@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700;900&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --navy: #1b1e34;
  --navy-light: #252847;
  --navy-lighter: #2f3360;
  --red: #ff4b55;
  --red-hover: #e63e47;
  --orange: #ff7f30;
  --green: #00d084;
  --white: #ffffff;
  --gray-light: #f5f5f5;
  --gray: #b0b3c5;
  --gray-dark: #6b6e82;
  --text-primary: #ffffff;
  --text-secondary: #b0b3c5;
  --shadow: 0 4px 24px rgba(0,0,0,0.3);
  --shadow-hover: 0 8px 40px rgba(0,0,0,0.4);
  --radius: 12px;
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--navy);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: 'Playfair Display', serif;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

header {
  padding: 20px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(27, 30, 52, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--white);
}

.logo-icon {
  width: 44px;
  height: 44px;
  background: var(--red);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 900;
  font-family: 'Playfair Display', serif;
}

.logo-text {
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.logo-sub {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gray);
  display: block;
}

.nav-links {
  display: flex;
  gap: 8px;
}

.nav-link {
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--white);
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  background: none;
}

.nav-link:hover {
  background: var(--navy-light);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

#auth-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 8px;
  padding-left: 12px;
  border-left: 1px solid rgba(255,255,255,0.1);
}

.auth-btn {
  padding: 7px 16px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.auth-login {
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.2);
}

.auth-login:hover {
  background: var(--navy-light);
  border-color: var(--red);
}

.auth-avatar-wrapper {
  position: relative;
}

.auth-avatar-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.2);
  background: var(--navy-lighter);
  cursor: pointer;
  padding: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.auth-avatar-btn:hover {
  border-color: var(--red);
}

.auth-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.auth-avatar-initials {
  font-size: 14px;
  font-weight: 600;
  color: var(--white);
  font-family: 'Inter', sans-serif;
}

.auth-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--navy-light);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  min-width: 220px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s ease;
  z-index: 1000;
}

.auth-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.auth-dropdown-header {
  padding: 14px 16px;
}

.auth-dropdown-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--white);
}

.auth-dropdown-email {
  font-size: 12px;
  color: var(--gray);
  margin-top: 2px;
}

.auth-dropdown-divider {
  height: 1px;
  background: rgba(255,255,255,0.08);
}

.auth-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  color: var(--gray);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: var(--transition);
  border-radius: 0 0 10px 10px;
}

.auth-dropdown-item:hover {
  background: rgba(255,75,85,0.1);
  color: var(--red);
}

.auth-dropdown-item svg {
  flex-shrink: 0;
}

.nav-link.active {
  background: var(--red);
}

.hero {
  padding: 80px 0 60px;
  text-align: center;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255,75,85,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero h1 {
  font-size: 56px;
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 20px;
}

.hero h1 .accent {
  color: var(--red);
}

.hero p {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 40px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  font-family: 'Inter', sans-serif;
}

.btn-primary {
  background: var(--red);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--red-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255,75,85,0.3);
}

.btn-secondary {
  background: var(--navy-light);
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.1);
}

.btn-secondary:hover {
  background: var(--navy-lighter);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--red);
}

.btn-outline:hover {
  background: var(--red);
}

.section {
  padding: 60px 0;
}

.section-title {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 12px;
  text-align: center;
}

.section-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 40px;
}

#guide-section {
  background: linear-gradient(180deg, rgba(255,75,85,0.03) 0%, transparent 100%);
}

.guide-wizard {
  max-width: 720px;
  margin: 0 auto;
  background: var(--navy-light);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,0.05);
}

.wizard-step {
  display: none;
}

.wizard-step.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

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

.wizard-question {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
}

.wizard-desc {
  color: var(--text-secondary);
  margin-bottom: 24px;
  font-size: 15px;
}

.wizard-options {
  display: grid;
  gap: 12px;
}

.wizard-option {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--navy);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
  color: var(--white);
  font-size: 15px;
  font-family: 'Inter', sans-serif;
}

.wizard-option:hover {
  border-color: var(--red);
  background: rgba(255,75,85,0.06);
  transform: translateX(4px);
}

.wizard-option .option-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--navy-lighter);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 18px;
}

.wizard-option .option-text strong {
  display: block;
  margin-bottom: 2px;
}

.wizard-option .option-text span {
  color: var(--text-secondary);
  font-size: 13px;
}

.wizard-back {
  margin-top: 20px;
  padding: 10px 20px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--gray);
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: var(--transition);
  font-family: 'Inter', sans-serif;
}

.wizard-back:hover {
  border-color: var(--white);
  color: var(--white);
}

.freeform-search {
  max-width: 720px;
  margin: 32px auto 0;
}

.search-box {
  display: flex;
  gap: 12px;
  background: var(--navy-light);
  padding: 8px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
}

.search-box input {
  flex: 1;
  padding: 14px 20px;
  background: transparent;
  border: none;
  color: var(--white);
  font-size: 15px;
  font-family: 'Inter', sans-serif;
  outline: none;
}

.search-box input::placeholder {
  color: var(--gray-dark);
}

.search-box button {
  padding: 14px 24px;
  background: var(--red);
  color: var(--white);
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  white-space: nowrap;
}

.search-box button:hover {
  background: var(--red-hover);
}

.search-results {
  margin-top: 20px;
  display: none;
}

.search-results.visible {
  display: block;
  animation: fadeIn 0.3s ease;
}

.result-card {
  background: var(--navy-light);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 12px;
  border: 1px solid rgba(255,255,255,0.05);
  cursor: pointer;
  transition: var(--transition);
}

.result-card:hover {
  border-color: var(--red);
  transform: translateY(-2px);
}

.result-card .result-badge {
  display: inline-block;
  padding: 4px 10px;
  background: rgba(255,75,85,0.15);
  color: var(--red);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 8px;
}

.result-card h4 {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.result-card p {
  color: var(--text-secondary);
  font-size: 14px;
}

.forms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.form-card {
  background: var(--navy-light);
  border-radius: var(--radius);
  padding: 24px;
  border: 1px solid rgba(255,255,255,0.05);
  transition: var(--transition);
  cursor: pointer;
  text-decoration: none;
  color: var(--white);
  display: block;
}

.form-card:hover {
  border-color: var(--red);
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.form-card .card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--red), var(--orange));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  font-size: 22px;
}

.form-card h3 {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.form-card p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.form-card .card-arrow {
  margin-top: 16px;
  color: var(--red);
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: 0;
  transform: translateX(-8px);
  transition: var(--transition);
}

.form-card:hover .card-arrow {
  opacity: 1;
  transform: translateX(0);
}

.chatbot-toggle {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  background: var(--red);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(255,75,85,0.4);
  transition: var(--transition);
  z-index: 1000;
  border: none;
  color: var(--white);
  font-size: 24px;
}

.chatbot-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(255,75,85,0.5);
}

.chatbot-panel {
  position: fixed;
  bottom: 96px;
  right: 24px;
  width: 400px;
  max-height: 560px;
  background: var(--navy);
  border-radius: 16px;
  box-shadow: 0 12px 48px rgba(0,0,0,0.5);
  z-index: 1000;
  display: none;
  flex-direction: column;
  border: 1px solid rgba(255,255,255,0.08);
  overflow: hidden;
}

.chatbot-panel.open {
  display: flex;
  animation: slideUp 0.3s ease;
}

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

.chat-header {
  padding: 16px 20px;
  background: var(--navy-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.chat-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-avatar {
  width: 36px;
  height: 36px;
  background: var(--red);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
}

.chat-header-info h4 {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 600;
}

.chat-header-info span {
  font-size: 12px;
  color: var(--green);
}

.chat-close {
  background: none;
  border: none;
  color: var(--gray);
  cursor: pointer;
  font-size: 20px;
  padding: 4px;
  transition: var(--transition);
}

.chat-close:hover {
  color: var(--white);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 300px;
  max-height: 360px;
}

.chat-message {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
}

.chat-message.bot {
  background: var(--navy-light);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.chat-message.user {
  background: var(--red);
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.chat-message .suggested-form {
  margin-top: 10px;
  padding: 10px 14px;
  background: rgba(255,255,255,0.06);
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid rgba(255,255,255,0.1);
}

.chat-message .suggested-form:hover {
  border-color: var(--red);
}

.chat-message .suggested-form strong {
  display: block;
  font-size: 13px;
  margin-bottom: 2px;
}

.chat-message .suggested-form span {
  font-size: 12px;
  color: var(--text-secondary);
}

.chat-message .live-chat-btn {
  display: inline-block;
  margin-top: 10px;
  padding: 8px 16px;
  background: var(--green);
  color: var(--navy);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  border: none;
  cursor: pointer;
}

.chat-message .live-chat-btn:hover {
  opacity: 0.9;
}

.chat-message.agent {
  background: rgba(0, 208, 132, 0.15);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  border-left: 3px solid var(--green);
}

.chat-message.system {
  background: rgba(255, 255, 255, 0.04);
  align-self: center;
  text-align: center;
  font-size: 12px;
  color: var(--gray);
  padding: 8px 14px;
  max-width: 100%;
  border-radius: 8px;
}

.live-indicator {
  color: var(--green) !important;
  font-weight: 600 !important;
}

.end-chat-btn {
  margin-top: 8px;
}

.chat-input-area {
  padding: 12px 16px;
  border-top: 1px solid rgba(255,255,255,0.05);
  display: flex;
  gap: 8px;
}

.chat-input-area input {
  flex: 1;
  padding: 12px 16px;
  background: var(--navy-light);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  color: var(--white);
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: var(--transition);
}

.chat-input-area input:focus {
  border-color: var(--red);
}

.chat-input-area input::placeholder {
  color: var(--gray-dark);
}

.chat-input-area button {
  width: 42px;
  height: 42px;
  background: var(--red);
  border: none;
  border-radius: 8px;
  color: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
}

.chat-input-area button:hover {
  background: var(--red-hover);
}

.chat-typing {
  display: none;
  align-self: flex-start;
  padding: 12px 16px;
  background: var(--navy-light);
  border-radius: 12px;
  border-bottom-left-radius: 4px;
}

.chat-typing.visible {
  display: flex;
  gap: 4px;
}

.chat-typing span {
  width: 6px;
  height: 6px;
  background: var(--gray);
  border-radius: 50%;
  animation: bounce 1.4s infinite;
}

.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes bounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-6px); }
}

.recommendation-result {
  max-width: 720px;
  margin: 24px auto 0;
  padding: 24px;
  background: var(--navy-light);
  border-radius: var(--radius);
  border: 1px solid rgba(0,208,132,0.3);
  display: none;
}

.recommendation-result.visible {
  display: block;
  animation: fadeIn 0.3s ease;
}

.recommendation-result .rec-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  color: var(--green);
  font-weight: 600;
}

footer {
  padding: 40px 0;
  border-top: 1px solid rgba(255,255,255,0.05);
  text-align: center;
}

footer p {
  color: var(--gray-dark);
  font-size: 14px;
}

footer a {
  color: var(--red);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.2);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 36px;
  }

  .hero p {
    font-size: 16px;
  }

  .forms-grid {
    grid-template-columns: 1fr;
  }

  .chatbot-panel {
    width: calc(100% - 32px);
    right: 16px;
    bottom: 88px;
    max-height: 480px;
  }

  .guide-wizard {
    padding: 24px;
  }

  .nav-links {
    display: none;
  }

  .search-box {
    flex-direction: column;
  }

  .search-box button {
    width: 100%;
  }

  .install-banner-content {
    flex-direction: column;
    text-align: center;
  }

  .install-banner-actions {
    width: 100%;
    justify-content: center;
  }
}

.install-banner {
  background: linear-gradient(135deg, var(--red) 0%, var(--orange) 100%);
  padding: 12px 0;
  position: relative;
  z-index: 1001;
}

.install-banner-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.install-banner-text {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 0.95rem;
}

.install-banner-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.btn-install {
  background: var(--white);
  color: var(--navy);
  border: none;
  padding: 8px 20px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-install:hover {
  background: var(--navy);
  color: var(--white);
}

.btn-dismiss {
  background: transparent;
  color: var(--white);
  border: 1.5px solid rgba(255,255,255,0.5);
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
}

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

.ios-install-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.7);
  z-index: 10000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 20px;
}

.ios-install-modal-content {
  background: var(--navy-light);
  border-radius: 16px;
  padding: 28px 24px;
  max-width: 400px;
  width: 100%;
  position: relative;
  margin-bottom: 20px;
  border: 1px solid var(--navy-lighter);
}

.ios-install-modal-content h3 {
  font-size: 1.3rem;
  margin-bottom: 8px;
  color: var(--white);
}

.ios-install-modal-content p {
  color: var(--gray);
  margin-bottom: 16px;
  font-size: 0.95rem;
}

.ios-install-modal-content ol {
  list-style: none;
  counter-reset: step;
  padding: 0;
}

.ios-install-modal-content ol li {
  counter-increment: step;
  padding: 10px 0;
  padding-left: 36px;
  position: relative;
  color: var(--gray);
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.ios-install-modal-content ol li:last-child {
  border-bottom: none;
}

.ios-install-modal-content ol li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 10px;
  width: 24px;
  height: 24px;
  background: var(--red);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--white);
}

.ios-install-modal-content ol li strong {
  color: var(--white);
}

.ios-modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  color: var(--gray);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}

.ios-modal-close:hover {
  color: var(--white);
}
