/* NAVBAR RESPONSIVE */
.mobile-only {
  display: none;
}

.hamburger {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--gray-800);
}

@media (max-width: 768px) {
  .menu {
    position: absolute;
    top: 72px;
    /* Adjusted for taller navbar */
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem 0;
    display: none;
    box-shadow: var(--shadow-lg);
    border-bottom: 1px solid var(--gray-200);
  }

  .menu.active {
    display: flex;
    animation: slideDown 0.3s ease forwards;
  }

  .hamburger {
    display: block;
  }

  .nav-right {
    display: none;
  }

  .mobile-only {
    display: block;
    width: 100%;
    text-align: center;
  }

  .mobile-theme-btn {
    background: none;
    border: 1px solid var(--gray-200);
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    font-size: 1rem;
    cursor: pointer;
    color: var(--gray-800);
    width: 80%;
    transition: all 0.2s;
  }

  .mobile-theme-btn:hover {
    background: var(--gray-100);
  }

  /* Adjust mobile login button width */
  .mobile-login {
    display: inline-block;
    width: 80%;
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== GLASSMORPHISM UTILITIES ===== */
.glass-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.05);
  border-radius: var(--radius-xl);
}

body.dark .glass-card {
  background: rgba(30, 41, 59, 0.7);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
}

/* ===== CARD ANIMATION & STYLES ===== */

.card {
  background: white;
  padding: 2rem;
  border-radius: var(--radius-lg);
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-100);
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary-light);
}

.card h3 {
  margin-top: 1rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gray-800);
}

.card h3 {
  margin-top: 1rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gray-800);
}

.card-icon {
  width: 48px;
  height: 48px;
  color: var(--primary);
  margin-bottom: 1rem;
  transition: transform 0.3s ease;
}

.card:hover .card-icon {
  transform: scale(1.1);
  color: var(--primary-dark);
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}



/* ===== BUTTONS ===== */
.btn-primary {
  background: var(--primary);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  text-decoration: none;
  display: inline-block;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--gray-800);
  border: 2px solid var(--gray-200);
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-block;
}

.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* ===== AUTH (LOGIN / REGISTER) ===== */

.auth-container {
  min-height: calc(100vh - 80px);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: white;
  padding: 2.5rem;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--gray-100);
}

.auth-card h2 {
  margin-bottom: 0.5rem;
  font-size: 1.75rem;
  color: var(--game-dark);
}

.auth-desc {
  font-size: 0.95rem;
  color: #6b7280;
  margin-bottom: 2rem;
}

.auth-card label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray-800);
}

.auth-card input {
  width: 100%;
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
  border-radius: 0.75rem;
  border: 1px solid var(--gray-200);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-card input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.btn-primary.full {
  width: 100%;
  margin-top: 0.5rem;
}

.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: #6b7280;
}

.auth-footer a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

/* ===== AUDIO PLAYER ===== */

.audio-container,
.quiz-container {
  min-height: calc(100vh - 80px);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
}

.audio-card,
.quiz-card {
  width: 100%;
  max-width: 450px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  padding: 2rem;
  border-radius: var(--radius-xl);
  text-align: center;
  box-shadow: var(--shadow-xl);
}

.audio-desc {
  font-size: 0.95rem;
  color: #6b7280;
  margin-bottom: 1.5rem;
}

.controls {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.controls button {
  font-size: 1.5rem;
  background: var(--gray-100);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  color: var(--game-dark);
}

.controls button:hover {
  background: var(--primary);
  color: white;
  transform: scale(1.1);
}

#progress {
  width: 100%;
  margin: 1rem 0;
  accent-color: var(--primary);
  height: 4px;
}

.time {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: #6b7280;
  font-feature-settings: "tnum";
}

/* ===== ARTICLE READING MODE ===== */

.article-container {
  display: flex;
  justify-content: center;
  padding: 4rem 1.5rem;
}

.article-content {
  max-width: 720px;
  width: 100%;
  font-size: 1.125rem;
  line-height: 1.8;
  color: #374151;
}

.article-content h1 {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  line-height: 1.2;
  color: var(--game-dark);
}

.article-meta {
  font-size: 0.9rem;
  color: #6b7280;
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--gray-200);
}

.article-content p {
  margin-bottom: 1.5rem;
}

.article-content .lead {
  font-size: 1.25rem;
  color: var(--gray-800);
  margin-bottom: 2rem;
}

.article-content blockquote {
  border-left: 4px solid var(--primary);
  padding-left: 1.5rem;
  background: var(--primary-light);
  padding: 1.5rem;
  border-radius: 0 1rem 1rem 0;
  color: var(--primary-dark);
  margin: 2rem 0;
  font-style: italic;
}

/* ===== LATEST ARTICLES ===== */

.latest-articles {
  padding: 4rem 5%;
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.section-header h2 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--game-dark);
}

.view-all {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: transform 0.2s;
}

.view-all:hover {
  transform: translateX(4px);
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.article-card {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-100);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.article-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary-light);
}

.article-thumb {
  height: 200px;
  width: 100%;
  background-size: cover;
  background-position: center;
  transition: transform 0.5s ease;
}

.article-card:hover .article-thumb {
  transform: scale(1.05);
}

/* Gradient Placeholders since image generation was busy */
.thumb-1 {
  background-image: url('../assets/article-1.svg');
}

.thumb-2 {
  background-image: url('../assets/article-2.svg');
}

.thumb-3 {
  background-image: url('../assets/article-3.svg');
}

.article-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.article-meta {
  font-size: 0.85rem;
  color: #6b7280;
  margin-bottom: 0.75rem;
  font-weight: 500;
}

.article-body h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  line-height: 1.4;
  color: var(--gray-800);
}

.article-body a {
  text-decoration: none;
  color: inherit;
}

.article-body a:hover h3 {
  color: var(--primary);
}

.article-body p {
  font-size: 0.95rem;
  color: #4b5563;
  line-height: 1.6;
  margin-bottom: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== VIDEO PAGE ===== */

.video-container {
  padding: 2rem 5%;
  max-width: 1000px;
  margin: 0 auto;
}

.main-player-wrapper {
  margin-bottom: 3rem;
  animation: fadeUp 0.6s ease;
}

.video-frame {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  /* 16:9 Aspect Ratio */
  background: black;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  margin-bottom: 1.5rem;
}

.video-frame iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.main-player-wrapper h1 {
  font-size: 1.75rem;
  color: var(--game-dark);
}

.playlist-section h3 {
  margin-bottom: 1.5rem;
  color: var(--gray-800);
  font-size: 1.5rem;
}

.playlist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
}

.playlist-item {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s ease;
}

.playlist-item:hover,
.playlist-item.active {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.playlist-item img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.playlist-item .info {
  padding: 1rem;
}

.playlist-item h4 {
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--game-dark);
}

.play-icon {
  font-size: 0.8rem;
  color: var(--primary);
  font-weight: 600;
}

/* ===== NEW AUDIO PLAYER STYLES ===== */

.audio-layout {
  display: flex;
  flex-wrap: wrap;
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem 5%;
  gap: 2rem;
  align-items: flex-start;
  min-height: calc(100vh - 80px);
}

.player-section {
  flex: 1 1 400px;
}

.playlist-sidebar {
  flex: 1 1 300px;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 1.5rem;
  max-height: 600px;
  overflow-y: auto;
}

.now-playing-card {
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  padding: 2rem;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  text-align: center;
  position: relative;
  overflow: hidden;
  color: var(--gray-800);
}

.album-art-wrapper {
  margin: 0 auto 1.5rem;
  width: 180px;
  height: 180px;
  position: relative;
}

.album-art {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--gray-700);
  /* Placeholder */
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  animation: spin 20s linear infinite;
  animation-play-state: paused;
}

.visualizer.active~.album-art-wrapper .album-art {
  animation-play-state: running;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.track-info h2 {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
  color: var(--gray-800);
  font-weight: 800;
}

.track-info p {
  font-size: 0.95rem;
  color: var(--gray-600);
  margin-bottom: 1.5rem;
  font-weight: 500;
}

/* Custom Visualizer */
.visualizer {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 4px;
  height: 30px;
  margin-bottom: 1.5rem;
}

.visualizer .bar {
  width: 6px;
  background: var(--primary);
  border-radius: 3px;
  height: 4px;
  transition: height 0.1s ease;
}

.visualizer.active .bar {
  animation: bounce 0.5s infinite ease-in-out alternate;
}

.visualizer.active .bar:nth-child(1) {
  animation-delay: 0s;
}

.visualizer.active .bar:nth-child(2) {
  animation-delay: 0.1s;
}

.visualizer.active .bar:nth-child(3) {
  animation-delay: 0.2s;
}

.visualizer.active .bar:nth-child(4) {
  animation-delay: 0.3s;
}

.visualizer.active .bar:nth-child(5) {
  animation-delay: 0.4s;
}

@keyframes bounce {
  0% {
    height: 4px;
  }

  100% {
    height: 24px;
  }
}

.progress-container {
  margin-bottom: 1.5rem;
}

.progress-container input[type="range"] {
  width: 100%;
  margin-bottom: 0.5rem;
  accent-color: var(--primary);
}

.time-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--gray-400);
}

.player-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
}

.ctrl-btn {
  background: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  color: #111827;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}

.ctrl-btn:hover {
  transform: scale(1.1);
  background: var(--primary);
  color: white;
}

.ctrl-btn.sm {
  width: 40px;
  height: 40px;
  font-size: 1.25rem;
}

.ctrl-btn.lg {
  width: 64px;
  height: 64px;
  font-size: 2rem;
}

/* Playlist Styles */
.playlist-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.playlist-header h3 {
  color: var(--game-dark);
  font-size: 1.25rem;
}

.badge {
  background: var(--gray-100);
  padding: 0.25rem 0.75rem;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--game-dark);
}

.audio-item {
  display: flex;
  align-items: center;
  padding: 0.75rem;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: background 0.2s;
  border-bottom: 1px solid var(--gray-100);
}

.audio-item:last-child {
  border-bottom: none;
}

.audio-item:hover {
  background: var(--gray-50);
}

.audio-item.active {
  background: var(--primary-light);
  border-color: transparent;
}

.mini-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  margin-right: 1rem;
  font-size: 1.2rem;
}

.audio-item .info {
  flex: 1;
}

.audio-item h4 {
  font-size: 0.9rem;
  color: var(--game-dark);
  margin-bottom: 0.25rem;
}

.audio-item p {
  font-size: 0.75rem;
  color: #6b7280;
}

.wave-mini {
  display: none;
  width: 10px;
  height: 10px;
  background: var(--primary);
  border-radius: 50%;
}

.audio-item.active .wave-mini {
  display: block;
}

/* ===== NEWSLETTER ===== */

.newsletter {
  padding: 4rem 5%;
  background: white;
}

.newsletter-content {
  background: linear-gradient(135deg, var(--primary) 0%, var(--game-dark) 100%);
  padding: 3rem 2rem;
  border-radius: var(--radius-xl);
  text-align: center;
  color: white;
  max-width: 1000px;
  margin: 0 auto;
  box-shadow: var(--shadow-xl);
}

.newsletter-content h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.newsletter-content p {
  opacity: 0.9;
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

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

.newsletter-form input {
  flex: 1;
  padding: 0.75rem 1.5rem;
  border-radius: 99px;
  border: none;
  font-size: 1rem;
  min-width: 250px;
}

.newsletter-form input:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.newsletter-form button {
  background: white;
  color: var(--primary);
  border: none;
  padding: 0.75rem 2rem;
  border-radius: 99px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s;
}

.newsletter-form button:hover {
  transform: translateY(-2px);
  background: var(--gray-50);
}

/* ===== FOOTER ===== */

.footer {
  background: var(--white);
  padding: 4rem 5% 2rem;
  border-top: 1px solid var(--gray-100);
}

.footer-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto 3rem;
}

.footer-brand h3 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--game-dark);
  margin-bottom: 1rem;
}

.footer-brand p {
  color: #6b7280;
  line-height: 1.6;
}

.footer-links,
.footer-social {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links h4,
.footer-social h4 {
  font-weight: 700;
  color: var(--game-dark);
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: #6b7280;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--primary);
}

.social-icons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gray-100);
  color: var(--gray-600);
  text-decoration: none;
  transition: all 0.2s ease;
}

.social-icons a:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.social-icons svg {
  width: 20px;
  height: 20px;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--gray-100);
  color: #9ca3af;
  font-size: 0.9rem;
}

/* ===== QUIZ MODERNIZATION ===== */
.quiz-question {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--game-dark);
  margin-bottom: 1rem;
  text-align: left;
}

.options-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.quiz-option {
  position: relative;
  cursor: pointer;
}

.quiz-option input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.option-content {
  display: block;
  padding: 1rem 1.25rem;
  background: var(--gray-50);
  border: 2px solid transparent;
  border-radius: var(--radius-lg);
  font-weight: 500;
  color: var(--gray-800);
  transition: all 0.2s ease;
  text-align: left;
}

.quiz-option:hover .option-content {
  background: var(--gray-100);
  transform: translateX(4px);
}

.quiz-option input:checked+.option-content {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary-dark);
}

.quiz-step {
  margin-bottom: 2rem;
}

/* SCORE PAGE */
.score-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 2rem 0;
}

.score-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: 800;
  box-shadow: 0 10px 25px rgba(16, 185, 129, 0.4);
  margin-bottom: 1rem;
  animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
  0% {
    transform: scale(0);
    opacity: 0;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* MOBILE AUDIO/VIDEO ADJUSTMENTS */
@media (max-width: 900px) {
  .audio-layout {
    grid-template-columns: 1fr;
    /* Stack vertically */
    gap: 2rem;
  }

  .playlist-sidebar {
    height: auto;
    max-height: 400px;
  }
}

@media (max-width: 640px) {
  .now-playing-card {
    padding: 1.5rem;
  }

  .cover-art {
    width: 200px !important;
    height: 200px !important;
    margin: 0 auto 1.5rem;
  }

  .controls {
    gap: 0.75rem;
  }

  .btn-control {
    width: 36px;
    height: 36px;
  }

  .btn-control.play {
    width: 50px;
    height: 50px;
  }

  .track-info h2 {
    font-size: 1.2rem;
  }

  .glass-card {
    padding: 1.5rem !important;
  }
}