/* Global styles */
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial; color: #0f172a; background: #ffffff; }
body.menu-open { overflow: hidden; }
img { max-width: 100%; height: auto; display: block; }

/* Layout helpers */
.container { max-width: 1100px; margin: 0 auto; padding: 0 1rem; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(135deg, #0f1a1a 0%, #2e293b 100%);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  min-height: 64px;
}

.site-header .brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: #fff;
  font-size: 1.25rem;
}

.brand-name {
  font-weight: 800;
  letter-spacing: -0.5px;
}

.brand-accent {
  background: linear-gradient(135deg, #f7931a 0%, #ffab40 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Mobile menu toggle */
.menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 110;
}

.menu-icon,
.menu-icon::before,
.menu-icon::after {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.menu-icon {
  position: relative;
}

.menu-icon::before,
.menu-icon::after {
  content: '';
  position: absolute;
  left: 0;
}

.menu-icon::before { top: -7px; }
.menu-icon::after { top: 7px; }

/* Menu open state */
.menu-toggle.is-active .menu-icon {
  background: transparent;
}

.menu-toggle.is-active .menu-icon::before {
  top: 0;
  transform: rotate(45deg);
}

.menu-toggle.is-active .menu-icon::after {
  top: 0;
  transform: rotate(-45deg);
}

/* Navigation */
.nav {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 320px;
  height: 100vh;
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
  padding: 80px 1.5rem 2rem;
  transform: translateX(100%);
  transition: transform 0.3s ease, opacity 0.3s ease;
  opacity: 0;
  display: flex;
  flex-direction: column;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.3);
}

.nav.is-open {
  transform: translateX(0);
  opacity: 1;
}

/* Overlay when menu is open */
body.menu-open::before {
  content: '';
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 90;
}

.nav-links {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.nav-link {
  color: #cbd5e1;
  text-decoration: none;
  padding: 0.875rem 1rem;
  font-size: 1rem;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

/* Dropdown */
.nav-dropdown {
  position: relative;
}

.dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  width: 100%;
  text-align: left;
}

.dropdown-arrow {
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.nav-dropdown.is-open .dropdown-arrow {
  transform: rotate(180deg);
}

.dropdown-menu {
  display: none;
  flex-direction: column;
  padding: 0.25rem 0 0.25rem 1rem;
  margin-top: 0.25rem;
}

.nav-dropdown.is-open .dropdown-menu {
  display: flex;
}

.dropdown-item {
  color: #94a3b8;
  text-decoration: none;
  padding: 0.625rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.dropdown-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.nav-actions {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.user-cacatais {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  background: rgba(247, 147, 26, 0.15);
  border: 1px solid rgba(247, 147, 26, 0.3);
  border-radius: 8px;
}

.cacatais-amount {
  color: #f7931a;
  font-weight: 600;
  font-size: 0.9rem;
  text-shadow: 0 0 10px rgba(247, 147, 26, 0.3);
}

.btn-login {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.25rem;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.btn-login:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
}

.btn-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.25rem;
  background: linear-gradient(135deg, #f7931a 0%, #ffab40 100%);
  color: #0f172a;
  text-decoration: none;
  font-weight: 700;
  border-radius: 8px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 15px rgba(247, 147, 26, 0.3);
}

.btn-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(247, 147, 26, 0.4);
}

/* Desktop styles */
@media (min-width: 768px) {
  .menu-toggle {
    display: none;
  }

  .nav {
    position: static;
    width: auto;
    max-width: none;
    height: auto;
    background: transparent;
    padding: 0;
    transform: none;
    opacity: 1;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    box-shadow: none;
  }

  .nav-links {
    flex-direction: row;
    gap: 0;
  }

  .nav-link {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    color: #e2e8f0;
  }

  .nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
  }

  .dropdown-toggle {
    width: auto;
  }

  .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 160px;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  }

  .dropdown-item {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
  }

  .nav-actions {
    flex-direction: row;
    margin-top: 0;
    padding-top: 0;
    border-top: none;
    margin-left: 0.5rem;
    align-items: center;
    gap: 1rem;
  }

  .user-cacatais {
    padding: 0.375rem 0.75rem;
    background: rgba(247, 147, 26, 0.15);
    border: 1px solid rgba(247, 147, 26, 0.3);
    border-radius: 6px;
  }

  .cacatais-amount {
    font-size: 0.8rem;
  }

  .btn-login {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }

  .btn-cta {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }
}

@media (min-width: 1024px) {
  .header-container {
    padding: 0 2rem;
  }

  .nav-link {
    padding: 0.5rem 1rem;
  }
}

/* Footer */
.site-footer { 
  border-top: 1px solid #e5e7eb; 
  margin-top: 3rem; 
  background: linear-gradient(135deg, #0f1a1a 0%, #2e293b 100%);
}

.site-footer .container { 
  padding: 2rem 1rem; 
  color: #94a3b8; 
  font-size: .95rem; 
  text-align: center;
}

.footer-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.footer-social a {
  color: #94a3b8;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-social a:hover {
  color: #fff;
  transform: translateY(-2px);
}

.footer-social svg {
  width: 1.5rem;
  height: 1.5rem;
}

@media (max-width: 640px) {
  .site-footer .container {
    padding: 1.5rem 1rem;
  }

  .footer-social {
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
  }

  .footer-social svg {
    width: 1.25rem;
    height: 1.25rem;
  }

  .footer-social a {
    font-size: 0.875rem;
  }

  .site-footer p {
    font-size: 0.875rem;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.site-footer p {
  margin: 0;
  color: #64748b;
}

/* Hero - overridden by home.css */
.hero { display: grid; place-items: center; min-height: calc(100vh - 120px); padding: 3rem 1rem; }
.hero-inner { text-align: center; max-width: 780px; }
.kicker { display: inline-block; font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; color: #7c3aed; background: #ede9fe; padding: .35rem .6rem; border-radius: 999px; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.25rem); line-height: 1.1; margin: 1rem 0 .75rem; }
.hero p { font-size: clamp(1.05rem, 2.4vw, 1.25rem); margin: 0 auto 1.5rem; }
.cta-row { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; margin-top: 1rem; }
.button { appearance: none; border: none; border-radius: 12px; padding: .85rem 1.1rem; font-weight: 600; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: .5rem; }
.button.primary { background: #0ea5e9; color: white; box-shadow: 0 10px 18px rgba(14,165,233,.25); }
.button.primary:hover { background: #0284c7; }
.button.neutral { background: #e2e8f0; color: #0f172a; }
.button.neutral:hover { background: #cbd5e1; }

/* Feature grid */
.features { padding: 3rem 1rem; }
.grid { display: grid; grid-template-columns: repeat(1, minmax(0, 1fr)); gap: 1rem; }
.card { background: white; border: 1px solid #e5e7eb; border-radius: 14px; padding: 1.1rem; box-shadow: 0 1px 0 #e5e7eb; }
.card h3 { margin: .25rem 0 .35rem; font-size: 1.1rem; }
.card p { margin: 0; color: #475569; }

@media (min-width: 640px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Auth pages */
.auth-page {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: rgba(30, 41, 59, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  padding: 2.5rem 2rem;
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-header .brand-name {
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
}

.auth-header .brand-accent {
  background: linear-gradient(135deg, #f7931a 0%, #ffab40 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  margin: 1rem 0 0.5rem;
}

.auth-header p {
  color: #94a3b8;
  font-size: 0.95rem;
  margin: 0;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #cbd5e1;
}

.form-group input {
  width: 100%;
  padding: 0.875rem 1rem;
  font-size: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.6);
  color: #fff;
  transition: all 0.2s ease;
}

.form-group input:focus {
  outline: none;
  border-color: #f7931a;
  background: rgba(15, 23, 42, 0.8);
  box-shadow: 0 0 0 3px rgba(247, 147, 26, 0.2);
}

.form-group input::placeholder {
  color: #64748b;
}

.auth-submit {
  width: 100%;
  padding: 0.875rem 1.5rem;
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  background: linear-gradient(135deg, #f7931a 0%, #ffab40 100%);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 20px rgba(247, 147, 26, 0.4);
  margin-top: 0.5rem;
}

.auth-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(247, 147, 26, 0.5);
}

.auth-submit:active {
  transform: translateY(0);
}

.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-footer p {
  color: #94a3b8;
  font-size: 0.9rem;
  margin: 0;
}

.auth-footer a {
  color: #f7931a;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
}

.auth-footer a:hover {
  color: #ffab40;
  text-decoration: underline;
}

.auth-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1rem;
}

.auth-links a {
  color: #94a3b8;
  font-size: 0.875rem;
  text-decoration: none;
  transition: color 0.2s ease;
}

.auth-links a:hover {
  color: #f7931a;
}

.auth-social {
  margin-bottom: 1.5rem;
}

.google-signin-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.875rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: #1f2937;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.google-signin-btn:hover {
  background: #f9fafb;
  border-color: #d1d5db;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.google-signin-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.google-signin-btn svg {
  flex-shrink: 0;
}

.auth-error {
  margin-top: 0.75rem;
  padding: 0.75rem;
  font-size: 0.875rem;
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
  border-radius: 8px;
  text-align: center;
}

.auth-divider {
  display: flex;
  align-items: center;
  margin: 1.5rem 0;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(148, 163, 184, 0.3);
}

.auth-divider span {
  padding: 0 1rem;
  color: #94a3b8;
  font-size: 0.875rem;
}

/* Flash messages container */
.flash-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 1000;
  max-width: 400px;
}

.flash {
  padding: 0.875rem 1rem;
  border-radius: 10px;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  animation: slideIn 0.3s ease-out;
}

.flash-alert {
  background: rgba(220, 38, 38, 0.95);
  color: #fca5a5;
  border: 1px solid rgba(220, 38, 38, 0.3);
}

.flash-notice {
  background: rgba(22, 163, 74, 0.95);
  color: #86efac;
  border: 1px solid rgba(22, 163, 74, 0.3);
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@media (max-width: 768px) {
  .flash-container {
    top: 70px;
    left: 20px;
    right: 20px;
    max-width: none;
  }
}

/* Flash messages */
.flash {
  padding: 0.875rem 1rem;
  border-radius: 10px;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.flash-alert {
  background: rgba(220, 38, 38, 0.15);
  color: #fca5a5;
  border: 1px solid rgba(220, 38, 38, 0.3);
}

.flash-notice {
  background: rgba(22, 163, 74, 0.15);
  color: #86efac;
  border: 1px solid rgba(22, 163, 74, 0.3);
}

/* Field errors */
.field-errors {
  background: rgba(220, 38, 38, 0.15);
  border: 1px solid rgba(220, 38, 38, 0.3);
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.field-errors h3 {
  color: #fca5a5;
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
}

.field-errors ul {
  margin: 0;
  padding-left: 1.25rem;
  color: #fca5a5;
  font-size: 0.875rem;
}

.field-errors li {
  margin: 0.25rem 0;
}

/* FAQ Page Styles */
.faq-page {
  min-height: calc(100vh - 64px);
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
  padding: 3rem 1rem;
}

.faq-container {
  max-width: 900px;
  margin: 0 auto;
}

.faq-header {
  text-align: center;
  margin-bottom: 3rem;
}

.faq-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  animation: fadeInDown 0.6s ease-out;
}

.faq-title {
  font-size: clamp(2rem, 5vw, 2.5rem);
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 1rem;
  letter-spacing: -0.5px;
  animation: fadeInUp 0.6s ease-out 0.1s both;
}

.faq-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.125rem);
  color: #94a3b8;
  margin: 0;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
  animation: fadeInUp 0.6s ease-out 0.2s both;
}

.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  background: rgba(15, 23, 42, 0.6);
  border: 2px solid rgba(59, 130, 246, 0.3);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  animation: fadeInUp 0.5s ease-out both;
}

.faq-item:nth-child(1) { animation-delay: 0.1s; }
.faq-item:nth-child(2) { animation-delay: 0.2s; }
.faq-item:nth-child(3) { animation-delay: 0.3s; }
.faq-item:nth-child(4) { animation-delay: 0.4s; }
.faq-item:nth-child(5) { animation-delay: 0.5s; }

.faq-item:hover {
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.15);
}

.faq-item.is-open {
  border-color: rgba(59, 130, 246, 0.6);
  background: rgba(15, 23, 42, 0.8);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.faq-question:hover {
  background: rgba(255, 255, 255, 0.03);
}

.faq-question span {
  flex: 1;
  line-height: 1.5;
}

.faq-arrow {
  flex-shrink: 0;
  color: #3b82f6;
  transition: transform 0.3s ease;
}

.faq-item.is-open .faq-arrow {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.faq-item.is-open .faq-answer {
  max-height: 500px; /* Large enough to accommodate content */
}

.faq-answer-inner {
  padding: 0 1.5rem 1.5rem;
}

.faq-answer .video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 8px;
  background: #000;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.faq-answer .video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 8px;
}

.faq-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: #94a3b8;
  font-size: 1.125rem;
}

@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);
  }
}

@media (min-width: 768px) {
  .faq-page {
    padding: 4rem 2rem;
  }

  .faq-header {
    margin-bottom: 4rem;
  }

  .faq-question {
    padding: 1.5rem 2rem;
    font-size: 1.125rem;
  }

  .faq-answer-inner {
    padding: 0 2rem 2rem;
  }
}

/* User Level Badge */
.user-level-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.5rem;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  border-radius: 4px;
  white-space: nowrap;
}

.user-level-badge.level-0 {
  background: rgba(100, 116, 139, 0.2);
  color: #94a3b8;
  border: 1px solid rgba(100, 116, 139, 0.3);
}

.user-level-badge.level-1 {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.user-level-badge.level-2 {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.user-level-badge.level-3 {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.user-level-badge.level-4 {
  background: rgba(247, 147, 26, 0.15);
  color: #f7931a;
  border: 1px solid rgba(247, 147, 26, 0.3);
}

.user-level-badge.level-5 {
  background: linear-gradient(135deg, rgba(247, 147, 26, 0.25) 0%, rgba(234, 179, 8, 0.25) 100%);
  color: #fbbf24;
  border: 1px solid rgba(234, 179, 8, 0.5);
  box-shadow: 0 0 8px rgba(234, 179, 8, 0.3);
}
