@media (max-width: 600px) {
  body.admin, .admin .page {
    padding: 0 2vw;
    font-size: 1em;
  }
  .admin .header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 12px 0 0 0;
  }
  .admin .card {
    padding: 12px 6px;
    margin-bottom: 16px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  }
  .admin .grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }
  .admin .row {
    flex-direction: column;
    gap: 8px;
  }
  .admin input, .admin select, .admin button {
    font-size: 1em;
    min-height: 42px;
    width: 100%;
    box-sizing: border-box;
  }
  .admin .sponsor-admin-grid, .admin .sponsor-strip {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .admin .sponsor-tile, .admin .sponsor-preview {
    min-width: 0;
    max-width: 100%;
    height: auto;
  }
  .admin .table-wrapper {
    overflow-x: auto;
    padding: 0;
  }
  .admin .table {
    min-width: 480px;
    font-size: 0.98em;
  }
  .admin .list-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .admin .modal-card {
    width: 98vw;
    max-width: 420px;
    min-width: 0;
    left: 1vw;
    right: 1vw;
    padding: 12px 8px;
  }
  .admin .modal-close {
    top: 8px;
    right: 8px;
    font-size: 1.5em;
  }
  .admin label, .admin .hint {
    font-size: 1em;
  }
}
.favorite-actions {
  margin-top: 120px;
}
.favorite-actions {
  position: relative;
  z-index: 10;
}
@media (max-width: 600px) {
  .formation-wrap {
    width: 98vw;
    max-width: 340px;
    height: 60vw;
    max-height: 260px;
    min-width: 220px;
    min-height: 160px;
    margin: 0 auto 16px auto;
    position: relative;
  }
  .formation-slot,
  .allstar-slot,
  .allstar-slot .favorite-empty {
    width: 16vw;
    height: 16vw;
    min-width: 56px;
    min-height: 56px;
    max-width: 72px;
    max-height: 72px;
    border-radius: 50%;
    position: absolute;
  }
  .allstar-slot.filled img {
    width: 14vw;
    height: 14vw;
    min-width: 48px;
    min-height: 48px;
    max-width: 64px;
    max-height: 64px;
  }
  .allstar-slot .player-name {
    font-size: 0.95em;
    bottom: -22px;
  }
}
/* All-Star Team Layout */

/* All-Star Team Layout */

.formation-wrap {
  position: relative;
  width: 320px;
  height: 340px;
  margin: 0 auto 12px auto;
}
.formation-slot {
  position: absolute;
  width: 84px;
  min-width: 84px;
  min-height: 84px;
  max-width: 84px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 3px dashed #e2c97a;
}

/* Goldener Glow-Rahmen für ausgewählten Spieler */
.formation-slot.filled {
  border: 3px solid #e2c97a;
  box-shadow: 0 0 16px 4px #ffe066, 0 0 4px 2px #e2c97a;
  /* height, max-height und overflow entfernt für bessere Anzeige */
}
/* 2 oben */
#formationSlot1 { top: 16px; left: 0px; }
#formationSlot2 { top: 16px; right: 0px; }
#formationSlot3 { bottom: 0px; left: 0px; }
#formationSlot4 { bottom: 0px; right: 0px; }
#formationSlot5 { left: 50%; top: 130%; transform: translate(-50%, -50%); z-index: 2; }
/* Slot-Bild immer rund */
.formation-slot.filled img {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.allstar-slot {
  width: 84px;
  height: 84px;
  min-width: 84px;
  min-height: 84px;
  border-radius: 50%;
  border: 3px dashed #fff3c0;
  background: radial-gradient(circle at 60% 40%, #e2c97a 70%, #bfa24a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 10px 0 rgba(0,0,0,0.13);
  position: absolute;
  left: 0; top: 0;
  transition: box-shadow 0.2s;
  overflow: visible;
  border-radius: 50%;
}
.allstar-slot.filled img {
  border-radius: 50%;
  width: 60px;
  height: 60px;
  object-fit: cover;
  box-shadow: 0 2px 8px 0 rgba(0,0,0,0.10);
}
.allstar-slot .player-name {
  position: absolute;
  bottom: -18px;
  width: 100%;
  text-align: center;
  font-size: 0.85em;
  color: #fff;
  font-weight: 500;
  line-height: 1.1;
  text-shadow: 0 2px 6px rgba(0,0,0,0.18);
}
.allstar-slot .favorite-empty {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 60% 40%, #e2c97a 70%, #bfa24a 100%);
  border: 3px dashed #fff3c0;
  box-shadow: 0 3px 10px 0 rgba(0,0,0,0.13);
  z-index: 1;
}

/* Entferne das goldene Plus-Icon (Mund) */
.allstar-slot .favorite-empty::before {
  content: none !important;
  display: none !important;
}
.allstar-slot:not(.filled) {
  background: radial-gradient(circle at 60% 40%, #e2c97a 70%, #bfa24a 100%);
  border: 3px dashed #fff3c0;
  width: 84px;
  height: 84px;
  min-width: 84px;
  min-height: 84px;
  border-radius: 50%;
}
.allstar-slot .favorite-empty::after {
  content: '+';
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2em;
  color: #222;
  font-weight: bold;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 1em;
  height: 1em;
  background: none;
  border-radius: 0;
  opacity: 1;
}
@media (max-width: 600px) {
  .raffle-table {
    font-size: 12px;
    min-width: 340px;
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
  .raffle-table th, .raffle-table td {
    font-size: 12px;
    padding: 5px 6px;
    word-break: break-word;
  }
  .raffle-accordion-panel {
    padding: 0 4px 10px 4px;
  }
}
/* Gewinnerbox für Raffle */
.raffle-winner-box {
  margin-top: 16px;
  background: #f0cc72;
  color: #222;
  border-radius: 8px;
  padding: 12px 18px;
  font-size: 17px;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}
/* Raffle (Gewinnspiel) Admin Styles */
.raffle-info-box {
  background: #fffbe7;
  color: #222;
  border-radius: 10px;
  padding: 10px 16px;
  margin-bottom: 18px;
  font-size: 15px;
  font-weight: 600;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.raffle-accordion {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.raffle-player-group {
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.08);
  background: #fff;
  margin-bottom: 2px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.raffle-player-group.first-place {
  border: 2px solid #222;
  box-shadow: 0 0 0 2px #222, 0 2px 12px rgba(0,0,0,0.08);
}
.raffle-accordion-header {
  width: 100%;
  background: none;
  border: none;
  outline: none;
  font-size: 17px;
  font-weight: 700;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  border-radius: 10px 10px 0 0;
  color: #222;
  background: #fffbe7;
  transition: background 0.15s;
}
.raffle-accordion-header[aria-expanded="true"] {
  background: #ffe9a7;
}
.raffle-player-rank {
  font-size: 18px;
  font-weight: 900;
  color: #bfa100;
  min-width: 32px;
  text-align: right;
}
.raffle-player-name {
  font-size: 17px;
  font-weight: 700;
  color: #222;
}
.raffle-player-team {
  font-size: 15px;
  color: #444;
  margin-left: 8px;
}
.raffle-player-group.first-place .raffle-player-team {
  color: #000 !important;
  font-weight: 800;
}
.raffle-player-count {
  margin-left: auto;
  font-size: 14px;
  color: #888;
}
.raffle-accordion-panel {
  padding: 0 16px 14px 16px;
  background: #fff;
  border-radius: 0 0 10px 10px;
}
.raffle-table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0 0 0;
}
.raffle-table th, .raffle-table td {
  padding: 6px 8px;
  border-bottom: 1px solid #eee;
  font-size: 14px;
  color: #222;
  text-align: center;
}
.raffle-table th {
  background: #fffbe7;
  font-weight: 700;
}
.raffle-winner-btn {
  margin-top: 12px;
  background: linear-gradient(90deg, #f0cc72, #c79a34);
  color: #000;
  font-weight: 800;
  border: none;
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: background 0.15s;
}
.raffle-winner-btn:hover {
  background: linear-gradient(90deg, #ffe9a7, #f0cc72);
}
:root {
  --bg: #0a0a0a;
  --bg-2: #111111;
  --card: rgba(255, 255, 255, 0.05);
  --card-strong: rgba(255, 255, 255, 0.12);
  --text: #f7f7f7;
  --muted: #d4d4d4;
  --accent: #e10600;
  --accent-2: #ffffff;
  --success: #53e38d;
  --danger: #ff8c8c;
  --slot-size: clamp(68px, 16vw, 88px);
  font-family: "Trebuchet MS", "Gill Sans", "Futura", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: radial-gradient(circle at 30% 20%, rgba(225, 6, 0, 0.18) 0, transparent 28%),
    radial-gradient(circle at 80% 0%, rgba(255, 255, 255, 0.12) 0, transparent 24%),
    linear-gradient(145deg, var(--bg), var(--bg-2));
  padding: 24px;
}

h1,
h2,
h3 {
  margin: 0 0 12px;
  letter-spacing: 0.5px;
}

p {
  margin: 0 0 8px;
  color: var(--muted);
}

a {
  color: var(--accent);
}

.page {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 20px;
}

.header.hero {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--card);
  color: var(--muted);
  font-size: 14px;
}

.pill strong {
  color: var(--text);
}

.card {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 16px;
  backdrop-filter: blur(8px);
  box-shadow: 0 14px 60px rgba(0, 0, 0, 0.25);
  margin-bottom: 12px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px;
}

.field {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  background:
    repeating-radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.06) 0 1px, transparent 3px),
    repeating-radial-gradient(circle at 80% 60%, rgba(0, 0, 0, 0.08) 0 1.2px, transparent 3px),
    linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.12)),
    #b2903b;
  border: 2px solid #d7c07a;
  border-radius: 16px;
  padding: 12px;
  min-height: 420px;
  aspect-ratio: 3 / 2.2;
  overflow: hidden;
  max-width: 760px;
  margin: 0 auto;
}

/* Favorite shell (Publikumsliebling) */
.favorite-card-shell {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.favorite-card-shell.field {
  display: flex;
  flex-direction: column;
  gap: 14px;
  aspect-ratio: auto;
  min-height: auto;
  padding: 16px;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.35);
}

.favorite-head {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: center;
}

.favorite-body {
  display: flex;
  flex-direction: column;
  gap: 160px;
  z-index: 2;
  align-items: center;
  justify-content: center;
}

.favorite-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 0;
}


.favorite-actions {
    margin-top: 80px;
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 0;
}

.favorite-actions button {
  font-size: clamp(14px, 3.6vw, 16px);
  padding: 12px 14px;
  white-space: nowrap;
  line-height: 1.2;
}

.favorite-actions .choose-btn {
  background: linear-gradient(135deg, #f3d36a, #c89a2a);
  color: #0a0a0a;
  font-weight: 800;
  border: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.2s ease;
  position: relative;
}
.favorite-actions .choose-btn:disabled,
.favorite-actions .choose-btn.disabled {
  background: #bbb !important;
  color: #fff !important;
  border: 1px solid #bbb !important;
  box-shadow: none !important;
  cursor: not-allowed;
  filter: grayscale(0.2);
}

.favorite-actions .choose-btn:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.favorite-actions .choose-btn.change {
  background: linear-gradient(135deg, #f9e27a, #d4ae2f);
}

.submit-card button.submit-pulse,
.favorite-actions button.submit-pulse {
  animation: pulseGlow 1.4s ease-in-out infinite;
  box-shadow: 0 0 0 rgba(240, 204, 114, 0.4);
}

@keyframes pulseGlow {
  0% {
    box-shadow: 0 0 0 0 rgba(240, 204, 114, 0.45);
    filter: brightness(1);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 20px 6px rgba(240, 204, 114, 0.35);
    filter: brightness(1.05);
    transform: scale(1.02);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(240, 204, 114, 0.2);
    filter: brightness(1);
    transform: scale(1);
  }
}

.favorite-empty {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: none;
  background: transparent;
  cursor: pointer;
  outline: none;
  box-shadow: none;
}

.favorite-empty::before {
  content: "+";
  color: #f0cc72;
  font-size: 38px;
  font-weight: 700;
  opacity: 0.8;
  position: static;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  transform: none;
}

.favorite-card {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 16px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(0, 0, 0, 0.18));
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4);
  min-height: 0;
  width: 100%;
  max-width: 420px;
}

.favorite-selected-label {
  width: 100%;
  max-width: 420px;
  text-align: center;
  color: rgba(255, 255, 255, 0.85);
  font-size: 13px;
  letter-spacing: 0.5px;
}


.favorite-card.filled {
  background: linear-gradient(135deg, #f0cc72 0%, #c79a34 60%, #9c7b2e 100%);
  border-color: rgba(240, 204, 114, 0.9);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45), 0 0 24px rgba(240, 204, 114, 0.45);
  transform: translateY(-10px);
}

.favorite-card.filled .pill {
  background: linear-gradient(90deg, #f0cc72, #c79a34);
  color: #0a0a0a;
  font-weight: 700;
}

.favorite-card::before,
.favorite-card::after {
  content: none;
}

.favorite-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  letter-spacing: 0.3px;
  position: relative;
  z-index: 2;
}

.favorite-season {
  opacity: 0.9;
}

.favorite-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  min-width: 42px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-weight: 700;
  letter-spacing: 0.4px;
}

.favorite-teamchip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.favorite-teamchip img {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.favorite-live-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.favorite-avatar.large {
  width: 78px;
  border: 2px solid rgba(255, 255, 255, 0.25);
}
.favorite-card.filled .favorite-avatar.large {
  border-color: rgba(240, 204, 114, 0.8);
  box-shadow: 0 0 12px rgba(240, 204, 114, 0.4);
}

.favorite-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.favorite-position {
  color: rgba(255, 255, 255, 0.65);
  font-size: 12px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  text-align: left;
}

.favorite-name {
  font-size: 20px;
  letter-spacing: 0.3px;
  font-weight: 700;
}

.favorite-teamline {
  color: rgba(255, 255, 255, 0.8);
  font-size: 13px;
}

.favorite-live-right {
  display: flex;
  align-items: center;
  justify-content: center;
}

.favorite-clubbadge {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  display: grid;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 0 14px rgba(240, 204, 114, 0.45);
}

.favorite-clubbadge img {
  width: 88%;
  height: 88%;
  object-fit: contain;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.12);
  padding: 4%;
}

.favorite-badge-stack {
  display: flex;
  align-items: center;
  gap: 8px;
}

.favorite-number-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  min-width: 44px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.5);
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.3px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.favorite-placeholder {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  border: 2px dashed rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.05);
  font-size: 28px;
  color: #fff;
}

.favorite-placeholder + .favorite-meta {
  gap: 8px;
}

.favorite-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: center;
}

.favorite-meta strong {
  font-size: 18px;
  color: #fff;
}

.favorite-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hint.small {
  font-size: 12px;
  line-height: 1.4;
}

.field-title {
  text-align: center;
  margin: 18px 0 28px;
  color: #fff4d0;
  letter-spacing: 0.6px;
}

.field::before,
.field::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-radius: 16px;
  pointer-events: none;
  z-index: 0;
}


.field-watermark {
  position: absolute;
  width: 120px;
  height: 120px;
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
  opacity: 0.60;
  pointer-events: none;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
  transform: translate(-50%, -50%);
}

.positions {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 12px;
  padding: 12px 10px 10px;
  z-index: 2;
  height: 100%;
  width: 100%;
  align-items: center;
}

.position {
  cursor: pointer;
  border-radius: 16px;
  padding: 6px;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
  background: transparent;
}

.position.active {
  transform: translateY(-2px);
}

.position.active .slot {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.35), 0 8px 22px rgba(0, 0, 0, 0.4);
}

.slot {
  width: var(--slot-size);
  height: var(--slot-size);
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #f0cc72, #c79a34);
  border: 3px dashed rgba(255, 255, 255, 0.85);
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.4);
}

.slot.filled {
  box-shadow:
    0 0 0 2px rgba(0, 0, 0, 0.75),
    0 0 16px rgba(0, 0, 0, 0.7),
    0 0 32px rgba(246, 207, 94, 0.72),
    0 0 60px rgba(246, 207, 94, 0.55);
}

.slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0%;
  display: block;
}

.slot.empty {
  color: #fff;
  font-size: 30px;
  font-weight: 800;
}

.slot-badge {
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translate(-50%, 50%);
  background: #59441c;
  color: #f8f0dc;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.slot-name {
  margin-top: 10px;
  color: #fff;
  font-weight: 700;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
}

.slot-placeholder {
  margin-top: 6px;
  color: #f0e5c1;
  font-weight: 600;
}

.pos-label {
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.3px;
}

.avatar {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar.stacked {
  display: grid;
  place-items: center;
  gap: 4px;
}

.avatar-note {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

.empty {
  color: var(--muted);
  font-size: 14px;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

label {
  font-size: 14px;
  color: var(--muted);
}

input,
select,
textarea {
  width: 100%;
  max-width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 15px;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--accent);
}

.row {
  display: flex;
  gap: 10px;
}

.row > * {
  flex: 1;
}

.raffle-actions button {
  min-height: 44px;
}

button {
  border: none;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 15px;
  cursor: pointer;
  color: #0a0a0a;
  background: linear-gradient(120deg, var(--accent), #ff3b30);
  font-weight: 700;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  text-align: center;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}

button.secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

button.disabled,
button:disabled {
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.submit-ready {
  background: linear-gradient(120deg, #22c55e, #16a34a) !important;
  color: #0a0a0a !important;
}

.fullwidth {
  width: 100%;
}

.list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(760px, 100%);
  margin: 0 auto;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.list-item.mvp {
  background: linear-gradient(135deg, rgba(240, 204, 114, 0.25), rgba(199, 154, 52, 0.5));
  border-color: rgba(240, 204, 114, 0.55);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 24px rgba(240, 204, 114, 0.35);
}

.list-item.mvp .avatar {
  border: 2px solid rgba(240, 204, 114, 0.8);
  box-shadow: 0 0 12px rgba(240, 204, 114, 0.4);
}

.mvp-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  margin-left: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, #f0cc72, #c79a34);
  color: #0a0a0a;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.4px;
  vertical-align: middle;
  white-space: nowrap;
}

.mvp-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 13px;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 10px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
}

.status.centered {
  align-self: center;
}

.status-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.timer-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.3);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  min-width: 90px;
  justify-content: center;
}

.status.open {
  color: var(--success);
}

.status.closed {
  color: var(--danger);
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table-wrapper {
  width: 100%;
  overflow-x: auto;
}

.table-wrapper::-webkit-scrollbar {
  height: 8px;
}

.table-wrapper::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
}

.table-wrapper::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

.table th,
.table td {
  padding: 8px 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
  font-size: 14px;
}

.hint {
  font-size: 13px;
  color: var(--muted);
}

.share {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.1);
}

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

.chip {
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 13px;
  color: var(--muted);
}

.hidden {
  display: none;
}

.hint-box {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  padding: 14px 18px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  z-index: 200;
  max-width: 280px;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.hint-box.show {
  opacity: 1;
  pointer-events: auto;
}

.modal.hidden {
  display: none !important;
}

.share-block {
  margin-top: 12px;
}

.submit-card {
  margin-top: 16px;
}

.player-list,
#playerEditModal {
  z-index: 600;
}

.squad {
  margin-top: 8px;
  padding: 8px 0;
}

.squad .hint {
  padding: 8px 0;
}

.squad-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 8px;
}

.squad-card {
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.squad-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.pill-number {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
  font-size: 12px;
}

button.danger {
  background: rgba(255, 0, 0, 0.18);
  color: #fff;
}
button.danger:hover {
  background: rgba(255, 0, 0, 0.25);
}
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 500;
  padding: 16px;
}

.modal-card {
  max-width: 440px;
  width: min(440px, 92vw);
  max-height: 90vh;
  overflow: auto;
  position: relative;
  z-index: 510;
  background: rgba(12, 12, 12, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.55);
}

.modal.show {
  display: flex;
}

body.modal-open {
  overflow: hidden;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: rgba(225, 6, 0, 0.82);
  color: transparent;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.3);
  display: grid;
  place-items: center;
}

.modal-close:hover {
  background: rgba(225, 6, 0, 0.9);
  transform: scale(1.04);
}

.submission-card .modal-close {
  top: 12px;
  right: 12px;
  z-index: 2;
}

.modal-close::before,
.modal-close::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) rotate(45deg);
}

.modal-close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.submission-card {
  max-width: 540px;
}

.submission-card .header {
  position: relative;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.submission-card #submissionHeadline {
  width: 100%;
  text-align: center;
}

.submission-card #closeShareModal.plain-close {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 50%;
  background: rgba(225, 6, 0, 0.18);
  color: #e10600;
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  padding: 0;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.25);
}

.submission-card #closeShareModal.plain-close:hover {
  background: rgba(225, 6, 0, 0.28);
  transform: scale(1.05);
}

.submission-card .hint {
  text-align: center;
}

.submission-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.summary-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

.summary-card .avatar {
  width: 44px;
  height: 44px;
}

.summary-teamlogo {
  margin-left: auto;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  display: grid;
  place-items: center;
  overflow: hidden;
  flex-shrink: 0;
}

.summary-teamlogo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.summary-teamlogo.placeholder {
  opacity: 0.4;
}
.sponsor-block {
  margin-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 12px;
  text-align: center;
}

.sponsor-strip {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.sponsor-tile {
  width: 100%;
  height: auto;
  aspect-ratio: 2500 / 1377;
  min-height: 80px;
  max-height: 200px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.sponsor-tile img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.sponsor-tile span {
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  padding: 0 8px;
}

.share-banner {
  width: 100%;
  height: auto;
  aspect-ratio: 2500 / 1377;
  min-height: 120px;
  max-height: 260px;
  margin-top: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

.share-banner.clickable {
  cursor: pointer;
}

.warning {
  color: var(--danger);
  font-weight: 700;
}

.edit-hint {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 6px;
}

.pill.team-label {
  display: inline-block;
  margin-bottom: 8px;
}

select,
textarea {
  width: 100%;
  max-width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  font-size: 16px;
}

select:focus,
textarea:focus {
  outline: 2px solid var(--accent);
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin: 8px 0 12px;
  padding: 6px;
}

.team-tile {
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid transparent;
  transition: border 0.2s, box-shadow 0.2s;
  display: grid;
  place-items: center;
  cursor: pointer;
  overflow: hidden;
  position: relative;
}

.team-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-tile .team-name {
  display: none;
}

.team-tile.active {
  border-color: #ffe066;
  box-shadow: 0 0 0 4px #ffe066cc, 0 2px 12px #ffe06644;
  z-index: 2;
}

.select-like {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.select-caret {
  font-size: 14px;
  opacity: 0.8;
}

.player-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.player-card {
  padding: 10px;
  border-radius: 0;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: border-color 0.2s, background 0.2s;
}

.player-card:hover {
  border-color: var(--accent);
  background: rgba(225, 6, 0, 0.1);
}

.player-card .avatar {
    border-radius: 50%;
  width: 46px;
  height: 46px;
}

.sponsor-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.sponsor-slot {
  padding: 8px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sponsor-preview {
  height: 120px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px dashed rgba(255, 255, 255, 0.2);
  display: grid;
  place-items: center;
  overflow: hidden;
  position: relative;
}

.sponsor-preview.small {
  height: 72px;
  width: 140px;
}

.sponsor-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.sponsor-crop label {
  font-size: 12px;
  color: var(--muted);
}

.live-banner {
  width: 100%;
  min-height: 200px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background-size: contain;
  background-position: center center;
  background-repeat: no-repeat;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  margin-bottom: 10px;
  aspect-ratio: 16 / 9;
}

.live-banner.hidden {
  display: none;
}

.live-banner.clickable,
.live-banner-vertical.clickable {
  cursor: pointer;
}

.live-banner-vertical {
  width: 100%;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  margin-top: 10px;
  aspect-ratio: 9 / 16;
  min-height: 320px;
}

.live-banner-vertical.hidden {
  display: none;
}

@media (max-width: 640px) {
  body {
    padding: 12px;
  }
  .card {
    padding: 14px;
    margin-bottom: 14px;
  }
  .field {
    max-width: 100%;
    width: 100%;
    aspect-ratio: auto;
    min-height: 0;
    padding: 14px;
  }
  .favorite-slot {
    padding: 10px;
    min-height: 0;
    justify-content: center;
    gap: 10px;
  }
  .live-banner-vertical {
    min-height: 220px;
  }
  .favorite-empty {
    min-height: 160px;
  }
  .favorite-card {
    padding: 12px 14px;
    gap: 8px;
    width: 100%;
  }
  .favorite-position {
    font-size: 11px;
  }
  .favorite-name {
    font-size: 18px;
  }
  .favorite-teamline {
    font-size: 12px;
  }
  .submit-card {
    margin-top: 18px;
  }
  .positions {
    gap: 14px;
    padding: 18px 10px 14px;
  }
  :root {
    --slot-size: clamp(96px, 26vw, 124px);
  }
  .slot-name,
  .slot-placeholder {
    font-size: 14px;
  }
  .modal-card {
    max-width: 100%;
    margin: 0 8px;
  }
  .row {
    flex-direction: column;
  }
  .share {
    flex-direction: column;
    align-items: flex-start;
  }
  .team-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
    padding: 4px;
  }
}

@media (max-width: 720px) {
  body {
    padding: 16px;
  }
  .row {
    flex-direction: column;
  }
  .positions {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }
  .favorite-slot {
    min-height: 240px;
  }
  .favorite-card {
    padding: 14px 16px;
    text-align: left;
    gap: 10px;
  }
  .admin .header {
    align-items: flex-start;
  }
  .admin .list-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .admin .list-item > div:last-child {
    width: 100%;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
  }
  .admin .list-item button {
    width: 100%;
  }
  .admin .squad-grid {
    grid-template-columns: 1fr;
  }
  .admin .table-wrapper {
    margin: 0 -6px;
    padding: 0 6px 4px;
  }
  .admin .table {
    min-width: 520px;
  }
  .submission-summary {
    grid-template-columns: 1fr;
  }
  .sponsor-strip {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .sponsor-tile {
    min-height: 70px;
    max-height: 160px;
  }
  .sponsor-admin-grid {
    grid-template-columns: 1fr;
  }
}
