:root {
  --primary-color: #2563eb;
  --primary-color-rgb: 37, 99, 235;
  --secondary-color: #1e40af;
  --notebook-blue: #1c4ed8;
  --notebook-red: #dc2626;
  --notebook-green: #16a34a;
  --notebook-purple: #9333ea;
  --background-color: #fefefe;
  --surface-color: #fffef8;
  --paper-color: #fcfcfc;
  --text-color: #1a1a1a;
  --text-secondary: #4a5568;
  --border-color: #d1d5db;
  --line-color: #e2e8f0;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 8px 25px rgba(0, 0, 0, 0.15);
  --doodle-shadow: 2px 2px 0px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
  --background-color: #1e1e1e;
  --surface-color: #2a2a2a;
  --paper-color: #262626;
  --text-color: #f0f0f0;
  --text-secondary: #c7c7c7;
  --border-color: #404040;
  --line-color: #404040;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 25px rgba(0, 0, 0, 0.4);
  --doodle-shadow: 2px 2px 0px rgba(255, 255, 255, 0.1);
}

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

body {
  font-family: "Indie Flower", "Kalam", cursive;
  background: var(--background-color);
  background-image: linear-gradient(
      90deg,
      var(--line-color) 1px,
      transparent 1px
    ),
    linear-gradient(var(--line-color) 1px, transparent 1px),
    linear-gradient(rgba(255, 0, 0, 0.1) 1px, transparent 1px);
  background-size: 50px 50px, 50px 50px, 50px 25px;
  background-position: 0 0, 0 0, 80px 0;
  color: var(--text-color);
  line-height: 1.8;
  transition: all 0.3s ease;
  font-size: 18px;

  /* Content Protection */
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

.container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 1rem 4rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 3px dashed var(--notebook-blue);
  position: relative;
}

header::before {
  content: "✧ ★ ✧";
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--notebook-purple);
  font-size: 1rem;
  letter-spacing: 1rem;
  opacity: 0.7;
}

h1 {
  font-family: "Caveat", cursive;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--notebook-blue);
  text-shadow: var(--doodle-shadow);
  position: relative;
  margin-bottom: 0;
  transform: rotate(-1deg);
}

h1::before {
  content: "★";
  position: absolute;
  left: -40px;
  top: -10px;
  color: var(--notebook-red);
  font-size: 1.5rem;
  transform: rotate(15deg);
  animation: twinkle 2s ease-in-out infinite alternate;
}

h1::after {
  content: "✎";
  position: absolute;
  right: -35px;
  bottom: -5px;
  color: var(--notebook-green);
  font-size: 1.2rem;
  transform: rotate(-20deg);
}

@keyframes twinkle {
  0% {
    opacity: 0.5;
    transform: rotate(15deg) scale(0.8);
  }
  100% {
    opacity: 1;
    transform: rotate(15deg) scale(1.2);
  }
}

h2 {
  font-family: "Caveat", cursive;
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--notebook-purple);
  text-shadow: var(--doodle-shadow);
  position: relative;
}

h3 {
  font-family: "Kalam", cursive;
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--notebook-blue);
}

.theme-toggle {
  background: var(--surface-color);
  border: 3px solid var(--notebook-blue);
  border-radius: 50% 40% 50% 40%;
  width: 55px;
  height: 55px;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--doodle-shadow);
  transform: rotate(2deg);
  position: relative;
}

.theme-toggle:hover {
  transform: rotate(-2deg) scale(1.1);
  box-shadow: var(--shadow-lg);
  border-color: var(--notebook-red);
}

.theme-toggle::before {
  content: "";
  position: absolute;
  top: -8px;
  right: -8px;
  width: 12px;
  height: 12px;
  background: var(--notebook-green);
  border-radius: 50%;
  opacity: 0.7;
}

.back-button {
  background: var(--surface-color);
  color: var(--notebook-blue);
  border: 3px solid var(--notebook-blue);
  padding: 0.8rem 1.8rem;
  border-radius: 25px 15px 25px 15px;
  font-size: 1.1rem;
  font-family: "Kalam", cursive;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 2rem;
  box-shadow: var(--doodle-shadow);
  transform: rotate(-1deg);
  position: relative;
}

.back-button:hover {
  background: var(--notebook-blue);
  color: white;
  transform: rotate(1deg) scale(1.05);
  box-shadow: var(--shadow-lg);
}

.back-button::before {
  content: "➤";
  position: absolute;
  left: -15px;
  top: 50%;
  transform: translateY(-50%) rotate(180deg);
  color: var(--notebook-red);
  font-size: 1.2rem;
}

.header-buttons {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.download-btn {
  background: var(--surface-color);
  color: var(--notebook-green);
  border: 3px solid var(--notebook-green);
  padding: 0.8rem 1.5rem;
  border-radius: 15px 25px 15px 25px;
  font-size: 1.1rem;
  font-family: "Kalam", cursive;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--doodle-shadow);
  transform: rotate(1deg);
  position: relative;
}

.download-btn:hover {
  background: var(--notebook-green);
  color: white;
  transform: rotate(-1deg) scale(1.05);
  box-shadow: var(--shadow-lg);
}

.download-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.download-btn i {
  margin-right: 0.5rem;
}

/* Content Protection - Disable all images */
img {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
}

/* Subject Grid - 3 cards in one row */
.subject-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  padding: 1rem;
  max-width: 100%;
  margin: 0 auto;
}

.subject-card {
  background: linear-gradient(
    135deg,
    var(--card-bg) 0%,
    var(--card-hover) 100%
  );
  border: 3px solid var(--primary-color);
  border-radius: 20px;
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  transform: rotate(-1deg);
  border-style: dashed;
}

.subject-card:nth-child(even) {
  transform: rotate(1.5deg);
}

.subject-card:nth-child(3n) {
  transform: rotate(-0.5deg);
}

.subject-card:hover {
  transform: scale(1.05) rotate(0deg);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
  background: linear-gradient(
    135deg,
    var(--card-hover) 0%,
    var(--primary-color) 100%
  );
  color: white;
}

.subject-card::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 15px;
  width: 20px;
  height: 20px;
  background: var(--notebook-green);
  border-radius: 50% 30% 50% 30%;
  opacity: 0.6;
}

.subject-card::after {
  content: "✧";
  position: absolute;
  top: 10px;
  right: 15px;
  color: var(--notebook-purple);
  font-size: 1rem;
  transform: rotate(25deg);
}

.subject-icon {
  font-size: 3.5rem;
  margin-bottom: 0.8rem;
  color: var(--notebook-blue);
  text-shadow: var(--doodle-shadow);
}

.subject-card h2 {
  font-family: "Caveat", cursive;
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  color: var(--notebook-purple);
  text-shadow: var(--doodle-shadow);
  transform: rotate(-1deg);
}

.subject-card p {
  color: var(--text-secondary);
  font-family: "Kalam", cursive;
  font-size: 1.1rem;
  line-height: 1.6;
}

.donation-card {
  background: linear-gradient(135deg, #ff6b6b 0%, #ff8e8e 100%);
  border-color: #ff4757;
}

.donation-card:hover {
  background: linear-gradient(135deg, #ff4757 0%, #ff3742 100%);
}

/* Donation Page Styles */
.donation-layout {
  display: flex;
  gap: 2rem;
  padding: 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.donation-content {
  flex: 1;
  max-width: 800px;
  margin: 0 auto;
}

.donation-card-main {
  background: var(--card-bg);
  border: 3px dashed var(--primary-color);
  border-radius: 20px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  transform: rotate(-0.5deg);
}

.donation-header {
  text-align: center;
  margin-bottom: 2rem;
}

.donation-heart {
  font-size: 3rem;
  color: #ff4757;
  margin-bottom: 1rem;
  animation: heartbeat 2s ease-in-out infinite;
}

@keyframes heartbeat {
  0% {
    transform: scale(1);
  }
  14% {
    transform: scale(1.1);
  }
  28% {
    transform: scale(1);
  }
  42% {
    transform: scale(1.1);
  }
  70% {
    transform: scale(1);
  }
}

.donation-header h2 {
  font-family: "Caveat", cursive;
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.donation-header p {
  font-family: "Kalam", cursive;
  font-size: 1.1rem;
  color: var(--text-color);
  line-height: 1.6;
}

.donation-form {
  margin-bottom: 2rem;
}

.amount-section {
  margin-bottom: 2rem;
}

.amount-section h3 {
  font-family: "Caveat", cursive;
  font-size: 1.8rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.preset-amounts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.amount-btn {
  background: var(--card-bg);
  border: 2px solid var(--primary-color);
  border-radius: 15px;
  padding: 1rem;
  font-family: "Kalam", cursive;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--primary-color);
  cursor: pointer;
  transition: all 0.3s ease;
  transform: rotate(-1deg);
}

.amount-btn:nth-child(even) {
  transform: rotate(1deg);
}

.amount-btn:hover,
.amount-btn.active {
  background: var(--primary-color);
  color: white;
  transform: scale(1.05) rotate(0deg);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.custom-amount {
  margin-top: 1rem;
}

.custom-amount label {
  display: block;
  font-family: "Kalam", cursive;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 0.5rem;
}

.custom-amount input {
  width: 100%;
  padding: 1rem;
  border: 2px solid var(--primary-color);
  border-radius: 15px;
  font-family: "Kalam", cursive;
  font-size: 1.1rem;
  background: var(--card-bg);
  color: var(--text-color);
  transform: rotate(-0.5deg);
}

.custom-amount input:focus {
  outline: none;
  transform: rotate(0deg);
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.3);
}

.donor-info {
  margin-bottom: 2rem;
}

.donor-info h3 {
  font-family: "Caveat", cursive;
  font-size: 1.8rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-family: "Kalam", cursive;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 1rem;
  border: 2px solid var(--primary-color);
  border-radius: 15px;
  font-family: "Kalam", cursive;
  font-size: 1rem;
  background: var(--card-bg);
  color: var(--text-color);
  transform: rotate(-0.3deg);
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  transform: rotate(0deg);
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.3);
}

.donate-btn {
  width: 100%;
  background: transparent;
  color: #ff4757;
  border: 3px solid #ff4757;
  border-radius: 20px;
  padding: 1.5rem 2rem;
  font-family: "Caveat", cursive;
  font-size: 1.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  transform: rotate(-1deg);
}

.donate-btn:hover {
  background: linear-gradient(135deg, #ff4757 0%, #ff3742 100%);
  color: white;
  transform: scale(1.02) rotate(0deg);
}

.donate-btn i {
  margin-right: 0.5rem;
}

.donation-info {
  background: var(--card-hover);
  border: 2px solid var(--primary-color);
  border-radius: 15px;
  padding: 1.5rem;
  transform: rotate(0.5deg);
}

.donation-info h3 {
  font-family: "Caveat", cursive;
  font-size: 1.8rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.donation-info ul {
  list-style: none;
  padding: 0;
}

.donation-info li {
  font-family: "Kalam", cursive;
  color: var(--text-color);
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
}

.donation-info li i {
  color: var(--primary-color);
  margin-right: 0.8rem;
  width: 20px;
}

/* Notification System */
#notification-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  max-width: 400px;
}

.notification {
  background: var(--card-bg);
  border: 3px solid;
  border-radius: 15px;
  padding: 1rem 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  transform: translateX(100%);
  transition: all 0.3s ease;
  position: relative;
  font-family: "Kalam", cursive;
  animation: slideIn 0.3s ease forwards;
}

@keyframes slideIn {
  to {
    transform: translateX(0);
  }
}

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

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

.notification.info {
  border-color: #3498db;
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
  color: white;
}

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

.notification-title {
  font-weight: 600;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
}

.notification-title i {
  margin-right: 0.5rem;
  font-size: 1.2rem;
}

.notification-close {
  background: none;
  border: none;
  color: inherit;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s ease;
}

.notification-close:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.notification-message {
  font-size: 0.95rem;
  line-height: 1.4;
}

/* Responsive Design for Donation Page */
@media (max-width: 768px) {
  .donation-layout {
    flex-direction: column;
    padding: 1rem;
  }

  .ad-left,
  .ad-right {
    display: none;
  }

  .preset-amounts {
    grid-template-columns: repeat(2, 1fr);
  }

  .donation-header h2 {
    font-size: 2rem;
  }

  .donation-heart {
    font-size: 2.5rem;
  }

  .subject-grid {
    grid-template-columns: 1fr;
    padding: 1rem;
  }
}

@media (max-width: 480px) {
  .preset-amounts {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }

  .amount-btn {
    padding: 0.8rem;
    font-size: 1rem;
  }

  .donation-card-main {
    padding: 1rem;
  }

  #notification-container {
    top: 10px;
    right: 10px;
    left: 10px;
    max-width: none;
  }
}

/* Chapter List */
.chapter-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.chapter-card {
  background: var(--paper-color);
  border: 2px solid var(--notebook-blue);
  border-radius: 20px 8px 15px 12px;
  padding: 1.8rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--doodle-shadow);
  position: relative;
  transform: rotate(0.5deg);
}

.chapter-card:nth-child(even) {
  transform: rotate(-0.5deg);
  border-color: var(--notebook-green);
}

.chapter-card:hover {
  transform: translateY(-5px) rotate(0deg) scale(1.02);
  box-shadow: var(--shadow-lg);
  border-color: var(--notebook-red);
}

.chapter-card::before {
  content: "•";
  position: absolute;
  left: -8px;
  top: 15px;
  color: var(--notebook-red);
  font-size: 1.5rem;
  font-weight: bold;
}

.chapter-title {
  font-family: "Caveat", cursive;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--notebook-blue);
  margin-bottom: 0.8rem;
  text-shadow: var(--doodle-shadow);
  transform: rotate(-0.5deg);
}

.chapter-subtitle {
  color: var(--text-secondary);
  font-family: "Kalam", cursive;
  font-size: 1rem;
  line-height: 1.5;
}

/* Home Layout with Ads */
.home-layout {
  display: flex;
  gap: 2rem;
  margin-top: 1rem;
  justify-content: center;
  align-items: flex-start;
  flex: 1;
}

.home-layout .subject-grid {
  flex: 1;
  max-width: 100%;
  min-width: 300px;
  margin-top: 0;
}

/* Gallery Layout with Ads */
.gallery-layout {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
  justify-content: center;
  align-items: flex-start;
}

.ad-left,
.ad-right {
  width: 160px;
  position: sticky;
  top: 2rem;
}

/* Mobile Banner */
.mobile-banner {
  display: none;
  width: 100%;
  margin-bottom: 1rem;
  justify-content: center;
}

/* Image Gallery */
.gallery-container {
  flex: 1;
  max-width: 800px;
  min-width: 300px;
}

.image-gallery {
  display: flex;
  flex-direction: column;
  max-height: 80vh;
  overflow-y: auto;
  padding: 1.5rem;
  border: 3px solid var(--notebook-blue);
  border-radius: 20px 10px 15px 12px;
  background: var(--paper-color);
  position: relative;
  box-shadow: var(--doodle-shadow);
  transform: rotate(-0.5deg);
}


/* Custom scrollbar for the gallery */
.image-gallery::-webkit-scrollbar {
  width: 8px;
}

.image-gallery::-webkit-scrollbar-track {
  background: var(--border-color);
  border-radius: 4px;
}

.image-gallery::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 4px;
}

.image-gallery::-webkit-scrollbar-thumb:hover {
  background: var(--secondary-color);
}

.gallery-image {
  width: 100%;
  height: auto;
  display: block;
  margin-bottom: 1rem;
  border-radius: 8px;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;

  /* Additional image protection */
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  pointer-events: none;
}

.gallery-image:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Loading States */
.loading {
  text-align: center;
  padding: 3rem;
  color: var(--notebook-blue);
  font-family: "Caveat", cursive;
  font-size: 1.5rem;
  position: relative;
}

.loading::before {
  content: "✎";
  position: absolute;
  left: 50%;
  top: 1rem;
  transform: translateX(-50%);
  color: var(--notebook-green);
  font-size: 2rem;
  animation: bounce 1s ease-in-out infinite alternate;
}

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

.loading::after {
  content: "";
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-color);
  border-top: 2px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-left: 0.5rem;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Contact Section */
.contact-section {
  margin-top: 1rem;
  text-align: center;
  padding: 1rem 0;
  border-top: 2px solid var(--border-color);
}

.contact-section h3 {
  font-family: "Caveat", cursive;
  font-size: 1.8rem;
  color: var(--notebook-purple);
  margin-bottom: 1rem;
  text-shadow: var(--doodle-shadow);
  position: relative;
  transform: rotate(-1deg);
}

.contact-section h3::before {
  content: "✉";
  position: absolute;
  left: -30px;
  top: -5px;
  color: var(--notebook-red);
  font-size: 1.5rem;
  transform: rotate(20deg);
}

.contact-section h3::after {
  content: "➤";
  position: absolute;
  right: -30px;
  top: 5px;
  color: var(--notebook-green);
  font-size: 1.2rem;
  transform: rotate(-15deg);
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 55px;
  height: 55px;
  background: var(--paper-color);
  border: 3px solid var(--notebook-blue);
  border-radius: 50% 40% 60% 30%;
  color: var(--notebook-blue);
  font-size: 1.5rem;
  transition: all 0.3s ease;
  text-decoration: none;
  box-shadow: var(--doodle-shadow);
  position: relative;
}

.social-links a:nth-child(odd) {
  transform: rotate(5deg);
}

.social-links a:nth-child(even) {
  transform: rotate(-5deg);
}

.social-links a:hover {
  transform: translateY(-5px) rotate(0deg) scale(1.1);
  box-shadow: var(--shadow-lg);
  border-color: var(--notebook-red);
}

.social-links a[href*="instagram"]:hover {
  color: #e4405f;
  border-color: #e4405f;
}

.social-links a[href*="mailto"]:hover {
  color: #ea4335;
  border-color: #ea4335;
}

.social-links a[href*="linkedin"]:hover {
  color: #0077b5;
  border-color: #0077b5;
}

.social-links a[href*="x.com"]:hover {
  color: #000000;
  border-color: #000000;
}

[data-theme="dark"] .social-links a[href*="x.com"]:hover {
  color: #ffffff;
  border-color: #ffffff;
}

.social-links a[href*="github"]:hover {
  color: #333333;
  border-color: #333333;
}

[data-theme="dark"] .social-links a[href*="github"]:hover {
  color: #ffffff;
  border-color: #ffffff;
}

.social-links a[href*="youtube"]:hover {
  color: #ff0000;
  border-color: #ff0000;
}

/* Footer */
.footer {
  margin-top: auto;
  padding: 1rem 0;
  text-align: center;
  border-top: 3px dashed var(--notebook-blue);
  color: var(--text-secondary);
  position: relative;
}

.footer::before {
  content: "✎ ✐ ✎";
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--notebook-green);
  font-size: 1rem;
  letter-spacing: 1rem;
  opacity: 0.7;
}

.footer p {
  margin: 0;
  font-family: "Kalam", cursive;
  font-size: 1rem;
  transform: rotate(-0.5deg);
}

/* Responsive Design */
@media (max-width: 1200px) {
  .home-layout,
  .gallery-layout {
    gap: 1rem;
  }

  .ad-left,
  .ad-right {
    width: 160px;
    position: static;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 1rem;
  }

  h1 {
    font-size: 2rem;
  }

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

  .chapter-list {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .home-layout,
  .gallery-layout {
    flex-direction: column;
    gap: 1rem;
    align-items: center;
  }

  .ad-left,
  .ad-right {
    display: none;
  }

  .mobile-banner {
    display: flex;
  }

  .gallery-container {
    max-width: 100%;
  }

  .home-layout .subject-grid {
    max-width: 100%;
    justify-self: center;
  }

  header {
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .header-buttons {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .download-btn {
    padding: 0.6rem 1rem;
    font-size: 1rem;
  }

  .back-button {
    padding: 0.6rem 1rem;
    font-size: 1rem;
  }

  .image-gallery {
    max-height: 70vh;
    padding: 0.5rem;
  }

  .gallery-image {
    margin-bottom: 0.5rem;
    border-radius: 6px;
  }

  .contact-section {
    margin-top: 2rem;
    padding: 1.5rem 0;
  }

  .social-links {
    gap: 1rem;
  }

  .social-links a {
    width: 45px;
    height: 45px;
    font-size: 1.3rem;
  }

}

@media (max-width: 480px) {
  .container {
    padding: 0.5rem;
  }

  h1 {
    font-size: 1.5rem;
  }

  .subject-card {
    padding: 1.5rem;
  }

  .subject-icon {
    font-size: 3rem;
  }

  .header-buttons {
    width: 100%;
    justify-content: center;
  }

  .download-btn {
    padding: 0.5rem 0.8rem;
    font-size: 0.9rem;
  }

  .back-button {
    padding: 0.5rem 0.8rem;
    font-size: 0.9rem;
  }

  .contact-section {
    margin-top: 1.5rem;
    padding: 1rem 0;
  }

  .contact-section h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
  }

  .social-links {
    gap: 0.8rem;
  }

  .social-links a {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }

}
