:root {
  --bg: #090909;
  --bg2: #151515;
  --card: rgba(255,255,255,.075);
  --card-strong: rgba(255,255,255,.12);
  --text: #ffffff;
  --muted: #b7b7b7;
  --accent: #ff2d2d;
  --accent2: #ffb000;
  --success: #19c37d;
  --danger: #ff4d6d;
  --border: rgba(255,255,255,.13);
  --shadow: 0 26px 80px rgba(0,0,0,.48);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 18% 8%, rgba(255,45,45,.24), transparent 28%),
    radial-gradient(circle at 82% 0%, rgba(255,176,0,.12), transparent 24%),
    linear-gradient(145deg, #050505 0%, #111 46%, #070707 100%);
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,.035), transparent 45%);
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
.container { width: min(1160px, calc(100% - 32px)); margin: 0 auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.floating-menu {
  position: fixed;
  top: max(16px, env(safe-area-inset-top));
  right: 16px;
  z-index: 20;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 16px;
  background: rgba(0,0,0,.46);
  backdrop-filter: blur(16px);
  color: white;
  display: grid;
  place-items: center;
  gap: 4px;
  cursor: pointer;
  box-shadow: 0 18px 34px rgba(0,0,0,.36);
}
.floating-menu span, .floating-menu::before, .floating-menu::after {
  content: "";
  width: 21px;
  height: 2px;
  display: block;
  background: white;
  border-radius: 999px;
}
.drawer-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.62); opacity: 0; pointer-events: none; z-index: 30; transition: .2s ease; }
.drawer { position: fixed; top: 0; right: 0; width: min(410px, 92vw); height: 100vh; padding: 22px; background: #0b0b0d; border-left: 1px solid var(--border); box-shadow: var(--shadow); transform: translateX(104%); transition: .25s ease; z-index: 31; overflow: auto; }
.drawer.open { transform: translateX(0); }
.drawer-backdrop.open { opacity: 1; pointer-events: auto; }
.drawer-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
.close-btn { background: var(--card); color: white; border: 1px solid var(--border); border-radius: 14px; padding: 10px 14px; cursor: pointer; }
.drawer-card { background: linear-gradient(180deg, rgba(255,255,255,.11), rgba(255,255,255,.055)); border: 1px solid var(--border); border-radius: 26px; box-shadow: var(--shadow); }
.drawer-padding { padding: 18px; }
.drawer-gap { height: 14px; }
.drawer-admin-btn { display: block; text-align: center; }

.app-stage {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 18px;
}
.phone-frame {
  position: relative;
  width: min(470px, 100%);
  min-height: min(820px, calc(100svh - 36px));
  display: grid;
  align-content: center;
  overflow: hidden;
  padding: 24px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 36px;
  background:
    radial-gradient(circle at 50% -10%, rgba(255,45,45,.16), transparent 36%),
    linear-gradient(180deg, rgba(255,255,255,.09), rgba(255,255,255,.045));
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}
.phone-frame::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 28px;
  pointer-events: none;
}
.app-screen {
  position: relative;
  z-index: 1;
  display: none;
  animation: screenIn .22s ease both;
}
.app-screen.is-active { display: grid; gap: 18px; }
@keyframes screenIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.brand-area { display: grid; justify-items: center; gap: 16px; }
.main-logo, .step-logo {
  display: block;
  width: min(210px, 58vw);
  max-height: 122px;
  object-fit: contain;
  filter: drop-shadow(0 18px 24px rgba(0,0,0,.32));
}
.step-logo { width: min(160px, 48vw); margin: 0 auto 2px; }
.brand-strip, .result-products {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.brand-strip span, .result-products span {
  width: 86px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  overflow: hidden;
}
.brand-strip img, .result-products img { width: 100%; height: 100%; object-fit: contain; padding: 7px; }
.match-label {
  justify-self: center;
  padding: 8px 13px;
  border: 1px solid rgba(255,45,45,.34);
  border-radius: 999px;
  background: rgba(255,45,45,.12);
  color: #ffd6d6;
  font-size: 13px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.score-stage {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto minmax(0,1fr);
  align-items: center;
  gap: 12px;
  margin: 4px 0 0;
}
.team-side {
  min-height: 160px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 10px;
  padding: 14px 10px;
  border-radius: 26px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
}
.team-side img {
  width: min(105px, 28vw);
  height: 100px;
  object-fit: contain;
  filter: drop-shadow(0 16px 18px rgba(0,0,0,.32));
}
.team-side strong { font-size: 15px; line-height: 1.1; text-align: center; }
.score-inputs {
  display: grid;
  grid-template-columns: 64px 24px 64px;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.score-inputs input {
  height: 70px;
  text-align: center;
  border-radius: 22px;
  font-size: 32px;
  font-weight: 950;
  letter-spacing: -.05em;
  color: white;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(0,0,0,.42);
  outline: none;
}
.score-inputs input:focus { border-color: rgba(255,45,45,.68); box-shadow: 0 0 0 4px rgba(255,45,45,.14); }
.score-inputs span { color: var(--accent); font-size: 28px; font-weight: 950; }
.btn-activate[hidden] { display: none; }
.timer-compact {
  display: grid;
  justify-items: center;
  gap: 4px;
  margin-top: 2px;
  padding: 14px;
  border-radius: 22px;
  background: rgba(0,0,0,.32);
  border: 1px solid rgba(255,255,255,.12);
  text-align: center;
}
.timer-compact span { color: var(--muted); font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; }
.timer-compact strong { font-size: 18px; color: white; }
.timer-compact strong span { color: white; font-size: inherit; letter-spacing: 0; text-transform: none; }
.timer-compact small { color: var(--muted); }
.timer-compact.is-closed { border-color: rgba(255,77,109,.45); background: rgba(255,77,109,.10); }

.step-top { display: flex; justify-content: space-between; align-items: center; min-height: 34px; color: var(--muted); font-size: 13px; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; }
.back-link { border: 0; background: transparent; color: #fff; cursor: pointer; padding: 0; font-weight: 900; }
.app-screen h1, .compact-status h1 {
  margin: 0;
  text-align: center;
  font-size: clamp(30px, 8vw, 46px);
  line-height: .98;
  letter-spacing: -.06em;
}
.step-desc, .compact-status p { margin: -4px auto 4px; color: var(--muted); text-align: center; line-height: 1.5; max-width: 330px; }
.field { display: grid; gap: 7px; margin-bottom: 14px; }
.clean-field { margin-bottom: 0; }
label { color: #f7f7f7; font-size: 13px; font-weight: 950; }
input, select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 17px;
  padding: 14px 15px;
  color: white;
  background: rgba(0,0,0,.34);
  outline: none;
}
input:focus, select:focus { border-color: rgba(255,45,45,.65); box-shadow: 0 0 0 4px rgba(255,45,45,.13); }

.products { display: grid; gap: 10px; }
.product-select-grid { max-height: 342px; overflow: auto; padding-right: 2px; }
.product-check { display: flex; align-items: center; gap: 12px; border: 1px solid var(--border); border-radius: 18px; padding: 12px; background: rgba(255,255,255,.06); cursor: pointer; }
.product-check input { width: 18px; height: 18px; accent-color: var(--accent); flex: 0 0 auto; }
.clean-product-option { transition: .18s ease; }
.clean-product-option:hover { transform: translateY(-1px); border-color: rgba(255,45,45,.45); }
.clean-product-option:has(input:checked) { border-color: rgba(255,45,45,.75); background: rgba(255,45,45,.12); }
.product-art { width: 76px; min-width: 76px; height: 58px; display: grid; place-items: center; border-radius: 15px; overflow: hidden; background: rgba(0,0,0,.25); }
.product-art img { width: 100%; height: 100%; object-fit: contain; padding: 5px; }
.product-info { min-width: 0; display: grid; gap: 4px; }
.product-info strong { display: block; font-size: 15px; color: white; }
.product-info small { color: var(--muted); font-size: 12px; line-height: 1.25; }

.btn { border: 0; border-radius: 18px; padding: 15px 18px; font-weight: 950; cursor: pointer; transition: .18s ease; }
.btn-primary { background: linear-gradient(135deg, #ff3838, #ff1f1f); color: #fff; width: 100%; box-shadow: 0 18px 34px rgba(255,45,45,.25); }
.btn-primary:hover { transform: translateY(-1px); }
.btn-primary:disabled { opacity: .56; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-secondary { background: rgba(255,255,255,.09); color: white; border: 1px solid var(--border); }
.btn-danger { background: var(--danger); color: white; }
.notice { border-radius: 18px; padding: 13px 14px; border: 1px solid var(--border); color: var(--muted); background: rgba(255,255,255,.065); }
.app-notice { position: relative; z-index: 1; margin: 18px 0 0; text-align: center; font-size: 13px; }
.notice.success { border-color: rgba(25,195,125,.45); background: rgba(25,195,125,.10); color: #b7ffd9; }
.notice.error { border-color: rgba(255,77,109,.5); background: rgba(255,77,109,.10); color: #ffd0d9; }
.notice.warning { border-color: rgba(255,176,0,.55); background: rgba(255,176,0,.10); color: #ffe7ad; }
.lookup-result { margin-top: 14px; display: grid; gap: 10px; }
.lookup-box { padding: 14px; border-radius: 18px; border: 1px solid var(--border); background: rgba(255,255,255,.07); }
.lookup-box strong { display: block; margin-bottom: 4px; }
.lookup-box p { margin: 4px 0; color: var(--muted); }
.status-card { text-align: center; }
.status-icon { font-size: 48px; margin-bottom: 10px; }
.compact-status { position: relative; z-index: 1; display: grid; gap: 16px; justify-items: center; padding: 20px 4px 0; }
.setup-frame { justify-items: center; gap: 20px; }

.success-screen { justify-items: center; text-align: center; align-content: center; min-height: 620px; }
.success-icon { width: 82px; height: 82px; display: grid; place-items: center; border-radius: 50%; background: var(--success); color: #fff; font-size: 44px; font-weight: 950; box-shadow: 0 18px 34px rgba(25,195,125,.22); }
.success-screen p { margin: 0; color: var(--muted); font-size: 20px; font-weight: 900; }

.public-result-mode {
  background:
    radial-gradient(circle at 50% -10%, rgba(255,45,45,.24), transparent 32%),
    linear-gradient(145deg, #040404, #101010 54%, #050505);
}
.result-only {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 22px;
}
.result-shell {
  width: min(760px, 100%);
  display: grid;
  gap: 18px;
  justify-items: center;
  padding: clamp(22px, 5vw, 44px);
  border-radius: 36px;
  border: 1px solid rgba(255,255,255,.13);
  background: linear-gradient(180deg, rgba(255,255,255,.09), rgba(255,255,255,.045));
  box-shadow: var(--shadow);
}
.result-brand img { width: min(240px, 68vw); max-height: 140px; object-fit: contain; filter: drop-shadow(0 18px 22px rgba(0,0,0,.36)); }
.result-products span { width: 100px; height: 66px; }
.champion-card {
  width: min(360px, 100%);
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 22px;
  border-radius: 30px;
  background: rgba(0,0,0,.32);
  border: 1px solid rgba(255,255,255,.13);
}
.champion-kicker { color: #ffdddd; font-size: 12px; font-weight: 950; text-transform: uppercase; letter-spacing: .1em; }
.champion-card img { width: min(160px, 44vw); height: 140px; object-fit: contain; filter: drop-shadow(0 18px 18px rgba(0,0,0,.35)); }
.champion-card strong { font-size: clamp(30px, 7vw, 48px); letter-spacing: -.06em; line-height: 1; text-align: center; }
.champion-card small { color: var(--muted); font-weight: 900; }
.draw-logos { display: flex; gap: 12px; align-items: center; }
.draw-logos img { width: 110px; height: 100px; }
.public-winners { width: 100%; }
.public-winners h1 { margin: 2px 0 16px; text-align: center; font-size: clamp(34px, 8vw, 62px); line-height: .95; letter-spacing: -.07em; }
.winner-list { display: grid; gap: 10px; }
.clean-winner-list { width: 100%; }
.winner-item { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; border-radius: 20px; padding: 15px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); }
.winner-item strong { font-size: 17px; }
.winner-item small { color: var(--muted); display: block; margin-top: 4px; }
.score-tag { background: rgba(255,45,45,.17); color: #ffd8d8; border: 1px solid rgba(255,45,45,.38); padding: 9px 12px; border-radius: 999px; font-weight: 950; white-space: nowrap; }
.empty-winners { width: 100%; padding: 18px; border-radius: 20px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); color: var(--muted); text-align: center; font-weight: 900; }
.card-title { margin: 0 0 7px; font-size: 24px; letter-spacing: -.03em; }
.card-desc { margin: 0 0 16px; color: var(--muted); line-height: 1.45; }

@supports not selector(:has(*)) {
  .clean-product-option input:checked + .product-art { outline: 3px solid rgba(255,45,45,.70); }
}

@media (max-width: 560px) {
  .app-stage { padding: 0; align-items: stretch; }
  .phone-frame {
    width: 100%;
    min-height: 100svh;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    padding: max(20px, env(safe-area-inset-top)) 18px max(22px, env(safe-area-inset-bottom));
  }
  .phone-frame::after { display: none; }
  .floating-menu { top: max(12px, env(safe-area-inset-top)); right: 12px; }
  .score-stage { gap: 8px; }
  .team-side { min-height: 145px; padding: 12px 6px; border-radius: 22px; }
  .team-side img { height: 88px; }
  .team-side strong { font-size: 13px; }
  .score-inputs { grid-template-columns: 54px 18px 54px; gap: 6px; }
  .score-inputs input { height: 62px; border-radius: 18px; font-size: 28px; padding: 8px; }
  .score-inputs span { font-size: 23px; }
  .brand-strip span { width: 76px; height: 52px; border-radius: 16px; }
  .product-select-grid { max-height: 300px; }
  .result-only { padding: 0; }
  .result-shell { min-height: 100svh; border-radius: 0; border-left: 0; border-right: 0; justify-content: center; }
  .winner-item { grid-template-columns: 1fr; text-align: center; justify-items: center; }
}

@media (max-width: 380px) {
  .score-stage { grid-template-columns: 1fr; }
  .team-side { min-height: auto; grid-template-columns: 70px 1fr; justify-items: start; text-align: left; }
  .team-side img { width: 64px; height: 64px; }
  .score-inputs { order: 2; width: 100%; grid-template-columns: 1fr 20px 1fr; }
}


.admin-body { background: #f4f6fb; color: #111827; }
.admin-body::before { display: none; }
.admin-shell { min-height: 100vh; display: grid; grid-template-columns: 280px 1fr; }
.sidebar { background: #0b1020; color: white; padding: 24px; }
.sidebar img { width: 170px; margin-bottom: 20px; }
.sidebar a { display: block; padding: 12px 14px; border-radius: 14px; color: #dbe3ff; margin-bottom: 8px; }
.sidebar a:hover { background: rgba(255,255,255,.08); }
.admin-main { padding: 28px; overflow: auto; }
.admin-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 22px; }
.admin-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; margin-bottom: 20px; }
.panel-card { background: white; border: 1px solid #e5e7eb; color: #111827; box-shadow: 0 12px 30px rgba(15,23,42,.06); padding: 20px; border-radius: 22px; }
.panel-card h3 { margin: 0 0 12px; }
.metric strong { display:block; font-size: 30px; }
.admin-form-grid { display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.admin-body input, .admin-body select { color:#111827; background:#fff; border-color:#d7dce8; }
.admin-body label { color:#111827; }
.admin-check { background:#fff; color:#111827; }
.table-wrap { overflow:auto; border-radius: 18px; border:1px solid #e5e7eb; }
table { width:100%; border-collapse: collapse; background:white; }
th, td { padding:12px; border-bottom:1px solid #edf0f6; text-align:left; vertical-align: top; font-size: 14px; }
th { background:#f9fafb; font-weight:900; }
.admin-alert { padding: 13px 14px; border-radius: 16px; margin-bottom: 16px; background:#ecfdf5; color:#065f46; border:1px solid #a7f3d0; }
.login-page { min-height:100vh; display:grid; place-items:center; padding: 20px; background: linear-gradient(135deg, #070914, #12172b); color:white; }
.login-card { width:min(430px, 100%); padding:28px; border-radius:28px; background:rgba(255,255,255,.09); border:1px solid rgba(255,255,255,.16); box-shadow: var(--shadow); }
.login-card img { width:170px; display:block; margin:0 auto 18px; }
.login-card input { color:white; }
.actions { display:flex; gap:10px; flex-wrap:wrap; align-items:center; }
.tiny { color:#6b7280; font-size:12px; }
.admin-products-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; margin-top: 18px; }
.admin-product-card { border: 1px solid #e5e7eb; border-radius: 20px; padding: 16px; background: #f9fafb; }
.admin-product-logo { display: flex; align-items: center; justify-content: center; margin-bottom: 14px; background: #fff; border: 1px solid #e5e7eb; border-radius: 18px; padding: 12px; }
.admin-product-logo img { width: 160px; height: 95px; object-fit: contain; }

@supports not selector(:has(*)) {
  .product-card-option input:checked + .product-art { outline: 3px solid rgba(255,212,59,.70); }
}

@media (max-width: 1000px) {
  .entry-grid { grid-template-columns: 1fr; }
  .promo-card { position: relative; top: auto; }
  .admin-products-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .admin-shell { grid-template-columns: 1fr; }
  .sidebar { position: relative; }
  .admin-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 720px) {
  .container { width: min(100% - 22px, 1120px); }
  .hero { padding-top: 24px; }
  .hero-main-card, .guess-card, .winners-card, .promo-card { border-radius: 24px; padding: 22px; }
  .match-stage { grid-template-columns: 1fr; max-width: 420px; }
  .versus-stack { margin: -4px auto; width: 82px; height: 82px; }
  .team-card { min-height: 170px; }
  .team-card img { height: 105px; }
  .form-grid, .products, .admin-form-grid, .admin-grid, .product-logo-grid { grid-template-columns: 1fr; }
  .score-row { grid-template-columns: 1fr auto 1fr; }
  .timer-grid { gap: 7px; }
  .timer-grid div { padding: 12px 6px; border-radius: 16px; }
  .product-art { width: 92px; min-width: 92px; }
}
