/* ============================================
   1. HERO SECTION
============================================ */
.hero-section {
  width: 90%;
  margin: 100px auto 30px auto;
  padding: 40px;
  text-align: center;
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}

.hero-content h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 10px;
  background: linear-gradient(135deg, var(--text-main), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-content p {
  font-size: 1.1rem;
  opacity: 0.8;
  max-width: 600px;
  margin: 0 auto;
}

/* ============================================
   2. FILTER BAR & ACTIVE STATE
============================================ */
.filter-container {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 0 auto 40px auto;
  width: 90%;
  flex-wrap: wrap;
}

.filter-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--glass-border);
  color: inherit;
  padding: 10px 24px;
  border-radius: 50px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
  outline: none;
}

.filter-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  border-color: var(--accent);
}

/* THIS IS THE ACTIVE STATE (Selection Indicator) */
.filter-btn.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  box-shadow: 0 4px 15px rgba(255, 0, 0, 0.3);
  font-weight: 700;
}

[data-theme="dark"] .filter-btn.active {
  background: #2E7D32; /* Agro Green for Dark Mode Active */
  border-color: #2E7D32;
  box-shadow: 0 4px 15px rgba(46, 125, 50, 0.4);
}

/* ============================================
   3. BACK BUTTON (Styled "Home")
============================================ */
.btn-back {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--glass-border);
  color: inherit;
  padding: 8px 16px;
  border-radius: 30px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.3s ease;
  backdrop-filter: blur(4px);
  text-decoration: none;
}

.btn-back:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  transform: translateX(-3px);
}

/* ============================================
   4. GRID LAYOUT
============================================ */
.rec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 60px;
}

/* Staggered Entrance Animation */
.rec-card {
  opacity: 0;
  transform: translateY(30px);
  animation: slideUp 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

/* Delays for stagger effect */
.rec-card:nth-child(1) { animation-delay: 0.1s; }
.rec-card:nth-child(2) { animation-delay: 0.2s; }
.rec-card:nth-child(3) { animation-delay: 0.3s; }
.rec-card:nth-child(4) { animation-delay: 0.4s; }
.rec-card:nth-child(5) { animation-delay: 0.5s; }
.rec-card:nth-child(6) { animation-delay: 0.6s; }
.rec-card:nth-child(7) { animation-delay: 0.7s; }

@keyframes slideUp {
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   5. CARD DESIGN (Defined & Nice)
============================================ */
.rec-card {
  padding: 0;
  border-radius: 18px;
  text-align: center;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
  border: 1px solid transparent;
}

/* Inner Padding */
.rec-card > *:not(.rec-badge) {
  padding: 0 20px;
  position: relative;
  z-index: 2;
}

.rec-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

/* Badge Styles */
.rec-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
  z-index: 3;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.rec-badge.hot { background: #ff4757; color: white; }
.rec-badge.new { background: #2ed573; color: white; }
.rec-badge.alert { background: #ffa502; color: white; }

/* Icon Container with Gradients */
.rec-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  margin-top: 30px;
  margin-bottom: 15px;
  transition: transform 0.4s ease;
  box-shadow: 0 8px 16px rgba(0,0,0,0.1);
  background: rgba(255, 255, 255, 0.15); /* Default fallback */
}

.rec-card:hover .rec-icon {
  transform: scale(1.1) rotate(5deg);
}

/* Typography */
.rec-card h3 {
  font-size: 1.3rem;
  margin-bottom: 8px;
  font-weight: 700;
}

.rec-card p {
  font-size: 0.9rem;
  opacity: 0.75;
  line-height: 1.5;
  margin: 0 0 15px 0;
  min-height: 42px; /* Aligns cards */
}

.rec-meta {
  width: 100%;
  margin-bottom: 25px;
  font-size: 0.85rem;
  font-weight: 600;
  opacity: 0.6;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* ============================================
   6. CATEGORY COLORS (The "Defined" Look)
============================================ */

/* Lifestyle (Orange/Pink) */
.cat-lifestyle .rec-icon {
  background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
  color: #d63031;
}
.cat-lifestyle:hover {
  border-color: rgba(255, 154, 158, 0.5);
}

/* Media (Purple/Blue) */
.cat-media .rec-icon {
  background: linear-gradient(135deg, #a18cd1 0%, #fbc2eb 100%);
  color: #6c5ce7;
}
.cat-media:hover {
  border-color: rgba(161, 140, 209, 0.5);
}

/* Career (Teal/Green) */
.cat-career .rec-icon {
  background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%);
  color: #00b894;
}
.cat-career:hover {
  border-color: rgba(132, 250, 176, 0.5);
}

/* ============================================
   7. POPUP MODAL (FIXED Z-INDEX)
============================================ */
.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  display: none;
  z-index: 9999; /* Extremely High to ensure visibility */
  animation: fadeIn 0.3s ease;
}

.popup {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 92%;
  max-width: 550px;
  max-height: 85vh;
  transform: translate(-50%, -50%) scale(0.9);
  display: none;
  padding: 0;
  z-index: 10000; /* Above Overlay */
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,0.3);
  animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { to { transform: translate(-50%, -50%) scale(1); } }

.popup-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255,255,255,0.05);
}

#popupTitle {
  font-size: 1.3rem;
  font-weight: 700;
}

.popup-close {
  background: rgba(0,0,0,0.1);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  color: inherit;
  transition: 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.popup-close:hover { 
  background: rgba(255,0,0,0.2); 
  color: var(--accent); 
}

.popup-content {
  padding: 24px;
  overflow-y: auto;
  max-height: 70vh;
}

/* Link styling in popup */
.popup-content a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px dashed var(--accent);
  display: inline-block;
  margin-top: 5px;
}

.popup-content a:hover {
  opacity: 0.8;
}

/* Responsive */
@media (max-width: 600px) {
  .rec-grid { grid-template-columns: 1fr; }
  .hero-section h1 { font-size: 2rem; }
  .popup { 
    width: 95%; 
    max-height: 90vh; 
    top: 50%; 
    left: 50%; 
  }
}
.ivouch4-title {
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
  text-align: center;
  color: #de1a1a;
}

/* Footer Styles */
.footer a {
  color: inherit;
  text-decoration: none;
  cursor: default;
}

.footer a:hover {
  text-decoration: none;
}

.footer .socials a {
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
  opacity: 0.75;
}

.footer .socials a:hover {
  transform: scale(1.2);
  opacity: 1;
}

.footer ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.footer ul li a {
  cursor: pointer;
  position: relative;
  opacity: 0.85;
  transition: opacity 0.2s ease;
}

.footer ul li a:hover {
  opacity: 1;
}

.footer a {
  display: inline-block; 
  transition: transform 0.25s ease;
}

.footer a:hover {
  transform: translateY(-4px);
}

.footer .socials {
  display: flex;        
}

.footer .socials a {
  margin-right: 24px;
}

.footer .socials a:last-child {
  margin-right: 0;
}

/* =========================================
   WHATSAPP CTA SECTION (CENTERED & PREMIUM)
   ========================================= */

.whatsapp-cta {
  margin: 40px auto;
  max-width: 900px;
  padding: 50px 30px;
  text-align: center;
  position: relative;
  border: 1px solid rgba(37, 211, 102, 0.3); 
  background: rgba(37, 211, 102, 0.05); 
  border-radius: 24px;
  animation: slide-up 0.8s ease-out;
}

@keyframes slide-up {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.wa-container {
  max-width: 700px;
  margin: 0 auto;
}

.wa-icon-wrapper {
  width: 80px;
  height: 80px;
  background: #25D366;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 2.5rem;
  box-shadow: 0 0 0 15px rgba(37, 211, 102, 0.3);
  position: relative;
}

/* Pulsing Ring around Icon */
.wa-icon-wrapper::after {
  content: '';
  position: absolute;
  top: -5px; left: -5px;
  right: -5px; bottom: -5px;
  border: 1px solid rgba(37, 211, 102, 0.5);
  border-radius: 50%;
  animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.15); opacity: 0; }
  100% { transform: scale(1); opacity: 0.8; }
}

.whatsapp-cta h2 {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 10px;
}

.wa-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 30px;
  line-height: 1.6;
}

/* The Big Button */
.wa-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #25D366;
  color: white;
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 600;
  padding: 16px 32px;
  border-radius: 50px;
  transition: all 0.3s ease;
  box-shadow: 0 10px 25px rgba(37, 211, 102, 0.3);
}

.wa-btn:hover {
  background: #128C7E;
  transform: translateY(-2px);
  box-shadow: 0 15px 30px rgba(37, 211, 102, 0.4);
}

.wa-btn i {
  font-size: 1.3rem;
}

/* Features List */
.wa-features {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.wa-feature-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.05);
  padding: 10px 20px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.wa-feature-item i {
  color: #25D366;
  font-size: 1.2rem;
}

.wa-feature-item span {
  font-weight: 500;
  color: var(--text-main);
}

/* =========================================
   9. QUIZ SECTION
   ========================================= */

#quiz-section {
  margin: 40px auto;
  max-width: 1000px;
}

.quiz-wrapper {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 30px;
  align-items: flex-start;
}

/* Responsive layout for mobile */
@media (max-width: 768px) {
  .quiz-wrapper {
    grid-template-columns: 1fr;
  }
}

/* --- LEFT SIDE: GAME AREA --- */
.quiz-game-area {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* The Spinner Wheel */
.spinner-container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 30px;
}

.wheel {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff3b3b, #ffbe0b);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 3rem;
  box-shadow: 0 10px 30px rgba(255, 59, 59, 0.3);
  border: 5px solid rgba(255, 255, 255, 0.2);
  transition: transform 0.1s;
}

.wheel-inner {
  font-weight: 800;
  text-shadow: 2px 2px 0px rgba(0,0,0,0.1);
}

/* Spin Button */
.spin-btn {
  margin-top: 20px;
  padding: 12px 30px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 30px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 5px 15px rgba(255, 0, 0, 0.2);
  transition: transform 0.2s, background 0.2s;
  display: flex;
  align-items: center;
  gap: 10px;
}

.spin-btn:hover {
  background: #cc0000;
  transform: translateY(-2px);
}

.spin-btn:active {
  transform: scale(0.95);
}

/* Spinning Animation Class (JS will toggle this) */
.wheel.spinning {
  animation: spin-wheel 0.5s cubic-bezier(0.17, 0.67, 0.12, 0.99) infinite;
}

@keyframes spin-wheel {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Question Box */
.question-box {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 24px;
  text-align: left;
  box-sizing: border-box;
}

.question-box h3 {
  font-size: 1.1rem;
  margin-bottom: 15px;
  line-height: 1.5;
}

/* NEW: Quiz Actions (Copy/Get Answer) */
.quiz-actions { 
  display: flex; 
  gap: 10px; 
  margin-bottom: 15px; 
}

.quiz-action-btn { 
  flex: 1; 
  padding: 10px; 
  background: rgba(0,0,0,0.1); 
  border: 1px solid var(--glass-border); 
  border-radius: 8px; 
  color: var(--text-main); 
  cursor: pointer; 
  font-weight: 600; 
  font-size: 0.85rem; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  gap: 8px; 
  transition: all 0.2s; 
} 

.quiz-action-btn:hover { 
  background: var(--accent); 
  color: white; 
  border-color: var(--accent); 
} 

.quiz-action-btn.secondary { 
  background: rgba(46, 213, 115, 0.1); 
  border-color: rgba(46, 213, 115, 0.3); 
  color: #2ed573; 
} 

.quiz-action-btn.secondary:hover { 
  background: #2ed573; 
  color: white; 
} 

[data-theme="light"] .quiz-action-btn { 
  background: rgba(0,0,0,0.05); 
} 

[data-theme="light"] .quiz-action-btn.secondary { 
  background: rgba(46, 213, 115, 0.1); 
} 


.question-box textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 12px;
  color: var(--text-main);
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  resize: none;
  margin-bottom: 15px;
  box-sizing: border-box;
}

.question-box textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.submission-row {
  display: flex;
  gap: 10px;
}

.submission-row input {
  flex: 1;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 10px;
  color: var(--text-main);
  font-family: 'Poppins', sans-serif;
}

.submission-row input:focus {
  outline: none;
  border-color: var(--accent);
}

.btn-submit {
  background: #2ed573;
  color: white;
  border: none;
  padding: 0 20px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  height: 42px;
}

.btn-submit:hover {
  background: #26b863;
}

/* --- RIGHT SIDE: SIDEBAR --- */
.quiz-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.quiz-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 20px;
}

.quiz-card h4 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  color: var(--accent);
  font-size: 1rem;
}

.auth-form input {
  width: 100%;
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 10px;
  color: var(--text-main);
  font-family: 'Poppins', sans-serif;
}

.btn-group {
  display: flex;
  gap: 10px;
}

.btn-primary {
  flex: 1;
  background: var(--accent);
  color: white;
  border: none;
  padding: 8px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.85rem;
}

.btn-secondary {
  flex: 1;
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--glass-border);
  padding: 8px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.85rem;
}

.btn-primary:hover { opacity: 0.9; }
.btn-secondary:hover { background: rgba(255,255,255,0.05); }

.id-display-box {
  margin-top: 15px;
  background: rgba(46, 213, 115, 0.1);
  border: 1px dashed #2ed573;
  border-radius: 8px;
  padding: 10px;
  text-align: center;
}

.id-display-box h2 {
  font-size: 1.5rem;
  margin: 5px 0;
  color: #2ed573;
  letter-spacing: 2px;
}

.small-text {
  font-size: 0.8rem;
  opacity: 0.7;
  margin-bottom: 10px;
}

/* Leaderboard */
.leaderboard-list {
  list-style: none;
  padding: 0;
  margin: 0;
  
  /* NEW: Scrolling Fix */
  max-height: 250px; /* Limits the height to about 5-6 entries */
  overflow-y: auto;  /* Adds scrollbar only when needed */
}

/* OPTIONAL: Custom Scrollbar Styling (Matches your theme) */
.leaderboard-list::-webkit-scrollbar {
  width: 6px;
}

.leaderboard-list::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 10px;
}

.leaderboard-list::-webkit-scrollbar-thumb {
  background: var(--accent); 
  border-radius: 10px;
}

.leaderboard-list li {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  font-size: 0.9rem;
}

/* =========================================
   10. LIGHT MODE FIXES (CRITICAL)
   ========================================= */

/* Ensure inputs are visible in light mode */
[data-theme="light"] .question-box textarea,
[data-theme="light"] .submission-row input,
[data-theme="light"] .auth-form input {
  background: rgba(0, 0, 0, 0.03); 
  border: 1px solid rgba(0, 0, 0, 0.15); 
  color: #333; 
}

[data-theme="light"] .question-box textarea:focus,
[data-theme="light"] .submission-row input:focus,
[data-theme="light"] .auth-form input:focus {
  border-color: var(--accent);
}

/* Fix Button visibility in Light Mode */
[data-theme="light"] .btn-secondary {
  border: 1px solid rgba(0, 0, 0, 0.15); 
  color: #333;
  background: rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .btn-secondary:hover {
  background: rgba(0, 0, 0, 0.08);
}

/* Ensure primary buttons have correct contrast */
[data-theme="light"] .btn-primary,
[data-theme="light"] .spin-btn {
  background: #ff3b3b; 
  color: white;
  border: none;
}

[data-theme="light"] .btn-submit {
  background: #2ed573;
  color: white;
}

/* Ensure cards have visible borders in light mode */
[data-theme="light"] .quiz-card,
[data-theme="light"] .question-box {
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

/* Light Mode FAQ Fixes */
[data-theme="light"] .faq-item {
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .faq-icon::before, 
[data-theme="light"] .faq-icon::after {
  background: #ff3b3b;
}

[data-theme="light"] .faq-item p {
  color: #555;
}


/* =========================================
   11. VALUE & FAQ SECTIONS (ACCORDION)
   ========================================= */

/* Value Section */
.value-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.value-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.value-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* FAQ Accordion Container */
.faq-accordion {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* Individual Accordion Item */
.faq-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  overflow: hidden; /* Hides the hidden answer */
  transition: border-color 0.3s ease;
}

.faq-item:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

/* Question Header (Clickable) */
.faq-question {
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-weight: 600;
  color: var(--text-main);
  transition: background 0.3s ease;
}

.faq-question:hover {
  background: rgba(255, 255, 255, 0.02);
}

/* The +/- Icon Container */
.faq-icon {
  width: 24px;
  height: 24px;
  position: relative;
  flex-shrink: 0;
}

/* Plus Sign (+) */
.faq-icon::before,
.faq-icon::after {
  content: '';
  position: absolute;
  background: var(--accent);
  transition: transform 0.3s ease;
}

.faq-icon::before {
  width: 12px;
  height: 2px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.faq-icon::after {
  width: 2px;
  height: 12px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Active State: Turn Plus into Minus */
.faq-item.active .faq-icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
  opacity: 0;
}

/* Answer Container (Hidden) */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
  background: rgba(0,0,0,0.03);
}

/* Answer Content */
.faq-answer p {
  padding: 0 20px 20px 20px;
  margin: 0;
  line-height: 1.6;
  color: var(--text-muted);
}

/* Active State: Show Answer */
.faq-item.active .faq-answer {
  max-height: 500px; /* Arbitrary large height to show content */
}


/* =========================================
   12. ADMIN SECTION (QUIZ & CONTENT)
   ========================================= */

#admin-section, #content-admin-section {
  max-width: 600px;
  margin: 40px auto;
  border: 1px solid rgba(255, 0, 0, 0.2);
}

/* Green border for Content Manager to differentiate */
#content-admin-section {
  border: 1px solid rgba(46, 213, 115, 0.3);
}

.admin-auth-box {
  max-width: 300px;
  margin: 0 auto;
  text-align: center;
}

.admin-auth-box input {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  background: rgba(0,0,0,0.1);
  color: var(--text-main);
  text-align: center;
  margin-bottom: 10px;
  box-sizing: border-box;
}

.admin-form-grid {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

#new-question-text, #content-html-input {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  background: rgba(0,0,0,0.1);
  color: var(--text-main);
  font-family: 'Poppins', sans-serif;
  resize: vertical;
  box-sizing: border-box;
}

#new-answer-text, #content-title-input, #category-select, #item-title, #item-subtitle, #item-link {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  background: rgba(0,0,0,0.1);
  color: var(--text-main);
  box-sizing: border-box;
}

/* Admin Select Dropdown Styles */
.admin-select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23FFFFFF%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
  background-repeat: no-repeat;
  background-position: right 10px top 50%;
  background-size: 12px auto;
}

/* Light Mode Fix for Admin */
[data-theme="light"] #admin-password-input,
[data-theme="light"] #new-question-text,
[data-theme="light"] #new-answer-text,
[data-theme="light"] #content-admin-password,
[data-theme="light"] #content-title-input,
[data-theme="light"] #content-html-input,
[data-theme="light"] .admin-select,
[data-theme="light"] #item-title,
[data-theme="light"] #item-subtitle,
[data-theme="light"] #item-link {
  background: rgba(0,0,0,0.05);
  border: 1px solid rgba(0,0,0,0.2);
  color: #333;
}

/* Fix arrow color in light mode */
[data-theme="light"] .admin-select {
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23333%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
}

/* =========================================
   13. AD NOTICE BANNER
   ========================================= */

.ad-notice-banner {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(90deg, #ff9f43, #ff6b6b);
  color: #fff;
  text-align: center;
  padding: 10px 15px;
  font-size: 0.85rem;
  font-weight: 600;
  z-index: 9999;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  display: flex;
  justify-content: center;
  align-items: center;
  line-height: 1.4;
}

.ad-notice-content {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.ad-notice-content i {
  font-size: 1rem;
  opacity: 0.9;
}

.ad-notice-content strong {
  text-decoration: underline;
  font-weight: 800;
}

/* --- Text Switching for Mobile --- */
.ad-short { display: none; } /* Hidden on Desktop */
.ad-long { display: inline; } /* Shown on Desktop */

/* --- LAYOUT ADJUSTMENTS FOR BANNER --- */

/* Push Navbar down (Desktop) */
.navbar {
  top: 42px !important; 
}

/* Push Hero Section down (Desktop) */
.hero-section {
  margin-top: 142px !important; 
}

/* =========================================
   14. MOBILE FIXES (BANNER & LAYOUT)
   ========================================= */
@media (max-width: 600px) {
  /* Switch text visibility */
  .ad-long { display: none; }
  .ad-short { display: inline; }

  /* Adjust banner padding for mobile */
  .ad-notice-banner {
    padding: 8px 10px;
    font-size: 0.8rem;
  }

  /* Move Navbar down to fit short banner */
  .navbar {
    top: 38px !important;
  }

  /* Move Hero down to fit navbar + banner */
  .hero-section {
    margin-top: 130px !important;
  }
  
  /* Ensure Quiz inputs don't overflow on small screens */
  .submission-row { flex-direction: column; gap: 10px; }
  .submission-row input { width: 100%; }
  .btn-submit { width: 100%; justify-content: center; }
  
  /* Stack quiz actions on mobile if needed */
  .quiz-actions { flex-direction: column; }
}

/* =========================================
   15. POPUP LINK BUTTONS & SHARE FEATURE (NEW)
   ========================================= */

/* 1. Share Button Container in Header */
.popup-header-actions {
  display: flex;
  align-items: center;
  gap: 8px; /* Space between Share and Close buttons */
}

/* 2. Style for Icon Buttons (Share & Close) */
.popup-action-btn {
  background: rgba(0,0,0,0.1);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  color: inherit;
  transition: 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.popup-action-btn:hover { 
  background: var(--accent); 
  color: white; 
}

/* 3. List Layout in Popup (generated by JS) */
.popup-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.popup-list li {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: background 0.2s;
}

.popup-list li:hover {
  background: rgba(255, 255, 255, 0.06);
}

/* Light mode list item bg */
[data-theme="light"] .popup-list li {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.08);
}

/* Text inside list items */
.list-item-header {
  font-size: 0.95rem;
  line-height: 1.4;
}

.list-item-header small {
  opacity: 0.7;
  font-size: 0.85rem;
}

/* 4. The Link Buttons inside the list */
.popup-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  width: fit-content;
  margin-top: 5px;
  
  /* Default Styling (Primary Accent) */
  background: var(--accent);
  color: white; 
  border: 1px solid transparent;
}

.popup-link-btn:hover {
  transform: translateY(-1px);
  opacity: 0.9;
  box-shadow: 0 4px 10px rgba(255, 59, 59, 0.3);
}

/* 5. Specific Colors for different link types */

/* Music - Spotify Green */
.popup-list li a[href*="spotify"] {
  background: #1DB954;
}
.popup-list li a[href*="spotify"]:hover {
  background: #1ed760;
  box-shadow: 0 4px 10px rgba(29, 185, 84, 0.3);
}

/* Movies - Red/Purple for Download */
.popup-list li a[href*="download"] {
  background: #e50914;
}
.popup-list li a[href*="download"]:hover {
  background: #f40612;
}

/* Jobs/Scholarships - Professional Blue */
.popup-list li a[href*="linkedin"],
.popup-list li a[href*="job"],
.popup-list li a[href*="apply"],
.popup-list li a[href*="scholarship"] {
  background: #0066cc;
}
.popup-list li a[href*="linkedin"]:hover,
.popup-list li a[href*="job"]:hover,
.popup-list li a[href*="apply"]:hover {
  background: #005bb5;
  box-shadow: 0 4px 10px rgba(0, 102, 204, 0.3);
}

/* 6. Light Mode Fixes for Popup Buttons */
[data-theme="light"] .popup-list li a {
  color: white;
}