/* ==========================================================================
   1. GLOBAL VARIABLES & RESET
   ========================================================================== */
:root {
  --bg-dark: #0a0c10;
  --bg-card: #12161f;
  --accent-red: #ff334b;
  --accent-gold: #d4af37;
  --text-white: #ffffff;
  --text-gray: #94a3b8;
  --border-dark: rgba(255, 255, 255, 0.08);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', 'Noto Sans Sinhala', sans-serif;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-white);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Prevent scroll when mobile menu is open */
body.menu-active {
  overflow: hidden;
}

/* ==========================================================================
   2. PRELOADER
   ========================================================================== */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--bg-dark);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.loader-container {
  position: relative;
  width: 120px;
  height: 120px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.glow-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 3px solid transparent;
  border-top-color: var(--accent-red);
  border-right-color: var(--accent-gold);
  animation: spin 1.2s linear infinite;
  box-shadow: 0 0 15px rgba(255, 51, 75, 0.3);
}

.md-logo {
  font-size: 2.2rem;
  font-weight: 900;
  animation: pulse 1.5s ease-in-out infinite;
}

.m-letter { color: var(--accent-red); }
.d-letter { color: var(--text-white); }

.loading-text {
  margin-top: 1.5rem;
  font-size: 0.75rem;
  letter-spacing: 4px;
  color: var(--text-gray);
  font-weight: 600;
}

@keyframes spin { 100% { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { transform: scale(1); opacity: 0.8; } 50% { transform: scale(1.08); opacity: 1; } }

#preloader.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* ==========================================================================
   3. NAVIGATION BAR
   ========================================================================== */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 6%;
  background: rgba(10, 12, 16, 0.85);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--border-dark);
}

.logo-badge {
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--accent-red);
  letter-spacing: 1px;
  text-decoration: none;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-white);
  font-size: 1.4rem;
  cursor: pointer;
  z-index: 1001;
  padding: 0.2rem 0.5rem;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-links a {
  color: var(--text-gray);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
  padding-bottom: 4px;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-white);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--accent-red);
  border-radius: 2px;
}

.btn-signup {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.2rem;
  border: 1px solid var(--border-dark);
  border-radius: 20px;
  color: var(--text-white);
  text-decoration: none;
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.03);
  transition: all 0.3s ease;
}

.btn-signup:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-signup i { color: var(--accent-red); }

/* ==========================================================================
   4. HERO / DASHBOARD SECTION
   ========================================================================== */
.hero-container {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 6%;
}

.ambient-glow {
  position: absolute;
  top: 10%;
  left: 25%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255, 51, 75, 0.15) 0%, rgba(10, 12, 16, 0) 70%);
  filter: blur(60px);
  z-index: 1;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1200px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-block {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-right: 2rem;
}

.brand-logo {
  font-size: 4rem;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.brand-text-red { color: var(--accent-red); }
.brand-text-white { color: var(--text-white); }

.instructor-name {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: 2px;
  margin-top: 0.5rem;
}

.subject-title {
  font-size: 0.85rem;
  letter-spacing: 3px;
  color: var(--text-gray);
  margin-bottom: 1.2rem;
  font-weight: 600;
}

.sinhala-tagline {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-white);
  margin-bottom: 0.5rem;
}

.brand-subtext {
  font-size: 0.95rem;
  color: var(--text-gray);
  margin-bottom: 0.8rem;
}

.badge-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.cta-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.6rem 1.4rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 30px;
  text-decoration: none;
  color: var(--text-white);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.cta-pill:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent-red);
  transform: translateY(-2px);
}

.telegram-icon {
  background: #0088cc;
  color: white;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}

.pill-text {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-red);
}

.pill-arrow {
  font-size: 0.75rem;
  color: var(--text-gray);
}

.image-block {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

.teacher-photo {
  max-width: 100%;
  height: auto;
  max-height: 580px;
  object-fit: contain;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 85%, rgba(0,0,0,0) 100%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 85%, rgba(0,0,0,0) 100%);
}

/* ==========================================================================
   5. SECTIONS & GRIDS
   ========================================================================== */
.section-container {
  padding: 4rem 6%;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  flex: 1;
}

.section-title {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-title h2 {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text-white);
  margin-bottom: 0.5rem;
}

.section-title p {
  color: var(--text-gray);
  font-size: 0.95rem;
}

.process-grid, .reviews-grid, .books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
}

.process-card, .review-card, .book-card {
  position: relative;
  background: var(--bg-card);
  padding: 2rem;
  border-radius: 12px;
  border: 1px solid var(--border-dark);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.process-card:hover, .review-card:hover, .book-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-red);
}

.step-num {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 1.2rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.1);
}

.process-icon {
  font-size: 2rem;
  color: var(--accent-red);
  margin-bottom: 1.2rem;
}

.stars { font-size: 0.9rem; margin-bottom: 1rem; }
.review-text { font-size: 0.9rem; color: var(--text-gray); font-style: italic; margin-bottom: 1.5rem; }
.student-info h4 { font-size: 0.95rem; }
.student-info span { font-size: 0.8rem; color: var(--accent-red); }

.book-card { text-align: center; display: flex; flex-direction: column; align-items: center; }
.book-cover {
  width: 70px;
  height: 90px;
  background: rgba(255, 51, 75, 0.1);
  border: 2px solid var(--accent-red);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--accent-red);
  margin-bottom: 1.5rem;
}

.btn-secondary-sm {
  padding: 0.5rem 1.2rem;
  border: 1px solid var(--border-dark);
  border-radius: 20px;
  color: var(--text-white);
  text-decoration: none;
  font-size: 0.8rem;
  transition: all 0.3s ease;
}

.btn-secondary-sm:hover {
  border-color: var(--accent-red);
  color: var(--accent-red);
}

.faq-accordion {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.faq-item {
  background: var(--bg-card);
  padding: 1.5rem 2rem;
  border-radius: 10px;
  border: 1px solid var(--border-dark);
}

.faq-item h3 { font-size: 1rem; margin-bottom: 0.5rem; display: flex; align-items: center; gap: 0.8rem; }
.faq-item h3 i { color: var(--accent-red); }
.faq-item p { font-size: 0.88rem; color: var(--text-gray); padding-left: 2rem; }

/* ==========================================================================
   6. FOOTER
   ========================================================================== */
.footer {
  text-align: center;
  padding: 2rem;
  border-top: 1px solid var(--border-dark);
  color: var(--text-gray);
  font-size: 0.85rem;
  margin-top: auto;
}

/* ==========================================================================
   7. MD AGENT WIDGET
   ========================================================================== */
#ai-agent-widget {
  position: fixed;
  bottom: 25px;
  right: 25px;
  z-index: 2000;
}

.agent-toggle {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 1.2rem;
  background: rgba(18, 22, 31, 0.9);
  border: 1px solid var(--accent-red);
  border-radius: 30px;
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 4px 25px rgba(255, 51, 75, 0.35);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.agent-toggle:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 30px rgba(255, 51, 75, 0.5);
}

.agent-avatar {
  position: relative;
  width: 32px;
  height: 32px;
  background: var(--accent-red);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.online-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 9px;
  height: 9px;
  background: #10b981;
  border: 2px solid #0a0c10;
  border-radius: 50%;
}

.agent-btn-text { font-weight: 600; font-size: 0.88rem; }

.agent-chat-box {
  position: absolute;
  bottom: 60px;
  right: 0;
  width: 350px;
  height: 480px;
  background: rgba(18, 22, 31, 0.95);
  border: 1px solid var(--border-dark);
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: all 0.3s ease;
  transform-origin: bottom right;
}

.agent-chat-box.chat-hidden {
  opacity: 0;
  visibility: hidden;
  transform: scale(0.8) translateY(20px);
  pointer-events: none;
}

.chat-header {
  padding: 1rem;
  background: rgba(10, 12, 16, 0.8);
  border-bottom: 1px solid var(--border-dark);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.agent-profile { display: flex; align-items: center; gap: 0.75rem; }
.agent-icon-badge {
  width: 36px;
  height: 36px;
  background: rgba(255, 51, 75, 0.15);
  border: 1px solid var(--accent-red);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-red);
}

.agent-info h3 { font-size: 0.95rem; font-weight: 700; display: flex; align-items: center; gap: 0.4rem; }
.badge-ai { font-size: 0.65rem; background: var(--accent-red); color: #fff; padding: 1px 5px; border-radius: 4px; }
.agent-info p { font-size: 0.72rem; color: var(--text-gray); }

.close-chat { background: none; border: none; color: var(--text-gray); font-size: 1.5rem; cursor: pointer; }
.close-chat:hover { color: var(--accent-red); }

.chat-body { flex: 1; padding: 1rem; overflow-y: auto; display: flex; flex-direction: column; gap: 0.8rem; }
.chat-msg { display: flex; max-width: 85%; }
.msg-content { padding: 0.65rem 0.9rem; border-radius: 12px; font-size: 0.85rem; line-height: 1.4; }
.bot-msg { align-self: flex-start; }
.bot-msg .msg-content { background: rgba(255, 255, 255, 0.06); border: 1px solid var(--border-dark); color: #e2e8f0; border-bottom-left-radius: 2px; }
.user-msg { align-self: flex-end; }
.user-msg .msg-content { background: var(--accent-red); color: #ffffff; border-bottom-right-radius: 2px; }

.quick-prompts { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.4rem; }
.chip-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-dark);
  color: var(--text-gray);
  padding: 0.35rem 0.7rem;
  border-radius: 15px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.chip-btn:hover { border-color: var(--accent-red); color: #ffffff; background: rgba(255, 51, 75, 0.1); }

.chat-footer { padding: 0.8rem; background: rgba(10, 12, 16, 0.8); border-top: 1px solid var(--border-dark); display: flex; gap: 0.5rem; }
.chat-footer input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-dark);
  border-radius: 20px;
  padding: 0.5rem 0.9rem;
  color: #fff;
  font-size: 0.82rem;
  outline: none;
}
.chat-footer input:focus { border-color: var(--accent-red); }
.send-btn {
  background: var(--accent-red);
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   8. MOBILE RESPONSIVENESS
   ========================================================================== */
@media (max-width: 900px) {
  .menu-toggle {
    display: block;
  }

  /* FULL-SCREEN GLASSMORPHISM MOBILE DRAWER */
  .nav-links {
    position: fixed;
    top: 65px;
    left: 0;
    width: 100vw;
    height: calc(100vh - 65px);
    background: rgba(10, 12, 16, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    padding: 2rem 0;
    border-bottom: none;
    
    display: flex;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    z-index: 999;
  }

  .nav-links.nav-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .nav-links a {
    font-size: 1.2rem;
    font-weight: 600;
  }

  /* Hero Section Mobile Layout */
  .hero-container { padding: 2rem 4% 3rem; }
  .hero-content { flex-direction: column; text-align: center; gap: 2rem; }
  .brand-block { padding-right: 0; }
  .brand-logo { font-size: 3.2rem; }
  .instructor-name { font-size: 1.4rem; }
  .sinhala-tagline { font-size: 1.3rem; }
  .teacher-photo { max-height: 340px; }

  /* Grid Layouts Mobile */
  .process-grid, .reviews-grid, .books-grid { grid-template-columns: 1fr; }

  /* Mobile MD Agent */
  #ai-agent-widget { bottom: 15px; right: 15px; }
  .agent-chat-box {
    position: fixed;
    bottom: 75px;
    left: 15px;
    right: 15px;
    width: auto;
    height: 70vh;
    max-height: 520px;
  }
}

/* ==========================================================================
   BRIGHTER RGB RUNNING BORDER & TALL BUTTONS
   ========================================================================== */
.btn-signup,
.cta-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 35px;
  background: var(--bg-dark);
  z-index: 1;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
  padding: 2px; /* Border thickness */
  text-decoration: none;
}

/* Button size & tall padding */
.btn-signup {
  gap: 0.6rem;
  padding: 0.9rem 1.8rem;
  color: var(--text-white);
  font-size: 0.95rem;
  font-weight: 600;
}

.cta-pill {
  gap: 0.8rem;
  padding: 0.95rem 2rem;
  color: var(--text-white);
  font-size: 0.95rem;
}

/* Keep content above mask layers */
.btn-signup > *,
.cta-pill > * {
  z-index: 2;
}

/* Spinning RGB Gradient — High Brightness & Vivid Colors */
.btn-signup::before,
.cta-pill::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  /* High saturation & pure RGB stops */
  background: conic-gradient(
    transparent 0deg,
    transparent 180deg,
    #ff334b 240deg,
    #00f0ff 290deg,
    #d4af37 330deg,
    #ffffff 350deg,
    transparent 360deg
  );
  animation: rotateBorder 3.5s linear infinite;
  z-index: -2;
  opacity: 1; /* Full brightness */
  /* Intense neon drop-shadow glow directly on the light beam */
  filter: drop-shadow(0 0 8px rgba(0, 240, 255, 0.8)) drop-shadow(0 0 12px rgba(255, 51, 75, 0.8));
}

/* Dark center mask to keep middle dark */
.btn-signup::after,
.cta-pill::after {
  content: '';
  position: absolute;
  inset: 2px;
  background: #0d1117;
  border-radius: 33px;
  z-index: -1;
  transition: background 0.3s ease;
}

/* Rotation animation */
@keyframes rotateBorder {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Hover effect */
.btn-signup:hover,
.cta-pill:hover {
  transform: translateY(-2px) scale(1.02);
}

.btn-signup:hover::after,
.cta-pill:hover::after {
  background: #131822;
}

/* ==========================================================================
   OUR PROCESS SECTION (2-COLUMN LAYOUT)
   ========================================================================== */
.process-section {
  padding-top: 5rem;
  padding-bottom: 5rem;
}

.process-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
}

.process-text-block {
  flex: 1;
}

.section-title.text-left {
  text-align: left;
  margin-bottom: 2.5rem;
}

.process-list {
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
}

.process-item {
  display: flex;
  align-items: flex-start;
  gap: 1.2rem;
  padding: 1rem 1.2rem;
  background: var(--bg-card);
  border: 1px solid var(--border-dark);
  border-radius: 12px;
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.process-item:hover {
  border-color: var(--accent-gold);
  transform: translateX(6px);
}

.process-num {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--accent-gold);
  line-height: 1;
  background: rgba(212, 175, 55, 0.1);
  padding: 0.5rem 0.8rem;
  border-radius: 8px;
  border: 1px solid rgba(212, 175, 55, 0.2);
}

.process-item h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-white);
  margin-bottom: 0.3rem;
}

.process-item p {
  font-size: 0.88rem;
  color: var(--text-gray);
  line-height: 1.5;
}

/* Right Side Image Styling */
.process-image-block {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  position: relative;
}

.process-photo {
  width: 100%;
  max-width: 420px;
  height: auto;
  object-fit: contain;
  /* Smooth fade mask at the bottom edge */
  mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 85%, rgba(0,0,0,0) 100%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 85%, rgba(0,0,0,0) 100%);
  filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.5));
}

/* Mobile Responsive adjustment */
@media (max-width: 900px) {
  .process-wrapper {
    flex-direction: column-reverse; /* Shows photo or text neatly stacked on mobile */
    gap: 2.5rem;
  }

  .section-title.text-left {
    text-align: center;
  }

  .process-photo {
    max-width: 300px;
  }
}
/* ==========================================================================
   AUTH MODAL STYLES
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-card {
  position: relative;
  background: #11131a;
  border: 1px solid var(--accent-gold);
  border-radius: 20px;
  width: 100%;
  max-width: 420px;
  padding: 2.5rem 2rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  background: none;
  border: none;
  color: var(--text-gray);
  font-size: 1.8rem;
  cursor: pointer;
  transition: color 0.3s ease;
}

.modal-close:hover {
  color: var(--accent-gold);
}

.auth-tabs {
  display: flex;
  gap: 1rem;
  border-bottom: 1px solid var(--border-dark);
  margin-bottom: 1.8rem;
}

.tab-btn {
  background: none;
  border: none;
  color: var(--text-gray);
  font-size: 1rem;
  font-weight: 600;
  padding-bottom: 0.6rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.tab-btn.active {
  color: var(--accent-gold);
  border-bottom: 2px solid var(--accent-gold);
}

.auth-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1.2rem;
}

.auth-form label {
  font-size: 0.85rem;
  color: var(--text-gray);
}

.auth-form input {
  padding: 0.8rem 1rem;
  background: #0d0f14;
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 10px;
  color: #fff;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.3s ease;
}

.auth-form input:focus {
  border-color: var(--accent-gold);
}

.form-btn {
  width: 100%;
  margin-top: 1rem;
  cursor: pointer;
}

.form-error {
  color: #ff334b;
  font-size: 0.85rem;
  margin-bottom: 0.8rem;
}

/* ==========================================================================
   AUTH MODAL & SIGN UP / LOGIN FORM STYLES (BLACK & GOLD)
   ========================================================================== */

/* Dark Blurred Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(5, 6, 9, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: fadeIn 0.3s ease;
}

/* Modal Box Container */
.modal-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--accent-gold);
  border-radius: 20px;
  width: 100%;
  max-width: 440px;
  padding: 2.5rem 2rem;
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.9), 0 0 20px rgba(212, 175, 55, 0.15);
  animation: slideUp 0.35s ease-out;
}

/* Close Button (X) */
.modal-close {
  position: absolute;
  top: 18px;
  right: 22px;
  background: none;
  border: none;
  color: var(--text-gray);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.3s ease, transform 0.2s ease;
}

.modal-close:hover {
  color: var(--accent-gold);
  transform: scale(1.1);
}

/* Tab Switchers (Sign Up / Login) */
.auth-tabs {
  display: flex;
  gap: 1.5rem;
  border-bottom: 1px solid rgba(212, 175, 55, 0.15);
  margin-bottom: 2rem;
}

.tab-btn {
  background: none;
  border: none;
  color: var(--text-gray);
  font-size: 1.05rem;
  font-weight: 600;
  padding-bottom: 0.75rem;
  cursor: pointer;
  position: relative;
  transition: color 0.3s ease;
}

.tab-btn.active {
  color: var(--accent-gold);
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent-gold);
  box-shadow: 0 0 8px var(--accent-gold);
  border-radius: 2px;
}

/* Form Layout */
.auth-form {
  display: flex;
  flex-direction: column;
}

.auth-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}

.auth-form label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-gray);
  letter-spacing: 0.5px;
}

.auth-form input {
  width: 100%;
  padding: 0.85rem 1.1rem;
  background: #090a0f;
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 12px;
  color: var(--text-white);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.auth-form input:focus {
  border-color: var(--accent-gold);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.2);
}

.auth-form input::placeholder {
  color: rgba(161, 161, 170, 0.5);
}

/* Form Action Button */
.form-btn {
  width: 100%;
  margin-top: 0.8rem;
  padding: 0.95rem;
  font-size: 1rem;
  cursor: pointer;
}

/* Error Message Area */
.form-error {
  color: #ff4d4d;
  background: rgba(255, 77, 77, 0.1);
  border: 1px solid rgba(255, 77, 77, 0.3);
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  font-size: 0.85rem;
  margin-bottom: 1rem;
  display: none; /* Shown dynamically via JS when errors occur */
}

.form-error:not(:empty) {
  display: block;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

 
