/* Sports Watch — charcoal and muted-crimson theme
   Presentation only. No collection or watched-history logic is changed. */

:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #f2f2f4;
  background: #101114;
  font-synthesis: none;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 90% -10%, #292126 0%, transparent 30%), #101114;
}

.shell {
  max-width: 980px;
  margin: auto;
  padding: 0 20px;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 25px 0 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
}

.brandmark {
  display: grid;
  place-items: center;
  width: 45px;
  height: 45px;
  border-radius: 15px;
  background: #B8444B;
  color: #E7E0E0;
  font-size: 20px;
}

h1 {
  margin: 2px 0;
  font-size: 22px;
  letter-spacing: -0.8px;
}

.eyebrow {
  color: #acabb2;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2px;
}

.accent { color: #D4797F; }

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

.pill {
  padding: 8px 12px;
  border-radius: 30px;
  background: #2b2b32;
  color: #e5e5e9;
  font-size: 11px;
}

.btn {
  min-height: 43px;
  padding: 12px 16px;
  border: 0;
  border-radius: 11px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 750;
  white-space: nowrap;
}

.btn.outline {
  background: #25252b;
  color: #f0f0f3;
  border: 1px solid #464650;
}

.btn.primary {
  background: #B8444B;
  color: #E7E0E0;
}

.btn.small {
  min-height: 35px;
  padding: 8px 11px;
}

.btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.btn:not(:disabled):hover { filter: brightness(1.12); }

.hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 33px 34px;
  border: 1px solid #514047;
  border-radius: 23px;
  background: linear-gradient(112deg, #30252b, #1b1b20 85%);
}

.hero h2 {
  margin: 12px 0;
  font-size: clamp(25px, 4.7vw, 39px);
  line-height: 1.1;
  letter-spacing: -1.4px;
}

.hero p {
  margin: 0;
  color: #c2bcc2;
  font-size: 14px;
  line-height: 1.5;
}

.hero-stat {
  min-width: 107px;
  text-align: center;
}

.hero-stat strong {
  display: block;
  color: #D4797F;
  font-size: 40px;
}

.hero-stat span {
  color: #c2bcc2;
  font-size: 12px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 17px;
}

.stats > div {
  padding: 15px 18px;
  border: 1px solid #3a3a42;
  border-radius: 15px;
  background: #202126;
}

.stats span {
  display: block;
  color: #b7b7bf;
  font-size: 12px;
}

.stats strong {
  display: block;
  margin-top: 6px;
  font-size: 26px;
}

.progress {
  height: 7px;
  margin: 15px 0 25px;
  overflow: hidden;
  border-radius: 8px;
  background: #34343c;
}

.progress > div {
  width: 0;
  height: 100%;
  background: #B8444B;
  transition: width 0.2s;
}

.toolbar {
  display: grid;
  gap: 13px;
  padding: 19px;
  border: 1px solid #3c3c45;
  border-radius: 17px;
  background: #202126;
}

.toolbar-top,
.toolbar-bottom {
  display: flex;
  align-items: end;
  gap: 12px;
}

.field {
  display: grid;
  flex: 1;
  min-width: 0;
  gap: 7px;
  color: #c0c0c7;
  font-size: 11px;
  font-weight: 750;
}

.field input,
.field select {
  width: 100%;
  min-height: 43px;
  padding: 12px;
  border: 1px solid #50505a;
  border-radius: 9px;
  background: #17181d;
  color: #f2f2f4;
  font: inherit;
  font-size: 14px;
}

.field input:focus,
.field select:focus {
  outline: 2px solid #B8444B;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  padding: 9px 15px;
  border: 1px solid #4b4b55;
  border-radius: 50px;
  background: #2a2a31;
  color: #d0cfd5;
  cursor: pointer;
  font-weight: 700;
}

.chip.active {
  border-color: #B8444B;
  background: #B8444B;
  color: #E7E0E0;
}

.list-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 24px 0 11px;
}

.list-heading h3 {
  margin: 0 0 6px;
  font-size: 19px;
}

.list-heading p {
  margin: 0;
  color: #a7a7b0;
  font-size: 12px;
}

.game-list {
  display: grid;
  gap: 8px;
}

.game {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 15px 17px;
  border: 1px solid #3c3c45;
  border-radius: 13px;
  background: #202126;
}

.game.watched { opacity: 0.65; }

.check {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  accent-color: #B8444B;
  cursor: pointer;
}

.game-main {
  flex: 1;
  min-width: 0;
}

.game-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.game-title {
  font-size: 14px;
  font-weight: 750;
}

.game-meta {
  margin-top: 6px;
  color: #b6b6be;
  font-size: 12px;
}

.tag {
  padding: 4px 7px;
  border-radius: 7px;
  background: #433326;
  color: #ffe3b8;
  font-size: 10px;
}

 .watch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 43px;
  padding: 10px 16px;
  border: 0;
  border-radius: 11px;
  background: #96383F;
  color: #F5F2F2;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  text-shadow: none;
}

.watch:hover { background: #C3545C; }

.pagination,
.tool-buttons {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 20px 0;
}

.pagination span {
  color: #b3b3bc;
  font-size: 12px;
}

.tools {
  margin: 35px 0 20px;
  padding: 20px;
  border: 1px solid #42424b;
  border-radius: 15px;
}

.tools h3 { margin: 0; }

.tools p {
  color: #babac2;
  font-size: 13px;
  line-height: 1.5;
}

.tool-buttons {
  justify-content: start;
  flex-wrap: wrap;
}

.empty {
  padding: 45px 12px;
  border-radius: 12px;
  background: #24242b;
  color: #c0c0c7;
  text-align: center;
}

footer {
  padding: 24px;
  color: #94949e;
  font-size: 11px;
  text-align: center;
}

dialog {
  width: calc(100% - 30px);
  max-width: 440px;
  padding: 25px;
  border: 1px solid #50505a;
  border-radius: 19px;
  background: #24242a;
  color: #f2f2f4;
}

dialog::backdrop { background: #000b; }

dialog form {
  display: grid;
  gap: 16px;
}

dialog h3 { margin: 0; }

dialog p,
dialog small {
  color: #bfc0c8;
  font-size: 13px;
  line-height: 1.6;
}

.dialog-actions {
  display: flex;
  justify-content: end;
  gap: 10px;
}

.error {
  margin: 0;
  color: #ffbdbd !important;
}

#toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  display: none;
  max-width: 90vw;
  padding: 13px 18px;
  transform: translateX(-50%);
  border-radius: 12px;
  background: #B8444B;
  color: #E7E0E0;
  font-size: 13px;
  font-weight: 700;
}

#toast.visible { display: block; }

@media (max-width: 600px) {
  .shell { padding: 0 12px; }
  header { padding-top: 15px; }
  .brandmark { width: 38px; height: 38px; }
  .brand h1 { font-size: 18px; }
  .account { justify-content: end; }
  .pill { display: none; }
  .hero { padding: 25px 20px; }
  .hero-stat { min-width: 78px; }
  .hero-stat strong { font-size: 30px; }
  .stats > div { padding: 13px; }
  .stats strong { font-size: 21px; }
  .toolbar-top { align-items: stretch; }
  .toolbar-top .btn { align-self: end; }
  .game { padding: 12px 10px; gap: 9px; }
  .list-heading h3 { font-size: 16px; }
  .list-heading .btn { font-size: 11px; }
  .toolbar-bottom .field:last-child { flex: 0 0 40%; }
}

/* v1.0.2 — Use the chosen pitcher icon in the application header. */
.brandmark {
  background-color: #B8444B;
  background-image: url("icon.svg");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  color: transparent;
  font-size: 0;
  overflow: hidden;
}

/* v1.1.0 — Sports Library navigation and collection selection */
.version {
  margin-left: 6px;
  color: #b9b5b8;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0;
  vertical-align: middle;
}

.toolbar-top { flex-wrap: wrap; }
.toolbar-top .field { flex: 1 1 220px; }

.dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

#browse-dialog { max-width: 650px; max-height: 85vh; overflow-y: auto; }
.browse-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.browse-list { display: grid; gap: 8px; }
.browse-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border: 1px solid #42424b;
  border-radius: 10px;
  background: #202126;
}
.browse-row strong { display: block; margin-bottom: 4px; font-size: 13px; }
.browse-row small { color: #b7b7bf; }
.browse-row .btn { flex-shrink: 0; }
.empty-library { color: #babac2; padding: 18px 4px; }

@media (max-width: 600px) {
  .browse-fields { grid-template-columns: 1fr; }
  .toolbar-top .btn { flex: 1 1 160px; }
}

.browse-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 6px;
}

/* v1.1.1 — Watched status confirmation, minimum 500 ms. */
.game.watch-feedback {
  position: relative;
  border-color: #b87479;
  background: #34272e;
  animation: watch-status-highlight 350ms ease-out both;
}

.game.watch-feedback[data-change="unwatched"] {
  border-color: #777d88;
  background: #2c2e35;
}

.watch-feedback-label {
  display: block;
  margin-top: 6px;
  color: #f5f2f2;
  font-size: 12px;
  font-weight: 600;
}

.game.watch-feedback-exiting[data-fade="true"] {
  animation: watch-status-exit 150ms ease-in-out both;
}

@keyframes watch-status-highlight {
  0% { box-shadow: 0 0 0 2px #b8747980; }
  100% { box-shadow: none; }
}

@keyframes watch-status-exit {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-3px); }
}

@media (prefers-reduced-motion: reduce) {
  .game.watch-feedback,
  .game.watch-feedback-exiting[data-fade="true"] {
    animation: none;
  }
}


/* PWA-only additions: preserve website base styling and layout. */
.offline-notice {margin:14px 0;padding:13px 16px;border:1px solid #514047;border-radius:13px;background:#202126;color:#d5d1d5;font-size:13px;line-height:1.5}
.offline-notice strong{color:#f2f2f4}
.offline-action {display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:16px 0 0}
.offline-file{max-width:100%;color:#c0c0c7}
.offline-file::file-selector-button{background:#25252b;color:#f0f0f3;border:1px solid #464650;border-radius:11px;padding:11px 14px;font:inherit;font-weight:750;cursor:pointer}
.offline-state{display:inline-block;margin-top:6px;color:#bfc0c8;font-size:12px;font-weight:600}
.offline-state.saved{color:#b2dfbd}
.offline-state.missing{color:#d2b1b4}
.game-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.game-actions .watch{cursor:pointer}
.game-actions .btn.small{min-height:43px}
.offline-player{width:100%;max-height:60vh;background:#09090b;border-radius:12px}
.offline-video-name{margin:8px 0 14px;color:#bfc0c8;font-size:13px;overflow-wrap:anywhere}
.offline-section{margin:20px 0;padding:20px;border:1px solid #42424b;border-radius:15px;background:#202126}
.offline-section h3{margin:0 0 12px}
.offline-section p{color:#bfc0c8;font-size:13px;line-height:1.5}
[hidden]{display:none !important}
@media(max-width:600px){.game-actions{justify-content:flex-start}.game{flex-wrap:wrap}.game-actions{width:100%;margin-left:33px}.offline-action{align-items:stretch}}
