/* =========================================================
   IdooLearn Design System
   IdooTech Green #8DAE37 (primary) + Purple #1E0066 (brand)
   Fredoka One (headings) / Nunito (body)
   ========================================================= */

:root {
  --primary: #8DAE37;
  --primary-dark: #5E7A1C;
  --secondary: #B3D449;
  --secondary-dark: #6E8A21;
  --purple: #1E0066;
  --purple-dark: #150045;
  --purple-light: #3a1f8f;
  --brand-gradient: linear-gradient(135deg, #1E0066 0%, #4a2f9e 45%, #8DAE37 100%);
  --brand-gradient-soft: linear-gradient(135deg, rgba(30, 0, 102, 0.06) 0%, rgba(141, 174, 55, 0.06) 100%);
  --dark: #1d2710;
  --body-bg: #f7f9f0;
  --card-bg: #ffffff;
  --text: #26301a;
  --text-muted: #6b7658;
  --border: #e3ebcc;
  --danger: #e0554f;
  --danger-bg: #fdeceb;
  --radius: 14px;
  --shadow: 0 4px 18px rgba(94, 122, 28, 0.10);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Nunito', sans-serif;
  background: var(--body-bg);
  color: var(--text);
  line-height: 1.55;
}

h1, h2, h3, h4, .brand-font {
  font-family: 'Fredoka One', cursive;
  font-weight: 400;
  color: var(--dark);
  margin: 0 0 .4em;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
a.btn:hover, a.filter-pill:hover, a.level-card:hover, a.class-link-card:hover, a.material-card:hover { text-decoration: none; }

img { max-width: 100%; display: block; }

.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 15px;
  padding: 12px 22px;
  border-radius: 999px;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; }
.btn-primary:hover { background: linear-gradient(135deg, var(--purple), var(--primary)); }
.btn-secondary { background: linear-gradient(135deg, var(--secondary), var(--secondary-dark)); color: #fff; }
.btn-secondary:hover { background: linear-gradient(135deg, var(--secondary-dark), var(--primary-dark)); }
.btn-outline { background: transparent; border: 2px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #c8433d; }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { color: var(--primary); }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-block { width: 100%; justify-content: center; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }

/* ---------- Top nav (public + app shared header bits) ---------- */
.topbar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
}
.topbar-inner {
  max-width: 1160px; margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { height: 34px; }
.brand-text { font-family: 'Fredoka One', cursive; font-size: 20px; color: var(--purple); }
.brand-text span { color: var(--primary); }
.nav-links { display: flex; gap: 22px; align-items: center; }
.nav-links a { color: var(--text); font-weight: 700; font-size: 14.5px; }
.nav-links > a:not(.btn) {
  position: relative; display: inline-flex; align-items: center; gap: 7px; padding: 7px 1px;
  transition: color 180ms ease, transform 180ms ease;
}
.nav-links > a:not(.btn)::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 1px; height: 2px;
  background: var(--secondary); border-radius: 2px; transform: scaleX(0); transform-origin: left;
  transition: transform 180ms ease;
}
.nav-links > a:not(.btn):hover { color: var(--primary); text-decoration: none; transform: translateY(-2px); }
.nav-links > a:not(.btn):hover::after { transform: scaleX(1); }
.nav-links .login-link i { font-size: 13px; transition: transform 180ms ease; }
.nav-links .login-link:hover i { transform: translateX(3px); }
.nav-links a.active { color: var(--primary); }
.nav-links .btn { color: #fff !important; }

/* ---------- App shell (tutor portal) ---------- */
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 236px; flex-shrink: 0;
  background: #2A115C;
  color: #cfc8e6;
  display: flex; flex-direction: column;
  padding: 20px 14px;
}
.sidebar .brand { padding: 6px 10px 22px; }
.sidebar .brand-text { color: #fff; }
.sidebar .brand-text span { color: var(--secondary); }
.sidebar-logo-badge {
  height: 42px; padding: 5px 9px; border-radius: 10px;
  background: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 12px rgba(0,0,0,.25); flex-shrink: 0;
}
.sidebar-logo-badge img { height: 30px; width: auto; object-fit: contain; }
.sidebar nav { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.sidebar nav a {
  color: #cfc8e6; padding: 11px 14px; border-radius: 10px;
  font-weight: 700; font-size: 14.5px; display: flex; align-items: center; gap: 10px;
  transition: background-color 180ms ease, color 180ms ease, transform 180ms ease;
}
.sidebar nav a:hover { background: rgba(141,174,55,.20); color: #fff; text-decoration: none; transform: translateX(3px); }
.sidebar nav a.active { background: #8DAE37; color: #fff; }
.sidebar .logout { margin-top: auto; }
.sidebar .nav-icon { width: 18px; text-align: center; font-size: 15px; transition: transform 180ms ease; }
.sidebar nav a:hover .nav-icon { transform: scale(1.12); }
.sidebar .logout-link {
  display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 10px;
  color: #f3a29e; font-weight: 700; font-size: 14.5px;
  transition: background-color 180ms ease, color 180ms ease, transform 180ms ease;
}
.sidebar .logout-link:hover { background: rgba(229, 91, 84, .14); color: #ffc0bc; text-decoration: none; transform: translateX(3px); }
.sidebar .logout-link i { width: 18px; text-align: center; transition: transform 180ms ease; }
.sidebar .logout-link:hover i { transform: translateX(3px); }
@media (prefers-reduced-motion: reduce) {
  .sidebar nav a, .sidebar .nav-icon, .sidebar .logout-link, .sidebar .logout-link i { transition: none; }
  .sidebar nav a:hover, .sidebar .logout-link:hover, .sidebar nav a:hover .nav-icon, .sidebar .logout-link:hover i { transform: none; }
}

/* Keep the sidebar fixed to the viewport while the page scrolls */
@media (min-width: 601px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 40;
  }
  .main-content { margin-left: 236px; }
}

.main-content { flex: 1; min-width: 0; }
.app-topbar {
  background: #fff; border-bottom: 1px solid var(--border);
  padding: 16px 30px; display: flex; align-items: center; justify-content: space-between;
}
.app-topbar h1 { font-size: 20px; margin: 0; }
.app-body { padding: 28px 30px 60px; }

.user-chip { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text-muted); }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-family: 'Fredoka One',cursive;
}

/* ---------- Cards ---------- */
.card { background: var(--card-bg); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.grid { display: grid; gap: 20px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .grid-4, .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; } .app-shell{flex-direction:column;} .sidebar{width:100%;} }

.stat-card { text-align: left; animation: cardPop .6s cubic-bezier(.22,.8,.3,1) both; }
.stat-card .num { font-family: 'Fredoka One', cursive; font-size: 30px; color: var(--primary); }
.stat-card .label { color: var(--text-muted); font-size: 13.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }

/* Card entrance animation */
@keyframes cardPop {
  0% { transform: translateY(8px); opacity: 0; }
  60% { transform: translateY(-4px); opacity: 1; }
  100% { transform: translateY(0); opacity: 1; }
}

/* Material thumbnail icon: no animation — hover effect only */
.material-thumb i { font-size: 36px; color: #fff; animation: none; transition: transform .25s ease; }
.material-card:hover .material-thumb i { transform: scale(1.12); }

/* Material card hover lift */
.material-card { transition: transform 220ms ease, box-shadow 220ms ease; }
.material-card:hover { transform: translateY(-6px); box-shadow: 0 30px 60px rgba(0,0,0,.12); }


/* ---------- Forms ---------- */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 800; margin-bottom: 6px; font-size: 14px; }
.form-group .hint { color: var(--text-muted); font-size: 12.5px; margin-top: 4px; }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=number],
select, textarea {
  width: 100%; padding: 12px 14px; border-radius: 10px; border: 2px solid var(--border);
  font-family: 'Nunito', sans-serif; font-size: 15px; background: #fff; color: var(--text);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); }
textarea { resize: vertical; min-height: 90px; }
.level-checkboxes { display: flex; flex-wrap: wrap; gap: 10px; }
.level-check { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border: 2px solid var(--border); border-radius: 999px; cursor: pointer; font-size: 14px; font-weight: 700; color: var(--text); background: #fff; transition: all .15s ease; }
.level-check:hover { border-color: var(--primary); }
.level-check input { accent-color: var(--primary); width: 16px; height: 16px; margin: 0; }
.level-check:has(input:checked) { border-color: var(--primary); background: #eff4de; color: var(--primary-dark); }
.file-drop {
  border: 2px dashed var(--border); border-radius: var(--radius); padding: 30px;
  text-align: center; background: #f7faf0; color: var(--text-muted); cursor: pointer;
}
.file-drop.dragover { border-color: var(--secondary); background: #f2fbf0; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }

.alert { padding: 13px 16px; border-radius: 10px; margin-bottom: 18px; font-weight: 700; font-size: 14.5px; }
.alert-error { background: var(--danger-bg); color: var(--danger); border: 1px solid #f4c6c3; }
.alert-success { background: #eaf7e6; color: var(--secondary-dark); border: 1px solid #cdeac1; }

/* ---------- Auth pages ---------- */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--brand-gradient); position: relative; padding: 24px; }
.auth-wrap::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 20% 20%, rgba(255,255,255,.10), transparent 45%), radial-gradient(circle at 80% 80%, rgba(179,212,73,.16), transparent 45%); pointer-events: none; }
.auth-card { position: relative; z-index: 1; background: #fff; border-radius: 18px; padding: 40px; width: 100%; max-width: 420px; box-shadow: 0 20px 50px rgba(0,0,0,.2); }
.auth-card .brand { justify-content: center; margin-bottom: 18px; }
.auth-card h1 { text-align: center; font-size: 22px; }
.auth-card .sub { text-align: center; color: var(--text-muted); margin-bottom: 24px; font-size: 14.5px; }
.auth-foot { text-align: center; margin-top: 18px; font-size: 14px; color: var(--text-muted); }

/* ---------- Material cards ---------- */
.material-card { display: flex; flex-direction: column; overflow: hidden; padding: 0; }
.material-thumb {
  height: 130px; background: linear-gradient(120deg, #1E0066 0%, #4a2f9e 45%, #8DAE37 100%);
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: 40px;
}
.material-thumb img { width: 100%; height: 100%; object-fit: cover; }
.material-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.material-title { font-weight: 800; font-size: 15.5px; }
.material-meta { font-size: 12.5px; color: var(--text-muted); }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; }
.badge-html { background: #e9efd2; color: var(--primary); }
.badge-pdf { background: #fdeceb; color: var(--danger); }
.badge-image { background: #eaf7e6; color: var(--secondary-dark); }
.badge-scratch { background: #fff0d7; color: #b4690e; }
.scratch-preview { text-align: center; padding: 40px 20px; }
.scratch-preview-icon { font-size: 64px; color: #f5a623; }
.badge-shared { background: #fff4d6; color: #8a6400; }
.badge-video { background: #e6eefc; color: #2b5cb8; }
.badge-link { background: #eef0f3; color: #4a5160; }
.badge-private { background: #eef0f3; color: #4a5160; }
.material-actions { display: flex; gap: 8px; padding: 14px 16px; border-top: 1px solid var(--border); flex-wrap: wrap; }

/* ---------- Toolbar / filters ---------- */
.toolbar { display: flex; gap: 12px; align-items: center; margin-bottom: 22px; flex-wrap: wrap; }
.toolbar input[type=search] { max-width: 320px; }
.filter-pill { padding: 8px 16px; border-radius: 999px; border: 2px solid var(--border); font-weight: 700; font-size: 13.5px; color: var(--text-muted); background: #fff; }
.filter-pill.active { border-color: var(--primary); color: var(--primary); background: #eff4de; }

/* ---------- School-level material library ---------- */
.library-levels { margin-bottom: 24px; }
.level-card { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--text); border: 2px solid transparent; }
.level-card span { color: var(--text-muted); font-size: 13px; }
.level-card:hover, .level-card.active { border-color: var(--primary); background: #eff4de; }
.level-card.active strong { color: var(--primary); }
.class-material-group { margin: 30px 0; }
.class-material-group:first-child { margin-top: 0; }
.class-group-heading { border-bottom: 2px solid var(--border); padding-bottom: 10px; margin-bottom: 16px; }
.class-page-heading { margin: 20px 0 22px; }
.class-page-heading h2 { margin: 10px 0 4px; }
.class-link-card { display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: var(--text); border: 2px solid transparent; }
.class-link-card:hover { border-color: var(--primary); background: #eff4de; transform: translateY(-3px); }
.class-link-card span { color: var(--text-muted); font-size: 13px; }
.class-link-card .class-link-action { color: var(--primary); font-weight: 800; margin-top: 6px; }

/* ---------- Empty state ---------- */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-state h3 { color: var(--text); }

/* ---------- Share box ---------- */
.share-box { background: #eff4de; border: 2px dashed var(--primary); border-radius: 12px; padding: 18px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.share-link-text { font-family: monospace; font-size: 14px; background: #fff; padding: 8px 12px; border-radius: 8px; border: 1px solid var(--border); flex: 1; min-width: 200px; word-break: break-all; }

/* ---------- Preview frame ---------- */
.preview-frame-wrap { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow); background: #fff; }
.preview-frame-wrap iframe { width: 100%; height: 70vh; border: none; display: block; }

/* ---------- Landing page ---------- */
.hero-public {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff; padding: 80px 24px; text-align: center;
}
.hero-public h1 { color: #fff; font-size: 2.6rem; max-width: 780px; margin: 0 auto 16px; }
.hero-public p { max-width: 600px; margin: 0 auto 30px; font-size: 18px; opacity: .95; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.feature-section { padding: 70px 24px; }
.feature-section h2 { text-align: center; margin-bottom: 40px; font-size: 1.8rem; }
.feature-card { text-align: left; transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease; }
.feature-card:hover { transform: translateY(-7px); box-shadow: 0 22px 42px rgba(61, 78, 22, .14); }
.feature-card .icon { 
  font-size: 48px; 
  margin-bottom: 14px; 
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, rgba(141, 174, 55, 0.08) 0%, rgba(179, 212, 73, 0.08) 100%);
  border-radius: 12px;
  transition: all 0.3s ease;
}
.feature-card:hover .icon {
  color: var(--secondary);
  transform: translateY(-3px);
  background: linear-gradient(135deg, rgba(141, 174, 55, 0.12) 0%, rgba(179, 212, 73, 0.12) 100%);
}
.steps { display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; padding: 0 24px 70px; }
.step {
  flex: 1; min-width: 200px; max-width: 240px; text-align: center; padding: 18px 14px;
  border-radius: 14px; transition: transform 220ms ease, background-color 220ms ease, box-shadow 220ms ease;
}
.step:hover { transform: translateY(-6px); background: #f2f5e4; box-shadow: 0 16px 32px rgba(61, 78, 22, .10); }
.step .num {
  width: 42px; height: 42px; border-radius: 50%; background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center; font-family: 'Fredoka One', cursive;
  margin: 0 auto 12px;
  transition: transform 220ms ease, background-color 220ms ease;
}
.step:hover .num { transform: scale(1.1) rotate(6deg); background: var(--secondary); }
@media (prefers-reduced-motion: reduce) {
  .nav-links > a:not(.btn), .nav-links > a:not(.btn)::after, .nav-links .login-link i,
  .feature-card, .step, .step .num { transition: none; }
  .nav-links > a:not(.btn):hover, .feature-card:hover, .step:hover, .step:hover .num,
  .nav-links .login-link:hover i { transform: none; }
}
footer.site-footer { background: linear-gradient(135deg, #200D47 0%, #32146E 55%, #441E96 100%); color: #cfc8e6; text-align: center; padding: 30px; font-size: 13.5px; }
footer.site-footer a { color: #d9d2ec; }

/* ---------- Student viewer ---------- */
.student-shell { min-height: 100vh; display: flex; flex-direction: column; background: var(--body-bg); }
.student-header {
  background: linear-gradient(120deg, var(--primary), var(--secondary)); color: #fff;
  padding: 18px 24px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px;
}
.student-header .brand-text { color: #fff; }
.student-header .brand-text span { color: #d9f2c9; }
.student-meta { font-size: 13.5px; opacity: .95; }
.student-body { flex: 1; padding: 20px; }
.student-frame-wrap { max-width: 1000px; margin: 0 auto; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: #fff; }
.student-frame-wrap iframe { width: 100%; height: 78vh; border: none; display: block; }
.student-open-btn { text-align: center; margin: 16px auto; }
footer.student-footer { text-align: center; padding: 18px; color: var(--text-muted); font-size: 13px; }

/* ---------- AI Studio ---------- */
.ai-result-frame { width: 100%; height: 60vh; border: none; border-radius: 12px; background: #fff; }
.report-box { background: #0f172a; color: #e2e8f0; padding: 18px; border-radius: 12px; font-family: monospace; font-size: 13px; white-space: pre-wrap; max-height: 300px; overflow-y: auto; }
.demo-note { background: #fff4d6; color: #8a6400; padding: 10px 14px; border-radius: 10px; font-size: 13.5px; font-weight: 700; margin-bottom: 16px; }

/* ---------- Misc ---------- */
.text-muted { color: var(--text-muted); }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }

/* ---------- School Management ---------- */
.school-subnav {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 26px;
  padding: 8px; background: #fff; border-radius: 14px; box-shadow: var(--shadow);
}
.school-subnav a {
  padding: 9px 18px; border-radius: 999px; font-weight: 800; font-size: 14px;
  color: var(--text-muted);
}
.school-subnav a:hover { background: var(--body-bg); text-decoration: none; color: var(--primary); }
.school-subnav a.active { background: var(--primary); color: #fff; }

.school-card { transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease; border: 2px solid transparent; }
.school-card:hover { transform: translateY(-4px); box-shadow: 0 20px 44px rgba(0,0,0,.12); border-color: var(--primary); }
.school-name { font-family: 'Fredoka One', cursive; font-size: 18px; color: var(--dark); }

.badge-archived { background: #e6ecd0; color: var(--text-muted); }
.badge-term { background: #e9efd2; color: var(--primary); }

/* ---------- Student landing: hero robot ---------- */
.hero-student { position: relative; overflow: hidden; padding-bottom: 40px; }
.hero-student .hero-title { font-size: 2.6rem; margin-top: 10px; }
.hero-student-sub { max-width: 640px; margin: 0 auto 26px; font-size: 18px; opacity: .95; }
.hero-robot-wrap {
  display: flex; justify-content: center; margin-bottom: 6px;
  animation: floaty 4s ease-in-out infinite;
}
@keyframes floaty { 0%,100%{ transform: translateY(0);} 50%{ transform: translateY(-16px);} }

/* ---- Robot made from CSS ---- */
.robot { position: relative; width: 170px; height: 210px; }
.robot-antenna { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 4px; height: 22px; background: #fff; }
.robot-antenna span { position: absolute; top: -9px; left: 50%; transform: translateX(-50%); width: 14px; height: 14px; border-radius: 50%; background: var(--secondary); box-shadow: 0 0 16px var(--secondary); animation: pulse 1.6s infinite; }
@keyframes pulse { 0%,100%{ transform: translateX(-50%) scale(1);} 50%{ transform: translateX(-50%) scale(1.35);} }
.robot-head {
  position: absolute; top: 26px; left: 50%; transform: translateX(-50%);
  width: 96px; height: 80px; background: linear-gradient(180deg,#ffffff,#e4eed0);
  border: 4px solid var(--primary); border-radius: 22px; z-index: 2;
  display: flex; align-items: center; justify-content: center; gap: 18px;
  transition: transform 200ms ease;
}
.robot-eye { width: 20px; height: 24px; border-radius: 50%; background: var(--primary); transition: all 160ms ease; }
.robot-eye.left { transform-origin: center; }
.robot-eye.right { transform-origin: center; }
.robot-mouth {
  position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%);
  width: 34px; height: 8px; border-radius: 8px; background: var(--primary); transition: all 200ms ease;
}
.robot-body {
  position: absolute; top: 108px; left: 50%; transform: translateX(-50%);
  width: 104px; height: 82px; background: linear-gradient(180deg,#e6efcc,#d8e6b8);
  border: 4px solid var(--primary); border-radius: 16px; z-index: 1;
}
.robot-panel { position: absolute; top: 16px; left: 50%; transform: translateX(-50%); width: 54px; height: 20px; background: #d5e6a8; border-radius: 8px; }
.robot-bolt { position: absolute; right: 10px; top: 12px; width: 14px; height: 14px; background: var(--secondary); border-radius: 50%; }
.robot-bolt.small { right: auto; left: 10px; top: auto; bottom: 12px; width: 11px; height: 11px; }
.robot-arm { position: absolute; top: 112px; width: 18px; height: 42px; background: #d8e6b8; border: 3px solid var(--primary); border-radius: 10px; }
.robot-arm.left { left: 18px; transform-origin: top; }
.robot-arm.right { right: 18px; transform-origin: top; }
.robot-leg { position: absolute; bottom: 0; width: 24px; height: 20px; background: #e6efcc; border: 3px solid var(--primary); border-radius: 8px; }
.robot-leg.left { left: 34px; } .robot-leg.right { right: 34px; }
.robot-speech {
  position: absolute; right: -30px; top: 18px; transform: translateX(100%);
  background: #fff; color: var(--dark); border-radius: 14px; padding: 10px 14px;
  font-size: 13px; font-weight: 700; max-width: 210px; box-shadow: 0 8px 24px rgba(0,0,0,.18);
  opacity: 0; visibility: hidden; transition: opacity 250ms ease, transform 250ms ease;
}
.robot-speech::before { content: ''; position: absolute; left: -10px; top: 18px; border: 6px solid transparent; border-right-color: #fff; }
.robot:hover .robot-speech, .robot[data-state="happy"] .robot-speech { opacity: 1; visibility: visible; transform: translateX(0); }

/* Robot reaction states */
.robot[data-state="happy"] .robot-eye { background: var(--secondary); }
.robot[data-state="happy"] .robot-head { transform: translateX(-50%) rotate(-8deg) scale(1.05); }
.robot[data-state="happy"] .robot-arm.left { animation: wave 0.9s ease; }
@keyframes wave { 0%{ transform: rotate(0);} 40%{ transform: rotate(-45deg);} 70%{ transform: rotate(20deg);} 100%{ transform: rotate(0);} }

/* ---------- Share code section ---------- */
.share-code-section { padding: 70px 24px; background: #fff; }
.share-code-card { max-width: 620px; margin: 0 auto; text-align: center; background: var(--body-bg); border: 2px dashed var(--primary); border-radius: var(--radius); padding: 40px 32px; }
.share-code-card .icon { font-size: 44px; color: var(--primary); margin-bottom: 12px; }
.share-code-form { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 22px; }
.share-code-form input {
  flex: 1; min-width: 200px; padding: 13px 16px; border: 2px solid var(--border); border-radius: 12px;
  font-size: 16px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; text-align: center;
}
.share-code-form input:focus { outline: none; border-color: var(--primary); }
.share-code-error { color: var(--danger); font-weight: 700; margin-top: 12px; min-height: 20px; }

.feature-intro { max-width: 620px; margin: -26px auto 36px; text-align: center; color: var(--text-muted); font-size: 17px; }

/* ---------- Landing videos ---------- */
.video-section { padding: 70px 24px; background: var(--body-bg); }
.video-section h2 { text-align: center; margin-bottom: 0; font-size: 1.8rem; }
.video-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 26px; max-width: 980px; margin: 0 auto; }
.video-card { background: #fff; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); border: 2px solid var(--border); }
.video-card video { width: 100%; display: block; background: #000; aspect-ratio: 16 / 9; }
.video-card p { padding: 14px 16px; margin: 0; font-weight: 700; }

.about-band { background: #fff; border-top: 1px solid var(--border); }

@media (max-width: 560px) {
  .robot-speech { display: none; }
  .hero-student .hero-title { font-size: 2rem; }
}

/* ---------- Student home (video hero) ---------- */
.student-home-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 12px 24px;
}
.student-home-header .topbar-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.student-home-header .brand { margin: 0; max-width: none; }
.student-home-header .brand img { height: 34px; }
.student-home-header .brand-text { font-size: 20px; }
.student-home-header .nav-links { margin-left: auto; }
.hero-public.student-home-hero {
  position: relative;
  isolation: isolate;
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #000;
  color: #fff; padding: 96px 24px; text-align: center;
}
.hero-video, .hero-video-tint { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-video { z-index: -2; object-fit: cover; object-position: center; filter: saturate(.72) contrast(1.08) brightness(.82); }
.hero-video-tint {
  z-index: -1;
  background: linear-gradient(180deg, rgba(0,0,0,.25) 0%, rgba(0,0,0,.55) 45%, rgba(0,0,0,.85) 100%);
}
.hero-public.student-home-hero::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 28%;
  z-index: -1;
  background: linear-gradient(to top, rgba(0,0,0,.55), transparent);
  pointer-events: none;
}
.hero-content { max-width: 800px; position: relative; z-index: 1; }
.hero-kicker { margin: 0 0 14px; color: #d9f2c9; font-weight: 800; font-size: 14px; letter-spacing: .12em; text-transform: uppercase; }
.hero-public.student-home-hero h1 { color: #fff; font-size: 3.4rem; line-height: 1.08; max-width: 780px; margin: 0 auto 18px; }
.hero-copy { max-width: 640px; margin: 0 auto 30px; font-size: 19px; opacity: .97; }
.material-code-form { width: min(100%, 520px); margin: 0 auto 24px; text-align: left; }
.material-code-form label { display: block; margin-bottom: 7px; color: #fff; font-size: 13px; font-weight: 800; }
.material-code-controls { display: flex; gap: 10px; align-items: stretch; }
.material-code-controls input { min-width: 0; flex: 1; border: 0; padding: 13px 15px; border-radius: 10px; font-size: 16px; }
.material-code-controls .btn { flex: 0 0 auto; border-radius: 10px; }
.material-code-error { margin: 7px 0 0; color: #ffd4d1; font-size: 13px; font-weight: 700; }
.hero-tech-words { display: flex; justify-content: center; gap: 9px; flex-wrap: wrap; margin: -8px auto 28px; }
.hero-tech-words span { border: 1px solid rgba(217,242,201,.6); border-radius: 999px; padding: 5px 12px; color: #d9f2c9; font-size: 12px; font-weight: 800; letter-spacing: .04em; background: rgba(31,24,54,.22); }
.student-home-features { background: #fff; }
@media (max-width: 560px) {
  .student-home-header { padding: 10px 16px; }
  .student-home-header .topbar-inner { flex-wrap: wrap; gap: 10px; }
  .student-home-header .brand { flex: 1 1 auto; }
  .student-home-header .nav-links { width: auto; order: 2; margin-left: auto; justify-content: flex-end; }
  .student-home-header .nav-links .btn { padding: 9px 14px; }
  .student-home-header .brand img { height: 30px; }
  .hero-copy { font-size: 16px; }
  .material-code-controls { flex-direction: column; }
  .material-code-controls .btn { width: 100%; justify-content: center; }
}

/* ---------- Upload page: professional + animated ---------- */
.card h3 i { margin-right: 8px; color: var(--primary); }
.file-drop {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  border: 2px dashed var(--border); border-radius: 16px; padding: 34px 20px;
  background: linear-gradient(180deg, #f7faf0, #f1f5e3);
  text-align: center; cursor: pointer; color: var(--text);
  transition: border-color 240ms ease, background 240ms ease, transform 240ms ease, box-shadow 240ms ease;
}
.file-drop:hover { border-color: var(--primary); background: linear-gradient(180deg, #f4f8e6, #edf2d9); transform: translateY(-2px); box-shadow: 0 14px 30px rgba(141,174,55,.10); }
.file-drop.dragover { border-color: var(--secondary); background: linear-gradient(180deg, #f2fbe9, #e9f7dc); transform: scale(1.02); box-shadow: 0 18px 40px rgba(179,212,73,.18); }
.file-drop.has-file .file-drop-icon { background: linear-gradient(135deg, var(--secondary), #a8cc5f); animation: popIn 320ms ease; }
.file-drop-icon {
  width: 66px; height: 66px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; color: #fff;
  background: linear-gradient(135deg, var(--primary), #6E8A21);
  box-shadow: 0 10px 22px rgba(141,174,55,.28);
  animation: floaty 3.4s ease-in-out infinite;
}
@keyframes popIn { 0%{ transform: scale(.7);} 60%{ transform: scale(1.12);} 100%{ transform: scale(1);} }

.file-type-tray {
  display: flex; gap: 10px; flex-wrap: wrap; justify-content: center;
  margin-top: 18px;
}
.fmt-chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px; border-radius: 999px;
  background: #fff; border: 1.5px solid var(--border);
  font-size: 13px; font-weight: 800; color: var(--text-muted);
  position: relative; overflow: hidden;
  transition: transform 220ms ease, color 220ms ease, border-color 220ms ease, box-shadow 220ms ease, background 220ms ease;
  animation: chipIn 480ms ease both;
}
.fmt-chip:nth-child(1) { animation-delay: .05s; }
.fmt-chip:nth-child(2) { animation-delay: .12s; }
.fmt-chip:nth-child(3) { animation-delay: .19s; }
.fmt-chip:nth-child(4) { animation-delay: .26s; }
.fmt-chip:nth-child(5) { animation-delay: .33s; }
.fmt-chip:nth-child(6) { animation-delay: .40s; }
@keyframes chipIn { 0%{ opacity: 0; transform: translateY(10px);} 100%{ opacity: 1; transform: translateY(0);} }
.fmt-chip i { transition: transform 220ms ease, color 220ms ease; }
.fmt-chip::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.7), transparent);
  transform: translateX(-100%); pointer-events: none;
}
.fmt-chip:hover {
  transform: translateY(-3px) scale(1.05);
  color: var(--primary); border-color: var(--primary);
  background: linear-gradient(160deg, #eef4da, #f3f8e0);
  box-shadow: 0 10px 22px rgba(141,174,55,.16);
}
.fmt-chip:hover i { transform: rotate(-8deg) scale(1.15); color: var(--secondary); }
.fmt-chip:hover::after { animation: shimmer 700ms ease; }
@keyframes shimmer { 0%{ transform: translateX(-100%);} 100%{ transform: translateX(100%);} }

@keyframes floaty { 0%,100%{ transform: translateY(0);} 50%{ transform: translateY(-8px);} }

/* ---------- Materials: professional animated buttons & links ---------- */
.btn { position: relative; overflow: hidden; }
.btn i { transition: transform 220ms ease, color 220ms ease; position: relative; z-index: 1; }
.btn:hover i { transform: translateX(2px) scale(1.12); }
.btn::after {
  content: ''; position: absolute; top: 0; left: -80%; width: 50%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,.55), transparent);
  transform: skewX(-20deg); pointer-events: none;
}
.btn:hover::after { animation: btnShine 700ms ease; }
@keyframes btnShine { 0%{ left: -80%; } 100%{ left: 140%; } }
.btn { transition: transform 220ms ease, box-shadow 220ms ease, background-color 220ms ease, color 220ms ease; }
.btn-primary:hover { background: var(--primary-dark); box-shadow: 0 10px 24px rgba(141,174,55,.35); transform: translateY(-2px); }
.btn-secondary:hover { box-shadow: 0 10px 24px rgba(179,212,73,.35); transform: translateY(-2px); }
.btn-outline:hover { box-shadow: 0 10px 24px rgba(141,174,55,.22); transform: translateY(-2px); }
.btn-danger:hover { box-shadow: 0 10px 24px rgba(220,53,69,.30); transform: translateY(-2px); }
.btn-ghost:hover { box-shadow: 0 8px 20px rgba(31,24,54,.10); transform: translateY(-2px); }

.filter-pill {
  position: relative; overflow: hidden;
  transition: transform 220ms ease, color 220ms ease, border-color 220ms ease, background-color 220ms ease, box-shadow 220ms ease;
}
.filter-pill i { margin-right: 6px; color: var(--secondary); transition: transform 220ms ease, color 220ms ease; position: relative; z-index: 1; }
.filter-pill::after {
  content: ''; position: absolute; top: 0; left: -80%; width: 50%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(141,174,55,.12), transparent);
  transform: skewX(-20deg); pointer-events: none;
}
.filter-pill:hover { transform: translateY(-2px); border-color: var(--primary); color: var(--primary); box-shadow: 0 10px 22px rgba(141,174,55,.14); }
.filter-pill:hover i { transform: scale(1.15) rotate(-8deg); color: var(--primary); }
.filter-pill:hover::after { animation: btnShine 650ms ease; }

.level-card { transition: transform 220ms ease, border-color 220ms ease, background 220ms ease, box-shadow 220ms ease; }
.level-card:hover { transform: translateY(-5px); box-shadow: 0 18px 36px rgba(61,78,22,.13); border-color: var(--secondary); background: #eef3d8; }
.level-card .level-card-icon {
  width: 48px; height: 48px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: #fff;
  background: linear-gradient(135deg, var(--primary), #6E8A21);
  box-shadow: 0 8px 18px rgba(141,174,55,.24);
  transition: transform 220ms ease, box-shadow 220ms ease;
}
.level-card:hover .level-card-icon { transform: scale(1.12) rotate(-6deg); box-shadow: 0 12px 26px rgba(141,174,55,.34); }

.material-actions .btn { align-items: center; }
.material-actions { align-items: center; }

/* =========================================================
   Animated brand gradients — IdooTech green + purple, mixed
   so neither colour dominates buttons, icons or inputs.
   ========================================================= */
@keyframes brandFlow {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes brandGlow {
  0%,100% { box-shadow: 0 0 0 3px rgba(30, 0, 102, .12), 0 0 18px rgba(30, 0, 102, .18); }
  50%      { box-shadow: 0 0 0 3px rgba(141, 174, 55, .18), 0 0 18px rgba(141, 174, 55, .22); }
}

/* Primary & secondary buttons carry both brand colours */
.btn-primary,
.btn-secondary,
.btn-outline:hover,
.btn-danger:hover {
  background-image: linear-gradient(120deg, #1E0066 0%, #4a2f9e 22%, #8DAE37 55%, #B3D449 78%, #1E0066 100%);
  background-size: 300% 300%;
  animation: brandFlow 9s ease infinite;
  color: #fff;
}
.btn-primary:hover,
.btn-secondary:hover,
.btn-outline:hover,
.btn-danger:hover { animation-duration: 4.5s; filter: brightness(1.06); }

/* Outline buttons: gradient border + gradient text, both colours */
.btn-outline {
  background-image: linear-gradient(#fff, #fff), linear-gradient(120deg, #1E0066, #4a2f9e, #8DAE37, #B3D449);
  background-origin: border-box;
  background-clip: padding-box, border-box;
  background-size: 100% 100%, 300% 300%;
  border: 2px solid transparent;
  color: #1E0066;
  animation: brandFlow 9s ease infinite;
}
.btn-outline:hover { color: #fff; background-origin: border-box; background-clip: border-box; border-color: transparent; }

/* Home page "Tutor Login" — purple gradient, animated */
.student-home-header .nav-links .btn,
.nav-links .login-link {
  background-image: linear-gradient(120deg, #1E0066 0%, #3a1f8f 30%, #6a3fd0 55%, #1E0066 100%);
  background-size: 300% 300%;
  animation: brandFlow 6s ease infinite;
  color: #fff !important;
}

/* Icon glyphs: static two-tone gradient, no animation — hover effect only */
.share-code-card .icon,
.stat-card .num,
.empty-state i {
  background-image: linear-gradient(120deg, #1E0066, #4a2f9e, #8DAE37, #B3D449);
  background-size: 200% 200%;
  background-position: 0% 50%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: none;
  transition: background-position .45s ease, transform .25s ease;
}
.share-code-card:hover .icon,
.stat-card:hover .num,
.empty-state:hover i {
  background-position: 100% 50%;
  transform: translateY(-3px);
}

/* Sidebar nav icons: solid white, no animation, white even when active */
.sidebar .nav-icon,
.sidebar nav a.active .nav-icon {
  background: none !important;
  -webkit-background-clip: initial !important;
  background-clip: initial !important;
  -webkit-text-fill-color: #fff !important;
  color: #fff !important;
  animation: none !important;
}

/* Step numbers: static gradient, no animation — hover effect only */
.step .num {
  background-image: linear-gradient(120deg, #1E0066 0%, #4a2f9e 35%, #8DAE37 70%, #B3D449 100%);
  background-size: 100% 100%;
  animation: none;
  color: #fff;
  transition: transform .25s ease, box-shadow .25s ease;
}
.step:hover .num {
  transform: translateY(-3px) scale(1.06);
  box-shadow: 0 12px 24px rgba(30, 0, 102, .28);
}

/* Materials level icons (Lower / Upper Junior / Senior Secondary):
   solid company green, no gradient — hover effect only */
.level-card .level-card-icon {
  background-image: none;
  background-color: #8DAE37;
  color: #fff;
  transition: transform .22s ease, background-color .22s ease, box-shadow .22s ease;
}
.level-card:hover .level-card-icon {
  background-color: #5E7A1C;
  transform: scale(1.12) rotate(-6deg);
  box-shadow: 0 12px 26px rgba(141, 174, 55, .34);
}

/* Home page feature icons: solid company purple, no animation, hover effect only */
.feature-card .icon,
.feature-card:hover .icon {
  background-image: none;
  background-color: #1E0066;
  animation: none;
  color: #fff;
  transition: transform .25s ease, background-color .25s ease, box-shadow .25s ease;
}
.feature-card:hover .icon {
  background-color: #8DAE37;
  background-image: linear-gradient(135deg, #8DAE37 0%, #B3D449 100%);
  transform: translateY(-4px);
  box-shadow: 0 14px 28px rgba(141, 174, 55, .35);
}
.feature-card .icon i { color: #fff !important; -webkit-text-fill-color: #fff !important; background: none; animation: none; }

/* Inputs: static gradient border, no animation — hover effect only */
input[type=text], input[type=email], input[type=password], input[type=search], input[type=number], select, textarea {
  transition: border-color .18s ease, box-shadow .18s ease;
}
input[type=text]:hover:not(:focus), input[type=email]:hover:not(:focus), input[type=password]:hover:not(:focus),
input[type=search]:hover:not(:focus), input[type=number]:hover:not(:focus), select:hover:not(:focus), textarea:hover:not(:focus) {
  border-color: #4a2f9e;
  box-shadow: 0 0 0 3px rgba(50, 20, 110, .10);
}
input[type=text]:focus,
input[type=email]:focus,
input[type=password]:focus,
input[type=search]:focus,
input[type=number]:focus,
select:focus,
textarea:focus {
  outline: none;
  border: 2px solid transparent;
  background-image: linear-gradient(#fff, #fff), linear-gradient(120deg, #1E0066, #4a2f9e, #8DAE37, #B3D449);
  background-origin: border-box;
  background-clip: padding-box, border-box;
  background-size: 100% 100%, 100% 100%;
  animation: none;
}

/* Home page input keeps its animated two-tone glow */
#material-code:focus {
  animation: brandFlow 6s ease infinite, brandGlow 2.4s ease-in-out infinite;
}

/* Dashboard sidebar: solid purple #2A115C, single flat colour, no gradient */
.sidebar {
  background-color: #2A115C;
  background-image: none;
}
.sidebar nav a.active {
  background-color: #8DAE37;
  background-image: none;
}

/* Uploaded material cards: gradient of both brand colours (purple + green) */
.material-card {
  background-image:
    linear-gradient(135deg, #f7f2ff 0%, #ffffff 48%, #f2f8e0 100%),
    linear-gradient(135deg, #1E0066 0%, #4a2f9e 45%, #8DAE37 100%);
  background-origin: border-box;
  background-clip: padding-box, border-box;
  background-size: 100% 100%, 100% 100%;
  border: 2px solid transparent;
}
.material-card:hover {
  background-image:
    linear-gradient(135deg, #f1e9ff 0%, #fbfdf5 48%, #ebf4d2 100%),
    linear-gradient(135deg, #1E0066 0%, #4a2f9e 45%, #8DAE37 100%);
}

@media (prefers-reduced-motion: reduce) {
  .btn-primary, .btn-secondary, .btn-outline, .btn-danger,
  .student-home-header .nav-links .btn, .nav-links .login-link,
  .feature-card .icon, .step .num, .level-card .level-card-icon,
  .feature-card .icon i, .stat-card .num, .sidebar .nav-icon,
  input:focus, select:focus, textarea:focus {
    animation: none !important;
  }
}


/* ---------- Learner projects ---------- */
.source-toggle { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.consent-check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; cursor: pointer; }
.consent-check input { margin-top: 3px; width: auto; flex-shrink: 0; }
.project-media { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow); background: #fff; }
.project-media iframe { width: 100%; height: 70vh; min-height: 360px; border: none; display: block; }
.project-media iframe.project-media-scratch { height: auto; aspect-ratio: 482 / 412; min-height: 0; max-height: 80vh; }
.project-media-image { width: 100%; display: block; }
.project-media-video { width: 100%; display: block; background: #000; aspect-ratio: 16 / 9; }
.project-media-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.showcase-wrap { max-width: 1000px; margin: 0 auto; }
.showcase-intro { margin-bottom: 18px; }
.showcase-intro h1 { margin: 8px 0 4px; }

/* ---------- Project form fields ---------- */
.field-label { display: block; font-weight: 800; margin-bottom: 6px; font-size: 14px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
input[type=url] {
  width: 100%; padding: 12px 14px; border-radius: 10px; border: 2px solid var(--border);
  font-family: 'Nunito', sans-serif; font-size: 15px; background: #fff; color: var(--text);
}
.link-field { margin-top: 4px; }
.input-icon { position: relative; }
.input-icon > i { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 16px; pointer-events: none; transition: color .15s ease; }
.input-icon > input { padding-left: 44px; }
.input-icon:focus-within > i { color: var(--primary); }
.link-status { font-size: 13px; font-weight: 700; margin-top: 8px; min-height: 0; }
.link-status:empty { display: none; }
.link-status.is-ok { color: var(--primary-dark); }
.link-status.is-ok::before { content: "\2713  "; }
.link-status.is-error { color: var(--danger); }
.platform-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.platform-chips .fmt-chip { cursor: default; }
.cover-picker { display: flex; align-items: center; gap: 16px; padding: 12px; border: 2px solid var(--border); border-radius: 12px; background: #fff; }
.cover-picker:focus-within { border-color: var(--primary); }
.cover-preview { width: 96px; height: 64px; flex-shrink: 0; border-radius: 8px; overflow: hidden; display: flex; align-items: center; justify-content: center; background: var(--brand-gradient); color: rgba(255,255,255,.85); font-size: 22px; }
.cover-preview img { width: 100%; height: 100%; object-fit: cover; }
.cover-picker-body { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.cover-picker-body .hint { flex-basis: 100%; margin-top: 0; overflow-wrap: anywhere; }
.cover-picker-body label.btn { margin: 0; cursor: pointer; }
@media (max-width: 480px) { .cover-picker { flex-direction: column; align-items: flex-start; } .cover-preview { width: 100%; height: 120px; } }
