/* ============================================================
   THE RAW VISION — shared stylesheet
   This ONE file styles every page on the site.
   Change a color here and it updates everywhere. That's the
   whole point of sharing a stylesheet.
   ============================================================ */

/* ---------- COLORS (edit these to re-skin the whole site) ---------- */
:root {
  --bg:      #0E1116;
  --panel:   #161B22;
  --panel-2: #1D242E;
  --border:  #29313D;
  --text:    #E7EBF1;
  --muted:   #8A94A6;
  --accent:  #F5B544;
  --win:     #2FBF87;
  --loss:    #E5484D;
}

/* Light mode: these override the :root colors when body has .light */
body.light {
  --bg:      #F4F5F7;
  --panel:   #FFFFFF;
  --panel-2: #EDEFF2;
  --border:  #D8DCE3;
  --text:    #14161A;
  --muted:   #6A6E77;
  --accent:  #C98A0E;
}
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  transition: background 0.25s ease, color 0.25s ease;
}

.theme-btn {
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--text);
  width: 36px; height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
}
.theme-btn:hover { border-color: var(--accent); }

h1, h2, h3, .brand, .tf-time, .stat-value { font-family: 'Space Grotesk', sans-serif; }

.wrap { max-width: 900px; margin: 0 auto; padding: 0 22px; }

/* ---------- NAV (appears on every page) ---------- */
nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(14,17,22,0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 900px; margin: 0 auto; padding: 14px 22px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { font-weight: 700; font-size: 18px; letter-spacing: 0.02em; text-decoration: none; color: var(--text); }
.brand .dot { color: var(--accent); }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tab {
  color: var(--muted); text-decoration: none;
  font-size: 14px; font-weight: 500;
  padding: 8px 14px; border-radius: 8px; transition: all 0.15s;
}
.tab:hover { color: var(--text); background: var(--panel); }
/* The "active" class marks which page you're currently on */
.tab.active { color: var(--bg); background: var(--accent); font-weight: 600; }

/* ---------- PAGE SHELL ---------- */
main { padding: 44px 0 90px; animation: fade 0.4s ease both; }
@keyframes fade { from { opacity: 0; transform: translateY(8px);} to {opacity:1; transform:none;} }

.page-head { margin-bottom: 30px; }
.page-head h2 { font-size: 30px; margin-bottom: 6px; }
.page-head p { color: var(--muted); font-size: 15px; }

/* ---------- HOME ---------- */
.hero { padding: 8vh 0 6vh; }
.eyebrow {
  color: var(--accent); font-size: 13px; font-weight: 600;
  letter-spacing: 0.2em; text-transform: uppercase; margin-bottom: 20px;
}
.hero h1 { font-size: clamp(44px, 10vw, 88px); line-height: 0.98; letter-spacing: -0.02em; margin-bottom: 22px; }
.hero h1 .mark { color: var(--accent); }
.hero p { color: var(--muted); font-size: clamp(17px,2.2vw,20px); max-width: 46ch; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px,1fr)); gap: 16px; margin-top: 48px; }
.card {
  background: var(--panel); border: 1px solid var(--border); border-radius: 14px;
  padding: 24px; transition: all 0.18s; text-decoration: none; color: inherit; display: block;
}
.card:hover { border-color: var(--accent); transform: translateY(-3px); }
.card .ico { font-size: 26px; margin-bottom: 12px; }
.card h3 { font-size: 19px; margin-bottom: 6px; }
.card p { color: var(--muted); font-size: 14px; }

/* ---------- FORM ELEMENTS ---------- */
input, textarea, select {
  width: 100%; background: var(--panel-2); border: 1px solid var(--border);
  color: var(--text); border-radius: 10px; padding: 12px 14px;
  font-family: 'Inter', sans-serif; font-size: 15px;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); }
label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; font-weight: 500; }

.btn {
  background: var(--accent); color: var(--bg); border: none; border-radius: 10px;
  padding: 12px 20px; font-family: 'Inter', sans-serif; font-weight: 600; font-size: 15px;
  cursor: pointer; transition: opacity 0.15s;
}
.btn:hover { opacity: 0.88; }
.btn-ghost { background: none; border: 1px solid var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); opacity: 1; }

.panel {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 14px; padding: 22px; margin-bottom: 26px;
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.empty { color: var(--muted); text-align: center; padding: 36px; font-size: 15px; }

/* ---------- TIMER ---------- */
.timer-box { text-align: center; padding: 20px 0; }
.mode-row { display: flex; gap: 8px; justify-content: center; margin-bottom: 34px; flex-wrap: wrap; }
.mode-btn {
  background: var(--panel); border: 1px solid var(--border); color: var(--muted);
  padding: 9px 18px; border-radius: 999px; cursor: pointer; font-size: 14px; font-weight: 500;
  font-family: 'Inter', sans-serif; transition: all 0.15s;
}
.mode-btn.active { background: var(--accent); color: var(--bg); border-color: var(--accent); font-weight: 600; }
.ring-wrap { position: relative; width: 280px; height: 280px; margin: 0 auto 34px; }
.ring-wrap svg { transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--border); stroke-width: 10; }
.ring-fg { fill: none; stroke: var(--accent); stroke-width: 10; stroke-linecap: round; transition: stroke-dashoffset 1s linear; }
.tf-time {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 58px; font-weight: 600;
}
.timer-controls { display: flex; gap: 12px; justify-content: center; margin-bottom: 26px; }
.timer-controls .btn { min-width: 120px; }
.sessions { color: var(--muted); font-size: 14px; }
.sessions b { color: var(--accent); }

/* ---------- BETS ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit,minmax(130px,1fr)); gap: 12px; margin-bottom: 26px; }
.stat { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; }
.stat .stat-label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; }
.stat .stat-value { font-size: 24px; font-weight: 600; margin-top: 4px; }
.pos { color: var(--win); }
.neg { color: var(--loss); }

.bet {
  background: var(--panel); border: 1px solid var(--border); border-radius: 12px;
  padding: 16px 18px; margin-bottom: 12px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.bet .bet-main { flex: 1; min-width: 180px; }
.bet .bet-desc { font-weight: 600; }
.bet .bet-sub { color: var(--muted); font-size: 13px; }
.status-row { display: flex; gap: 6px; }
.st-btn {
  border: 1px solid var(--border); background: var(--panel-2); color: var(--muted);
  padding: 6px 11px; border-radius: 8px; cursor: pointer; font-size: 12px; font-weight: 600;
  font-family: 'Inter', sans-serif;
}
.st-btn.won.active { background: var(--win); color: #062; border-color: var(--win); }
.st-btn.lost.active { background: var(--loss); color: #400; border-color: var(--loss); }
.st-btn.pending.active { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.del { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 18px; padding: 4px 8px; }
.del:hover { color: var(--loss); }

/* ---------- JOURNAL ---------- */
.file-drop {
  border: 1.5px dashed var(--border); border-radius: 10px; padding: 22px;
  text-align: center; color: var(--muted); cursor: pointer; transition: border-color 0.15s;
}
.file-drop:hover { border-color: var(--accent); }
.preview { margin-top: 14px; }
.preview img { max-width: 100%; border-radius: 10px; border: 1px solid var(--border); }
.entry {
  background: var(--panel); border: 1px solid var(--border); border-radius: 14px;
  padding: 20px; margin-bottom: 18px;
}
.entry-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.entry-title { font-weight: 600; font-size: 17px; font-family: 'Space Grotesk', sans-serif; }
.entry-date { color: var(--muted); font-size: 13px; }
.entry img { max-width: 100%; border-radius: 10px; border: 1px solid var(--border); margin: 12px 0; }
.entry-text { white-space: pre-wrap; }

/* ---------- FOOTER ---------- */
footer {
  border-top: 1px solid var(--border); padding: 30px 0;
  color: var(--muted); font-size: 14px; text-align: center;
}

/* ---------- MOBILE ---------- */
@media (max-width: 560px) {
  .form-grid { grid-template-columns: 1fr; }
  .ring-wrap { width: 230px; height: 230px; }
  .tf-time { font-size: 46px; }
}

/* ============================================================
   TO-DO  +  BALLOON POP
   Paste this block at the BOTTOM of css/style.css
   ============================================================ */

/* ---------- the add-task row ---------- */
.todo-add { display: flex; gap: 10px; }
.todo-add input { flex: 1; }

/* ---------- the little bar above the list ---------- */
.todo-bar {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 14px; color: var(--muted); font-size: 14px;
}
.btn-link {
  background: none; border: none; color: var(--muted);
  font-family: 'Inter', sans-serif; font-size: 14px;
  cursor: pointer; text-decoration: underline;
}
.btn-link:hover { color: var(--accent); }

/* ---------- a single task row ---------- */
.todo {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: opacity 0.2s ease;
}

/* ---------- the round checkbox ---------- */
.check {
  flex-shrink: 0;                 /* never squash the circle */
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: transparent;
  color: var(--bg);
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s ease;
}
.check:hover { border-color: var(--accent); }

/* When the row is done, fill the checkbox in */
.todo.done .check {
  background: var(--win);
  border-color: var(--win);
}

.todo-text { flex: 1; }

/* Completed tasks: faded + struck through */
.todo.done { opacity: 0.55; }
.todo.done .todo-text {
  text-decoration: line-through;
  color: var(--muted);
}

/* ============================================================
   THE BALLOONS
   JavaScript creates these elements and sets --dx / --dy.
   CSS reads those values and does the actual animating.
   ============================================================ */
.balloon {
  position: fixed;          /* fixed = positioned against the window */
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;  /* balloon-ish shape */
  pointer-events: none;     /* clicks pass straight through them */
  z-index: 9999;            /* always on top */
  opacity: 0;
  animation: balloon-pop 700ms ease-out forwards;
}

@keyframes balloon-pop {
  0% {
    transform: translate(-50%, -50%) scale(0.3);
    opacity: 1;
  }
  60% {
    opacity: 1;
  }
  100% {
    /* var(--dx) and var(--dy) come from JavaScript — each balloon
       gets a different random destination. That's the whole trick. */
    transform: translate(
                 calc(-50% + var(--dx)),
                 calc(-50% + var(--dy))
               )
               scale(1)
               rotate(25deg);
    opacity: 0;
  }
}

/* Respect people who get motion sickness. Always worth doing. */
@media (prefers-reduced-motion: reduce) {
  .balloon { display: none; }
}