:root {
  /* --- COLOR PALETTE --- */
  --light-bg: #eef2f5;
  --light-text: #1e293b;
  --light-card: rgba(255, 255, 255, 0.45);
  --light-border: rgba(255, 255, 255, 0.8);
  --light-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);

  --dark-bg: #0f172a;
  --dark-text: #f1f5f9;
  --dark-card: rgba(17, 25, 40, 0.55);
  --dark-border: rgba(255, 255, 255, 0.2);
  --dark-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);

  /* --- SEMANTIC COLORS --- */
  --primary: #4f46e5;
  --secondary: #06b6d4;
  --accent: #f59e0b;
  --danger: #ef4444;
  --success: #10b981;

  /* --- GLASS --- */
  --blur: blur(20px);

  /* --- GRADIENTS --- */
  --grad-light: radial-gradient(at 0% 0%, hsla(253, 16%, 90%, 1) 0, transparent 50%), radial-gradient(at 50% 100%, hsla(225, 39%, 90%, 1) 0, transparent 50%);
  --grad-dark: radial-gradient(at 0% 0%, hsla(253, 16%, 10%, 1) 0, transparent 50%), radial-gradient(at 50% 100%, hsla(225, 39%, 10%, 1) 0, transparent 50%);

  /* --- DEFAULTS --- */
  --bg-color: var(--light-bg);
  --text-color: var(--light-text);
  --card-bg: var(--light-card);
  --border-color: var(--light-border);
  --shadow: var(--light-shadow);
  --page-gradient: var(--grad-light);
}

body.dark {
  --bg-color: var(--dark-bg);
  --text-color: var(--dark-text);
  --card-bg: var(--dark-card);
  --border-color: var(--dark-border);
  --shadow: var(--dark-shadow);
  --page-gradient: var(--grad-dark);
}

/* --- RESET --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg-color);
  background-image: var(--page-gradient);
  background-attachment: fixed;
  color: var(--text-color);
  min-height: 100vh;
  padding-bottom: 120px;
  /* Space for Navbar */
  transition: background 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

/* Noise Texture */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: -1;
  opacity: 0.5;
}

/* --- GLASS CARD COMPONENT --- */
.glass-card {
  background: var(--card-bg);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow);
  border-radius: 24px;
  padding: 24px;
  margin-bottom: 20px;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.glass-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
  border-color: rgba(255, 255, 255, 0.8);
}

body.dark .glass-card:hover {
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(30, 41, 65, 0.7);
  /* Slightly lighter on hover */
}

/* --- LAYOUT UTILS --- */
.app-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  padding-top: 10px;
}

.page {
  display: none;
  animation: fadeUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.page.active {
  display: block;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* --- HEADER (HERO) --- */
.main-header {
  text-align: center;
  position: relative;
  z-index: 1;
  margin-bottom: 20px;
  padding: 30px 20px !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  /* Hero Card Specifics */
  background: rgba(255, 255, 255, 0.3);
  /* Slightly more opaque for prominence */
  border: 1px solid rgba(255, 255, 255, 0.6);
}

body.dark .main-header {
  background: rgba(17, 25, 40, 0.7);
  border-color: rgba(255, 255, 255, 0.15);
}

.brand-top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 10px;
}

.brand-icon {
  font-size: 2rem;
  color: var(--primary);
  background: rgba(79, 70, 229, 0.1);
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(79, 70, 229, 0.2);
}

.brand-title {
  font-size: clamp(1.8rem, 5vw, 2.5rem);
  font-weight: 800;
  line-height: 1.1;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-transform: uppercase;
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.brand-meta {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  flex-wrap: wrap;
  justify-content: center;
}

.location-badge,
.session-badge {
  font-size: 0.8rem;
  padding: 6px 12px;
  border-radius: 20px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
}

.location-badge {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.session-badge {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.tagline {
  font-size: 0.9rem;
  color: var(--text-color);
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: 0.8;
  margin-bottom: 20px;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 5px 20px;
  display: inline-block;
}

/* --- BUTTONS --- */
.btn-wa {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, #25D366, #128C7E);
  /* Gradient WA */
  color: white;
  width: 100%;
  max-width: 300px;
  padding: 14px 24px;
  border-radius: 16px;
  text-decoration: none;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
  margin-top: 5px;
  transition: all 0.2s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 1.05rem;
}

.btn-wa:hover {
  transform: scale(1.05);
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
  }

  70% {
    box-shadow: 0 0 0 10px rgba(37, 211, 102, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

.btn-text {
  background: none;
  border: none;
  color: var(--primary);
  font-weight: 700;
  cursor: pointer;
  font-size: 0.9rem;
}

.btn-outline {
  display: block;
  width: 100%;
  padding: 12px;
  text-align: center;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  text-decoration: none;
  color: var(--text-color);
  font-weight: 600;
  margin-top: 15px;
  background: rgba(255, 255, 255, 0.1);
  transition: all 0.2s;
}

.btn-outline:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(79, 70, 229, 0.2);
}

.btn-submit {
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--dark-bg), #000);
  color: white;
  font-weight: 700;
  font-size: 1rem;
  margin-top: 20px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: all 0.2s;
}

body.dark .btn-submit {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.btn-back {
  background: none;
  border: none;
  color: var(--primary);
  font-weight: 600;
  cursor: pointer;
}

/* --- STORY & TIMELINE --- */
.story-container {
  position: relative;
  z-index: 2;
  padding-top: 30px;
}

.card-title {
  text-align: center;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 20px;
}

.timeline {
  border-left: 2px solid var(--border-color);
  margin-left: 10px;
  padding-left: 20px;
}

.timeline-item {
  position: relative;
  margin-bottom: 25px;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -26px;
  top: 5px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.timeline-item.danger::before {
  background: var(--danger);
}

.timeline-item.info::before {
  background: var(--secondary);
}

.timeline-item.success::before {
  background: var(--success);
}

.timeline-title {
  font-weight: 700;
  margin-bottom: 5px;
  color: var(--text-color);
}

.danger .timeline-title {
  color: var(--danger);
}

.info .timeline-title {
  color: var(--secondary);
}

.success .timeline-title {
  color: var(--success);
}

.read-more-wrapper {
  margin-top: 20px;
  text-align: center;
  border-top: 1px dashed var(--border-color);
  padding-top: 15px;
}

/* --- LOCATION --- */
.location-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 5px;
  font-size: 1.1rem;
}

.icon-danger {
  color: var(--danger);
}

/* --- PAGE HEADER --- */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.subtitle {
  font-size: 0.9rem;
  color: var(--text-color);
  opacity: 0.7;
}

/* --- FEATURES LIST --- */
.feature-list {
  list-style: none;
}

.feature-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
  transition: all 0.2s ease;
  padding-left: 5px;
}

.feature-list li:hover {
  transform: translateX(5px);
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding-left: 10px;
}

.feature-list li:last-child {
  border-bottom: none;
}

.feature-list i {
  color: var(--success);
  margin-right: 10px;
}

/* --- BATCH CARDS --- */
.batch-grid {
  display: grid;
  gap: 15px;
}

.batch-card {
  border-left: 4px solid #ccc;
  padding: 20px;
}

.batch-card.xii {
  border-color: var(--primary);
}

.batch-card.x {
  border-color: var(--success);
}

.batch-card.xi {
  border-color: var(--secondary);
}

.batch-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
}

.badge {
  color: white;
  font-size: 0.7rem;
  padding: 4px 8px;
  border-radius: 6px;
  font-weight: 700;
}

.text-purple {
  color: var(--primary);
}

.bg-purple {
  background: var(--primary);
}

.text-green {
  color: var(--success);
}

.bg-green {
  background: var(--success);
}

.text-blue {
  color: var(--secondary);
}

.bg-blue {
  background: var(--secondary);
}

.batch-date {
  font-size: 2rem;
  font-weight: 800;
}

/* --- FEE TABLE --- */
.fee-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border-color);
}

.fee-row:last-child {
  border-bottom: none;
}

/* --- ROUTINE TABLE --- */
.table-container {
  overflow-x: auto;
  padding: 10px;
}

table {
  width: 100%;
  min-width: 500px;
  border-collapse: collapse;
}

th {
  text-align: left;
  padding: 10px;
  font-size: 0.8rem;
  color: var(--primary);
  border-bottom: 2px solid var(--border-color);
}

td {
  padding: 10px;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.85rem;
}

.bg-math {
  color: var(--primary);
  font-weight: 600;
  background: rgba(79, 70, 229, 0.05);
  border-left: 3px solid var(--primary);
}

.bg-chem {
  color: var(--accent);
  font-weight: 600;
  background: rgba(245, 158, 11, 0.05);
  border-left: 3px solid var(--accent);
}

/* --- DOWNLOADS --- */
.downloads-grid {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.download-card {
  padding: 15px;
}

.dl-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
}

.dl-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
}

.bg-orange {
  background: var(--accent);
}

.text-orange {
  color: var(--accent);
}

.bg-teal {
  background: var(--secondary);
}

.text-teal {
  color: var(--secondary);
}

.btn-dl {
  display: flex;
  justify-content: space-between;
  background: var(--bg-color);
  color: var(--text-color);
  padding: 12px 15px;
  border-radius: 12px;
  text-decoration: none;
  margin-bottom: 8px;
  border: 1px solid var(--border-color);
  font-weight: 600;
  transition: 0.2s;
}

.btn-dl:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 5px 15px rgba(79, 70, 229, 0.3);
}

/* --- FORMS --- */
.form-group {
  margin-bottom: 15px;
}

.form-input {
  width: 100%;
  padding: 16px;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  color: var(--text-color);
  border-radius: 12px;
  font-size: 1rem;
  font-family: inherit;
  transition: 0.3s;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.text-red {
  color: var(--danger);
  text-align: center;
}

.note {
  font-size: 0.8rem;
  text-align: center;
  margin-top: 15px;
  opacity: 0.6;
}

/* --- NAVBAR --- */
.navbar {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  width: 90%;
  max-width: 400px;
  border-radius: 20px;
  display: flex;
  justify-content: space-between;
  padding: 10px 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  border: 1px solid rgba(255, 255, 255, 0.5);
}

body.dark .navbar {
  background: rgba(30, 30, 30, 0.8);
  border-color: rgba(255, 255, 255, 0.1);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--text-color);
  opacity: 0.5;
  font-size: 0.7rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  gap: 4px;
  padding: 5px;
  border-radius: 12px;
}

.nav-item:hover {
  opacity: 1;
  background: rgba(79, 70, 229, 0.1);
  transform: translateY(-2px);
}

.nav-item i {
  font-size: 1.2rem;
  transition: transform 0.3s;
}

.nav-item:hover i {
  transform: scale(1.2);
}

.nav-item.active {
  opacity: 1;
  color: var(--primary);
  transform: translateY(-4px);
  background: rgba(79, 70, 229, 0.1);
  /* Subtle active bg */
}

/* Mobile Tweak */
@media (max-width: 380px) {
  .batch-date {
    font-size: 1.5rem;
  }

  .brand-title {
    font-size: 2rem;
  }
}