/**
 * Mind Bridge Institute, Patna
 * Shared Student Portal Design System & Component Styles
 * Obsidian Black & 3D Metallic Gold Design Hierarchy
 */

:root {
  /* Obsidian & Charcoal Canvas */
  --obsidian-darkest:  #050608;
  --obsidian-bg:       #08090C;
  --obsidian-surface:  #0E1017;
  --obsidian-card:     #131620;
  --obsidian-elevated: #181C28;
  --obsidian-input:    #0C0E14;
  --obsidian-line:     rgba(212, 175, 55, 0.16);
  --obsidian-line-sub: rgba(255, 255, 255, 0.08);

  /* Metallic Gold Palette */
  --gold-highlight:    #FFF1C2;
  --gold-champagne:    #F8DF93;
  --gold-primary:      #D4AF37;
  --gold-rich:         #E2B743;
  --gold-glow:         rgba(212, 175, 55, 0.28);
  --gold-ambient:      rgba(212, 175, 55, 0.08);

  /* Section Accent Colors */
  --live-red:          #FF4B4B;
  --live-glow:         rgba(255, 75, 75, 0.35);
  --free-green:        #2ECC71;
  --free-glow:         rgba(46, 204, 113, 0.3);
  --paid-purple:       #9B59B6;
  --paid-glow:         rgba(155, 89, 182, 0.3);
  --badge-blue:        #3498DB;
  --badge-glow:        rgba(52, 152, 219, 0.3);
  --amber-orange:      #E67E22;
  --teal-accent:       #1ABC9C;
  --test-gold:         #F39C12;

  --text-primary:      #FFFFFF;
  --text-heading:      #FAF9F6;
  --text-secondary:    #CBD2DE;
  --text-muted:        #8E96A4;
  --text-faint:        #616775;

  --r-sm:              8px;
  --r:                 14px;
  --r-lg:              20px;
  --r-pill:            999px;

  --shadow-card:       0 12px 30px rgba(0, 0, 0, 0.6), 0 0 1px rgba(212, 175, 55, 0.2);
  --shadow-card-hover: 0 18px 40px rgba(0, 0, 0, 0.75), 0 0 20px rgba(212, 175, 55, 0.25);
  --grad-gold-btn:     linear-gradient(135deg, #FFE89D 0%, #D4AF37 50%, #B88E28 100%);
  --grad-gold-text:    linear-gradient(135deg, #FFF5CC 0%, #D4AF37 50%, #F5C518 100%);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  font-size: 16px;
  background-color: var(--obsidian-bg);
  color-scheme: dark;
}
body {
  font-family: 'Inter', 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  color: var(--text-secondary);
  background: var(--obsidian-bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% 10%, rgba(212, 175, 55, 0.1) 0%, transparent 60%),
    linear-gradient(180deg, #050608 0%, #08090C 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-bottom: 74px; /* Space for fixed mobile bottom nav */
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ============================================================
   TOP NAVIGATION BAR
============================================================ */
.dash-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: rgba(8, 9, 12, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--obsidian-line);
  position: sticky;
  top: 0;
  z-index: 100;
}
.brand-group {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #FFFFFF;
}
.brand-crest {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid rgba(212, 175, 55, 0.6);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.25);
  background: #000;
  overflow: hidden;
  flex-shrink: 0;
}
.brand-crest img { width: 100%; height: 100%; object-fit: cover; }
.brand-names { display: flex; flex-direction: column; }
.brand-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.brand-sub {
  font-size: 0.7rem;
  color: var(--gold-primary);
  font-weight: 600;
  letter-spacing: 0.03em;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.portal-badge {
  display: none;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gold-champagne);
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: var(--r-pill);
  padding: 4px 10px;
}
@media (min-width: 640px) {
  .portal-badge { display: inline-flex; }
}
.site-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--r-sm);
  padding: 6px 12px;
  text-decoration: none;
  transition: all .2s;
}
.site-link-btn:hover {
  background: rgba(212, 175, 55, 0.12);
  border-color: var(--gold-primary);
  color: var(--gold-champagne);
}
.header-avatar-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--gold-primary);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
  overflow: hidden;
  background: #000;
  cursor: pointer;
  text-decoration: none;
  display: block;
}
.header-avatar-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ============================================================
   DESKTOP STUDENT IDENTITY PILL
============================================================ */
.header-student-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 9999px;
  padding: 3px 14px 3px 3px;
  transition: all .2s ease;
}
.header-student-pill:hover {
  background: rgba(212, 175, 55, 0.12);
  border-color: var(--gold-primary);
}
.header-student-avatar-wrap {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, #1f2438, #11141e);
  border: 1.5px solid var(--gold-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.header-student-avatar-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.header-student-initials {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--gold-primary);
  letter-spacing: 0.02em;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.header-student-name {
  font-size: 0.84rem;
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: -0.01em;
  white-space: nowrap;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 679px) {
  .header-student-pill {
    padding: 0;
    border: none;
    background: transparent;
  }
  .header-student-name {
    display: none !important;
  }
}

/* ============================================================
   CONTAINER & VIEWS
============================================================ */
.dash-container {
  width: min(1040px, 100% - 24px);
  margin: 18px auto 28px;
  flex: 1;
}

.dash-view {
  display: none;
}
.dash-view.active {
  display: block;
  animation: fadeIn .25s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   WELCOME BANNER
============================================================ */
.welcome-banner {
  background: linear-gradient(165deg, rgba(22, 26, 38, 0.95) 0%, rgba(13, 15, 22, 0.98) 100%);
  border: 1.5px solid rgba(212, 175, 55, 0.3);
  border-radius: var(--r-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}
.welcome-banner::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-highlight), var(--gold-primary), transparent);
}
.welcome-user-info {
  display: flex;
  align-items: center;
  gap: 14px;
}
.user-photo-ring {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid var(--gold-primary);
  box-shadow: 0 0 16px rgba(212, 175, 55, 0.35);
  overflow: hidden;
  background: #000;
  flex-shrink: 0;
}
.user-photo-ring img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.welcome-text-wrap {
  display: flex;
  flex-direction: column;
}
.welcome-sub {
  font-size: 0.76rem;
  color: var(--gold-champagne);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.welcome-name {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(1.25rem, 4vw, 1.55rem);
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1.15;
}
.welcome-right-badge {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
}
.admit-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--free-green);
  background: rgba(46, 204, 113, 0.1);
  border: 1px solid rgba(46, 204, 113, 0.3);
  padding: 3px 10px;
  border-radius: var(--r-pill);
}
.pulse-green {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--free-green);
  box-shadow: 0 0 6px var(--free-green);
  animation: pulse 1.8s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.3); }
}
.admit-target {
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-top: 3px;
}

/* Notice Strip */
.notice-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.22);
  border-radius: var(--r);
  padding: 10px 14px;
  margin-bottom: 22px;
  font-size: 0.82rem;
  color: var(--text-secondary);
}
.notice-tag {
  background: var(--gold-primary);
  color: #000;
  font-weight: 800;
  font-size: 0.68rem;
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
  flex-shrink: 0;
}
.notice-text {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============================================================
   PAGE SECTION HEADERS
============================================================ */
.inpage-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.back-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  min-width: 40px;
  font-size: 1.45rem;
  font-weight: 800;
  color: #FFD700; /* Bright Vivid Yellow Arrow */
  background: rgba(255, 215, 0, 0.1);
  border: 1.5px solid rgba(255, 215, 0, 0.45);
  border-radius: 50%;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
  transition: all .2s ease;
  line-height: 1;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.18);
  flex-shrink: 0;
}
.back-btn:hover {
  background: rgba(255, 215, 0, 0.24);
  color: #FFF04D;
  border-color: #FFD700;
  box-shadow: 0 0 18px rgba(255, 215, 0, 0.45);
  transform: translateX(-3px);
}
.inpage-title-wrap {
  flex: 1;
  min-width: 200px;
}
.inpage-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.45rem;
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1.2;
}
.inpage-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ============================================================
   ACADEMIC LEARNING HUB (PREMIUM CARDS DESIGN SYSTEM)
============================================================ */
.section-headline {
  display: flex;
  align-items: center;
  margin-bottom: 18px;
}
.section-headline h3 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: -0.01em;
}

.square-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}
@media (min-width: 680px) {
  .square-cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }
}
@media (min-width: 990px) {
  .square-cards-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
  }
}

.square-card {
  position: relative;
  min-height: 154px;
  border-radius: 24px;
  padding: 20px 18px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  text-decoration: none;
  color: #FFFFFF;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 12px 28px -6px rgba(0, 0, 0, 0.45);
  transition: transform .28s cubic-bezier(0.2, 0, 0.2, 1), box-shadow .28s ease, filter .24s ease;
  border: 1px solid rgba(255, 255, 255, 0.14);
}
.square-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 100%;
  background: radial-gradient(circle at 85% 15%, rgba(255, 255, 255, 0.22), transparent 60%);
  pointer-events: none;
}
.square-card:hover {
  transform: translateY(-5px) scale(1.015);
  box-shadow: 0 20px 40px -8px var(--card-glow, rgba(0, 0, 0, 0.65));
  filter: brightness(1.05);
}
.square-card:active {
  transform: scale(0.97);
}

.card-top-row {
  display: flex;
  align-items: flex-start;
  width: 100%;
  margin-bottom: 16px;
}

.card-icon-frame {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1.5px solid rgba(255, 255, 255, 0.38);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
  flex-shrink: 0;
  color: #FFFFFF;
  transition: transform .24s ease, background .24s ease;
}
.card-icon-frame svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}
.square-card:hover .card-icon-frame {
  transform: scale(1.08);
  background: rgba(255, 255, 255, 0.28);
}

.card-content {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-right: 36px;
}

.card-name {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(1rem, 3.2vw, 1.15rem);
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1.22;
  letter-spacing: -0.015em;
}

.card-desc {
  font-size: 0.76rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.3;
  letter-spacing: 0.01em;
}

/* ============================================================
   RESPONSIVE SUBTITLE & MOBILE CARD OPTIMIZATION
============================================================ */
@media (max-width: 679px) {
  .square-card .card-desc {
    display: none !important;
  }
  .square-card {
    min-height: 104px !important;
    padding: 14px 14px 12px !important;
    border-radius: 16px !important;
    justify-content: space-between !important;
  }
  .card-top-row {
    margin-bottom: 8px !important;
  }
  .card-icon-frame {
    width: 36px !important;
    height: 36px !important;
    border-radius: 10px !important;
  }
  .card-icon-frame svg {
    width: 20px !important;
    height: 20px !important;
  }
  .card-content {
    padding-right: 30px !important;
    gap: 0 !important;
  }
  .card-name {
    font-size: 0.96rem !important;
    line-height: 1.2 !important;
    font-weight: 800 !important;
  }
  .card-action-btn {
    right: 12px !important;
    bottom: 12px !important;
    width: 28px !important;
    height: 28px !important;
  }
  .card-action-btn svg {
    width: 13px !important;
    height: 13px !important;
  }
  .square-cards-grid {
    gap: 12px !important;
  }
}
@media (min-width: 680px) {
  .square-card .card-desc {
    display: block !important;
  }
}

.card-action-btn {
  position: absolute;
  right: 16px;
  bottom: 16px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.24);
  border: 1px solid rgba(255, 255, 255, 0.38);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16);
  transition: transform .22s ease, background .22s ease;
  pointer-events: none;
}
.card-action-btn svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
  transition: transform .22s ease;
}
.square-card:hover .card-action-btn {
  transform: translateX(3px) scale(1.06);
  background: rgba(255, 255, 255, 0.38);
}
.square-card:hover .card-action-btn svg {
  transform: translateX(1px);
}

/* 7 Premium Gradients matching the design */
.card-grad-violet {
  background: linear-gradient(135deg, #4A3EBE 0%, #6852ED 52%, #8561F6 100%);
  --card-glow: rgba(104, 82, 237, 0.55);
}
.card-grad-blue {
  background: linear-gradient(135deg, #0270BD 0%, #028BE3 52%, #14B4E8 100%);
  --card-glow: rgba(2, 139, 227, 0.55);
}
.card-grad-orange {
  background: linear-gradient(135deg, #D44E0E 0%, #EA6A12 52%, #F69324 100%);
  --card-glow: rgba(234, 106, 18, 0.55);
}
.card-grad-ruby {
  background: linear-gradient(135deg, #B51A46 0%, #D8265D 52%, #E84D7B 100%);
  --card-glow: rgba(216, 38, 93, 0.55);
}
.card-grad-teal {
  background: linear-gradient(135deg, #097568 0%, #0D9488 52%, #14B8A6 100%);
  --card-glow: rgba(13, 148, 136, 0.55);
}
.card-grad-amber {
  background: linear-gradient(135deg, #9C5B09 0%, #C97A0A 52%, #EAB308 100%);
  --card-glow: rgba(201, 122, 10, 0.55);
}
.card-grad-indigo {
  background: linear-gradient(135deg, #2A45C4 0%, #3B66F5 52%, #6366F1 100%);
  --card-glow: rgba(59, 102, 245, 0.55);
}

/* Stats Strip */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  background: var(--obsidian-surface);
  border: 1px solid var(--obsidian-line);
  border-radius: var(--r);
  padding: 14px 10px;
  margin-bottom: 24px;
  text-align: center;
}
.stat-box strong {
  display: block;
  font-size: 1.1rem;
  font-weight: 800;
  color: #FFFFFF;
}
.stat-box span {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ============================================================
   EMPTY STATE BOX
============================================================ */
.empty-state-box {
  background: var(--obsidian-card);
  border: 1.5px dashed rgba(212, 175, 55, 0.32);
  border-radius: var(--r);
  padding: 40px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  max-width: 580px;
  margin: 20px auto;
  box-shadow: var(--shadow-card);
}
.empty-state-icon {
  font-size: 3rem;
  line-height: 1;
  filter: drop-shadow(0 4px 12px rgba(212, 175, 55, 0.25));
}
.empty-state-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--r-pill);
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.35);
  color: var(--gold-champagne);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.empty-state-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  color: #FFFFFF;
  margin: 0;
}
.empty-state-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 440px;
  margin: 0;
}
.empty-state-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 6px;
}

/* ============================================================
   ACTION BUTTONS
============================================================ */
.action-btn {
  padding: 8px 16px;
  border-radius: var(--r-sm);
  font-size: 0.85rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: all .2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}
.btn-gold {
  background: var(--grad-gold-btn);
  color: #000;
}
.btn-gold:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn-outline {
  background: transparent;
  color: var(--gold-champagne);
  border: 1px solid rgba(212, 175, 55, 0.4);
}
.btn-outline:hover { background: rgba(212, 175, 55, 0.12); color: #FFF; }
.btn-danger {
  background: rgba(255, 75, 75, 0.15);
  color: #FFA5A5;
  border: 1px solid rgba(255, 75, 75, 0.4);
}
.btn-danger:hover {
  background: rgba(255, 75, 75, 0.25);
  color: #FFFFFF;
}

/* ============================================================
   PROFILE BOX & METADATA
============================================================ */
.profile-box {
  background: var(--obsidian-card);
  border: 1.5px solid rgba(212, 175, 55, 0.35);
  border-radius: var(--r-lg);
  padding: 28px 20px;
  text-align: center;
  box-shadow: var(--shadow-card);
}
.profile-avatar-big {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 2.5px solid var(--gold-primary);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.35);
  margin: 0 auto 14px;
  overflow: hidden;
  background: #000;
}
.profile-avatar-big img { width: 100%; height: 100%; object-fit: cover; }
.profile-meta-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 20px 0;
  text-align: left;
}
.profile-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--r-sm);
  font-size: 0.88rem;
  gap: 8px;
}
.profile-meta-row span { color: var(--text-muted); font-size: 0.82rem; }
.profile-meta-row strong { color: #FFFFFF; font-weight: 700; word-break: break-all; }

/* ============================================================
   MODALS
============================================================ */
.inpage-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.inpage-modal.open {
  display: flex;
}
.modal-content {
  width: 100%;
  max-width: 580px;
  background: var(--obsidian-surface);
  border: 1.5px solid rgba(212, 175, 55, 0.4);
  border-radius: var(--r-lg);
  padding: 24px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85);
  max-height: 90vh;
  overflow-y: auto;
}
.modal-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
}
.modal-close-btn:hover { color: #FFFFFF; }

/* ============================================================
   BOTTOM NAVIGATION BAR (MOBILE & DESKTOP DOCK)
============================================================ */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: rgba(10, 12, 17, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--obsidian-line);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 4px;
  z-index: 90;
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.7);
}
.bnav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px 4px;
  border-radius: 8px;
  transition: all .2s;
  font-family: inherit;
  flex: 1;
  min-width: 0;
  text-decoration: none;
}
.bnav-icon {
  font-size: 1.25rem;
  line-height: 1;
  transition: transform .2s ease;
}
.bnav-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.bnav-item.active {
  color: var(--gold-champagne);
}
.bnav-item.active .bnav-icon {
  transform: translateY(-2px);
}
.bnav-item.active .bnav-label {
  color: var(--gold-primary);
}

/* ============================================================
   UNIVERSAL HIGH-PERFORMANCE SKELETON ANIMATION SYSTEM
   GPU-Accelerated Shimmer Wave matching Obsidian & Gold Theme
============================================================ */
@keyframes mbiSkeletonShimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.mbi-skeleton-shimmer,
.skeleton-shimmer {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.03) 0%,
    rgba(255, 255, 255, 0.06) 20%,
    rgba(212, 175, 55, 0.15) 50%,
    rgba(255, 255, 255, 0.06) 80%,
    rgba(255, 255, 255, 0.03) 100%
  ) !important;
  background-size: 200% 100% !important;
  animation: mbiSkeletonShimmer 1.5s cubic-bezier(0.4, 0, 0.2, 1) infinite !important;
  pointer-events: none !important;
  user-select: none !important;
  border-color: rgba(212, 175, 55, 0.14) !important;
}

.mbi-skeleton-card {
  background: var(--obsidian-card, #11141E) !important;
  border: 1px solid rgba(212, 175, 55, 0.16) !important;
  border-radius: 14px !important;
  overflow: hidden !important;
  padding: 18px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3) !important;
  pointer-events: none !important;
  user-select: none !important;
  min-height: 200px;
}

.mbi-skeleton-line {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
}

.mbi-skeleton-title {
  height: 20px;
  width: 75%;
  margin: 6px 0 10px;
  border-radius: 4px;
}

.mbi-skeleton-badge {
  height: 18px;
  width: 60px;
  border-radius: 12px;
}

.mbi-skeleton-text {
  height: 12px;
  width: 90%;
  margin-bottom: 6px;
  border-radius: 3px;
}

.mbi-skeleton-btn {
  height: 38px;
  width: 100%;
  border-radius: 10px;
  margin-top: 10px;
}

.mbi-skeleton-thumb-16-9 {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  margin-bottom: 12px;
}

.mbi-skeleton-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  margin-bottom: 8px;
}

/* ============================================================
   LIVE CLASSES PORTAL CARDS & REAL-TIME STATUS
============================================================ */
.live-header-count {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.16);
  border: 1px solid rgba(239, 68, 68, 0.42);
  color: #fca5a5;
  font-size: 0.78rem;
  font-weight: 800;
}

.live-checking-spinner {
  width: 34px;
  height: 34px;
  border: 3px solid rgba(212, 175, 55, 0.2);
  border-top-color: var(--gold-primary, #D4AF37);
  border-radius: 50%;
  animation: mbiLiveSpin 0.8s linear infinite;
}

@keyframes mbiLiveSpin {
  to { transform: rotate(360deg); }
}

.live-classes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 18px;
  margin-top: 8px;
}

.live-class-card {
  background: var(--obsidian-card, #11141E);
  border: 1.5px solid rgba(239, 68, 68, 0.3);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.live-class-card:hover {
  transform: translateY(-3px);
  border-color: rgba(239, 68, 68, 0.65);
}

.live-card-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
  cursor: pointer;
}

.live-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.live-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.65) 100%);
}

.live-now-pill {
  position: absolute;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(220, 38, 38, 0.92);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.45);
}

.live-now-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
  animation: mbiLivePulse 1.3s ease-in-out infinite;
}

@keyframes mbiLivePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.8); }
}

.live-play-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(212, 175, 55, 0.92);
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}

.live-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 8px;
}

.live-card-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.live-meta-chip {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(212, 175, 55, 0.12);
  color: var(--gold-champagne, #F5E0A3);
  border: 1px solid rgba(212, 175, 55, 0.25);
}

.live-card-title {
  margin: 0;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.02rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.35;
}

.live-card-desc {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-secondary, #94a3b8);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.live-watch-btn {
  margin-top: auto;
  width: 100%;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 10px;
}

.live-modal-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.45);
  color: #fca5a5;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.live-modal-pill.ended {
  background: rgba(16, 185, 129, 0.18);
  border-color: rgba(16, 185, 129, 0.45);
  color: #6ee7b7;
}

.live-ended-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 16px;
  background: rgba(16, 185, 129, 0.14);
  border-bottom: 1px solid rgba(16, 185, 129, 0.35);
  color: #a7f3d0;
  font-size: 0.82rem;
  font-weight: 600;
}

