/* ManjuLAB Online Portal — SaaS hub, folders, login, study room */
.portal-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.portal-header {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}
.portal-header .back-link {
  color: var(--cyan-light);
  text-decoration: none;
  font-size: 0.9rem;
}
.portal-header .back-link:hover { text-decoration: underline; }
.portal-header h1 {
  font-size: 1rem;
  font-weight: 600;
  color: #f1f5f9;
  text-align: center;
  flex: 1;
}

.portal-main {
  flex: 1;
  position: relative;
  z-index: 5;
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 24px 48px;
  width: 100%;
}

.portal-hero {
  text-align: center;
  margin-bottom: 36px;
}
.portal-hero .eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan-light);
}
.portal-hero h2 {
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  color: #f8fafc;
  margin-top: 8px;
}
.portal-hero p {
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 520px;
  margin: 12px auto 0;
}

/* SaaS folder grid */
.folder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
}
.folder-card {
  position: relative;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: center;
  padding: 0;
  color: inherit;
  font: inherit;
  transition: transform 0.25s ease;
}
.folder-card:hover { transform: translateY(-4px); }
.folder-card:focus-visible {
  outline: 2px solid var(--cyan-light);
  outline-offset: 4px;
  border-radius: 12px;
}
.folder-card.is-static { cursor: pointer; opacity: 0.92; }

.folder-icon {
  position: relative;
  height: 100px;
  margin-bottom: 10px;
}
.folder-icon::before {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 88px;
  height: 64px;
  border-radius: 0 10px 10px 10px;
  background: linear-gradient(145deg, rgba(6, 182, 212, 0.35), rgba(15, 23, 42, 0.9));
  border: 1px solid rgba(103, 232, 249, 0.25);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.folder-icon::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 18px;
  transform: translateX(-50%);
  margin-left: -22px;
  width: 44px;
  height: 14px;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(90deg, rgba(6, 182, 212, 0.5), rgba(6, 182, 212, 0.25));
  border: 1px solid rgba(103, 232, 249, 0.2);
  border-bottom: none;
}
.folder-card[data-vertical="education"] .folder-icon::before {
  background: linear-gradient(145deg, rgba(16, 185, 129, 0.4), rgba(15, 23, 42, 0.9));
  border-color: rgba(52, 211, 153, 0.35);
}
.folder-card[data-vertical="hvac"] .folder-icon::before {
  background: linear-gradient(145deg, rgba(249, 115, 22, 0.35), rgba(15, 23, 42, 0.9));
}
.folder-card[data-vertical="restaurant"] .folder-icon::before {
  background: linear-gradient(145deg, rgba(234, 179, 8, 0.35), rgba(15, 23, 42, 0.9));
}
.folder-card[data-vertical="hospital"] .folder-icon::before {
  background: linear-gradient(145deg, rgba(239, 68, 68, 0.35), rgba(15, 23, 42, 0.9));
}
.folder-card[data-vertical="events"] .folder-icon::before {
  background: linear-gradient(145deg, rgba(168, 85, 247, 0.35), rgba(15, 23, 42, 0.9));
}
.folder-card[data-vertical="landscaping"] .folder-icon::before {
  background: linear-gradient(145deg, rgba(34, 197, 94, 0.35), rgba(15, 23, 42, 0.9));
}

.folder-emoji {
  position: relative;
  z-index: 1;
  font-size: 1.75rem;
  line-height: 100px;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.4));
}
.folder-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #e2e8f0;
  line-height: 1.3;
}
.folder-tagline {
  display: block;
  font-size: 0.62rem;
  line-height: 1.35;
  color: var(--cyan-light);
  opacity: 0.85;
  max-width: 150px;
  margin: 4px auto 0;
  font-weight: 400;
}
.login-error {
  color: #fca5a5;
  font-size: 0.78rem;
  margin: 8px 0 0;
}

.portal-login-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(2, 6, 23, 0.88);
  backdrop-filter: blur(8px);
}

.portal-login-card {
  width: min(100%, 380px);
  padding: 28px 24px;
  border-radius: 16px;
  background: linear-gradient(160deg, rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 0.98));
  border: 1px solid rgba(56, 189, 248, 0.25);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
  text-align: center;
}

.portal-login-card h2 {
  margin: 8px 0 6px;
  color: #f8fafc;
  font-size: 1.2rem;
}

.portal-login-lead {
  color: #94a3b8;
  font-size: 0.85rem;
  margin: 0 0 18px;
}

.portal-login-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}

.portal-login-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.78rem;
  color: #cbd5e1;
}

.portal-login-form input {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.8);
  color: #f1f5f9;
  font: inherit;
}

body.portal-login-locked .portal-main,
body.portal-login-locked .portal-header {
  filter: blur(4px);
  pointer-events: none;
  user-select: none;
}
.folder-badge {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
}
.folder-badge.live {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
  border: 1px solid rgba(52, 211, 153, 0.35);
}
.folder-badge.platform {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

/* Microservice cards */
.sku-grid {
  display: grid;
  gap: 16px;
  max-width: 720px;
  margin: 0 auto;
}
.sku-card {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  text-align: left;
  padding: 18px 20px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  cursor: pointer;
  color: inherit;
  font: inherit;
  transition: border-color 0.2s, transform 0.2s;
}
.sku-card:hover:not(:disabled) {
  border-color: rgba(103, 232, 249, 0.4);
  transform: translateX(4px);
}
.sku-card:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.sku-card .sku-icon { font-size: 1.75rem; }
.sku-card .sku-body { flex: 1; }
.sku-card .sku-body strong {
  display: block;
  color: #f1f5f9;
  font-size: 1rem;
}
.sku-card .sku-body span {
  font-size: 0.8rem;
  color: var(--muted);
}

/* Login modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(2, 6, 23, 0.82);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}
.modal-panel {
  width: 100%;
  max-width: 400px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.95);
  padding: 28px 24px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
  transform: translateY(12px);
  transition: transform 0.25s;
}
.modal-backdrop.open .modal-panel { transform: translateY(0); }
.modal-panel h3 {
  font-size: 1.15rem;
  color: #f8fafc;
  margin-bottom: 4px;
}
.modal-panel .modal-sub {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 20px;
}
.modal-panel label {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 4px;
}
.modal-panel input,
.modal-panel select {
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(2, 6, 23, 0.6);
  color: #e2e8f0;
  font-size: 0.9rem;
}
.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}
.btn-portal {
  flex: 1;
  padding: 11px 16px;
  border-radius: 999px;
  border: none;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
}
.btn-portal-primary {
  background: linear-gradient(135deg, #06b6d4, #0891b2);
  color: #0f172a;
}
.btn-portal-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
}
.role-pick {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}
.role-pick button {
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(2, 6, 23, 0.5);
  color: #cbd5e1;
  cursor: pointer;
  font-size: 0.85rem;
}
.role-pick button.active {
  border-color: rgba(103, 232, 249, 0.5);
  background: rgba(6, 182, 212, 0.15);
  color: #67e8f9;
}
.role-pick button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Study room */
.study-room-page.student-ambience {
  --lamp-glow: rgba(251, 191, 36, 0.12);
  --desk-accent: rgba(6, 182, 212, 0.15);
}
.study-room-page.teacher-ambience {
  --lamp-glow: rgba(148, 163, 184, 0.1);
  --desk-accent: rgba(251, 191, 36, 0.12);
}
.study-desk {
  position: relative;
  border-radius: 20px;
  border: 1px solid var(--border);
  background:
    radial-gradient(ellipse 60% 40% at 20% 0%, var(--lamp-glow), transparent),
    linear-gradient(180deg, rgba(15, 23, 42, 0.85), rgba(2, 6, 23, 0.92));
  min-height: 420px;
  overflow: hidden;
}
.lamp-glow {
  position: absolute;
  top: -20px;
  left: 24px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--lamp-glow), transparent 70%);
  pointer-events: none;
}
.book-rack {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}
.book-spine {
  flex-shrink: 0;
  width: 36px;
  height: 52px;
  border-radius: 4px 8px 8px 4px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 4px;
  font-size: 0.55rem;
  font-weight: 700;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  color: rgba(255,255,255,0.85);
}
.book-spine.sci { background: linear-gradient(180deg, #059669, #047857); }
.book-spine.math { background: linear-gradient(180deg, #0284c7, #0369a1); }

.study-layout {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .study-layout { grid-template-columns: 220px 1fr 200px; }
}

.chapter-list {
  list-style: none;
  padding: 12px;
  max-height: 360px;
  overflow-y: auto;
}
.chapter-list li button {
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  margin-bottom: 4px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: #cbd5e1;
  font-size: 0.78rem;
  cursor: pointer;
}
.chapter-list li button.active,
.chapter-list li button:hover {
  background: rgba(6, 182, 212, 0.12);
  color: #67e8f9;
}

.chat-panel {
  display: flex;
  flex-direction: column;
  min-height: 320px;
  padding: 12px;
}
.chat-messages {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
  max-height: 280px;
}
.chat-bubble {
  max-width: 88%;
  padding: 8px 12px;
  border-radius: 14px;
  font-size: 0.82rem;
  line-height: 1.45;
}
.chat-bubble.tutor { align-self: flex-start; background: rgba(51, 65, 85, 0.8); }
.chat-bubble.student { align-self: flex-end; background: rgba(6, 182, 212, 0.2); }
.chat-bubble.peer { align-self: flex-start; background: rgba(139, 92, 246, 0.15); border: 1px solid rgba(167, 139, 250, 0.2); }
.chat-input-row {
  display: flex;
  gap: 8px;
}
.study-quick-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.study-quick-btn {
  font-size: 0.72rem;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(103, 232, 249, 0.35);
  background: rgba(6, 182, 212, 0.1);
  color: #67e8f9;
  cursor: pointer;
}
.study-quick-btn:hover {
  background: rgba(6, 182, 212, 0.2);
}
.chat-input-row input {
  flex: 1;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(2, 6, 23, 0.5);
  color: #e2e8f0;
}

.teacher-placeholder {
  text-align: center;
  padding: 48px 24px;
  color: var(--muted);
}
.teacher-placeholder h3 { color: #fbbf24; margin-bottom: 8px; }

.portal-note {
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 24px;
}
.portal-note a { color: var(--cyan-light); }

.portal--saas .portal-ring {
  background: radial-gradient(circle, rgba(16, 185, 129, 0.38) 0%, rgba(6, 182, 212, 0.1) 55%, transparent 70%);
  box-shadow: 0 0 60px rgba(16, 185, 129, 0.32), inset 0 0 40px rgba(16, 185, 129, 0.12);
}
.portal--saas .portal-core {
  background: linear-gradient(145deg, rgba(16, 185, 129, 0.5), rgba(15, 23, 42, 0.88));
  animation-delay: -1s;
}
.portal--saas .portal-orbit::before,
.portal--saas .portal-orbit::after {
  background: #34d399;
  box-shadow: 0 0 12px #34d399;
}

/* Live online badge */
.online-live-badge {
  font-size: 0.68rem;
  color: #6ee7b7;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(52, 211, 153, 0.35);
  background: rgba(16, 185, 129, 0.08);
  margin-left: 8px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.online-live-badge:hover {
  background: rgba(16, 185, 129, 0.18);
  border-color: rgba(52, 211, 153, 0.55);
}

/* Subject orbs (replaces book spines) */
.subject-orbs {
  display: flex;
  gap: 12px;
  justify-content: center;
  padding: 16px 12px 8px;
}
.subject-orb {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: 0 0 24px rgba(6, 182, 212, 0.15);
}
.subject-orb.science {
  background: radial-gradient(circle at 30% 30%, rgba(16, 185, 129, 0.45), rgba(15, 23, 42, 0.85));
}
.subject-orb.math {
  background: radial-gradient(circle at 30% 30%, rgba(6, 182, 212, 0.45), rgba(15, 23, 42, 0.85));
}

/* Circular microservice nav (portal pages) */
.portal-circle-grid {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(24px, 5vw, 48px);
  justify-content: center;
  align-items: center;
  margin: 0 auto;
  max-width: 960px;
}
.portal-circle-grid .portal {
  width: min(200px, 40vw);
  height: min(200px, 40vw);
}
.portal-circle-grid .portal-sub {
  font-size: 0.62rem;
  line-height: 1.35;
}
.portal-circle-grid .portal-title {
  font-size: clamp(0.82rem, 2vw, 0.95rem);
}
.portal-circle-grid .portal-icon {
  font-size: 1.6rem;
}
.portal-circle-grid .online-thumb-badge {
  display: block;
  margin-top: 4px;
  font-size: 0.58rem;
  color: #6ee7b7;
}
button.portal {
  border: none;
  background: transparent;
  padding: 0;
  font: inherit;
  cursor: pointer;
}
button.portal:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
button.portal:disabled:hover {
  transform: none;
}

/* Rhytoma stream circles */
.stream-circle-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  justify-content: center;
  margin: 28px 0;
}
.stream-circle-grid .portal {
  width: min(160px, 36vw);
  height: min(160px, 36vw);
}
.stream-nested {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.15);
}
.stream-nested h3 {
  text-align: center;
  font-size: 0.85rem;
  color: #94a3b8;
  margin-bottom: 16px;
}
.folder-card .online-thumb-badge,
.sku-card .online-thumb-badge {
  display: block;
  margin-top: 8px;
  font-size: 0.68rem;
  color: #6ee7b7;
  font-weight: 500;
}

/* Study room — outer peers panel */
.study-room-wrap {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.study-room-wrap .study-desk {
  flex: 1;
  min-width: 0;
}
.peers-outer-panel {
  width: 280px;
  flex-shrink: 0;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.75);
  overflow: hidden;
}
.peers-outer-panel.collapsed .peers-chevron {
  transform: rotate(-90deg);
}
.peers-outer-toggle {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border: none;
  background: rgba(6, 182, 212, 0.1);
  color: #67e8f9;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}
.peers-chevron {
  transition: transform 0.2s;
  opacity: 0.7;
}
.peers-outer-body {
  padding: 10px 12px 14px;
  max-height: 420px;
  overflow-y: auto;
}
.peers-hint {
  font-size: 0.65rem;
  color: #94a3b8;
  margin: 0 0 10px;
  line-height: 1.4;
}
.peers-filter-row select {
  width: 100%;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(2, 6, 23, 0.6);
  color: #e2e8f0;
  font-size: 0.75rem;
  margin-bottom: 10px;
}
.peers-roster {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.peer-roster-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 8px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.15);
  background: rgba(2, 6, 23, 0.4);
}
.peer-avatar {
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.peer-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.peer-meta strong {
  font-size: 0.78rem;
  color: #f1f5f9;
}
.peer-loc {
  font-size: 0.65rem;
  color: #94a3b8;
}
.peer-school {
  font-size: 0.6rem;
  color: #64748b;
  line-height: 1.3;
}
.peer-invite-btn {
  font-size: 0.62rem !important;
  padding: 4px 8px !important;
  white-space: nowrap;
  align-self: center;
}
.peers-empty {
  font-size: 0.72rem;
  color: #64748b;
  padding: 8px;
}
.active-peers {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(148, 163, 184, 0.15);
}
.peers-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
  margin-bottom: 6px;
}
#activePeerList {
  list-style: none;
  margin: 0;
  padding: 0;
}
#activePeerList li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: #c4b5fd;
  margin-bottom: 4px;
}
#activePeerList img {
  border-radius: 50%;
}

/* Admin dashboard */
.admin-page .admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.admin-stat-card {
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.6);
}
.admin-stat-card strong {
  display: block;
  font-size: 1.4rem;
  color: #67e8f9;
}
.admin-stat-card span {
  font-size: 0.72rem;
  color: #94a3b8;
}
.admin-table-wrap {
  overflow-x: auto;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.2);
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}
.admin-table th,
.admin-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}
.admin-table th {
  color: #94a3b8;
  font-weight: 600;
  background: rgba(2, 6, 23, 0.5);
}
.admin-table tr.bot-row td:first-child {
  color: #fbbf24;
}
.admin-table tr.real-row td:first-child {
  color: #6ee7b7;
}
.admin-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 600;
}
.admin-badge.bot {
  background: rgba(251, 191, 36, 0.15);
  color: #fcd34d;
}
.admin-badge.real {
  background: rgba(52, 211, 153, 0.15);
  color: #6ee7b7;
}
.admin-badge.online {
  background: rgba(6, 182, 212, 0.15);
  color: #67e8f9;
}
.admin-badge.offline {
  background: rgba(100, 116, 139, 0.15);
  color: #64748b;
}

@media (max-width: 960px) {
  .study-room-wrap {
    flex-direction: column;
  }
  .peers-outer-panel {
    width: 100%;
  }
}

/* CBSE10 hub */
.cbse10-hub-grid {
  max-width: 920px;
  margin: 0 auto;
}

.cbse10-hub-game-row {
  display: flex;
  justify-content: center;
  margin: 8px auto 0;
  max-width: 920px;
}

.portal--game-room .portal-ring {
  border-color: rgba(168, 85, 247, 0.45);
}

.portal--game-room .portal-core {
  background: radial-gradient(circle at 30% 30%, rgba(168, 85, 247, 0.35), rgba(15, 23, 42, 0.9));
}

/* Practice */
.practice-card {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
}
.practice-card label {
  display: block;
  margin: 10px 0 4px;
  font-size: 0.78rem;
  color: #94a3b8;
}
.practice-card select,
.practice-card input[type="number"] {
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(2, 6, 23, 0.6);
  color: #e2e8f0;
}
.figure-note,
.figure-badge {
  font-size: 0.75rem;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.08);
  border-left: 3px solid #fbbf24;
  padding: 8px 10px;
  border-radius: 0 8px 8px 0;
  margin: 8px 0;
}

/* Mock exam */
.mock-exam-page {
  background: #0f172a;
}
.mock-exam-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  background: rgba(2, 6, 23, 0.95);
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}
.mock-clock-wrap {
  text-align: center;
  flex: 1;
}
.mock-clock {
  font-family: ui-monospace, monospace;
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 700;
  color: #6ee7b7;
  letter-spacing: 0.05em;
}
.mock-clock.urgent {
  color: #f87171;
  animation: mock-pulse 1s ease-in-out infinite;
}
@keyframes mock-pulse {
  50% { opacity: 0.75; }
}
.mock-clock-label {
  font-size: 0.72rem;
  color: #94a3b8;
}
.mock-integrity {
  display: flex;
  gap: 14px;
  font-size: 0.75rem;
  color: #94a3b8;
}
.mock-exam-main {
  max-width: 820px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}
.mock-paper-header {
  text-align: center;
  border-bottom: 2px double rgba(148, 163, 184, 0.35);
  padding-bottom: 16px;
  margin-bottom: 24px;
}
.mock-paper-header h1 {
  font-size: 1.15rem;
  color: #f1f5f9;
}
.mock-q-block {
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px dashed rgba(148, 163, 184, 0.15);
}
.mock-q-num {
  font-weight: 600;
  color: #cbd5e1;
}
.verified-tag {
  font-size: 0.65rem;
  color: #6ee7b7;
  font-weight: 500;
  margin-left: 8px;
}
.mock-q-prompt {
  margin: 10px 0;
  line-height: 1.55;
  color: #e2e8f0;
}
.mock-opt {
  display: block;
  padding: 8px 10px;
  margin: 4px 0;
  border-radius: 8px;
  cursor: pointer;
  color: #cbd5e1;
}
.mock-opt:hover {
  background: rgba(148, 163, 184, 0.08);
}

/* Forum */
.forum-main {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 20px;
  max-width: 1100px;
  align-items: start;
}
.forum-sidebar {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 16px;
  padding: 16px;
}
.sahadeva-card {
  text-align: center;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}
.sahadeva-avatar {
  font-size: 2rem;
}
.sahadeva-card strong {
  display: block;
  color: #f1f5f9;
}
.sahadeva-card span {
  font-size: 0.72rem;
  color: #67e8f9;
}
.thread-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.thread-row {
  text-align: left;
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(15, 23, 42, 0.55);
  color: #e2e8f0;
  cursor: pointer;
}
.thread-row:hover {
  border-color: rgba(103, 232, 249, 0.35);
}
.thread-row strong {
  display: block;
  margin: 4px 0;
}
.thread-tag {
  font-size: 0.62rem;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 600;
}
.thread-tag.science {
  background: rgba(52, 211, 153, 0.15);
  color: #6ee7b7;
}
.thread-tag.mathematics {
  background: rgba(96, 165, 250, 0.15);
  color: #93c5fd;
}
.tag-pred {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.62rem;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(167, 139, 250, 0.2);
  color: #c4b5fd;
}
.thread-detail {
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 16px;
  padding: 20px;
}
.forum-post {
  padding: 14px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}
.forum-post.sahadeva {
  background: rgba(167, 139, 250, 0.06);
  margin: 0 -12px;
  padding: 14px 12px;
  border-radius: 10px;
}
.post-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.post-head img {
  border-radius: 50%;
}
.disclaimer {
  font-size: 0.7rem;
  color: #fbbf24;
  font-style: italic;
  margin-top: 8px;
}
@media (max-width: 768px) {
  .forum-main {
    grid-template-columns: 1fr;
  }
}
