:root {
  --primary: #117d80;
  --primary-hover: #0e6669;
  --bg-dark: #0a0a0a;
  --bg-accent: #111111;
  --text-main: #ffffff;
  --text-muted: #888888;
  --glass: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.08);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Outfit", sans-serif;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* Background Image with Overlay */
.hero-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("../img/hero-bg.png") center/cover no-repeat;
  z-index: -2;
}

.hero-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    circle at center,
    rgba(10, 10, 10, 0.4) 0%,
    rgba(10, 10, 10, 0.95) 100%
  );
  z-index: -1;
}

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

header {
  padding: 3rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  opacity: 0;
  animation: fadeInDown 1s forwards;
}

.logo {
  display: flex;
  align-items: center;
  transition: var(--transition);
  height: 60px; /* Control header logo height */
}

.logo img {
  height: 100%;
  width: auto;
  object-fit: contain;
}

.logo:hover {
  opacity: 0.8;
}

.badge {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  background: var(--primary);
  border: 1px solid var(--primary);
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1.5rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}

main {
  flex: 1;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 4rem;
  align-items: center;
  padding-bottom: 4rem;
}

/* Hero Content */
.hero-content {
  opacity: 0;
  animation: fadeInLeft 1s 0.3s forwards;
}

h1 {
  font-size: clamp(3rem, 8vw, 5rem);
  line-height: 1.1;
  font-weight: 800;
  margin-bottom: 1.5rem;
}

h1 span {
  color: var(--primary);
}

.description {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 500px;
  margin-bottom: 2rem;
  font-weight: 400;
}

/* Contact Card */
.contact-card {
  background: var(--glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 2.5rem;
  opacity: 0;
  animation: fadeInRight 1s 0.6s forwards;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.contact-card h2 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  font-weight: 700;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 1rem;
  color: var(--text-main);
  font-size: 1rem;
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 0 4px rgba(17, 125, 128, 0.1);
}

button {
  width: 100%;
  padding: 1rem;
  background: var(--primary);
  border: none;
  border-radius: 12px;
  color: #ffffff;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
}

button:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(17, 125, 128, 0.15);
}

footer {
  padding: 2rem 0;
  border-top: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  opacity: 0;
  animation: fadeInUp 1s 0.9s forwards;
}

/* Animations */
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideUpFade {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Layout Wrapper */
.app-wrapper {
  display: flex;
  width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
  transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.main-content {
  flex: 1;
  position: relative;
  min-width: 100%;
  transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.app-wrapper.chat-active .main-content {
  margin-left: -400px;
}

/* Chat Sidebar */
.chat-sidebar {
  width: 400px;
  height: 100vh;
  background: rgba(10, 10, 10, 0.98);
  backdrop-filter: blur(30px);
  border-left: 1px solid var(--glass-border);
  position: fixed;
  right: -400px;
  top: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.app-wrapper.chat-active .chat-sidebar {
  right: 0;
}

.chat-header {
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.chat-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.close-btn {
  cursor: pointer;
  opacity: 0.5;
  transition: 0.3s;
}

.close-btn:hover {
  opacity: 1;
  transform: rotate(90deg);
}

.chat-name-input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 0.6rem 1rem;
  color: white;
  font-size: 0.85rem;
  width: 100%;
  transition: 0.3s;
}

.chat-name-input:focus {
  border-color: var(--primary);
  outline: none;
  background: rgba(255, 255, 255, 0.08);
}

/* Messages Area */
.chat-messages {
  flex: 1;
  padding: 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  scrollbar-width: thin;
  scrollbar-color: var(--glass-border) transparent;
}

.startup-greeting {
  text-align: center;
  padding: 2rem 1rem;
  margin-top: 2rem;
}

.greeting-logo {
  width: 60px;
  height: 60px;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.5rem;
  border-radius: 20px;
  margin: 0 auto 1.5rem;
  box-shadow: 0 10px 30px rgba(0, 168, 168, 0.3);
}

.startup-greeting h4 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.startup-greeting p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.message {
  padding: 0.8rem 1.2rem;
  border-radius: 18px;
  max-width: 85%;
  font-size: 0.95rem;
  line-height: 1.5;
  position: relative;
}

.message.bot {
  background: rgba(255, 255, 255, 0.05);
  color: white;
  align-self: flex-start;
  border-bottom-left-radius: 2px;
}

.message.user {
  background: var(--primary);
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 2px;
}

.message-meta {
  font-size: 0.7rem;
  opacity: 0.5;
  margin-top: 0.3rem;
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.attachment-preview {
  max-width: 200px;
  border-radius: 8px;
  margin-top: 0.5rem;
  display: block;
}

/* Quoted Message */
.quoted-message {
  background: rgba(0, 0, 0, 0.2);
  border-left: 3px solid var(--primary);
  padding: 0.5rem 0.8rem;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.message.bot .quoted-message {
  background: rgba(255, 255, 255, 0.1);
}

.reply-trigger {
  background: transparent;
  border: none;
  color: inherit;
  opacity: 0.3;
  cursor: pointer;
  padding: 2px 5px;
  transition: 0.3s;
}

.message:hover .reply-trigger {
  opacity: 1;
}

/* Reply Preview Box */
.reply-preview-box {
  background: rgba(255, 255, 255, 0.05);
  border-left: 4px solid var(--primary);
  padding: 0.8rem 1rem;
  border-radius: 12px 12px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: -1px;
  border: 1px solid var(--glass-border);
  border-bottom: none;
}

.reply-content small {
  color: var(--primary);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.65rem;
  display: block;
  margin-bottom: 2px;
}

.reply-content p {
  font-size: 0.85rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 250px;
}

.cancel-reply {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 5px;
}

.cancel-reply:hover {
  color: white;
}

/* Input Area */
.chat-input-container {
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid var(--glass-border);
}

.input-wrapper {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 0.4rem 0.4rem 0.4rem 1rem;
  transition: 0.3s;
}

.input-wrapper:focus-within {
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.08);
}

.input-wrapper input[type="text"] {
  flex: 1;
  background: transparent;
  border: none;
  color: white;
  padding: 0.6rem 0;
  font-size: 0.9rem;
}

.input-wrapper input[type="text"]:focus {
  outline: none;
}

.icon-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.3s;
}

.icon-btn:hover {
  color: white;
  background: rgba(255, 255, 255, 0.1);
}

.send-btn {
  background: var(--primary);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.3s;
}

.send-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 5px 15px rgba(0, 168, 168, 0.4);
}

/* FAB */
.chat-fab {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 60px;
  height: 60px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 900;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.chat-fab:hover {
  transform: scale(1.1) rotate(5deg);
}

.app-wrapper.chat-active .chat-fab {
  opacity: 0;
  pointer-events: none;
  transform: scale(0);
}

@media (max-width: 768px) {
  .chat-sidebar {
    width: 100%;
    right: -100%;
  }
  .app-wrapper.chat-active .main-content {
    margin-left: -100%;
  }
}
