/* OST Quest — Stylesheet */
/* Aesthetic: dark gaming terminal, sharp + editorial */

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

/* ─── Reset & Base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body {
  font-family: 'Barlow', sans-serif;
  background: #16171a;
  color: #ddd9cf;
  min-height: 100vh;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
a { color: inherit; }
ul, li { list-style: none; }

/* ─── Layout ───────────────────────────────────────────────────────────────── */
.app-wrapper {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 12px 16px;
}

/* ─── Header ───────────────────────────────────────────────────────────────── */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0 8px;
  margin-bottom: 4px;
  gap: 10px;
  position: relative;
}
.site-header__left { display: flex; align-items: baseline; gap: 10px; }
.site-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #b8e030;
  line-height: 1;
}
.site-subtitle {
  font-size: 12px;
  color: #555960;
  letter-spacing: 0.5px;
}
.site-header__right { display: flex; gap: 5px; align-items: center; flex-wrap: wrap; }

.header-countdown {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 13px;
  color: #555960;
  letter-spacing: 1px;
}
.header-countdown span { color: #b8e030; }

.icon-btn {
  width: 36px; height: 36px;
  border-radius: 8px;
  border: 1px solid #232328;
  background: #18191e;
  color: #9999a0;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.icon-btn:hover { background: #20202a; color: #ddd9cf; border-color: #2c2c34; }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn--ghost { background: none; border-color: transparent; }
.icon-btn--ghost:hover { background: none; border-color: transparent; color: #ddd9cf; }

#btn-help {
  position: fixed;
  top: 10px;
  right: max(8px, calc(50vw - 412px));
  z-index: 50;
}

.today-btn {
  height: 36px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid #2a3520;
  background: #141a0e;
  color: #b8e030;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: background 0.15s, border-color 0.15s;
}
.today-btn:hover { background: #1c2614; border-color: #3a4828; }

/* ─── Archive Banner ───────────────────────────────────────────────────────── */
.archive-banner {
  display: none;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  background: #1a1400;
  border: 1px solid #3a2e00;
  color: #d4a820;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 1.5px;
  padding: 6px 16px;
  border-radius: 6px;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
}

/* ─── Score bar ─────────────────────────────────────────────────────────────── */
.score-bar { display: none; margin-bottom: 0; }

/* ─── Loading ───────────────────────────────────────────────────────────────── */
#loading-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 400px;
}
.loading-spinner {
  width: 36px; height: 36px;
  border: 3px solid #232328;
  border-top-color: #b8e030;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 14px;
  color: #555960;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* ─── Columns ───────────────────────────────────────────────────────────────── */
.columns-wrapper {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.col {
  width: 100%;
  background: #18191e;
  border-radius: 10px;
  border: 1.5px solid #232328;
  overflow: hidden;
  position: relative;
  transition: border-color 0.2s;
}
.col--active  { border-color: #2a2a34; }
.col--correct { border-color: #2e5018; }
.col--wrong   { border-color: #8d1010; }
.col--locked  { opacity: 0.4; pointer-events: none; }

/* Column header */
.col__header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  background: #131315;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s;
}
.col__header:hover       { background: #191a1d; }
.col__header--playing    { background: #101a08; }

@keyframes col-spin { to { transform: rotate(360deg); } }
.col__loading-icon { animation: col-spin 0.9s linear infinite; }

.play-btn {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #b8e030;
  color: #16171a;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: transform 0.12s, background 0.12s;
  will-change: transform;
}
.play-btn:hover    { transform: scale(1.1); background: #c8f040; }
.play-btn:disabled { background: #2c2c34; color: #444; }
.play-btn svg      { width: 9px; height: 9px; }

.col__track-hint {
  font-size: 11px;
  color: #555960;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.col__track-hint strong { color: #ddd9cf; }

/* ─── Covers grid ───────────────────────────────────────────────────────────── */
.covers-grid {
  padding: 8px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.cover-item {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 3/4;
  background: #101012;
  transition: transform 0.12s;
}
.cover-item:hover { transform: scale(1.02); }
.cover-item img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.cover-item__label {
  position: absolute;
  inset: auto 0 0;
  padding: 24px 6px 6px;
  background: linear-gradient(transparent, rgba(0,0,0,0.92));
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  opacity: 0;
  transition: opacity 0.18s;
  line-height: 1.3;
  text-align: center;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.cover-item:hover .cover-item__label { opacity: 1; }

.cover-item--correct-pick { outline: 3px solid #6bc832; outline-offset: -1px; }
.cover-item--wrong-pick   { outline: 3px solid #c71717; outline-offset: -1px; }
.cover-item--wrong-pick img { opacity: 0.6; }
.cover-item--answer       { outline: 3px solid #6bc832; outline-offset: -1px; }
.cover-item--dimmed       { opacity: 0.2; }

/* ─── Lock overlay ──────────────────────────────────────────────────────────── */
.lock-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(22, 23, 26, 0.5);
  color: #383840;
  pointer-events: none;
}

/* ─── Modal ─────────────────────────────────────────────────────────────────── */
#modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(2px);
}
#modal.modal--open { display: flex; }

#modal-inner {
  background: #18191e;
  border: 1px solid #2c2c34;
  border-radius: 14px;
  width: 100%;
  max-width: 320px;
  overflow: hidden;
  animation: popIn 0.18s ease;
  position: relative;
}
@keyframes popIn {
  from { transform: scale(0.9); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

.modal__cover-wrap img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
}

.modal__body {
  padding: 14px 16px 18px;
}

.modal__game-name {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #ddd9cf;
  margin-bottom: 12px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.modal__game-year {
  font-size: 14px;
  font-weight: 400;
  color: #7a7a6e;
  flex-shrink: 0;
  line-height: 1.1;
}

/* Buttons */
.btn {
  width: 100%;
  padding: 11px 16px;
  border-radius: 8px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: filter 0.12s;
}
.btn:hover:not(:disabled) { filter: brightness(1.12); }
.btn:disabled { cursor: default; }

.btn--guess      { background: #6a1a1a; color: #fff; }
.btn--result-ok  { background: #2e5018; color: #b8f060; }
.btn--result-fail{ background: #501818; color: #f06060; }
.btn--new        { background: #20202a; color: #b8e030; border: 1px solid #2a2a34; margin-top: 16px; }

/* Result info row */
.modal__result-info {
  display: flex;
  flex-direction: column;
  gap: 0;
  align-items: flex-start;
  margin-top: 14px;
  background: #131315;
  border-radius: 8px;
  padding: 10px 12px;
}
.modal__result-text {
  font-size: 12px;
  color: #888;
  line-height: 1.5;
}
.modal__result-text strong { color: #ddd9cf; }

/* Source link — shared base (compact result modal + full info modal) */
.source-link,
.btn--source-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #ddd9cf;
  background: none;
  border: none;
  padding: 0;
  line-height: 1;
}
.source-link svg,
.btn--source-link svg { flex-shrink: 0; display: block; }

/* Compact (result modal) */
.source-link { font-size: 12px; margin-top: 8px; }

/* Full-width (info modal) */
.btn--source-link { font-size: 15px; margin-top: 10px; width: auto; justify-content: flex-start; }

/* Platform name coloring */
.source-name--yt { color: #7a9af0; }
.source-name--sc { color: #f7931a; }
.source-name--sp { color: #1db954; }

.source-link:hover .source-name--yt,
.btn--source-link:hover .source-name--yt { color: #aac0ff; }
.source-link:hover .source-name--sc,
.btn--source-link:hover .source-name--sc { color: #ffa940; }
.source-link:hover .source-name--sp,
.btn--source-link:hover .source-name--sp { color: #3fd972; }

/* Track title */
.modal__track-title {
  font-family: 'Barlow', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #c4c4b8;
  margin: 6px 0 10px;
}
.modal__track-title::before {
  content: '♪ ';
  color: #b8e030;
}

/* Tutorial */
.modal__tutorial-title {
  margin-bottom: 18px;
}

.tutorial-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tutorial-steps li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.tutorial-step__icon {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  font-size: 16px;
  color: #ddd9cf;
}

.tutorial-step__icon--score {
  font-size: 10px;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  flex-direction: column;
  gap: 1px;
  letter-spacing: 0.5px;
}

.tutorial-hit  { color: #b8e030; }
.tutorial-miss { color: #c84040; }

.tutorial-steps strong {
  display: block;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #ddd9cf;
  margin-bottom: 2px;
}

.tutorial-steps p {
  margin: 0;
  font-size: 13px;
  color: #7a7a6e;
  line-height: 1.4;
}

/* Custom audio player */
.modal-player {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  margin-top: 8px;
}

.modal-player__btn {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #b8e030;
  color: #1a1b1f;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.15s;
}
.modal-player__btn:hover { background: #caf040; }

.modal-player__track {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.modal-player__bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
  cursor: default;
  position: relative;
}
.modal-player__fill {
  height: 100%;
  width: 0%;
  background: #b8e030;
  border-radius: 2px;
  pointer-events: none;
}

.modal-player__time {
  font-family: 'Courier New', monospace;
  font-size: 11px;
  color: #7a7a6e;
  line-height: 1;
}

/* Modal close X button */
.modal__close-x {
  position: absolute;
  top: 10px; right: 10px;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  display: flex; align-items: center; justify-content: center;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
  z-index: 10;
}
.modal__close-x:hover { background: rgba(0,0,0,0.8); }

/* End modal */
.modal__end {
  padding: 28px 24px 24px;
  text-align: center;
}
.modal__end-score {
  font-family: 'Barlow Condensed', sans-serif;
  margin-bottom: 6px;
}
.modal__end-num {
  font-size: 64px;
  font-weight: 800;
  line-height: 1;
}
.modal__end-num--0 { color: #c84040; }
.modal__end-num--1 { color: #d4a820; }
.modal__end-num--2 { color: #7abe3a; }
.modal__end-num--3 { color: #b8e030; }
.modal__end-denom {
  font-size: 28px;
  color: #3a4030;
  font-weight: 700;
}
.modal__end-label {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 20px;
  font-weight: 600;
  color: #e8e4dc;
  margin-bottom: 20px;
}
.modal__archive-note {
  font-size: 11px;
  color: #d4a820;
  background: #1a1400;
  border: 1px solid #3a2e00;
  border-radius: 5px;
  padding: 5px 10px;
  margin-bottom: 14px;
  letter-spacing: 0.5px;
}

/* Stats boxes */
.modal__stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}
.stat-box {
  background: #131315;
  border-radius: 8px;
  padding: 10px 4px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.stat-box__val {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #ddd9cf;
  line-height: 1;
  flex: 1;
  display: flex;
  align-items: center;
}
.stat-box__lbl {
  font-size: 10px;
  color: #a8a4a0;
  text-align: center;
  line-height: 1.2;
  min-height: 2.4em;
  display: flex;
  align-items: center;
}

.modal__countdown {
  font-size: 12px;
  color: #a8a4a0;
  margin-bottom: 4px;
}
.modal__countdown strong {
  font-family: 'Barlow Condensed', sans-serif;
  color: #b8e030;
  letter-spacing: 1px;
}

/* Archive list */
.archive__list {
  max-height: 280px;
  overflow-y: auto;
  margin-bottom: 4px;
  text-align: left;
}
.archive__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 4px;
  border-bottom: 1px solid #232328;
  cursor: pointer;
  transition: background 0.12s;
  border-radius: 4px;
}
.archive__item:hover { background: #20202a; }
.archive__item--active { background: #1a1400; border-left: 3px solid #d4a820; padding-left: 9px; }
.archive__item--active:hover { background: #1e1800; }
.archive__item--active .archive__date { color: #d4a820; }
.archive__date {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 15px;
  color: #888;
  letter-spacing: 0.5px;
}
.archive__badge {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.5px;
}
.archive__badge--ok      { background: #1a3008; color: #6bc832; }
.archive__badge--partial { background: #2a2000; color: #d4a820; }
.archive__badge--fail    { background: #300808; color: #c84040; }
.archive__badge--new     { background: #1e1e24; color: #7a9af0; }
.archive__badge--ongoing { background: #1c1c20; color: #a080e0; }

/* ─── Toast ──────────────────────────────────────────────────────────────────── */
#toast {
  position: fixed;
  bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: #20202a;
  border: 1px solid #2a2a34;
  color: #ddd9cf;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 13px;
  z-index: 500;
  transition: transform 0.25s ease;
  white-space: nowrap;
  max-width: 90vw;
  text-align: center;
}
#toast.toast--show { transform: translateX(-50%) translateY(0); }

/* ─── Footer ─────────────────────────────────────────────────────────────────── */
.site-footer {
  margin-top: 20px;
  padding-bottom: 12px;
  text-align: center;
}
.site-footer p {
  font-family: 'Barlow', sans-serif;
  font-size: 11px;
  color: #55555f;
  margin: 3px 0;
  line-height: 1.4;
}

/* ─── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 520px) {
  .site-title { font-size: 20px; }
  .site-subtitle { display: none; }
  .header-countdown { font-size: 11px; }
  .col { border-radius: 8px; }
  .modal__stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 360px) {
  .columns-wrapper { gap: 5px; }
  .covers-grid { gap: 4px; padding: 5px; }
}


/* ─── Settings panel (bottom-left: volume + language) ───────────────────────── */
.settings-panel {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.lang-flag-svg {
  width: 16px;
  height: 11px;
  border-radius: 2px;
  flex-shrink: 0;
  display: block;
}

.lang-dropdown { position: relative; }

.lang-dropdown__btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #18191e;
  border: 1px solid #2c2c34;
  border-radius: 20px;
  color: #7a7a6e;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 0 10px;
  height: 32px;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
}
.lang-dropdown__btn:hover,
.lang-dropdown--open .lang-dropdown__btn { color: #b8e030; border-color: #b8e030; }

.lang-dropdown__chevron {
  width: 10px; height: 6px;
  flex-shrink: 0;
  transition: transform 0.2s;
}
.lang-dropdown--open .lang-dropdown__chevron { transform: rotate(180deg); }

.lang-dropdown__menu {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 0;
  background: #18191e;
  border: 1px solid #2c2c34;
  border-radius: 10px;
  padding: 4px;
  display: none;
  flex-direction: column;
  min-width: 100%;
  z-index: 200;
}
.lang-dropdown--open .lang-dropdown__menu { display: flex; }

.lang-dropdown__option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: none;
  background: none;
  border-radius: 7px;
  color: #9999a0;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.12s;
}
.lang-dropdown__option:hover { background: #20202a; color: #ddd9cf; }
.lang-dropdown__option--active { color: #b8e030; }

.vol-control {
  display: flex;
  flex-direction: row;
  align-items: center;
}

.vol-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: #18191e;
  border: 1px solid #2c2c34;
  color: #7a7a6e;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}
.vol-btn:hover  { color: #b8e030; border-color: #b8e030; }
.vol-btn.muted  { color: #c84040; border-color: #c84040; }
.vol-btn svg    { width: 18px; height: 18px; }

.vol-slider-wrap {
  display: flex;
  align-items: center;
  background: #18191e;
  border: 1px solid #2c2c34;
  border-left: none;
  border-radius: 0 20px 20px 0;
  margin-left: -22px;
  padding: 0 14px 0 26px;
  height: 40px;
  overflow: hidden;
  max-width: 0;
  opacity: 0;
  transition: max-width 0.25s ease, opacity 0.2s ease;
  pointer-events: none;
}
.vol-control:hover .vol-slider-wrap,
.vol-control.open  .vol-slider-wrap {
  max-width: 140px;
  opacity: 1;
  pointer-events: all;
}

.vol-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 90px;
  height: 4px;
  border-radius: 2px;
  background: #2c2c34;
  outline: none;
  cursor: pointer;
}
.vol-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: #b8e030;
  cursor: pointer;
}
.vol-slider::-moz-range-thumb {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: #b8e030;
  cursor: pointer;
  border: none;
}


/* ─── Floating score popup (RPG style) ──────────────────────────────────────── */
.score-popup {
  position: fixed;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 2px;
  pointer-events: none;
  z-index: 300;
  text-shadow: 0 2px 8px rgba(0,0,0,0.8);
  animation: scoreFloat 1.4s ease-out forwards;
}
.score-popup--hit  { color: #6bc832; }
.score-popup--miss { color: #c84040; }

@keyframes scoreFloat {
  0%   { opacity: 1;   transform: translateY(0)     scale(1.2); }
  20%  { opacity: 1;   transform: translateY(-12px) scale(1); }
  100% { opacity: 0;   transform: translateY(-60px) scale(0.9); }
}

/* ─── Line effect ────────────────────────────────────────────────────────────── */
.line-strip {
  position: fixed;
  border-radius: 6px;
  pointer-events: none;
  z-index: 150;
  animation: lineFlash 1.6s ease-out forwards;
}

@keyframes lineFlash {
  0%   { background: rgba(107, 200, 50, 0);    box-shadow: none; }
  12%  { background: rgba(107, 200, 50, 0.5);  box-shadow: 0 0 22px 8px rgba(107, 200, 50, 0.6); }
  40%  { background: rgba(107, 200, 50, 0.25); box-shadow: 0 0 12px 4px rgba(107, 200, 50, 0.3); }
  100% { background: rgba(107, 200, 50, 0);    box-shadow: none; }
}

.line-gif {
  position: fixed;
  pointer-events: none;
  z-index: 600;
  animation: lineGifFloat 1.8s ease-out forwards;
}
.line-gif img { width: 72px; height: 72px; }

@keyframes lineGifFloat {
  0%   { opacity: 1; transform: translateX(-50%) translateY(-50%) scale(1.3); }
  20%  { opacity: 1; transform: translateX(-50%) translateY(calc(-50% - 14px)) scale(1); }
  100% { opacity: 0; transform: translateX(-50%) translateY(calc(-50% - 80px)) scale(0.9); }
}

/* Wasted effect */
.wasted-active .app-wrapper {
  filter: grayscale(1);
  transition: filter 0.5s ease;
}

.wasted-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.6s ease;
}
.wasted-overlay--fading { opacity: 0; }

.wasted-img {
  width: min(736px, calc(100vw - 24px));
  height: auto;
  animation: wasted-in 0.12s ease-out;
}

@keyframes wasted-in {
  from { transform: scaleX(5); opacity: 0; }
  to   { transform: scaleX(1); opacity: 1; }
}

