@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800&family=DM+Mono:wght@400;500&display=swap');

:root {
  --navy: #0d1b2a;
  --navy-soft: #1c2e40;
  --cream: #f7f3eb;
  --paper: #fffdf8;
  --ink: #19252d;
  --muted: #7a8587;
  --line: #e7e3da;
  --coral: #ec6d4e;
  --coral-dark: #cf553c;
  --mint: #a8d8c8;
  --yellow: #f4c95d;
  --shadow: 0 22px 55px rgba(13, 27, 42, 0.12);
}

* { box-sizing: border-box; }
html { min-width: 320px; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--cream);
  font-family: 'Cairo', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button { cursor: pointer; }
.page-shell { max-width: 1240px; margin: 0 auto; padding: 28px 48px 24px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 74px; }
.brand-lockup { display: flex; align-items: center; gap: 13px; }
.brand-mark { display: grid; place-items: center; width: 43px; height: 43px; color: var(--navy); background: var(--yellow); border-radius: 13px 13px 13px 4px; font-size: 22px; transform: rotate(-8deg); box-shadow: 4px 4px 0 rgba(13, 27, 42, .08); }
.brand-mark span { transform: rotate(8deg); }
.brand-lockup h1 { margin: 1px 0 0; font-size: 18px; font-weight: 800; letter-spacing: -.04em; }
.school-name { margin: 4px 0 0; color: var(--coral); font-size: 10px; font-weight: 800; letter-spacing: -.02em; }
.principal-name { margin: 1px 0 0; color: var(--muted); font-size: 9px; }
.eyebrow { margin: 0; color: var(--muted); font-family: 'DM Mono', monospace; font-size: 10px; letter-spacing: .06em; }
.topbar .eyebrow { font-size: 9px; }
.status-pill { display: flex; align-items: center; gap: 9px; padding: 9px 14px; color: #487563; background: rgba(168, 216, 200, .3); border: 1px solid rgba(72, 117, 99, .12); border-radius: 999px; font-size: 11px; font-weight: 700; }
.status-dot { display: block; width: 7px; height: 7px; background: #63ad8f; border-radius: 50%; box-shadow: 0 0 0 4px rgba(99, 173, 143, .15); }
.hero-grid { display: grid; grid-template-columns: minmax(280px, .84fr) minmax(420px, 1.16fr); align-items: center; gap: 74px; margin-bottom: 76px; }
.intro-panel { padding-right: 10px; }
.accent { color: var(--coral); font-weight: 700; }
.intro-panel h2 { max-width: 480px; margin: 15px 0 22px; color: var(--navy); font-size: clamp(46px, 6vw, 76px); font-weight: 800; line-height: 1.08; letter-spacing: -.07em; }
.intro-panel h2 em { color: var(--coral); font-style: normal; }
.intro-copy { max-width: 420px; margin: 0; color: var(--muted); font-size: 14px; line-height: 2; }
.stats-row { display: flex; gap: 36px; margin-top: 38px; }
.stat-card { display: flex; flex-direction: column; gap: 4px; }
.stat-card strong { color: var(--navy); font-family: 'DM Mono', monospace; font-size: 29px; font-weight: 500; letter-spacing: -.08em; }
.stat-card span { color: var(--muted); font-size: 11px; }
.draw-card { position: relative; min-height: 420px; overflow: hidden; background: var(--navy); border-radius: 31px 31px 31px 5px; box-shadow: var(--shadow); }
.draw-card::before { position: absolute; inset: 0; background: radial-gradient(circle at 72% 28%, rgba(244, 201, 93, .13), transparent 33%), linear-gradient(135deg, rgba(255,255,255,.05), transparent 50%); content: ''; }
.draw-card-content { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 420px; padding: 40px; text-align: center; }
.card-kicker { margin: 0 0 20px; color: var(--mint); font-family: 'DM Mono', monospace; font-size: 11px; letter-spacing: .04em; }
.winner { min-height: 85px; color: var(--paper); font-size: clamp(33px, 4.6vw, 58px); font-weight: 800; line-height: 1.35; letter-spacing: -.06em; }
.winner.winner-shuffling { color: var(--yellow); filter: blur(.2px); animation: winner-shuffle .12s ease-in-out infinite alternate; }
@keyframes winner-shuffle { from { transform: translateY(-2px); opacity: .72; } to { transform: translateY(2px); opacity: 1; } }
.winner.winner-pop { animation: winner-pop .65s cubic-bezier(.18,.89,.32,1.28); }
@keyframes winner-pop { 0% { opacity: 0; transform: translateY(17px) scale(.85); } 100% { opacity: 1; transform: translateY(0) scale(1); } }
.winner-hint { min-height: 25px; margin: 7px 0 28px; color: rgba(255, 253, 248, .55); font-size: 12px; }
.draw-button { display: inline-flex; align-items: center; gap: 22px; padding: 15px 22px 15px 17px; color: var(--navy); background: var(--yellow); border: 0; border-radius: 10px 10px 10px 2px; font-size: 13px; font-weight: 800; transition: transform .18s ease, background .18s ease, box-shadow .18s ease; box-shadow: 0 8px 0 rgba(244, 201, 93, .18); }
.draw-button span { display: grid; place-items: center; width: 24px; height: 24px; background: rgba(13, 27, 42, .12); border-radius: 7px; font-size: 17px; }
.draw-button:hover { background: #ffd975; transform: translateY(-2px); box-shadow: 0 10px 0 rgba(244, 201, 93, .18); }
.draw-button:active { transform: translateY(2px); box-shadow: none; }
.draw-button:disabled { color: rgba(13, 27, 42, .62); background: var(--mint); box-shadow: 0 8px 0 rgba(168, 216, 200, .18); cursor: not-allowed; }
.draw-button:disabled:hover { transform: none; background: var(--mint); box-shadow: 0 8px 0 rgba(168, 216, 200, .18); }
.text-button { margin-top: 22px; padding: 0; color: rgba(255, 253, 248, .5); background: transparent; border: 0; font-size: 11px; text-decoration: underline; text-underline-offset: 4px; }
.text-button:hover { color: var(--paper); }
.card-orbit { position: absolute; border: 1px solid rgba(168, 216, 200, .18); border-radius: 50%; }
.orbit-one { width: 390px; height: 390px; top: -195px; left: -85px; }
.orbit-two { width: 260px; height: 260px; right: -66px; bottom: -118px; border-color: rgba(236, 109, 78, .28); }
.workspace { display: grid; grid-template-columns: 1.35fr .65fr; gap: 24px; align-items: start; }
.list-panel, .add-panel { background: var(--paper); border: 1px solid var(--line); border-radius: 22px 22px 22px 5px; }
.list-panel { min-height: 295px; padding: 29px 32px; }
.add-panel { padding: 29px; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
h3 { margin: 6px 0 0; color: var(--navy); font-size: 22px; letter-spacing: -.05em; }
.small-button { padding: 7px 11px; color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 7px; font-size: 10px; }
.small-button:hover { color: var(--coral); border-color: rgba(236, 109, 78, .4); }
.students-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.student-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 13px; background: #fbf9f3; border: 1px solid #efebe2; border-radius: 8px; animation: slide-in .3s ease both; }
@keyframes slide-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.student-name { display: flex; align-items: center; gap: 9px; min-width: 0; font-size: 12px; font-weight: 600; }
.student-index { display: grid; flex: 0 0 23px; place-items: center; width: 23px; height: 23px; color: #678276; background: var(--mint); border-radius: 6px 6px 6px 2px; font-family: 'DM Mono', monospace; font-size: 9px; }
.remove-button { flex: 0 0 auto; width: 22px; height: 22px; color: #b3b2ab; background: transparent; border: 0; border-radius: 5px; font-size: 17px; line-height: 1; }
.remove-button:hover { color: var(--coral); background: #fff0ec; }
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 160px; color: var(--muted); text-align: center; }
.empty-state span { margin-bottom: 6px; color: var(--yellow); font-size: 27px; }
.empty-state p { margin: 0; font-size: 12px; line-height: 1.9; }
.add-panel h3 { margin-bottom: 28px; }
.add-panel label { display: block; margin-bottom: 8px; color: var(--muted); font-size: 11px; }
.input-row { display: flex; gap: 7px; }
.input-row input { width: 100%; min-width: 0; padding: 12px 13px; color: var(--ink); background: #fbf9f3; border: 1px solid var(--line); border-radius: 7px; outline: none; font-size: 12px; }
.input-row input:focus { border-color: var(--coral); box-shadow: 0 0 0 3px rgba(236, 109, 78, .11); }
.input-row input::placeholder { color: #b7b6ae; }
.add-button { flex: 0 0 45px; color: var(--paper); background: var(--coral); border: 0; border-radius: 7px 7px 7px 2px; font-size: 25px; line-height: 1; transition: background .18s ease, transform .18s ease; }
.add-button:hover { background: var(--coral-dark); transform: translateY(-1px); }
.form-note { margin: 11px 0 22px; color: var(--muted); font-size: 10px; line-height: 1.7; }
.import-divider { display: flex; align-items: center; gap: 10px; margin: 0 0 13px; color: #b7b6ae; font-size: 10px; }
.import-divider::before, .import-divider::after { flex: 1; height: 1px; background: var(--line); content: ''; }
.upload-label { display: flex; align-items: center; gap: 10px; padding: 11px 12px; color: var(--navy); background: #fbf9f3; border: 1px dashed #d9d4c9; border-radius: 8px; cursor: pointer; transition: border-color .18s ease, background .18s ease, transform .18s ease; }
.upload-label:hover { background: #fff9eb; border-color: var(--yellow); transform: translateY(-1px); }
.upload-icon { display: grid; flex: 0 0 28px; place-items: center; width: 28px; height: 28px; color: var(--coral); background: #fff0ec; border-radius: 7px; font-size: 19px; font-weight: 700; }
.upload-label span:last-child { display: flex; flex-direction: column; gap: 2px; }
.upload-label strong { font-size: 11px; }
.upload-label small { color: var(--muted); font-size: 9px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.import-status { min-height: 18px; margin: 8px 2px 15px; color: #5d8a77; font-size: 10px; line-height: 1.6; }
.import-status.error { color: var(--coral-dark); }
.tip-box { display: flex; gap: 10px; padding: 13px; color: #527667; background: #eff8f3; border-radius: 8px; }
.tip-box span { color: #68a88f; font-size: 17px; }
.tip-box p { margin: 0; font-size: 10px; line-height: 1.8; }
.footer { display: flex; justify-content: space-between; gap: 20px; padding: 30px 2px 0; color: #a19f96; font-family: 'DM Mono', monospace; font-size: 9px; }
.footer b { color: var(--coral); font-weight: 500; }
@media (max-width: 850px) { .page-shell { padding: 24px 24px 22px; } .topbar { margin-bottom: 50px; } .hero-grid { grid-template-columns: 1fr; gap: 38px; margin-bottom: 48px; } .intro-panel h2 { font-size: clamp(48px, 12vw, 72px); } .draw-card { min-height: 370px; } .draw-card-content { min-height: 370px; } .workspace { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .page-shell { padding: 18px 16px; } .topbar { align-items: flex-start; margin-bottom: 38px; } .status-pill { padding: 7px 10px; font-size: 9px; } .topbar .eyebrow { display: none; } .hero-grid { gap: 28px; } .intro-panel h2 { margin-top: 11px; font-size: 50px; } .intro-copy { font-size: 13px; } .stats-row { margin-top: 28px; } .draw-card { min-height: 335px; border-radius: 24px 24px 24px 4px; } .draw-card-content { min-height: 335px; padding: 26px 18px; } .winner { font-size: 37px; } .students-list { grid-template-columns: 1fr; } .list-panel, .add-panel { padding: 22px 19px; } .footer { flex-direction: column; gap: 7px; } }
