:root {
  --color-base-100: #f8fafc;
  --color-base-200: #f1f5f9;
  --color-base-content: #0f172a;
  --color-primary: #1a2a4a;
  --color-primary-light: #1e3a5f;
  --color-primary-content: #ffffff;
  --color-secondary: #00897B;
  --color-secondary-content: #ffffff;
  --color-accent: #00BFA5;

  /* NEW - Gaming additions */
  --teal-primary:    #00897B;
  --teal-light:      #4DB6AC;
  --teal-glow:       #00BFA5;
  --navy-dark:       #1a2a4a;
  --navy-mid:        #1e3a5f;
  --glow-teal:       0 0 20px rgba(0, 191, 165, 0.6);
  --glow-teal-lg:    0 0 40px rgba(0, 191, 165, 0.4), 0 0 80px rgba(0,191,165,0.2);
  --glow-gold:       0 0 20px rgba(255, 193, 7, 0.5);
  --particle-color:  rgba(0, 191, 165, 0.3);
  --card-bg: rgba(255,255,255,0.8);
  --glass-border:    rgba(0, 191, 165, 0.2);

  /* Gradients */
  --hero-gradient: linear-gradient(135deg, #f8fafc 0%, #e0f2fe 100%);
  --card-gradient: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  --btn-gradient:    linear-gradient(135deg, #00897B, #00BFA5);
}

html {
  scroll-behavior: smooth;
}

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

body {
  font-family: 'Inter', sans-serif;
  background: var(--hero-gradient);
  position: relative;
  overflow-x: hidden;
  color: #334155;
  line-height: 1.6;
}

.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  font-feature-settings: 'liga';
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 5%;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  transition: all 0.3s ease;
}
.navbar-brand:hover { text-shadow: var(--glow-teal); }
.nav-link::after {
  content: ''; position: absolute; bottom: -2px; left: 0;
  width: 0; height: 2px; background: var(--teal-glow);
  transition: width 0.3s ease;
}
.nav-link:hover::after { width: 100%; }

.logo-container {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo {
  height: 50px;
  width: auto;
  object-fit: contain;
}

.brand-name {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--color-primary);
  letter-spacing: -0.5px;
}

nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

nav a {
  text-decoration: none;
  color: var(--color-base-content);
  font-weight: 600;
  transition: color 0.3s ease;
}

nav a:hover:not(.btn) {
  color: var(--color-primary);
}

.btn {
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: none;
  font-size: 1rem;
}

.btn-primary {
  background-color: var(--color-primary);
  color: var(--color-primary-content);
  box-shadow: 0 4px 14px 0 rgba(26,58,107,0.39);
}

.btn-primary:hover {
  background-color: var(--color-primary-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(26,58,107,0.23);
  color: #ffffff;
}

.btn-secondary {
  background-color: var(--color-secondary);
  color: var(--color-secondary-content);
  box-shadow: 0 4px 14px 0 rgba(13,148,136,0.39);
}

.btn-secondary:hover {
  background-color: #0f766e;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(13,148,136,0.23);
  color: #ffffff;
}

.btn-ghost {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
  padding: 0.65rem 1.4rem;
}

.btn-ghost:hover {
  background: rgba(26,58,107,0.05);
}

.btn-large {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

/* Glassmorphism Classes */
.glass-card {
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 1rem;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.05);
}

/* Hero Section */
.hero {
  padding: 12rem 5% 6rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  min-height: 100vh;
  align-items: center;
  background: linear-gradient(135deg, #e0f2fe 0%, #f1f5f9 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 60%;
    height: 80%;
    background: radial-gradient(circle, rgba(13,148,136,0.15) 0%, rgba(255,255,255,0) 70%);
    z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.badge {
  background: rgba(13, 148, 136, 0.1);
  color: var(--color-secondary);
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  font-weight: 700;
  font-size: 0.875rem;
  display: inline-block;
  margin-bottom: 1.5rem; 
  border: 1px solid rgba(13, 148, 136, 0.2);
}

.hero h1 {
  font-size: 4rem;
  line-height: 1.1;
  color: var(--color-primary);
  margin-bottom: 1.5rem;
  font-weight: 800;
  letter-spacing: -1.5px;
}

.hero p {
  font-size: 1.25rem;
  color: #334155;
  margin-bottom: 3rem;
  max-width: 90%;
}

.hero-ctas {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 4rem;
}

.stats-bar {
  display: inline-flex;
  gap: 3rem;
  padding: 1.5rem 2.5rem;
}

.stat h3 {
  font-size: 2.5rem;
  color: var(--color-primary);
  font-weight: 800;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.stat p {
  margin: 0;
  font-size: 0.875rem;
  color: #334155;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hero-image-container {
  position: relative;
  z-index: 1;
  perspective: 1000px;
}

.hero-image {
  width: 100%;
  border-radius: 1rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  animation: float 6s ease-in-out infinite;
  transform: rotateY(-10deg) rotateX(5deg);
}

@keyframes float {
  0% { transform: translateY(0px) rotateY(-10deg) rotateX(5deg); }
  50% { transform: translateY(-20px) rotateY(-5deg) rotateX(2deg); }
  100% { transform: translateY(0px) rotateY(-10deg) rotateX(5deg); }
}

.stat-overlay {
  position: absolute;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  color: var(--color-primary);
  animation: float-delayed 7s ease-in-out infinite;
  z-index: 2;
}

.overlay-1 {
  top: 10%;
  left: -10%;
}

.overlay-2 {
  bottom: 15%;
  right: -5%;
  animation-delay: 2s;
}

.stat-overlay .material-symbols-outlined {
    color: var(--color-secondary);
    font-size: 1.5rem;
}

@keyframes float-delayed {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-15px); }
  100% { transform: translateY(0px); }
}

/* Features */
.features {
  padding: 8rem 5%;
  background-color: #f8fafc;
}

.section-title {
  text-align: center;
  font-size: 3rem;
  color: var(--color-primary);
  margin-bottom: 4rem;
  font-weight: 800;
  letter-spacing: -1px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
}

.feature-card {
  padding: 3rem 2.5rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 1.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.feature-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  background: white;
  border-color: rgba(13,148,136,0.2);
}

.feature-icon {
  font-size: 3rem;
  color: var(--color-secondary);
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.1) 0%, rgba(13, 148, 136, 0.05) 100%);
  padding: 1rem;
  border-radius: 1rem;
  display: inline-flex;
}

.feature-card h3 {
  font-size: 1.5rem;
  color: var(--color-primary);
  margin-bottom: 1rem;
  font-weight: 700;
}

.feature-card p {
  color: #1e293b;
  font-size: 1.1rem;
}

/* Paper Library */
.paper-library-preview {
  padding: 8rem 5%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  align-items: center;
  background: linear-gradient(135deg, #f8fafc 0%, #e0f2fe 100%);
}

.pl-content h2 {
    font-size: 3rem;
    color: var(--color-primary);
    margin-bottom: 1.5rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.pl-content p {
    font-size: 1.25rem;
    color: #334155;
    margin-bottom: 2.5rem;
}

.collage {
    position: relative;
    height: 500px;
}

.pl-img {
    width: 80%;
    height: 400px;
    object-fit: cover;
    border-radius: 1.5rem;
    transform: rotate(-5deg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border: 8px solid white;
}

.pl-img:hover {
    transform: rotate(0deg) scale(1.05);
    z-index: 10;
}

.pl-highlight {
    position: absolute;
    bottom: 5%;
    right: 5%;
    padding: 1.5rem 2rem;
    background: rgba(255,255,255,0.95);
    border-left: 5px solid var(--color-accent);
    z-index: 5;
}

.pl-highlight h4 {
    color: var(--color-primary);
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
}

.pl-highlight p {
    color: var(--color-accent);
    font-weight: 600;
}

/* CTA Section */
.cta-section {
  padding: 8rem 5%;
  text-align: center;
  background: linear-gradient(135deg, var(--color-primary) 0%, #0f172a 100%);
  color: #ffffff;
}

.cta-section h2 {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  font-weight: 800;
  letter-spacing: -1px;
}

.cta-section p {
  font-size: 1.35rem;
  opacity: 0.9;
  margin-bottom: 3.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.cta-form {
  display: flex;
  gap: 1rem;
  justify-content: center;
  max-width: 550px;
  margin: 0 auto;
}

.cta-form input {
  padding: 1.25rem 1.5rem;
  border-radius: 0.75rem;
  border: none;
  font-size: 1.1rem;
  flex: 1;
  outline: none;
  transition: all 0.3s;
}

.cta-form input:focus {
    box-shadow: 0 0 0 4px rgba(13,148,136,0.5);
}

.cta-form button {
  font-size: 1.1rem;
  padding: 1.25rem 2rem;
}

/* Footer */
footer {
  background-color: #020617;
  color: #94a3b8;
  padding: 5rem 5% 2rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 4rem;
  padding-bottom: 4rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 300px;
}

.footer-logo {
    height: 50px;
    filter: brightness(0) invert(1);
    width: fit-content;
}

.footer-brand span {
  font-size: 1.75rem;
  font-weight: 800;
  color: #e2e8f0;
}

.footer-links {
  display: flex;
  gap: 3rem;
}

.footer-links a {
  color: #94a3b8;
  text-decoration: none;
  transition: color 0.3s;
  font-weight: 500;
  font-size: 1.1rem;
}

.footer-links a:hover {
  color: #e2e8f0;
}

.copyright {
  text-align: center;
  font-size: 1rem;
}

/* ============================================
   HAMBURGER MENU
   ============================================ */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 0.5rem;
  transition: background 0.2s;
  z-index: 1100;
}

.hamburger:hover {
  background: rgba(26,58,107,0.08);
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-primary);
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}

/* Animate to X when active */
.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Slide-Down Nav */
.mobile-menu {
  display: none;
  position: fixed;
  top: 70px; /* below the header */
  left: 0;
  width: 100%;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(0,0,0,0.08);
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  z-index: 999;
  padding: 1rem 1.5rem 1.5rem;
  box-shadow: 0 8px 30px rgba(0,0,0,0.1);
  transform: translateY(-10px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.mobile-menu.open {
  display: flex;
  transform: translateY(0);
  opacity: 1;
}

.mobile-menu a {
  display: block;
  padding: 0.65rem 1rem;
  color: var(--color-base-content);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  transition: color 0.2s;
}

.mobile-menu a:last-child {
  border-bottom: none;
}

.mobile-menu a:hover {
  color: var(--color-primary);
}

.mobile-menu .btn {
  padding: 0.7rem 1rem;
  font-size: 0.9rem;
  justify-content: center;
  text-align: center;
  border-bottom: none;
  flex: 1;
}

.mobile-menu-btns {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem 0 0.25rem;
  margin-top: 0.25rem;
  border-top: 1px solid rgba(0,0,0,0.07);
}

/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================ */

/* Large tablets / small desktops */
@media (max-width: 1200px) {
  .hero h1 { font-size: 3.5rem; }
  .section-title { font-size: 2.5rem; }
}

/* Tablets */
@media (max-width: 1024px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding-top: 10rem;
    gap: 3rem;
  }

  .hero-content { margin: 0 auto; }

  .hero h1 { font-size: 3rem; }

  .hero p { margin: 0 auto 2.5rem; max-width: 600px; }

  .stats-bar { justify-content: center; }

  .hero-image {
    transform: rotateY(0) rotateX(0);
    animation: float-simple 6s ease-in-out infinite;
    max-width: 560px;
    margin: 0 auto;
  }

  @keyframes float-simple {
    0%   { transform: translateY(0px); }
    50%  { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
  }

  .overlay-1 { left: 0; }
  .overlay-2 { right: 0; }

  .paper-library-preview {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 3rem;
    padding: 5rem 5%;
  }

  .pl-content p { margin-left: auto; margin-right: auto; }

  .collage { margin-top: 2rem; height: auto; }

  .pl-img {
    margin: 0 auto;
    display: block;
    transform: none;
    width: 100%;
    max-width: 500px;
    height: auto;
  }

  .pl-img:hover { transform: scale(1.02); }

  .pl-highlight {
    position: relative;
    bottom: auto;
    right: auto;
    margin-top: 1.5rem;
    display: inline-block;
  }

  .features { padding: 5rem 5%; }

  .features-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
  }
}

/* Mobile — show hamburger, hide desktop nav */
@media (max-width: 768px) {
  /* Navbar */
  nav#main-nav { display: none; }
  .hamburger { display: flex; }

  header { padding: 1rem 4%; }

  .brand-name { font-size: 1.4rem; }
  .logo { height: 38px; }

  /* Hero */
  .hero {
    padding: 8rem 5% 4rem;
    gap: 2.5rem;
    min-height: auto;
  }

  .hero h1 { font-size: 2.25rem; letter-spacing: -1px; }

  .hero p { font-size: 1.1rem; margin-bottom: 2rem; }

  .stats-bar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    padding: 1rem 1.25rem;
    width: 100%;
  }

  .stat h3 { font-size: 1.75rem; }
  .stat p { font-size: 0.75rem; }

  /* Stat overlays — hide on small screens to avoid clutter */
  .stat-overlay { display: none; }

  /* Features */
  .features { padding: 4rem 5%; }
  .section-title { font-size: 2rem; margin-bottom: 2.5rem; }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .feature-card { padding: 2rem 1.5rem; }

  /* Paper Library */
  .paper-library-preview {
    padding: 4rem 5%;
    gap: 2rem;
  }

  .pl-content h2 { font-size: 2rem; }
  .pl-content p { font-size: 1rem; }

  /* CTA */
  .cta-section { padding: 5rem 5%; }
  .cta-section h2 { font-size: 2.25rem; }
  .cta-section p { font-size: 1.1rem; }
  .cta-form { flex-direction: column; gap: 0.75rem; }
  .cta-form input, .cta-form button { width: 100%; }

  /* Footer */
  footer { padding: 3rem 5% 1.5rem; }
  .footer-content {
    flex-direction: column;
    gap: 2rem;
    text-align: center;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
  }
  .footer-brand { align-items: center; }
  .footer-links { flex-wrap: wrap; justify-content: center; gap: 1.5rem; }

  /* Auth modal */
  .modal-content { padding: 1.75rem 1.25rem; }
}

/* Extra small phones */
@media (max-width: 480px) {
  .hero h1 { font-size: 1.9rem; }
  .hero p { font-size: 1rem; }

  .stats-bar {
    grid-template-columns: 1fr;
    gap: 0.75rem;
    padding: 1rem;
  }

  .stat { display: flex; align-items: center; gap: 1rem; }
  .stat h3 { font-size: 1.5rem; margin: 0; }
  .stat p { margin: 0; font-size: 0.8rem; }

  .feature-card { padding: 1.5rem 1.25rem; }
}

/* Global Animations */
@keyframes lexi-float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-12px); }
}
@keyframes lexi-blink {
  0%, 90%, 100% { transform: scaleY(1); }
  95%           { transform: scaleY(0.1); }
}
@keyframes lexi-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 8px #00BFA5; }
  50%       { opacity: 0.5; box-shadow: 0 0 20px #00BFA5; }
}
@keyframes lexi-wave {
  0%, 100% { transform: rotate(0deg); }
  25%       { transform: rotate(-30deg); }
  75%       { transform: rotate(20deg); }
}
@keyframes lexi-jump {
  0%, 100% { transform: translateY(0) scale(1); }
  40%       { transform: translateY(-30px) scale(1.1); }
  60%       { transform: translateY(-25px) scale(1.05); }
}
@keyframes lexi-celebrate {
  0%   { transform: rotate(0deg) scale(1); }
  25%  { transform: rotate(-10deg) scale(1.15); }
  50%  { transform: rotate(10deg) scale(1.2); }
  75%  { transform: rotate(-5deg) scale(1.1); }
  100% { transform: rotate(0deg) scale(1); }
}

.lexi-mascot          { animation: lexi-float 3s ease-in-out infinite; }
.lexi-eye-left,
.lexi-eye-right       { animation: lexi-blink 4s ease-in-out infinite; transform-origin: center; }
.lexi-chest-pulse     { animation: lexi-pulse 2s ease-in-out infinite; }
.lexi-arm-right       { transform-origin: left center; }

.lexi-mascot.happy    { animation: lexi-jump 0.6s ease 3; }
.lexi-mascot.celebrate { animation: lexi-celebrate 0.5s ease 5; }
.lexi-mascot.waving .lexi-arm-right { animation: lexi-wave 0.5s ease 3; }

.reveal { opacity: 0; transform: translateY(30px); transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1); }
.reveal.visible { opacity: 1; transform: translateY(0); }

.page-exit { animation: page-out 0.3s ease forwards; }
@keyframes page-out {
  to { opacity: 0; transform: translateX(-30px); }
}

.btn-ripple { position: relative; overflow: hidden; }
.btn-ripple .ripple-effect {
  position: absolute; border-radius: 50%;
  background: rgba(255,255,255,0.25);
  transform: scale(0); animation: ripple-grow 0.6s ease;
  pointer-events: none;
}
@keyframes ripple-grow {
  to { transform: scale(4); opacity: 0; }
}

.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(0,191,165,0.08) 50%, rgba(255,255,255,0.05) 75%);
  background-size: 200% 100%;
  animation: skeleton-wave 1.5s infinite;
  border-radius: 8px;
}
@keyframes skeleton-wave { to { background-position: -200% 0; } }

.toast-success {
  background: linear-gradient(135deg, #ecfdf5, #f0fdf4);
  border: 1px solid #00BFA5;
  box-shadow: 0 4px 20px rgba(0,191,165,0.2);
  color: #065f46;
  border-radius: 14px;
  animation: toast-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes toast-in {
  from { transform: translateX(100%) scale(0.8); opacity: 0; }
  to   { transform: translateX(0) scale(1);   opacity: 1; }
}
