/* ============================================================
   InteractEd — Apple Light Design System
   Modern, Airy, Human-Centric Interface for K-12 Interactives
   ============================================================ */

:root {
  --bg-main: #f5f5f7;
  --bg-surface: #ffffff;
  --bg-surface-hover: #fafafa;
  --bg-surface-card: #ffffff;
  --bg-input: #ffffff;
  --border-subtle: #e5e5ea;
  --border-strong: #d1d1d6;
  --border-glow: rgba(0, 113, 227, 0.2);
  
  --primary: #0071e3;
  --primary-hover: #0077ed;
  --primary-glow: rgba(0, 113, 227, 0.15);
  --secondary: #5856d6;
  --secondary-glow: rgba(88, 86, 214, 0.15);
  --accent: #ff2d55;
  --accent-glow: rgba(255, 45, 85, 0.15);
  --success: #34c759;
  --success-bg: #eafaf1;
  --success-border: #bbf7d0;
  --warning: #ff9500;
  --warning-bg: #fffbeb;
  --warning-border: #fef3c7;

  --text-main: #1d1d1f;
  --text-muted: #6e6e73;
  --text-faint: #86868b;

  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', SFMono-Regular, Menlo, monospace;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 26px;
  --radius-full: 9999px;

  --shadow-card: 0 2px 10px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.02);
  --shadow-hover: 0 12px 30px rgba(0, 0, 0, 0.07), 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-glow: 0 0 20px rgba(0, 113, 227, 0.12);
}

/* Base & Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  min-height: 100vh;
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Subtle studio atmosphere */
.ambient-glow {
  display: none;
}

/* Layout */
.app-layout {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Top Global Navigation Bar */
.app-header {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 32px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  cursor: pointer;
}

.logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #0071e3;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 113, 227, 0.25);
  color: #ffffff;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--text-main);
}

.brand-highlight {
  color: var(--primary);
}

.brand-tagline {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.2px;
}

/* Apple Segmented Nav Tabs */
.nav-tabs {
  display: flex;
  gap: 4px;
  background: #e5e5ea;
  padding: 3px;
  border-radius: var(--radius-md);
  border: none;
}

.nav-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  background: transparent;
  border: none;
  border-radius: 10px;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-tab:hover {
  color: var(--text-main);
}

.nav-tab.active {
  color: var(--text-main);
  background: #ffffff;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.stats-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.ref-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-main);
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.ref-link-btn:hover {
  background: #f5f5f7;
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 113, 227, 0.12);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 6px rgba(52, 199, 89, 0.4);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 113, 227, 0.25);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 113, 227, 0.35);
}

.btn-secondary {
  background: #ffffff;
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.btn-secondary:hover {
  background: #f5f5f7;
  border-color: var(--border-strong);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
}

.btn-outline:hover {
  background: rgba(0, 113, 227, 0.06);
}

.btn-sm {
  padding: 5px 12px;
  font-size: 12px;
}

.icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.18s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.icon-btn:hover {
  color: var(--text-main);
  background: #f5f5f7;
  border-color: var(--border-strong);
}

/* Main Content Area */
.main-content {
  flex: 1;
  padding: 32px;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
}

.view-panel {
  display: none;
}

.view-panel.active {
  display: block;
  animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   HERO BANNERS (APPLE STUDIO CARDS)
   ============================================================ */
.testing-hero, .gallery-hero, .topics-hero {
  margin-bottom: 24px;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 32px 36px;
  box-shadow: var(--shadow-card);
}

.hero-text h1, .hero-text-row h1 {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.6px;
  color: var(--text-main);
  margin-bottom: 6px;
}

.gradient-text {
  color: var(--primary);
  background: none;
  -webkit-text-fill-color: initial;
}

.hero-text p, .hero-text-row p {
  color: var(--text-muted);
  font-size: 14.5px;
  max-width: 780px;
  line-height: 1.55;
}

.hero-text-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.testing-kpis {
  display: flex;
  gap: 12px;
}

.kpi-card {
  background: #f5f5f7;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 110px;
}

.kpi-num {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

.kpi-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.1px;
  margin-top: 2px;
}

.kpi-success {
  border-color: var(--success-border);
  background: var(--success-bg);
}
.kpi-success .kpi-num {
  color: #2e7d32;
}

.kpi-pending {
  border-color: var(--warning-border);
  background: var(--warning-bg);
}
.kpi-pending .kpi-num {
  color: #b45309;
}

/* ============================================================
   FILTERS & CONTROLS
   ============================================================ */
.filter-bar, .testing-filter-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.search-box {
  flex: 1;
  min-width: 260px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f5f5f7;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  transition: all 0.2s ease;
}

.search-box:focus-within {
  background: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.12);
}

.search-box input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 14px;
}

.search-box input::placeholder {
  color: var(--text-faint);
}

.search-box svg {
  color: var(--text-faint);
  flex-shrink: 0;
}

.clear-search {
  background: none;
  border: none;
  color: var(--text-faint);
  cursor: pointer;
  font-size: 14px;
  padding: 0 4px;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.filter-pills {
  display: flex;
  gap: 4px;
  background: #e5e5ea;
  padding: 3px;
  border-radius: var(--radius-full);
}

.pill {
  padding: 5px 14px;
  background: transparent;
  border: none;
  border-radius: var(--radius-full);
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s;
  white-space: nowrap;
}

.pill:hover {
  color: var(--text-main);
}

.pill.active {
  background: #ffffff;
  color: var(--text-main);
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.grade-pills-scroll {
  display: flex;
  gap: 4px;
  background: #e5e5ea;
  padding: 3px;
  border-radius: var(--radius-full);
  overflow-x: auto;
  max-width: 560px;
}

.segmented-control {
  display: flex;
  gap: 3px;
  background: #e5e5ea;
  padding: 3px;
  border-radius: var(--radius-md);
  border: none;
}

.seg-btn {
  flex: 1;
  padding: 5px 12px;
  background: transparent;
  border: none;
  border-radius: 9px;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s;
  white-space: nowrap;
}

.seg-btn:hover {
  color: var(--text-main);
}

.seg-btn.active {
  background: #ffffff;
  color: var(--text-main);
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.custom-select {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-main);
  padding: 8px 14px;
  font-family: var(--font-sans);
  font-size: 13px;
  outline: none;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

/* Status Bar */
.testing-status-bar, .topics-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding: 0 4px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}

/* ============================================================
   CARD GRIDS
   ============================================================ */
.testing-grid, .artifacts-grid, .topics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 20px;
}

/* Artifact & Testing Cards */
.artifact-card, .test-card, .topic-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-card);
  position: relative;
}

.artifact-card:hover, .test-card:hover, .topic-card:hover {
  transform: translateY(-2px);
  border-color: #c7c7cc;
  box-shadow: var(--shadow-hover);
}

.card-preview-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #f5f5f7;
  overflow: hidden;
  border-radius: 12px;
  margin-bottom: 16px;
  border: 1px solid var(--border-subtle);
}

.card-iframe-preview {
  width: 200%;
  height: 200%;
  transform: scale(0.5);
  transform-origin: top left;
  border: none;
  pointer-events: none;
}

.card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
  cursor: pointer;
  border-radius: 12px;
}

.artifact-card:hover .card-overlay {
  opacity: 1;
}

.overlay-play-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #ffffff;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  transform: scale(0.9);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.artifact-card:hover .overlay-play-btn {
  transform: scale(1);
}

/* Badges */
.badge-group {
  display: flex;
  gap: 6px;
}

.badge {
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1px;
}

.badge-subject {
  background: #eef2ff;
  color: #4338ca;
  border: 1px solid #c7d2fe;
}

.badge-grade {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #e2e8f0;
}

.test-badge-ready {
  background: var(--success-bg);
  color: #2e7d32;
  border: 1px solid var(--success-border);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.test-badge-pending {
  background: #f5f5f7;
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  font-size: 11px;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* Card Typography */
.card-title, .topic-card-title {
  font-size: 16.5px;
  font-weight: 600;
  color: var(--text-main);
  margin: 10px 0 6px 0;
  line-height: 1.35;
}

.card-description, .topic-card-concept {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 14px;
  flex: 1;
}

.topic-card-idea {
  font-size: 12px;
  color: #334155;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 16px;
  line-height: 1.45;
}

.topic-card-idea strong {
  color: var(--primary);
  font-weight: 600;
}

.test-snippet-box {
  background: #f5f5f7;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 8px 12px;
  margin: 10px 0 14px 0;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.test-card-tags, .card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 8px 0 14px 0;
}

.test-tag-pill, .tag-item {
  font-size: 11px;
  font-family: var(--font-sans);
  padding: 2px 8px;
  border-radius: 6px;
  background: #f5f5f7;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.test-tag-pill:hover, .tag-item:hover {
  background: #eef2ff;
  border-color: #c7d2fe;
  color: #4338ca;
}

.card-actions, .test-card-actions, .topic-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
  gap: 8px;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  background: #ffffff;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-xl);
  margin-top: 20px;
}

.empty-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.empty-state h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 6px;
}

.empty-state p {
  color: var(--text-muted);
  font-size: 14px;
  max-width: 480px;
  margin: 0 auto 20px auto;
}

/* ============================================================
   MODALS
   ============================================================ */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
  animation: modalFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

.modal-dialog {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: 22px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.12), 0 4px 16px rgba(0, 0, 0, 0.04);
  overflow: hidden;
}

.player-dialog {
  width: 95vw;
  max-width: 1100px;
  height: 90vh;
}

.embed-dialog {
  width: 90vw;
  max-width: 680px;
}

.modal-header {
  padding: 16px 24px;
  background: #fbfbfd;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-title-wrap h2 {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-main);
}

.modal-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.device-toggles {
  display: flex;
  gap: 3px;
  background: #e5e5ea;
  padding: 3px;
  border-radius: 9px;
}

.dev-btn {
  padding: 5px 12px;
  background: transparent;
  border: none;
  border-radius: 7px;
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.dev-btn.active {
  background: #ffffff;
  color: var(--text-main);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.player-body {
  flex: 1;
  background: #f5f5f7;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 16px;
}

.player-iframe-container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.player-iframe {
  width: 100%;
  height: 100%;
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
}

.modal-footer {
  padding: 14px 24px;
  background: #fbfbfd;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-info p {
  font-size: 13px;
  color: var(--text-muted);
  max-width: 600px;
}

/* Embed Modal */
.embed-body {
  padding: 24px;
}

.code-preview-wrap {
  position: relative;
  background: #f5f5f7;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  max-height: 240px;
  overflow-y: auto;
}

.code-preview-wrap pre {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-main);
  white-space: pre-wrap;
  word-break: break-all;
}

.copy-code-btn {
  position: absolute;
  top: 10px;
  right: 10px;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 2000;
}

.toast {
  padding: 10px 18px;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-main);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  gap: 8px;
  animation: fadeIn 0.2s ease;
}

/* Responsiveness */
@media (max-width: 960px) {
  .app-header {
    padding: 0 16px;
  }
  .main-content {
    padding: 16px;
  }
  .testing-grid, .artifacts-grid, .topics-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   InteractEd — Teacher Exploration Studio Apple Light Theme
   ============================================================ */

.teacher-portal-body {
  background: #f8fafc;
  color: #0f172a;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, sans-serif;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

/* Header */
.studio-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid #e2e8f0;
  height: 64px;
}

.studio-header-inner {
  max-width: 1360px;
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-symbol {
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-titles {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.brand-primary {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: #0f172a;
}

.brand-accent {
  color: #0071e3;
}

.brand-badge {
  font-size: 11px;
  font-weight: 600;
  background: #f1f5f9;
  color: #475569;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
}

.header-center-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #64748b;
}

.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  padding: 4px 10px;
  border-radius: 999px;
  color: #166534;
  font-weight: 600;
  font-size: 12px;
}

.pulse-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.6);
}

.status-separator {
  color: #cbd5e1;
}

.status-sub {
  font-size: 12px;
  color: #64748b;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #334155;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s ease;
}

.header-btn-secondary:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
}

.header-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: 999px;
  background: #0071e3;
  border: 1px solid #0071e3;
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 3px rgba(0, 113, 227, 0.2);
}

.header-btn-primary:hover {
  background: #0077ed;
  box-shadow: 0 3px 8px rgba(0, 113, 227, 0.3);
}

/* Studio Main */
.studio-main {
  max-width: 1360px;
  margin: 0 auto;
  padding: 32px 24px 80px;
  width: 100%;
}

/* Hero Section */
.studio-hero {
  text-align: center;
  max-width: 880px;
  margin: 0 auto 36px;
}

.hero-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 14px;
}

.hero-pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #2563eb;
}

.hero-headline {
  font-size: 38px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: #0f172a;
  margin-bottom: 14px;
}

.hero-tagline {
  font-size: 16px;
  line-height: 1.6;
  color: #475569;
  margin: 0 auto 28px;
  max-width: 720px;
}

.hero-stats-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 12px 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  width: fit-content;
  margin: 0 auto;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.stat-number {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}

.stat-label {
  font-size: 11px;
  color: #64748b;
}

.stat-divider {
  width: 1px;
  height: 24px;
  background: #e2e8f0;
}

/* Filter Console */
.filter-console {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 22px;
  padding: 22px 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
  margin-bottom: 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.search-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-input-wrapper {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 16px;
  color: #94a3b8;
  pointer-events: none;
}

.teacher-search-field {
  width: 100%;
  height: 48px;
  padding: 0 76px 0 46px;
  font-family: inherit;
  font-size: 14.5px;
  color: #0f172a;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  transition: all 0.15s ease;
  outline: none;
}

.teacher-search-field:focus {
  background: #ffffff;
  border-color: #0071e3;
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.15);
}

.search-shortcut {
  position: absolute;
  right: 44px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 2px 6px;
  font-size: 10px;
  font-family: 'JetBrains Mono', monospace;
  color: #64748b;
  pointer-events: none;
}

.clear-search-btn {
  position: absolute;
  right: 14px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: #cbd5e1;
  color: #ffffff;
  font-size: 11px;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
}

.clear-search-btn:hover {
  background: #94a3b8;
}

.btn-reset-filters {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #475569;
  padding: 0 16px;
  height: 48px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-reset-filters:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.filter-controls-row {
  display: flex;
  align-items: flex-start;
  gap: 28px;
  flex-wrap: wrap;
}

.filter-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-block-label {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  text-transform: none;
}

.segmented-pills {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 12px;
  flex-wrap: wrap;
}

.seg-pill {
  background: transparent;
  border: none;
  color: #475569;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.seg-pill:hover {
  color: #0f172a;
}

.seg-pill.active {
  background: #ffffff;
  color: #0f172a;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.grade-strip-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 4px;
  border-top: 1px solid #f1f5f9;
}

.grade-strip-label {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  white-space: nowrap;
}

.grade-pills-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.grade-pill {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #475569;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.grade-pill:hover {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #0f172a;
}

.grade-pill.active {
  background: #0071e3;
  border-color: #0071e3;
  color: #ffffff;
  font-weight: 600;
}

.filter-summary-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid #f1f5f9;
  font-size: 12.5px;
  color: #64748b;
  flex-wrap: wrap;
  gap: 8px;
}

.summary-text {
  font-weight: 600;
  color: #334155;
}

.summary-hint {
  color: #0071e3;
  font-weight: 500;
}

/* Grid Section */
.studio-grid-section {
  width: 100%;
}

.teacher-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 24px;
}

/* Teacher Card */
.teacher-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease;
  position: relative;
}

.teacher-card:hover {
  transform: translateY(-3px);
  border-color: #0071e3;
  box-shadow: 0 12px 32px rgba(0, 113, 227, 0.09);
}

.card-top {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card-badge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.card-badges-left {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.card-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
}

.badge-grade {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #e2e8f0;
}

.badge-subject {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #dbeafe;
}

.badge-subject-math {
  background: #f5f3ff;
  color: #6d28d9;
  border: 1px solid #ede9fe;
}

.badge-subject-physics {
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #ffedd5;
}

.badge-live-dot {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  color: #16a34a;
}

.badge-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
}

.card-title {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.card-concept {
  font-size: 13.5px;
  color: #475569;
  line-height: 1.55;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 4px;
}

.card-tag {
  font-size: 11px;
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  color: #64748b;
  padding: 2px 7px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.card-tag:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.card-bottom {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #f1f5f9;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card-actions-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-launch-desktop {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #0071e3;
  color: #ffffff;
  padding: 9px 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s ease;
  box-shadow: 0 1px 3px rgba(0, 113, 227, 0.2);
}

.btn-launch-desktop:hover {
  background: #0077ed;
  box-shadow: 0 4px 12px rgba(0, 113, 227, 0.3);
  transform: translateY(-1px);
}

.btn-card-preview {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #334155;
  padding: 9px 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-card-preview:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
}

.btn-card-embed {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #475569;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.btn-card-embed:hover {
  background: #f8fafc;
  border-color: #0071e3;
  color: #0071e3;
}

/* Modal */
.teacher-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.modal-sheet {
  position: relative;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 26px;
  width: 100%;
  max-width: 1020px;
  max-height: 92vh;
  box-shadow: 0 24px 64px -12px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 1;
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  background: #ffffff;
}

.modal-title-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.modal-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge-modal {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
}

.modal-id {
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  color: #94a3b8;
}

.modal-title {
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
}

.modal-top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-modal-launch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s ease;
}

.btn-modal-launch:hover {
  background: #dbeafe;
}

.btn-modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.btn-modal-close:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.modal-view-bar {
  padding: 10px 24px;
  background: #f8fafc;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.view-preset-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.preset-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #475569;
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.preset-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.preset-btn.active {
  background: #0f172a;
  border-color: #0f172a;
  color: #ffffff;
}

.preset-note {
  font-size: 11.5px;
  color: #64748b;
}

.modal-stage-wrapper {
  flex: 1;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
  min-height: 440px;
}

.stage-frame-container {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1), height 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.stage-frame-container.preset-desktop {
  width: 100%;
  max-width: 880px;
  height: 500px;
}

.stage-frame-container.preset-mobile {
  width: 375px;
  height: 540px;
  border-radius: 26px;
}

.stage-frame-container.preset-pill {
  width: 350px;
  height: 80px;
  border-radius: 18px;
}

.stage-frame-container iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.modal-footer-panels {
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  display: grid;
  grid-template-columns: 1fr 360px;
  overflow: hidden;
}

.pedagogy-panel {
  padding: 18px 24px;
  border-right: 1px solid #f1f5f9;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pedagogy-tab-bar {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pedagogy-tab {
  background: none;
  border: none;
  font-size: 12.5px;
  font-weight: 600;
  color: #64748b;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pedagogy-tab:hover {
  color: #0f172a;
}

.pedagogy-tab.active {
  background: #f1f5f9;
  color: #0071e3;
}

.pedagogy-content {
  font-size: 13px;
  line-height: 1.6;
  color: #334155;
}

.pedagogy-pane {
  display: none;
}

.pedagogy-pane.active {
  display: block;
}

.embed-panel {
  padding: 18px 20px;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
}

.embed-panel-header {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.embed-header-title {
  font-size: 12.5px;
  font-weight: 700;
  color: #0f172a;
}

.embed-header-sub {
  font-size: 11px;
  color: #64748b;
}

.embed-code-box {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.embed-code-box code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  color: #475569;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-copy-code {
  background: #0071e3;
  color: #ffffff;
  border: none;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease;
}

.btn-copy-code:hover {
  background: #0077ed;
}

/* Toast */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast-msg {
  background: #0f172a;
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  animation: slideUp 0.2s ease;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive Mobile Guard */
@media (max-width: 960px) {
  .hero-headline {
    font-size: 28px;
  }
  .filter-controls-row {
    flex-direction: column;
    gap: 14px;
  }
  .modal-footer-panels {
    grid-template-columns: 1fr;
  }
  .pedagogy-panel {
    border-right: none;
    border-bottom: 1px solid #f1f5f9;
  }
  .stage-frame-container.preset-desktop {
    height: 380px;
  }
}

