/* BoysReadingLog — "arcade / sports locker" theme.
   Aimed at active 13-14 year old boys: dark base, electric accents, chunky type,
   a bit of motion. Every class name from the original stylesheet is preserved. */

:root {
  --bg: #0e1424;
  --bg-2: #141d33;
  --card: #1a2440;
  --card-2: #202c4d;
  --ink: #eef2ff;
  --muted: #93a3c7;
  --line: #2b3a5f;

  --brand: #3b82f6;      /* electric blue */
  --brand-2: #22d3ee;    /* cyan */
  --zap: #a3e635;        /* lime — "go" colour */
  --flame: #fb923c;      /* orange */
  --ok: #34d399;
  --warn: #fbbf24;
  --bad: #f87171;

  --radius: 18px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .45);
  --glow: 0 0 0 3px rgba(59, 130, 246, .35);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  color: var(--ink);
  line-height: 1.55;
  background:
    radial-gradient(1100px 600px at 12% -10%, rgba(59,130,246,.20), transparent 60%),
    radial-gradient(900px 500px at 105% 0%, rgba(34,211,238,.14), transparent 55%),
    var(--bg);
  background-attachment: fixed;
  min-height: 100vh;
}

h1, h2, h3 { letter-spacing: -.02em; }
h1 { margin-top: 0; font-weight: 800; }

/* ---------- chrome ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px; background: rgba(14, 20, 36, .82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
}
.brand {
  font-weight: 900; font-size: 1.25rem; text-decoration: none; color: var(--ink);
  letter-spacing: -.03em;
}
.topbar nav { display: flex; align-items: center; gap: 16px; }
.topbar nav a { text-decoration: none; color: var(--brand-2); font-weight: 700; }
.topbar nav a:hover { color: var(--zap); }
.who { color: var(--muted); }

main { max-width: 980px; margin: 0 auto; padding: 26px 16px 72px; }
body.centered main { max-width: 470px; }
.foot { text-align: center; color: var(--muted); padding: 24px; font-size: .9rem; }

.card {
  background: linear-gradient(180deg, var(--card), var(--card-2));
  border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 24px; margin-bottom: 20px;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-block; border: none; cursor: pointer; text-decoration: none;
  text-align: center; color: #08131f; font-weight: 800; font-size: 1rem;
  padding: 13px 22px; border-radius: 14px;
  background: linear-gradient(135deg, var(--zap), #4ade80);
  box-shadow: 0 6px 18px rgba(163, 230, 53, .28);
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(163,230,53,.4); }
.btn:active { transform: translateY(0); }
.btn.big { font-size: 1.12rem; padding: 15px 26px; width: 100%; margin-top: 10px; }
.btn.ghost {
  background: transparent; color: var(--ink);
  border: 2px solid var(--line); box-shadow: none;
}
.btn.ghost:hover { border-color: var(--brand-2); color: var(--brand-2); box-shadow: none; }
.btn:disabled { opacity: .55; cursor: default; transform: none; }
button.link { background: none; border: none; color: var(--brand-2); cursor: pointer; font: inherit; padding: 0; font-weight: 700; }
.inline { display: inline; }
.row { display: flex; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.row.center { justify-content: center; }

/* ---------- forms ---------- */
label { display: block; margin: 15px 0; font-weight: 700; }
label .opt { color: var(--muted); font-weight: 400; }
input[type=text], input[type=password], input[type=number], textarea {
  width: 100%; margin-top: 7px; padding: 12px 13px; font-size: 1rem;
  border: 2px solid var(--line); border-radius: 12px; font-family: inherit;
  background: #101a2f; color: var(--ink); transition: border-color .12s, box-shadow .12s;
}
input:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: var(--glow); }
input::placeholder { color: #5f7099; }
textarea { resize: vertical; }
label.check { display: flex; align-items: center; gap: 9px; font-weight: 600; }
label.check input { width: auto; margin: 0; accent-color: var(--zap); }

.error { background: rgba(248,113,113,.14); color: #fecaca; border: 1px solid rgba(248,113,113,.4); padding: 11px 13px; border-radius: 12px; }
.sub, .hint, .muted, .tiny { color: var(--muted); }
.hint { margin-top: 10px; }
.tiny { font-size: .82rem; }

/* ---------- login ---------- */
.login-card { text-align: center; }
.profiles { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.profile {
  background: var(--card-2); border: 2px solid var(--line); border-radius: 18px;
  padding: 20px 24px; cursor: pointer; display: flex; flex-direction: column;
  align-items: center; gap: 8px; min-width: 130px; color: var(--ink);
  transition: transform .14s ease, border-color .14s ease, box-shadow .14s ease;
}
.profile:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: var(--pc); box-shadow: 0 10px 26px rgba(0,0,0,.5);
}
.avatar {
  width: 64px; height: 64px; border-radius: 50%;
  background: linear-gradient(135deg, var(--pc), #ffffff33);
  color: #fff; display: grid; place-items: center;
  font-size: 1.75rem; font-weight: 900;
  box-shadow: 0 0 0 4px rgba(255,255,255,.06);
}
.pname { font-weight: 800; font-size: 1.15rem; }
.page { color: var(--muted); font-size: .85rem; }
.pin-form input#pin { text-align: center; letter-spacing: .6em; font-size: 1.7rem; font-weight: 800; }
.hidden { display: none; }
.tiny-link { text-align: center; margin-top: 16px; }
.tiny-link a { color: var(--muted); }

/* ---------- hero / shelf ---------- */
.hero {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  background: linear-gradient(135deg, var(--pc), #0b1122 155%);
  color: #fff; border-radius: var(--radius); padding: 26px; margin-bottom: 26px;
  box-shadow: var(--shadow); flex-wrap: wrap;
  position: relative; overflow: hidden;
}
/* subtle speed-stripes, sports-jersey style */
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(115deg, rgba(255,255,255,.06) 0 12px, transparent 12px 34px);
}
.hero h1 { margin: 0; font-size: 1.9rem; font-weight: 900; }
.hero .stats { opacity: .95; font-weight: 600; }
.hero .btn { width: auto; position: relative; z-index: 1; }

.shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.book-card {
  display: flex; background: linear-gradient(180deg, var(--card), var(--card-2));
  border: 1px solid var(--line);
  border-radius: 16px; overflow: hidden; text-decoration: none; color: inherit;
  box-shadow: var(--shadow);
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}
.book-card:hover {
  transform: translateY(-5px); border-color: var(--pc);
  box-shadow: 0 16px 34px rgba(0,0,0,.55);
}
.spine { width: 12px; background: linear-gradient(180deg, var(--pc), #ffffff22); }
.book-body { padding: 15px; }
.book-body h3 { margin: 0 0 4px; font-weight: 800; }
.author { color: var(--muted); font-style: italic; margin: 0 0 8px; }
.book-body .meta { display: flex; justify-content: space-between; align-items: center; }
.stars { color: var(--warn); letter-spacing: 1px; }
.pay { color: var(--ok); font-weight: 800; letter-spacing: 1px; }
.date { color: var(--muted); font-size: .8rem; margin: 6px 0 0; }
.empty { text-align: center; color: var(--muted); }

/* ---------- finish flow ---------- */
.form-card .q {
  background: #101a2f; border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  border-radius: 12px; padding: 13px 15px;
}
.qnum { display: block; color: var(--brand-2); font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.qtext { display: block; margin: 5px 0; font-weight: 700; }
.starpick { display: inline-flex; gap: 5px; margin-top: 6px; }
.star {
  background: none; border: none; font-size: 1.9rem; color: var(--warn);
  cursor: pointer; padding: 0; line-height: 1; transition: transform .1s;
}
.star:hover { transform: scale(1.2) rotate(-8deg); }
hr { border: none; border-top: 1px solid var(--line); margin: 24px 0; }

/* ---------- celebrate ---------- */
.celebrate { text-align: center; }
.confetti { font-size: 3.4rem; animation: pop .6s cubic-bezier(.2,1.6,.4,1) both; }
@keyframes pop {
  0%   { transform: scale(0) rotate(-25deg); opacity: 0; }
  70%  { transform: scale(1.25) rotate(8deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}
.celebrate h1 {
  background: linear-gradient(90deg, var(--zap), var(--brand-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  font-size: 2.1rem; font-weight: 900;
}
.added { font-size: 1.05rem; }
.feedback {
  background: linear-gradient(135deg, rgba(59,130,246,.16), rgba(34,211,238,.10));
  border: 1px solid rgba(59,130,246,.35);
  border-radius: 14px; padding: 18px; margin: 18px 0; text-align: left;
}
.feedback h2 { margin-top: 0; font-size: 1.05rem; color: var(--brand-2); text-transform: uppercase; letter-spacing: .06em; }
.reward { margin: 18px 0; }
.reward-signs { font-size: 2rem; color: var(--ok); font-weight: 900; letter-spacing: 3px; }
.bonus {
  display: inline-block; color: #1a1205; font-weight: 800;
  background: linear-gradient(135deg, var(--warn), var(--flame));
  padding: 9px 16px; border-radius: 999px;
  box-shadow: 0 6px 18px rgba(251,146,60,.35);
}

/* ---------- journal ---------- */
.back { display: inline-block; margin-bottom: 10px; color: var(--brand-2); text-decoration: none; font-weight: 700; }
.qa { margin: 13px 0; padding: 13px 15px; border-left: 4px solid var(--line); background: #101a2f; border-radius: 0 12px 12px 0; }
.qa .q { font-weight: 800; margin: 0 0 6px; }
.qa .a { margin: 0; white-space: pre-wrap; }
.qa.flagged { border-left-color: var(--warn); background: rgba(251,191,36,.10); }
.flag { color: var(--warn); font-size: .85rem; margin: 6px 0 0; }

/* ---------- admin ---------- */
.admin-grid { display: grid; gap: 22px; }
.kid-panel { border-top: 5px solid var(--pc); }
.kid-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.age { color: var(--muted); font-size: .85rem; font-weight: 400; }
.pinreset input { width: 100px; display: inline-block; margin: 0 6px 0 0; padding: 7px 9px; }
.tiles { display: flex; gap: 12px; flex-wrap: wrap; margin: 14px 0; }
.tile { flex: 1; min-width: 92px; background: #101a2f; border: 1px solid var(--line); border-radius: 14px; padding: 13px; text-align: center; }
.tile .big { display: block; font-size: 1.7rem; font-weight: 900; }
.tile.warn { background: rgba(251,191,36,.12); border-color: rgba(251,191,36,.45); }
.tile span:not(.big) { color: var(--muted); font-size: .82rem; }

.entries { width: 100%; border-collapse: collapse; font-size: .92rem; }
.entries th { text-align: left; color: var(--muted); font-weight: 700; border-bottom: 1px solid var(--line); padding: 7px 6px; }
.entries td { padding: 9px 6px; border-bottom: 1px solid var(--line); }
.entries .d { display: block; color: var(--muted); font-size: .78rem; }
.entries .pct { color: var(--muted); font-size: .8rem; }
.entries .v { white-space: nowrap; }
tr.verdict-likely_not td:first-child { box-shadow: inset 3px 0 0 var(--bad); }
tr.verdict-uncertain td:first-child { box-shadow: inset 3px 0 0 var(--warn); }

.verdict-banner { border-radius: 14px; padding: 15px 17px; margin: 13px 0; background: #101a2f; border: 1px solid var(--line); }
.verdict-banner.verdict-likely_read { background: rgba(52,211,153,.12); border-color: rgba(52,211,153,.4); }
.verdict-banner.verdict-uncertain { background: rgba(251,191,36,.12); border-color: rgba(251,191,36,.4); }
.verdict-banner.verdict-likely_not { background: rgba(248,113,113,.13); border-color: rgba(248,113,113,.45); }
.verdict-banner span { color: var(--muted); margin-left: 8px; }
.admin-note { margin: 9px 0 0; }
.assess { background: #101a2f; border: 1px solid var(--line); border-radius: 14px; padding: 15px; margin: 13px 0; }
.reasoning { margin: 6px 0; color: var(--muted); }
.reflection { color: var(--ink); }
.controls .btn { width: auto; }

/* ---------- accessibility ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
  .btn:hover, .book-card:hover, .profile:hover, .star:hover { transform: none; }
}
