:root {
  color-scheme: light;
  --blue: #0646ff;
  --blue-dark: #071d68;
  --ink: #171821;
  --muted: #777b8c;
  --line: #e7e9f2;
  --card: rgba(255, 255, 255, 0.94);
  --success: #15a66a;
  --danger: #d93636;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 219, 112, 0.5), transparent 30%),
    radial-gradient(circle at 82% 4%, rgba(79, 133, 255, 0.38), transparent 34%),
    linear-gradient(145deg, #f7f9ff 0%, #eef3ff 42%, #fff7ea 100%);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.page-shell {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 24px 18px 44px;
}

.partner-logo-wrap {
  display: flex;
  justify-content: center;
  margin: 0 auto 18px;
}

.partner-logo {
  display: block;
  width: min(100%, 430px);
  height: auto;
  padding: 12px 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 45px rgba(26, 39, 88, 0.1);
}

.header {
  position: relative;
  overflow: hidden;
  padding: 34px 24px 28px;
  border-radius: 30px;
  color: #fff;
  text-align: center;
  background:
    linear-gradient(135deg, rgba(0, 34, 140, 0.95), rgba(0, 97, 255, 0.9)),
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.42), transparent 32%);
  box-shadow: 0 24px 70px rgba(16, 45, 130, 0.28);
}

.header::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(252, 209, 22, 0.9) 0 11%, rgba(0, 48, 135, 0.88) 11% 22%, rgba(206, 17, 38, 0.86) 22% 33%, transparent 33% 67%, rgba(0, 0, 0, 0.74) 67% 78%, rgba(221, 0, 0, 0.8) 78% 89%, rgba(255, 206, 0, 0.86) 89% 100%),
    linear-gradient(90deg, rgba(6, 19, 62, 0.08), rgba(6, 19, 62, 0.66) 34%, rgba(6, 19, 62, 0.66) 66%, rgba(6, 19, 62, 0.08));
  opacity: 0.72;
}

.header::after {
  content: "";
  position: absolute;
  inset: auto -12% -38% -12%;
  height: 120px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px 999px 0 0;
}

.match-score {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px minmax(0, 1fr);
  align-items: center;
  width: min(100%, 430px);
  margin: 18px auto 6px;
  gap: 8px;
}

.team-card {
  position: relative;
  overflow: hidden;
  min-height: 66px;
  padding: 12px 10px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 20px;
  color: #fff;
  text-align: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), 0 16px 34px rgba(0, 0, 0, 0.18);
}

.team-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.22), transparent 48%);
}

.team-ecuador {
  background: linear-gradient(180deg, #ffd100 0 50%, #003893 50% 75%, #ce1126 75% 100%);
}

.team-germany {
  background: linear-gradient(180deg, #111 0 33.33%, #dd0000 33.33% 66.66%, #ffce00 66.66% 100%);
}

.team-country,
.score-divider {
  position: relative;
  z-index: 1;
}

.team-country {
  display: block;
  padding-top: 2px;
  font-size: clamp(10px, 3vw, 14px);
  font-weight: 1000;
  letter-spacing: 0.07em;
  line-height: 1;
  text-transform: uppercase;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.44);
}

.score-divider {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 999px;
  color: var(--blue-dark);
  font-size: 14px;
  font-weight: 950;
  letter-spacing: -0.04em;
  background: #fff;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.2);
}

.header-logo {
  position: relative;
  z-index: 1;
  display: grid;
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
  place-items: center;
  border-radius: 22px;
  font-size: 34px;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.26);
}

.header h1 {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: clamp(34px, 9vw, 58px);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.header-sub {
  position: relative;
  z-index: 1;
  margin-top: 10px;
  font-size: 15px;
  opacity: 0.86;
}

.header-badge {
  position: relative;
  z-index: 1;
  display: inline-flex;
  margin-top: 16px;
  padding: 8px 13px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue-dark);
  background: #ffdf68;
}

.content {
  padding-top: 22px;
}

.section-label {
  margin: 24px 4px 10px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue-dark);
}

.card {
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 24px;
  background: var(--card);
  box-shadow: 0 18px 45px rgba(26, 39, 88, 0.11);
  backdrop-filter: blur(14px);
}

.field + .field {
  margin-top: 14px;
}

label {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 800;
}

input {
  width: 100%;
  min-height: 52px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--ink);
  background: #fff;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

input:focus {
  border-color: rgba(6, 70, 255, 0.55);
  box-shadow: 0 0 0 4px rgba(6, 70, 255, 0.11);
}

.question-text {
  margin: 0 0 13px;
  font-size: 15px;
  font-weight: 750;
  line-height: 1.42;
}

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

.yn-btn,
.submit-btn,
.admin-toggle-btn,
.export-btn,
.clear-btn {
  border: 0;
  border-radius: 16px;
  font-weight: 850;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.yn-btn {
  min-height: 48px;
  padding: 0 12px;
  color: #33384d;
  background: #f0f3fb;
}

.yn-btn:hover,
.submit-btn:hover,
.admin-toggle-btn:hover,
.export-btn:hover,
.clear-btn:hover {
  transform: translateY(-1px);
}

.sel-ja {
  color: #fff;
  background: var(--success);
  box-shadow: 0 12px 24px rgba(21, 166, 106, 0.24);
}

.sel-nein {
  color: #fff;
  background: #646b7a;
}

.q-divider {
  height: 1px;
  margin: 18px 0;
  background: var(--line);
}

.submit-btn {
  width: 100%;
  min-height: 58px;
  margin-top: 18px;
  color: #fff;
  font-size: 17px;
  background: linear-gradient(135deg, var(--blue), #0031b7);
  box-shadow: 0 18px 38px rgba(6, 70, 255, 0.27);
}

.submit-btn:disabled {
  cursor: wait;
  opacity: 0.68;
}

.hint {
  margin: 12px 6px 0;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

#success-view,
#admin-panel {
  display: none;
}

.success-wrap {
  margin-top: 24px;
  padding: 34px 22px;
  border-radius: 28px;
  text-align: center;
  background: #fff;
  box-shadow: 0 18px 45px rgba(26, 39, 88, 0.12);
}

.success-icon-wrap {
  display: grid;
  width: 70px;
  height: 70px;
  margin: 0 auto 14px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-size: 38px;
  font-weight: 900;
  background: var(--success);
}

.success-title {
  font-size: 29px;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.success-sub {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.45;
}

.admin-toggle-wrap {
  margin-top: 30px;
  text-align: center;
}

.admin-toggle-btn {
  padding: 12px 18px;
  color: #525a70;
  background: rgba(255, 255, 255, 0.72);
}

#admin-panel {
  margin-top: 16px;
}

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

.admin-title {
  font-size: 21px;
  font-weight: 950;
  letter-spacing: -0.03em;
}

.count-pill {
  display: inline-flex;
  min-width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  font-weight: 900;
  background: var(--blue);
}

.export-btn,
.clear-btn {
  width: 100%;
  min-height: 46px;
  margin-top: 14px;
}

.export-btn {
  color: #fff;
  background: var(--blue-dark);
}

.clear-btn {
  color: #fff;
  background: var(--danger);
}

.empty-state {
  margin: 0;
  padding: 18px 0 4px;
  color: #8c91a2;
  font-size: 13px;
}

.entry-row {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.entry-name {
  font-weight: 950;
}

.entry-contact,
.entry-time {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  word-break: break-word;
}

.entry-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.flag {
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
}

.flag-ja {
  color: #087449;
  background: #dcf8eb;
}

.flag-nein {
  color: #5d6270;
  background: #eef0f5;
}

@media (max-width: 520px) {
  .page-shell {
    padding: 14px 12px 34px;
  }

  .partner-logo-wrap {
    margin-bottom: 12px;
  }

  .partner-logo {
    width: min(100%, 340px);
    padding: 10px 12px;
    border-radius: 18px;
  }

  .header {
    padding: 28px 18px 24px;
    border-radius: 24px;
  }

  .match-score {
    grid-template-columns: minmax(0, 1fr) 34px minmax(0, 1fr);
    width: min(100%, 360px);
    gap: 6px;
    margin-top: 14px;
    margin-bottom: 4px;
  }

  .team-card {
    min-height: 58px;
    padding: 8px 4px;
    border-radius: 16px;
  }

  .team-country {
    font-size: clamp(10px, 2.85vw, 12px);
    letter-spacing: 0.055em;
  }

  .score-divider {
    width: 34px;
    height: 34px;
    font-size: 12px;
  }

  .card {
    padding: 15px;
    border-radius: 20px;
  }

  .yn-row {
    grid-template-columns: 1fr;
  }
}
