/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Kalam', cursive;
  line-height: 1.6;
  color: #2c3e50;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  min-height: 100vh;
}

/* Notebook container */
.notebook-container {
  max-width: 100%;
  margin: 0;
  background: white;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  overflow: hidden;
  position: relative;
  
  /* College ruled paper background */
  background-image: 
    repeating-linear-gradient(
      transparent,
      transparent 24px,
      #e3f2fd 24px,
      #e3f2fd 25px
    );
  
  /* Red margin line */
  border-left: 3px solid #ff6b6b;
  margin-left: 60px;
}

.notebook-container::before {
  content: '';
  position: absolute;
  left: -60px;
  top: 0;
  bottom: 0;
  width: 60px;
  background: white;
  border-right: 2px solid #ff6b6b;
  background-image: repeating-linear-gradient(
    transparent,
    transparent 24px,
    #e3f2fd 24px,
    #e3f2fd 25px
  );
}

/* Spiral binding effect */
.spiral-binding {
  position: absolute;
  left: -40px;
  top: 0;
  bottom: 0;
  width: 20px;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 20px,
    #666 20px,
    #666 25px,
    transparent 25px,
    transparent 45px
  );
  border-radius: 10px;
}

/* Header styles */
.notebook-header {
  padding: 40px 40px 20px;
  text-align: center;
  position: relative;
}

.main-title {
  font-family: 'Caveat', cursive;
  font-size: 3.5rem;
  font-weight: 700;
  color: #2c3e50;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
  margin-bottom: 10px;
  transform: rotate(-1deg);
}

.subtitle {
  font-family: 'Patrick Hand', cursive;
  font-size: 1.4rem;
  color: #7f8c8d;
  margin-bottom: 20px;
  transform: rotate(0.5deg);
}

.date-corner {
  position: absolute;
  top: 20px;
  right: 20px;
  font-family: 'Patrick Hand', cursive;
  color: #95a5a6;
  font-size: 0.9rem;
  transform: rotate(2deg);
}

/* GitHub link in header */
.github-link {
  position: absolute;
  top: 60px;
  right: 20px;
  font-family: 'Patrick Hand', cursive;
  transform: rotate(-1deg);
}

.github-link a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 15px;
  background: linear-gradient(135deg, #fff, #f8f9fa);
  border: 2px solid #28a745;
  border-radius: 15px;
  text-decoration: none;
  color: #28a745;
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(40, 167, 69, 0.2);
}

.github-link a:hover {
  transform: rotate(0deg) translateY(-2px);
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
}

/* CTA Section Styles */
.cta-section {
  background: linear-gradient(135deg, #fff3cd, #f8e6a6);
  border: 3px solid #ffc107;
  border-radius: 20px;
  margin: 30px 40px;
  padding: 30px;
  text-align: center;
  transform: rotate(-0.3deg);
  box-shadow: 0 5px 20px rgba(255, 193, 7, 0.3);
  position: relative;
}

.cta-section::before {
  content: '⭐';
  position: absolute;
  top: -15px;
  left: 20px;
  font-size: 2rem;
  transform: rotate(15deg);
}

.cta-section::after {
  content: '✨';
  position: absolute;
  top: -10px;
  right: 30px;
  font-size: 1.5rem;
  transform: rotate(-20deg);
}

.cta-container {
  max-width: 700px;
  margin: 0 auto;
}

.cta-title {
  font-family: 'Caveat', cursive;
  font-size: 2.2rem;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 10px;
  transform: rotate(0.5deg);
  text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.cta-subtitle {
  font-family: 'Patrick Hand', cursive;
  font-size: 1.3rem;
  color: #5a5a5a;
  margin-bottom: 20px;
}

/* Disclaimer Section Styles */
.disclaimer-section {
  margin: 30px 40px;
}

.disclaimer-section .note-section {
  background: linear-gradient(135deg, #fef3e2, #fff8f0);
  border-radius: 15px;
  padding: 30px;
  border-left: 5px solid #e67e22;
}

.disclaimer-section a {
  color: #3498db;
  text-decoration: underline;
  font-weight: 500;
}

.disclaimer-section a:hover {
  color: #2980b9;
}

.cta-button-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 20px;
}

/* Stripe buy button styling */
stripe-buy-button {
  transform: rotate(-0.2deg);
  transition: all 0.3s ease;
}

stripe-buy-button:hover {
  transform: rotate(0deg) scale(1.05);
}

/* About Section Styles */
.about-section {
  background: linear-gradient(135deg, #e3f2fd, #bbdefb);
  border: 3px solid #2196f3;
  border-radius: 20px;
  margin: 30px 40px;
  padding: 30px;
  text-align: center;
  transform: rotate(0.3deg);
  box-shadow: 0 5px 20px rgba(33, 150, 243, 0.3);
  position: relative;
}

.about-section::before {
  content: '🎓';
  position: absolute;
  top: -15px;
  left: 30px;
  font-size: 2rem;
  transform: rotate(-15deg);
}

.about-section::after {
  content: '🚀';
  position: absolute;
  top: -10px;
  right: 40px;
  font-size: 1.8rem;
  transform: rotate(20deg);
}

.about-container {
  max-width: 800px;
  margin: 0 auto;
}

.about-title {
  font-family: 'Caveat', cursive;
  font-size: 2.5rem;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 20px;
  transform: rotate(-0.5deg);
  text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.about-description {
  font-family: 'Patrick Hand', cursive;
  font-size: 1.15rem;
  line-height: 1.8;
  color: #34495e;
  margin-bottom: 25px;
  text-align: left;
}

.about-links {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
  margin-top: 20px;
}

.about-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: white;
  border: 2px solid #2196f3;
  border-radius: 20px;
  text-decoration: none;
  color: #2196f3;
  font-family: 'Patrick Hand', cursive;
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(33, 150, 243, 0.2);
  transform: rotate(-0.5deg);
}

.about-link:hover {
  transform: rotate(0deg) translateY(-2px);
  box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
  background: #2196f3;
  color: white;
}

.youtube-link {
  border-color: #ff0000;
  color: #ff0000;
  font-weight: 600;
}

.youtube-link:hover {
  background: #ff0000;
  color: white;
  border-color: #ff0000;
}

/* Table of Contents */
.table-of-contents {
  padding: 20px 40px;
  margin-bottom: 30px;
}

.toc-list {
  list-style: none;
  margin-left: 20px;
}

.toc-list li {
  margin: 10px 0;
  position: relative;
}

.toc-list li::before {
  content: '▶';
  color: #3498db;
  font-size: 0.8rem;
  position: absolute;
  left: -15px;
  top: 2px;
}

.toc-link {
  text-decoration: none;
  color: #2c3e50;
  font-size: 1.1rem;
  transition: color 0.3s ease;
  font-family: 'Patrick Hand', cursive;
}

.toc-link:hover {
  color: #3498db;
}

/* Chapter styles */
.chapter {
  padding: 30px 40px;
  margin-bottom: 40px;
  position: relative;
}

.chapter-title {
  font-family: 'Caveat', cursive;
  font-size: 2.5rem;
  font-weight: 600;
  margin-bottom: 20px;
  transform: rotate(-0.5deg);
  display: inline-block;
  padding: 10px 20px;
  border-radius: 15px;
}

/* Highlight colors */
.highlight-yellow {
  background: linear-gradient(45deg, #fff3a0, #fed049);
  box-shadow: 0 2px 10px rgba(254, 208, 73, 0.3);
}

.highlight-blue {
  background: linear-gradient(45deg, #a8e6cf, #7fcdcd);
  box-shadow: 0 2px 10px rgba(127, 205, 205, 0.3);
}

.highlight-pink {
  background: linear-gradient(45deg, #ffb3ba, #ffdfba);
  box-shadow: 0 2px 10px rgba(255, 179, 186, 0.3);
}

.highlight-green {
  background: linear-gradient(45deg, #c7ffb7, #a8e6cf);
  box-shadow: 0 2px 10px rgba(168, 230, 207, 0.3);
}

.highlight-orange {
  background: linear-gradient(45deg, #ffcc99, #ff9999);
  box-shadow: 0 2px 10px rgba(255, 204, 153, 0.3);
}

.highlight-purple {
  background: linear-gradient(45deg, #d4a5ff, #c39bd3);
  box-shadow: 0 2px 10px rgba(212, 165, 255, 0.3);
}

.highlight-red {
  background: linear-gradient(45deg, #ff9999, #ffb3b3);
  box-shadow: 0 2px 10px rgba(255, 153, 153, 0.3);
}

.highlight-teal {
  background: linear-gradient(45deg, #7fcdcd, #a8e6cf);
  box-shadow: 0 2px 10px rgba(127, 205, 205, 0.3);
}

.highlight-indigo {
  background: linear-gradient(45deg, #a8a8ff, #c8c8ff);
  box-shadow: 0 2px 10px rgba(168, 168, 255, 0.3);
}

/* Note sections */
.note-section {
  margin: 30px 0;
  padding: 20px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.section-title {
  font-family: 'Caveat', cursive;
  font-size: 1.8rem;
  color: #2c3e50;
  margin-bottom: 15px;
  transform: rotate(-0.3deg);
  display: inline-block;
}

.handwritten-note {
  font-family: 'Patrick Hand', cursive;
  font-size: 1.1rem;
  line-height: 1.8;
  color: #34495e;
  margin: 15px 0;
}

/* Equation boxes */
.equation-box {
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  border: 2px dashed #6c757d;
  border-radius: 10px;
  padding: 20px;
  margin: 20px 0;
  text-align: center;
  position: relative;
}

.equation-note {
  display: block;
  font-family: 'Patrick Hand', cursive;
  font-size: 0.9rem;
  color: #6c757d;
  margin-top: 10px;
  font-style: italic;
}

/* Important boxes */
.important-box {
  padding: 20px;
  border-radius: 15px;
  margin: 20px 0;
  border-left: 5px solid #3498db;
  transform: rotate(-0.2deg);
}

.important-box ul {
  margin-left: 20px;
  margin-top: 10px;
}

.important-box li {
  margin: 8px 0;
  font-family: 'Patrick Hand', cursive;
}

/* Two column layout */
.two-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin: 20px 0;
}

.column {
  background: rgba(255, 255, 255, 0.3);
  padding: 15px;
  border-radius: 10px;
  border: 1px solid #dee2e6;
}

/* Rules grid */
.rules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

.rule-card {
  background: linear-gradient(135deg, #fff, #f8f9fa);
  padding: 20px;
  border-radius: 15px;
  border: 2px solid #e9ecef;
  text-align: center;
  transform: rotate(-0.5deg);
  transition: transform 0.3s ease;
}

.rule-card:hover {
  transform: rotate(0deg) scale(1.05);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.rule-card:nth-child(even) {
  transform: rotate(0.5deg);
}

/* Quiz sections */
.quiz-section {
  background: linear-gradient(135deg, #e8f5e8, #f0f8f0);
  border: 3px solid #28a745;
  border-radius: 20px;
  padding: 30px;
  margin: 40px 0;
  transform: rotate(-0.3deg);
}

.quiz-title {
  font-family: 'Caveat', cursive;
  font-size: 2rem;
  text-align: center;
  margin-bottom: 20px;
  transform: rotate(0.5deg);
}

.quiz-question {
  margin: 20px 0;
  font-family: 'Patrick Hand', cursive;
  font-size: 1.1rem;
  line-height: 1.8;
}

.fill-blank {
  display: inline-block;
  background: white;
  border: 2px dashed #6c757d;
  border-radius: 5px;
  padding: 5px 10px;
  margin: 0 5px;
  min-width: 100px;
  text-align: center;
  font-family: 'Kalam', cursive;
  transition: all 0.3s ease;
}

.fill-blank:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 10px rgba(52, 152, 219, 0.3);
}

.check-answers-btn {
  background: linear-gradient(45deg, #28a745, #20c997);
  color: white;
  border: none;
  padding: 12px 25px;
  border-radius: 25px;
  font-family: 'Patrick Hand', cursive;
  font-size: 1.1rem;
  cursor: pointer;
  margin: 20px 0;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.check-answers-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.results {
  display: none;
  margin-top: 15px;
  padding: 15px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 10px;
  font-family: 'Patrick Hand', cursive;
  font-size: 1.1rem;
  text-align: center;
}

/* Video container styling */
.video-container {
  margin: 30px 0;
  padding: 20px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 15px;
  border: 2px dashed #6c757d;
  text-align: center;
  position: relative;
  transform: rotate(-0.2deg);
}

.video-container iframe {
  max-width: 100%;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Social Media Links */
.social-links {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px dashed #95a5a6;
}

.social-title {
  font-family: 'Caveat', cursive;
  font-size: 1.4rem;
  color: #2c3e50;
  margin-bottom: 15px;
  transform: rotate(-0.5deg);
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 15px;
  background: linear-gradient(135deg, #fff, #f8f9fa);
  border: 2px solid #e9ecef;
  border-radius: 20px;
  text-decoration: none;
  color: #2c3e50;
  font-family: 'Patrick Hand', cursive;
  font-size: 1rem;
  transition: all 0.3s ease;
  transform: rotate(-1deg);
}

.social-link:hover {
  transform: rotate(0deg) translateY(-2px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
}

.social-link:nth-child(2n) {
  transform: rotate(1deg);
}

.social-link:nth-child(2n):hover {
  transform: rotate(0deg) translateY(-2px);
}

.social-icon {
  font-size: 1.2rem;
}

.social-text {
  font-weight: 500;
}

/* Footer */
.notebook-footer {
  text-align: center;
  padding: 40px;
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  border-top: 2px dashed #6c757d;
  margin-top: 40px;
}

.footer-doodles {
  font-size: 2rem;
  margin-bottom: 15px;
}

.doodle {
  margin: 0 10px;
  display: inline-block;
  animation: float 3s ease-in-out infinite;
}

.doodle:nth-child(2) {
  animation-delay: -1s;
}

.doodle:nth-child(3) {
  animation-delay: -2s;
}

.doodle:nth-child(4) {
  animation-delay: -3s;
}

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

.notebook-footer p {
  font-family: 'Patrick Hand', cursive;
  font-size: 1.2rem;
  color: #7f8c8d;
}

/* Responsive design */
@media (max-width: 768px) {
  .notebook-container {
    margin: 10px;
    margin-left: 30px;
  }
  
  .notebook-container::before {
    left: -30px;
    width: 30px;
  }
  
  .spiral-binding {
    left: -20px;
    width: 15px;
  }
  
  .main-title {
    font-size: 2.5rem;
  }
  
  .chapter-title {
    font-size: 2rem;
  }
  
  .two-column {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .rules-grid {
    grid-template-columns: 1fr;
  }
  
  .notebook-header,
  .chapter,
  .table-of-contents {
    padding: 20px;
  }

  .video-container iframe {
    width: 100%;
    height: 200px;
  }

  .cta-section {
    margin: 20px;
    padding: 20px;
  }

  .cta-title {
    font-size: 1.8rem;
  }
}

@media (max-width: 480px) {
  .main-title {
    font-size: 2rem;
  }
  
  .chapter-title {
    font-size: 1.6rem;
  }
  
  .fill-blank {
    min-width: 80px;
    display: block;
    margin: 10px 0;
  }

  .video-container iframe {
    height: 180px;
  }

  .cta-title {
    font-size: 1.5rem;
  }
}

/* Math styling improvements */
.MathJax {
  color: #2c3e50 !important;
}

/* Smooth scroll behavior */
html {
  scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* ===============================================
   QUANTUM TRIVIA GAME STYLES
   =============================================== */

.trivia-section {
  margin: 30px 40px;
  padding: 30px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 20px;
  box-shadow: 0 15px 35px rgba(102, 126, 234, 0.4);
}

.trivia-container {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.trivia-title {
  font-family: 'Caveat', cursive;
  font-size: 2.8rem;
  color: white;
  margin-bottom: 5px;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

.trivia-subtitle {
  font-family: 'Patrick Hand', cursive;
  font-size: 1.2rem;
  color: rgba(255,255,255,0.9);
  margin-bottom: 20px;
}

.trivia-score {
  font-family: 'Kalam', cursive;
  font-size: 1.4rem;
  color: white;
  background: rgba(255,255,255,0.2);
  padding: 10px 25px;
  border-radius: 30px;
  display: inline-block;
  margin-bottom: 20px;
  backdrop-filter: blur(5px);
}

.trivia-streak {
  color: #ffd700;
  margin-left: 10px;
  font-weight: bold;
}

.trivia-card-container {
  perspective: 1000px;
  margin: 20px 0;
}

.trivia-card {
  background: white;
  border-radius: 20px;
  padding: 30px;
  min-height: 250px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  position: relative;
  transition: transform 0.5s ease, box-shadow 0.3s ease;
}

.trivia-card:hover {
  box-shadow: 0 15px 40px rgba(0,0,0,0.3);
}

.trivia-card.correct-swipe {
  animation: swipeRight 0.5s ease;
  border: 3px solid #2ecc71;
}

.trivia-card.incorrect-swipe {
  animation: swipeLeft 0.5s ease;
  border: 3px solid #e74c3c;
}

@keyframes swipeRight {
  0% { transform: translateX(0) rotate(0); }
  50% { transform: translateX(30px) rotate(5deg); }
  100% { transform: translateX(0) rotate(0); }
}

@keyframes swipeLeft {
  0% { transform: translateX(0) rotate(0); }
  50% { transform: translateX(-30px) rotate(-5deg); }
  100% { transform: translateX(0) rotate(0); }
}

.trivia-question {
  font-family: 'Patrick Hand', cursive;
  font-size: 1.5rem;
  color: #2c3e50;
  line-height: 1.5;
  margin-bottom: 20px;
}

.question-number {
  font-size: 0.9rem;
  color: #7f8c8d;
  background: #ecf0f1;
  padding: 3px 12px;
  border-radius: 15px;
}

.trivia-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

.trivia-option {
  font-family: 'Kalam', cursive;
  font-size: 1.1rem;
  padding: 15px 20px;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border: 2px solid #dee2e6;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: left;
}

.trivia-option:hover:not(:disabled) {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-color: #667eea;
  transform: translateX(5px);
}

.trivia-option.correct {
  background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
  color: white;
  border-color: #27ae60;
}

.trivia-option.incorrect {
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
  color: white;
  border-color: #c0392b;
}

.trivia-option:disabled {
  cursor: not-allowed;
  opacity: 0.8;
}

.trivia-swipe-hint {
  display: flex;
  justify-content: space-between;
  margin-top: 25px;
  font-family: 'Kalam', cursive;
  font-size: 1.1rem;
}

.swipe-left {
  color: #e74c3c;
  animation: bounceLeft 1s ease-in-out infinite;
}

.swipe-right {
  color: #2ecc71;
  animation: bounceRight 1s ease-in-out infinite;
}

@keyframes bounceLeft {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(-10px); }
}

@keyframes bounceRight {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(10px); }
}

.trivia-feedback {
  margin-top: 20px;
  padding: 15px;
  border-radius: 12px;
  font-family: 'Kalam', cursive;
  font-size: 1.1rem;
  display: none;
}

.trivia-feedback.correct {
  background: linear-gradient(135deg, #d5f5e3 0%, #a9dfbf 100%);
  color: #27ae60;
  border: 2px solid #2ecc71;
}

.trivia-feedback.incorrect {
  background: linear-gradient(135deg, #fadbd8 0%, #f5b7b1 100%);
  color: #c0392b;
  border: 2px solid #e74c3c;
}

.feedback-icon {
  font-size: 1.5rem;
}

.trivia-controls {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.trivia-btn {
  font-family: 'Kalam', cursive;
  font-size: 1.2rem;
  padding: 12px 30px;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: bold;
}

.trivia-true {
  background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
  color: white;
  box-shadow: 0 5px 15px rgba(46, 204, 113, 0.4);
}

.trivia-true:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(46, 204, 113, 0.5);
}

.trivia-false {
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
  color: white;
  box-shadow: 0 5px 15px rgba(231, 76, 60, 0.4);
}

.trivia-false:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(231, 76, 60, 0.5);
}

.trivia-next {
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
  color: white;
  box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

.trivia-next:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(52, 152, 219, 0.5);
}

.trivia-restart {
  margin-top: 20px;
  font-family: 'Patrick Hand', cursive;
  font-size: 1.1rem;
  padding: 10px 25px;
  background: rgba(255,255,255,0.2);
  color: white;
  border: 2px solid rgba(255,255,255,0.5);
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.trivia-restart:hover {
  background: rgba(255,255,255,0.3);
  transform: scale(1.05);
}

.game-over-emoji {
  font-size: 4rem;
  display: block;
  margin-bottom: 15px;
}

/* Mobile responsiveness for trivia */
@media (max-width: 768px) {
  .trivia-section {
    margin: 20px 15px;
    padding: 20px;
  }
  
  .trivia-title {
    font-size: 2rem;
  }
  
  .trivia-question {
    font-size: 1.3rem;
  }
  
  .trivia-controls {
    flex-direction: column;
  }
  
  .trivia-btn {
    width: 100%;
    justify-content: center;
  }
}

/* Quantum Fields Tree Diagram */
.quantum-fields-section {
  margin: 30px 20px;
  padding: 30px;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  border-radius: 20px;
  box-shadow: 0 15px 40px rgba(0,0,0,0.3);
}

.quantum-fields-section .note-section {
  background: rgba(255,255,255,0.03);
  border-radius: 15px;
  padding: 25px;
}

.quantum-fields-section .chapter-title {
  color: #e94560;
  text-shadow: 0 0 20px rgba(233, 69, 96, 0.5);
}

.quantum-fields-section .handwritten-note {
  color: #e0e0e0;
}

.tree-diagram {
  background: rgba(0,0,0,0.4);
  border-radius: 15px;
  padding: 25px;
  margin: 25px 0;
  overflow-x: auto;
  border: 1px solid rgba(233, 69, 96, 0.3);
  box-shadow: inset 0 0 30px rgba(0,0,0,0.3);
}

.quantum-tree {
  font-family: 'Courier New', monospace;
  font-size: 0.95rem;
  line-height: 1.8;
  color: #a0a0a0;
  white-space: pre;
  margin: 0;
}

/* Tree node colors */
.tree-category {
  color: #00d9ff;
  font-weight: bold;
  text-shadow: 0 0 10px rgba(0, 217, 255, 0.5);
}

.tree-fermion {
  color: #ff6b9d;
  font-weight: bold;
}

.tree-quark {
  color: #ffd93d;
  font-weight: bold;
}

.tree-lepton {
  color: #6bcb77;
  font-weight: bold;
}

.tree-boson {
  color: #4d96ff;
  font-weight: bold;
}

.tree-scalar {
  color: #c9b1ff;
  font-weight: bold;
}

.tree-higgs {
  color: #ff9f43;
  font-weight: bold;
  text-shadow: 0 0 10px rgba(255, 159, 67, 0.5);
}

.tree-label {
  color: #888;
  font-style: italic;
  font-size: 0.9em;
}

.tree-highlight {
  color: #fff;
  background: rgba(255,255,255,0.1);
  padding: 2px 6px;
  border-radius: 4px;
}

.tree-formula {
  color: #00ff88;
  font-weight: bold;
  letter-spacing: 1px;
}

.tree-bound {
  color: #ff8a5c;
}

.tree-baryon {
  color: #ff6b6b;
}

.tree-meson {
  color: #feca57;
}

.tree-anti {
  color: #ff9ff3;
  font-style: italic;
}

.tree-neutrino {
  color: #54a0ff;
}

.tree-gluon {
  color: #ff6b6b;
}

.tree-photon {
  color: #ffd93d;
  text-shadow: 0 0 8px rgba(255, 217, 61, 0.6);
}

.tree-weak {
  color: #a29bfe;
}

.tree-graviton {
  color: #636e72;
  font-style: italic;
}

/* Color charge indicators */
.color-red {
  color: #ff6b6b;
}

.color-green {
  color: #6bcb77;
}

.color-blue {
  color: #4d96ff;
}

.quantum-fields-section .important-box {
  background: rgba(255,255,255,0.08);
  border-left: 4px solid #00d9ff;
}

.quantum-fields-section .important-box strong {
  color: #00d9ff;
}

.quantum-fields-section .important-box li {
  color: #d0d0d0;
}

.quantum-fields-section .doodle-note {
  text-align: center;
  font-size: 1.2rem;
  color: #ffd93d;
  margin-top: 20px;
  padding: 15px;
  background: rgba(255, 217, 61, 0.1);
  border-radius: 10px;
}

/* Mobile responsiveness for tree */
@media (max-width: 768px) {
  .quantum-tree {
    font-size: 0.75rem;
    line-height: 1.6;
  }
  
  .tree-diagram {
    padding: 15px;
  }
  
  .quantum-fields-section {
    margin: 20px 10px;
    padding: 20px;
  }
}

/* Branches of Mathematics Section */
.math-branches-section {
  margin: 30px 20px;
  padding: 30px;
}

.math-branch-card {
  background: rgba(255, 255, 255, 0.7);
  border-radius: 12px;
  padding: 24px;
  margin: 20px 0;
  border-left: 5px solid #ccc;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.math-branch-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.math-branch-card.applied {
  border-left-color: #27ae60;
}

.math-branch-card.topology {
  border-left-color: #8e44ad;
}

.math-branch-card.analysis {
  border-left-color: #2980b9;
}

.branch-title {
  font-family: 'Caveat', cursive;
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.math-branch-card.applied .branch-title {
  color: #27ae60;
}

.math-branch-card.topology .branch-title {
  color: #8e44ad;
}

.math-branch-card.analysis .branch-title {
  color: #2980b9;
}

@media (max-width: 768px) {
  .math-branches-section {
    margin: 20px 10px;
    padding: 20px;
  }

  .math-branch-card {
    padding: 16px;
  }

  .branch-title {
    font-size: 1.5rem;
  }
}

/* Chess Analogy Section */
.chess-analogy-section {
  margin: 30px 20px;
  padding: 30px;
}

.math-branch-card.chess-classical {
  border-left-color: #7f8c8d;
}

.math-branch-card.chess-classical .branch-title {
  color: #7f8c8d;
}

.math-branch-card.chess-quantum {
  border-left-color: #8e44ad;
}

.math-branch-card.chess-quantum .branch-title {
  color: #8e44ad;
}

.math-branch-card.chess-nondeterministic {
  border-left-color: #e67e22;
}

.math-branch-card.chess-nondeterministic .branch-title {
  color: #e67e22;
}

@media (max-width: 768px) {
  .chess-analogy-section {
    margin: 20px 10px;
    padding: 20px;
  }
}
