:root {
  --bg: #061b45;
  --bg-2: #092c69;
  --panel: rgba(17, 45, 99, 0.82);
  --panel-strong: rgba(13, 37, 86, 0.96);
  --line: rgba(174, 198, 255, 0.18);
  --text: #f4f8ff;
  --muted: #a9b9d9;
  --blue: #1e7bff;
  --blue-soft: #aec6ff;
  --gold: #ffd34d;
  --red: #ff2d4f;
  --green: #00b894;
  --gray: #62708e;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at 16% -8%, rgba(30, 123, 255, 0.48), transparent 30%),
    radial-gradient(circle at 95% 10%, rgba(255, 45, 79, 0.16), transparent 25%),
    linear-gradient(180deg, #082b66 0%, #061b45 48%, #041333 100%);
  color: var(--text);
  font-family: "Be Vietnam Pro", "PingFang SC", "Microsoft YaHei", sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
}

.app-shell {
  width: min(100%, 480px);
  min-height: 100vh;
  margin: 0 auto;
  padding-bottom: 88px;
  position: relative;
  overflow-x: hidden;
}

.top-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 56px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(5, 21, 55, 0.84);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.icon-button {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--blue-soft);
  background: rgba(174, 198, 255, 0.08);
}

.page {
  padding: 16px;
}

.hero {
  position: relative;
  min-height: 150px;
  padding: 22px 18px;
  border-radius: 18px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(30, 123, 255, 0.96), rgba(8, 59, 138, 0.62)),
    radial-gradient(circle at 18% 22%, rgba(255, 255, 255, 0.34), transparent 22%);
  box-shadow: var(--shadow);
}

.hero::before {
  content: "";
  position: absolute;
  inset: auto -30px -40px -30px;
  height: 86px;
  border-radius: 50% 50% 0 0;
  background: rgba(0, 184, 148, 0.75);
  transform: rotate(-4deg);
}

.hero::after {
  content: "⚽";
  position: absolute;
  right: 22px;
  top: 18px;
  font-size: 56px;
  filter: drop-shadow(0 14px 18px rgba(0, 0, 0, 0.22));
  transform: rotate(12deg);
}

.hero-kicker {
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  font-weight: 700;
}

.hero-title {
  margin: 10px 0 12px;
  max-width: 270px;
  font-size: 31px;
  line-height: 1.08;
  font-weight: 900;
}

.hero-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(3, 18, 49, 0.35);
  color: #fff;
  font-weight: 800;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 6px;
  margin-top: 18px;
  border-radius: 14px;
  background: rgba(3, 18, 49, 0.42);
  border: 1px solid var(--line);
}

.tab {
  min-height: 40px;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.tab.active {
  background: var(--blue);
  color: white;
  box-shadow: 0 8px 26px rgba(30, 123, 255, 0.32);
}

.match-list,
.stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.match-list {
  margin-top: 16px;
}

.card {
  border-radius: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(18px);
}

.match-card {
  padding: 15px;
}

.row,
.between {
  display: flex;
  align-items: center;
}

.between {
  justify-content: space-between;
}

.match-stage,
.small-muted {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(174, 198, 255, 0.12);
  color: var(--blue-soft);
  font-size: 12px;
  font-weight: 800;
}

.pill.red {
  background: rgba(255, 45, 79, 0.15);
  color: #ffbac4;
}

.pill.green {
  background: rgba(0, 184, 148, 0.16);
  color: #9df2df;
}

.teams {
  display: grid;
  grid-template-columns: 1fr 96px 1fr;
  align-items: center;
  gap: 8px;
  margin: 16px 0;
}

.team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.flag {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(174, 198, 255, 0.12);
  border: 2px solid rgba(174, 198, 255, 0.2);
  font-size: 25px;
}

.team-name {
  width: 100%;
  font-size: 17px;
  font-weight: 900;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.score-box {
  text-align: center;
}

.score-main {
  color: var(--blue-soft);
  font-size: 28px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0.03em;
}

.score-sub {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.metric {
  padding: 9px;
  border-radius: 12px;
  background: rgba(3, 18, 49, 0.3);
}

.metric-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.metric-value {
  margin-top: 4px;
  color: var(--text);
  font-size: 15px;
  font-weight: 900;
}

.metric-value.gold {
  color: var(--gold);
}

.primary-button,
.ghost-button,
.danger-button,
.muted-button {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 12px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.primary-button {
  background: var(--blue);
  color: white;
  box-shadow: 0 9px 28px rgba(30, 123, 255, 0.33);
}

.ghost-button {
  color: var(--blue-soft);
  background: rgba(174, 198, 255, 0.1);
  border: 1px solid var(--line);
}

.danger-button {
  background: var(--red);
  color: #fff;
}

.muted-button,
button:disabled {
  color: #b4bfd4;
  background: rgba(98, 112, 142, 0.25);
  cursor: not-allowed;
  box-shadow: none;
}

.full {
  width: 100%;
}

.section-title {
  margin: 24px 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 19px;
  font-weight: 900;
}

.detail-hero {
  padding: 20px 16px;
}

.countdown {
  margin-top: 14px;
  padding: 12px;
  border-radius: 13px;
  text-align: center;
  color: #ffcad0;
  background: rgba(255, 45, 79, 0.13);
  border: 1px solid rgba(255, 45, 79, 0.24);
  font-weight: 900;
}

.prediction-panel {
  padding: 14px;
}

.my-score {
  font-size: 34px;
  font-weight: 900;
  color: var(--gold);
  letter-spacing: 0.06em;
}

.participant {
  padding: 12px;
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 10px;
  align-items: center;
}

.avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e7bff, #ff2d4f);
  color: white;
  font-weight: 900;
}

.user-name {
  font-size: 14px;
  font-weight: 900;
}

.guess-score {
  min-width: 54px;
  padding: 8px 10px;
  border-radius: 10px;
  text-align: center;
  background: rgba(174, 198, 255, 0.1);
  color: var(--blue-soft);
  font-weight: 900;
}

.winner {
  color: var(--green);
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 30;
  width: min(100%, 480px);
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  background: rgba(4, 19, 51, 0.92);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.nav-item {
  min-height: 58px;
  color: var(--muted);
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border-radius: 14px;
  font-size: 11px;
  font-weight: 800;
}

.nav-item.active {
  color: white;
  background: rgba(30, 123, 255, 0.18);
}

.sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0, 0, 0, 0.56);
}

.sheet {
  width: min(100%, 480px);
  max-height: 88vh;
  overflow: auto;
  padding: 10px 16px calc(20px + env(safe-area-inset-bottom));
  border-radius: 22px 22px 0 0;
  background: #071b44;
  border: 1px solid var(--line);
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.4);
}

.grabber {
  width: 42px;
  height: 5px;
  margin: 0 auto 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
}

.wheel-wrap {
  display: grid;
  grid-template-columns: 1fr 34px 1fr;
  align-items: center;
  gap: 8px;
  margin: 18px 0;
}

.wheel {
  height: 188px;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(7, 27, 68, 0.95), rgba(30, 123, 255, 0.16), rgba(7, 27, 68, 0.95));
  border: 1px solid var(--line);
}

.score-select {
  width: 100%;
  height: 160px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(7, 27, 68, 0.95), rgba(30, 123, 255, 0.2), rgba(7, 27, 68, 0.95));
  color: var(--text);
  font-size: 54px;
  font-weight: 900;
  text-align: center;
  text-align-last: center;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

.score-select option {
  color: #071b44;
  font-size: 28px;
}

.score-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(7, 27, 68, 0.95), rgba(30, 123, 255, 0.14), rgba(7, 27, 68, 0.95));
}

.score-choice {
  min-height: 42px;
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.72);
  background: rgba(174, 198, 255, 0.1);
  border: 1px solid rgba(174, 198, 255, 0.12);
  font-size: 22px;
  font-weight: 900;
}

.score-choice.active {
  color: #fff;
  background: var(--blue);
  box-shadow: 0 8px 22px rgba(30, 123, 255, 0.32);
}

.wheel-option {
  height: 56px;
  display: grid;
  place-items: center;
  scroll-snap-align: center;
  color: rgba(255, 255, 255, 0.44);
  font-size: 26px;
  font-weight: 900;
  cursor: pointer;
  border-radius: 12px;
}

.wheel-option.active {
  color: white;
  font-size: 38px;
  background: rgba(174, 198, 255, 0.16);
}

.colon {
  text-align: center;
  color: var(--blue-soft);
  font-size: 34px;
  font-weight: 900;
}

.form-card {
  padding: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 12px;
}

.field label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 11px;
  border: 1px solid var(--line);
  outline: none;
  background: rgba(3, 18, 49, 0.44);
  color: var(--text);
}

.field textarea {
  min-height: 92px;
  resize: vertical;
}

.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.profile-head {
  padding: 18px;
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: 14px;
  align-items: center;
}

.profile-avatar {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  background: linear-gradient(135deg, #1e7bff, #00b894);
  font-size: 24px;
  font-weight: 900;
}

.record {
  padding: 13px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 92px;
  z-index: 80;
  max-width: min(440px, calc(100% - 32px));
  transform: translateX(-50%);
  padding: 10px 14px;
  border-radius: 12px;
  color: white;
  background: rgba(6, 19, 51, 0.94);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  font-weight: 800;
}

.spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.empty {
  padding: 28px 18px;
  text-align: center;
  color: var(--muted);
}

@media (max-width: 360px) {
  .teams {
    grid-template-columns: 1fr 78px 1fr;
  }

  .hero-title {
    font-size: 27px;
  }

  .team-name {
    font-size: 15px;
  }
}
