:root {
  color-scheme: dark;
  --bg: #050b1a;
  --panel: rgba(12, 18, 38, 0.94);
  --panel-border: rgba(249, 115, 22, 0.18);
  --text: #f8fafc;
  --muted: rgba(148, 163, 184, 0.9);
  --accent: #f97316;
  --accent-dark: #ea580c;
  --danger: #ef4444;
  --hint-bg: rgba(148, 163, 184, 0.1);
  --chip-bg: rgba(249, 115, 22, 0.16);
  --chip-border: rgba(249, 115, 22, 0.32);
  --drop-border: rgba(249, 115, 22, 0.7);
  --drop-shadow: 0 0 0 3px rgba(249, 115, 22, 0.25);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% -10%, rgba(249, 115, 22, 0.28), transparent 55%),
    radial-gradient(circle at 82% 0%, rgba(79, 70, 229, 0.18), transparent 60%),
    var(--bg);
  color: var(--text);
  /* Mobile performance optimizations */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

.flash-stack {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.flash {
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 0.95rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(148, 163, 184, 0.08);
}

.flash-success {
  border-color: rgba(74, 222, 128, 0.4);
  background: rgba(22, 163, 74, 0.16);
  color: #bbf7d0;
}

.flash-error {
  border-color: rgba(248, 113, 113, 0.4);
  background: rgba(220, 38, 38, 0.18);
  color: #fecaca;
}

.flash-info {
  border-color: rgba(249, 115, 22, 0.45);
  background: rgba(249, 115, 22, 0.15);
  color: #ffedd5;
}

a {
  color: inherit;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 32px 24px 80px;
  display: grid;
  gap: 24px;
}

.site-header {
  display: grid;
  gap: 6px;
}

h1 {
  margin: 0 0 24px;
  font-size: clamp(2rem, 2.6vw, 2.8rem);
  letter-spacing: -0.5px;
}

.tagline {
  margin: -16px 0 12px;
  font-size: 1rem;
  color: var(--muted);
  max-width: 520px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 22px;
  padding: 24px;
  box-shadow: 0 26px 60px rgba(5, 10, 25, 0.55);
  backdrop-filter: blur(18px);
}

.panel-title {
  margin: 0;
  font-size: 1.2rem;
  color: #f8fafc;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.team-meta {
  display: grid;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: right;
}

.team-bar {
  position: relative;
  height: 12px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.24);
  overflow: hidden;
}

.team-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  width: var(--share, 0%);
  background: linear-gradient(90deg, rgba(249, 115, 22, 0.85), rgba(249, 115, 22, 0.2));
}

.team-total {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
  color: rgba(240, 253, 250, 0.9);
  font-weight: 600;
  font-size: 0.9rem;
}

.team-total strong {
  color: #f8fafc;
  font-variant-numeric: tabular-nums;
}

.team-share {
  font-size: 0.8rem;
  color: rgba(148, 163, 184, 0.9);
  background: rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  padding: 2px 8px;
}

.panel-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.team-header {
  align-items: stretch;
}

.form-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.new-player-form {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

#inline-add-player {
  display: grid;
  gap: 18px;
}

.form-row input {
  flex: 1;
  min-width: 180px;
}

input,
select,
button {
  font: inherit;
}

input,
select {
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.7);
  color: var(--text);
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
select:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: var(--drop-shadow);
}

.controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 180px;
}

.field label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
}

.button-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Header logo styles */
.brand-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

.header-logo {
  height: 45px;
  width: auto;
  max-width: 150px;
  object-fit: contain;
  flex-shrink: 0;
}

/* Footer logo styles */
.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.footer-logo {
  height: 40px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
}

/* Footer brand styling - logo only */

/* Mobile button spacing improvements */
@media (max-width: 768px) {
  .button-group {
    gap: 8px;
  }
  
  .button {
    padding: 12px 16px;
    min-height: 48px;
    font-size: 16px;
  }
  
  .button-group .button {
    flex: 1;
    min-width: 0;
  }
  
  .footer-brand {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .footer-logo {
    height: 32px;
    max-width: 100px;
  }
  
  .intro-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
  }
  
  .main-logo {
    height: 50px;
    max-width: 150px;
  }
  
  .brand-title {
    font-size: 2rem;
  }
  
  .brand-tagline {
    font-size: 1rem;
    margin-bottom: 16px;
  }
  
  .header-logo {
    height: 35px;
    max-width: 120px;
  }
}

.button {
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
  background: rgba(148, 163, 184, 0.18);
  color: var(--text);
  /* Mobile-friendly touch targets */
  min-height: 44px;
  min-width: 44px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 18px 32px rgba(249, 115, 22, 0.2);
}

.button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

.button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #041524;
  font-weight: 600;
}

.button.primary:hover {
  background: var(--accent-dark);
}

.button.secondary {
  background: rgba(249, 115, 22, 0.16);
  border-color: var(--accent);
  color: var(--accent);
}

.button.subtle {
  background: rgba(148, 163, 184, 0.08);
  border-color: transparent;
  color: var(--muted);
}

.button.danger {
  color: var(--danger);
}

.icon-button {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(248, 250, 252, 0.2);
  background: rgba(15, 23, 42, 0.6);
  color: inherit;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  line-height: 1;
  transition: transform 0.15s ease, background 0.2s ease;
}

.icon-button:hover {
  transform: scale(1.08);
  background: rgba(248, 113, 113, 0.18);
  border-color: rgba(248, 113, 113, 0.5);
}

.hint {
  margin: 12px 0 0;
  padding: 10px 12px;
  background: var(--hint-bg);
  border-radius: 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

.board {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(260px, 1fr) minmax(320px, 1.5fr);
}

.scoreboard {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.18), rgba(124, 58, 237, 0.22));
  border: 1px solid rgba(249, 115, 22, 0.32);
}

.intro-panel {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.08), rgba(59, 130, 246, 0.12));
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  position: relative;
  overflow: hidden;
}

.intro-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #f97316, #3b82f6, #22c55e);
}

.intro-container {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 32px;
  align-items: center;
}

.session-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.session-info .panel-title {
  margin: 0;
}

.session-info .hint {
  margin: 0;
  color: var(--text-secondary);
}

.session-code-wrapper {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
}

.session-code {
  display: inline-flex;
  padding: 14px 28px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(34, 197, 94, 0.25));
  border: 2px solid rgba(34, 197, 94, 0.3);
  letter-spacing: 8px;
  font-weight: 800;
  font-size: 1.8rem;
  color: #22c55e;
  text-shadow: 0 2px 8px rgba(34, 197, 94, 0.3);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.15);
  transition: all 0.3s ease;
}

.session-code:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(34, 197, 94, 0.25);
}

.session-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.session-divider {
  width: 1px;
  height: 120px;
  background: linear-gradient(to bottom, 
    transparent, 
    rgba(255, 255, 255, 0.2) 20%,
    rgba(255, 255, 255, 0.2) 80%,
    transparent
  );
}

.session-join {
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-self: stretch;
}

.session-join label {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 1rem;
  margin: 0;
}

.join-controls {
  display: flex;
  gap: 10px;
  width: 100%;
}

.join-controls input {
  flex: 1;
  min-width: 140px;
}

.join-controls button {
  flex-shrink: 0;
}

/* Responsive layout */
@media (max-width: 1024px) {
  .intro-container {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .session-divider {
    display: none;
  }
  
  .session-code-wrapper {
    align-items: center;
    text-align: center;
  }
  
  .session-buttons {
    justify-content: center;
    width: 100%;
  }
  
  .session-buttons button {
    flex: 1;
    min-width: 140px;
  }
}

@media (max-width: 640px) {
  .session-code {
    font-size: 1.5rem;
    letter-spacing: 6px;
    padding: 12px 20px;
  }
  
  .session-buttons {
    flex-direction: column;
  }
  
  .session-buttons button {
    width: 100%;
  }
  
  .join-controls {
    flex-direction: column;
  }
  
  .join-controls button {
    width: 100%;
  }
}
.lineup-panel {
  display: grid;
  gap: 20px;
}

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

.lineup-actions {
  display: flex;
  gap: 10px;
}

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

.lineup-card {
  background: linear-gradient(135deg, rgba(22, 163, 74, 0.24), rgba(6, 95, 70, 0.28));
  border: 1px solid rgba(34, 197, 94, 0.35);
  border-radius: 18px;
  padding: 18px;
  display: grid;
  gap: 12px;
}

.pitch {
  position: relative;
  width: 100%;
  padding-top: 140%;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(6, 95, 70, 0.92) 0%, rgba(4, 47, 46, 0.95) 100%),
    repeating-linear-gradient(
      0deg,
      rgba(15, 118, 110, 0.35) 0%,
      rgba(15, 118, 110, 0.35) 14%,
      rgba(4, 47, 46, 0.2) 14%,
      rgba(4, 47, 46, 0.2) 28%
    );
  box-shadow: inset 0 0 0 2px rgba(12, 74, 110, 0.35);
}

.pitch.drop {
  box-shadow: inset 0 0 0 3px rgba(59, 130, 246, 0.35);
}

.pitch::before,
.pitch::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 92%;
  height: 92%;
  border: 2px solid rgba(226, 232, 240, 0.2);
  border-radius: 18px;
  top: 4%;
  transform: translateX(-50%);
}

.pitch::after {
  height: 0;
  border: none;
  border-top: 2px solid rgba(226, 232, 240, 0.25);
  top: 50%;
  width: 90%;
}

.pitch-overlay {
  position: absolute;
  inset: 4%;
  border-radius: 16px;
  pointer-events: none;
}

.pitch-overlay::before,
.pitch-overlay::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 30%;
  height: 18%;
  border: 2px solid rgba(226, 232, 240, 0.2);
  border-radius: 6px;
  transform: translateX(-50%);
}

.pitch-overlay::before {
  top: 2%;
  box-shadow:
    0 22% 0 0 rgba(226, 232, 240, 0.2),
    -30% 22% 0 -20% rgba(226, 232, 240, 0.2),
    30% 22% 0 -20% rgba(226, 232, 240, 0.2);
}

.pitch-overlay::after {
  bottom: 2%;
  box-shadow:
    0 -22% 0 0 rgba(226, 232, 240, 0.2),
    -30% -22% 0 -20% rgba(226, 232, 240, 0.2),
    30% -22% 0 -20% rgba(226, 232, 240, 0.2);
}

.pitch-player {
  position: absolute;
  transform: translate(-50%, -50%);
  display: grid;
  gap: 4px;
  justify-items: center;
  color: #f8fafc;
  font-size: 0.75rem;
  text-shadow: 0 0 6px rgba(15, 23, 42, 0.8);
}

.pitch-player .dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(250, 204, 21, 0.9), rgba(245, 158, 11, 0.8));
  border: 2px solid rgba(248, 250, 252, 0.7);
  box-shadow: 0 0 10px rgba(249, 115, 22, 0.5);
}

.pitch-player[data-team="A"] .dot {
  background: linear-gradient(135deg, rgba(250, 204, 21, 0.9), rgba(245, 158, 11, 0.8));
  border-color: rgba(253, 224, 71, 0.9);
  box-shadow: 0 0 14px rgba(250, 204, 21, 0.55);
}

.pitch-player[data-team="B"] .dot {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.85), rgba(30, 64, 175, 0.9));
  border-color: rgba(191, 219, 254, 0.8);
  box-shadow: 0 0 14px rgba(59, 130, 246, 0.55);
}

.pitch[data-team="A"] {
  background:
    linear-gradient(180deg, rgba(234, 179, 8, 0.16) 0%, rgba(250, 204, 21, 0.12) 100%),
    linear-gradient(180deg, rgba(6, 95, 70, 0.92) 0%, rgba(4, 47, 46, 0.95) 100%),
    repeating-linear-gradient(
      0deg,
      rgba(15, 118, 110, 0.35) 0%,
      rgba(15, 118, 110, 0.35) 14%,
      rgba(4, 47, 46, 0.2) 14%,
      rgba(4, 47, 46, 0.2) 28%
    );
}

.pitch[data-team="B"] {
  background:
    linear-gradient(180deg, rgba(30, 64, 175, 0.22) 0%, rgba(15, 23, 42, 0.95) 100%),
    repeating-linear-gradient(
      0deg,
      rgba(37, 99, 235, 0.22) 0%,
      rgba(37, 99, 235, 0.22) 14%,
      rgba(15, 23, 42, 0.25) 14%,
      rgba(15, 23, 42, 0.25) 28%
    );
}

.pitch-player.dragging {
  opacity: 0.75;
  transform: translate(-50%, -50%) scale(1.08);
  transition: transform 0.1s ease, opacity 0.1s ease;
}

.pitch-empty {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px dashed rgba(248, 250, 252, 0.3);
}

.pitch-spot {
  position: absolute;
  width: 54px;
  height: 54px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: box-shadow 0.2s ease, background 0.2s ease;
}

.pitch-spot.drop {
  background: rgba(59, 130, 246, 0.25);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.45);
}

.pitch-empty-message {
  text-align: center;
  margin: 0;
  padding: 18px;
  color: rgba(226, 232, 240, 0.7);
  font-size: 0.9rem;
}

.session-panel {
  display: grid;
  gap: 18px;
  align-items: center;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.session-info {
  display: grid;
  gap: 6px;
}

.session-info .panel-title {
  margin-bottom: 6px;
}

.session-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
}



.session-join {
  display: grid;
  gap: 8px;
}

.session-join label {
  font-size: 0.85rem;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 1px;
}

.join-controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.join-controls input {
  min-width: 140px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.7);
  color: var(--text);
}

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

.score-card {
  background: rgba(15, 23, 42, 0.6);
  border-radius: 16px;
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.15);
  display: grid;
  gap: 12px;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.08);
}

.scoreboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.score-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.score-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.score-card h3 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0.4px;
}

.score-share {
  font-size: 0.8rem;
  color: rgba(148, 163, 184, 0.82);
  background: rgba(148, 163, 184, 0.16);
  border-radius: 999px;
  padding: 2px 8px;
}

.score-value {
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 0.6px;
}

.score-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(226, 232, 240, 0.82);
}

.team-total-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.score-value.diff {
  color: rgba(248, 250, 252, 0.92);
}

.score-leading {
  font-size: 0.85rem;
  color: rgba(148, 163, 184, 0.9);
}

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

.team-card {
  padding: 20px 22px 24px;
  border-radius: 22px;
  border: 1px solid rgba(249, 115, 22, 0.22);
  background:
    radial-gradient(circle at top, rgba(249, 115, 22, 0.24), transparent 60%),
    linear-gradient(145deg, rgba(30, 64, 175, 0.18), rgba(12, 18, 38, 0.9));
  display: grid;
  gap: 16px;
  box-shadow: 0 25px 55px rgba(5, 10, 25, 0.45);
  position: relative;
  overflow: hidden;
}

.team-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    rgba(249, 115, 22, 0.12),
    rgba(79, 70, 229, 0.08)
  );
  opacity: 0.6;
  pointer-events: none;
}

.team-card > * {
  position: relative;
  z-index: 1;
}

.player-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
  min-height: 120px;
}

.player-list[data-zone="team"] {
  padding: 12px;
  border: 1px dashed rgba(148, 163, 184, 0.26);
  border-radius: 14px;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.player-list.drop {
  border-color: var(--accent);
  box-shadow: var(--drop-shadow);
}

.player {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--chip-bg);
  border: 1px solid var(--chip-border);
  cursor: grab;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.player:active {
  cursor: grabbing;
}

.player.dragging {
  opacity: 0.4;
  transform: scale(0.98);
  box-shadow: 0 20px 40px rgba(13, 148, 136, 0.28);
}

.player-name {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.2px;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.remove-player {
  margin: 0;
}

.placeholder {
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px dashed rgba(148, 163, 184, 0.25);
  color: var(--muted);
  background: rgba(148, 163, 184, 0.08);
  text-align: center;
}

.count-pill {
  min-width: 60px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.22);
  color: rgba(45, 212, 191, 0.95);
  text-align: center;
  font-weight: 600;
  font-size: 0.85rem;
}

.panel-message {
  border-left: 4px solid var(--accent);
  background: rgba(56, 189, 248, 0.12);
}

/* Feedback notification - fixed position for visibility */
#feedback {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  min-width: 300px;
  max-width: 500px;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  font-weight: 500;
  text-align: center;
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.panel-message.warning {
  border-color: rgba(248, 113, 113, 0.8);
  background: rgba(248, 113, 113, 0.12);
}

.panel-message.info[hidden] {
  display: none;
}

.panel-message.info {
  border-color: rgba(56, 189, 248, 0.8);
  background: rgba(56, 189, 248, 0.08);
}

.panel-message.success {
  border-color: rgba(74, 222, 128, 0.8);
  background: rgba(74, 222, 128, 0.12);
}
  border-color: rgba(74, 222, 128, 0.8);
  background: rgba(74, 222, 128, 0.12);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.team-name {
  display: flex;
  align-items: center;
}

.team-name-input {
  border: none;
  background: transparent;
  color: #f8fafc;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  padding: 4px 6px;
  border-radius: 8px;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.team-name-input::placeholder {
  color: rgba(148, 163, 184, 0.6);
}

.team-name-input:focus {
  outline: none;
  background: rgba(148, 163, 184, 0.15);
  box-shadow: var(--drop-shadow);
}

.player-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.player-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.player-rating {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.14);
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
}

.player-rating span[aria-hidden="true"] {
  font-size: 0.9rem;
}

.player-rating-value {
  font-variant-numeric: tabular-nums;
}

.icon-button.rate-button {
  background: rgba(56, 189, 248, 0.08);
  border-color: rgba(56, 189, 248, 0.4);
  color: var(--accent);
  font-size: 0.95rem;
}

.icon-button.rate-button:hover {
  background: rgba(56, 189, 248, 0.18);
  border-color: rgba(56, 189, 248, 0.6);
}

/* Legacy responsive styles - replaced by comprehensive mobile styles above */
.guide-panel {
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.12), rgba(4, 120, 87, 0.14));
}

.guide-list {
  margin: 0;
  padding-left: 18px;
  color: rgba(226, 232, 240, 0.9);
  display: grid;
  gap: 10px;
}

.guide-list li {
  line-height: 1.6;
}

.language-switcher {
  display: grid;
  gap: 8px;
}

.language-label {
  font-size: 0.75rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
}

.language-flags {
  display: flex;
  gap: 12px;
  align-items: center;
}

.language-flag {
  width: 42px;
  height: 42px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(148, 163, 184, 0.12);
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.2s ease, background 0.2s ease,
    box-shadow 0.2s ease;
  color: #ffffff;
}

.language-flag.is-active {
  border-color: var(--accent);
  background: rgba(249, 115, 22, 0.18);
  box-shadow: 0 12px 28px rgba(249, 115, 22, 0.18);
  transform: translateY(-1px);
}

.language-flag:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.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;
}

/* Navigation Styles */
.main-navigation {
  background: var(--panel);
  border-bottom: 1px solid var(--panel-border);
  padding: 1rem 0;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand .brand-link {
  text-decoration: none;
  color: var(--text);
}

.nav-brand h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
}

.nav-brand .tagline {
  font-size: 0.875rem;
  color: var(--muted);
  margin: 0;
}

.nav-list {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 2rem;
}

.nav-link {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: var(--accent);
}

/* Page Styles */
.page-header {
  text-align: center;
  margin-bottom: 3rem;
  padding: 2rem 0;
}

.page-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0 0 1rem 0;
  color: var(--text);
}

.page-subtitle {
  font-size: 1.125rem;
  color: var(--muted);
  margin: 0;
}

.content-section {
  margin-bottom: 3rem;
  padding: 2rem;
  background: var(--panel);
  border-radius: 12px;
  border: 1px solid var(--panel-border);
}

.content-section h2 {
  color: var(--accent);
  font-size: 1.5rem;
  margin: 0 0 1.5rem 0;
  font-weight: 600;
}

.content-section h3 {
  color: var(--text);
  font-size: 1.25rem;
  margin: 1.5rem 0 1rem 0;
  font-weight: 600;
}

.content-section p {
  line-height: 1.7;
  margin: 0 0 1rem 0;
  color: rgba(226, 232, 240, 0.9);
}

.content-section ul {
  margin: 0 0 1rem 0;
  padding-left: 1.5rem;
}

.content-section li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
  color: rgba(226, 232, 240, 0.9);
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.feature-card {
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
}

.feature-card h3 {
  margin: 0 0 1rem 0;
  font-size: 1.125rem;
  color: var(--accent);
}

.feature-card p {
  margin: 0;
  font-size: 0.95rem;
}

/* How It Works */
.how-it-works {
  display: grid;
  gap: 2rem;
  margin: 2rem 0;
}

.step {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
}

.step-number {
  background: var(--accent);
  color: white;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.step-content h3 {
  margin: 0 0 0.5rem 0;
  color: var(--text);
}

.step-content p {
  margin: 0;
  color: rgba(226, 232, 240, 0.9);
}

/* Contact Form */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin: 2rem 0;
}

.contact-form {
  background: var(--panel);
  border-radius: 12px;
  border: 1px solid var(--panel-border);
  padding: 2rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 8px;
  background: rgba(148, 163, 184, 0.08);
  color: var(--text);
  font-size: 1rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

.contact-methods {
  display: grid;
  gap: 1.5rem;
}

.contact-method {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  background: rgba(148, 163, 184, 0.08);
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.contact-icon {
  font-size: 2rem;
  width: 3rem;
  text-align: center;
}

.contact-details h3 {
  margin: 0 0 0.5rem 0;
  color: var(--text);
  font-size: 1.125rem;
}

.contact-details p {
  margin: 0;
  color: rgba(226, 232, 240, 0.9);
}

/* FAQ */
.faq-list {
  display: grid;
  gap: 1.5rem;
}

.faq-item {
  background: rgba(148, 163, 184, 0.08);
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  padding: 1.5rem;
}

.faq-item h3 {
  margin: 0 0 1rem 0;
  color: var(--accent);
  font-size: 1.125rem;
}

.faq-item p {
  margin: 0;
  color: rgba(226, 232, 240, 0.9);
}

/* Social Links */
.social-links {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin: 2rem 0;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.2s ease;
}

.social-link:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

/* Footer */
.site-footer {
  background: var(--panel);
  border-top: 1px solid var(--panel-border);
  margin-top: 4rem;
  padding: 3rem 0 1rem 0;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
  color: var(--accent);
  margin: 0 0 1rem 0;
  font-size: 1.125rem;
}

.footer-section p {
  color: rgba(226, 232, 240, 0.9);
  line-height: 1.6;
  margin: 0 0 1rem 0;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: rgba(226, 232, 240, 0.9);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--accent);
}

.contact-info p {
  margin: 0.5rem 0;
  color: rgba(226, 232, 240, 0.9);
}

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  padding-top: 1.5rem;
}

.footer-bottom-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-legal {
  display: flex;
  gap: 1.5rem;
}

.footer-legal a {
  color: rgba(226, 232, 240, 0.9);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s ease;
}

.footer-legal a:hover {
  color: var(--accent);
}

/* Desktop - hide mobile form */
.desktop-form {
  display: block;
}

.mobile-add-section {
  display: none;
}

/* Language Selector */
.lang-compact {
  position: relative;
  display: inline-block;
}

.lang-current {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: rgba(148, 163, 184, 0.1);
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.9rem;
}

.lang-current:hover {
  background: rgba(148, 163, 184, 0.2);
  border-color: var(--accent);
}

.lang-current .flag {
  font-size: 1.2rem;
}

.lang-current .language-arrow {
  font-size: 0.7rem;
  transition: transform 0.2s ease;
}

.lang-current[aria-expanded="true"] .language-arrow {
  transform: rotate(180deg);
}

.lang-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  min-width: 140px;
}

.lang-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  background: transparent;
  border: none;
  color: var(--text);
  cursor: pointer;
  transition: background 0.2s ease;
  font-size: 0.9rem;
  text-align: left;
}

.lang-item:hover {
  background: rgba(148, 163, 184, 0.1);
}

.lang-item .flag {
  font-size: 1.1rem;
}

/* Rating Modal */
.rating-modal[hidden] { display: none; }
.rating-modal { position: fixed; inset: 0; z-index: 2000; }
.rating-modal-backdrop { position: absolute; inset: 0; background: rgba(2,6,23,0.6); backdrop-filter: blur(2px); }
.rating-modal-content {
  position: relative;
  margin: 6vh auto;
  max-width: 520px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 30px 70px rgba(0,0,0,0.45);
}
.rating-modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.rating-modal-header h3 { margin: 0; font-size: 1.1rem; }
.rating-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.rating-field { display: flex; flex-direction: column; gap: 8px; font-size: 0.9rem; color: var(--text); }
.rating-field span { font-weight: 500; color: var(--accent); }
.rating-field input { width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid rgba(148,163,184,0.35); background: rgba(15,23,42,0.7); color: var(--text); font-size: 1rem; }
.rating-modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }

/* Hamburger Menu Styles */
.hamburger-menu {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 2rem;
  height: 2rem;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 10;
}

.hamburger-line {
  width: 2rem;
  height: 0.25rem;
  background: var(--text);
  border-radius: 10px;
  transition: all 0.3s linear;
  position: relative;
  transform-origin: 1px;
}

.hamburger-open .hamburger-line:first-child {
  transform: rotate(45deg);
}

.hamburger-open .hamburger-line:nth-child(2) {
  opacity: 0;
  transform: translateX(20px);
}

.hamburger-open .hamburger-line:nth-child(3) {
  transform: rotate(-45deg);
}

/* Mobile Navigation */
@media (max-width: 768px) {
  .hamburger-menu {
    display: flex;
  }
  
  .nav-container {
    position: relative;
    justify-content: space-between;
  }
  
  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--panel);
    border: 1px solid var(--panel-border);
    border-radius: 0 0 12px 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
  }
  
  .nav-menu-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  
  .nav-list {
    flex-direction: column;
    gap: 0;
    padding: 1rem 0;
  }
  
  .nav-item {
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  }
  
  .nav-item:last-child {
    border-bottom: none;
  }
  
  .nav-link {
    display: block;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    transition: background-color 0.2s ease;
  }
  
  .nav-link:hover {
    background: rgba(148, 163, 184, 0.1);
  }
  
  .nav-actions {
    display: flex;
    align-items: center;
  }
  
  /* Language selector stays in header on mobile */
  
  .page-header h1 {
    font-size: 2rem;
  }
  
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-bottom-content {
    flex-direction: column;
    text-align: center;
  }
  
  .footer-legal {
    justify-content: center;
  }
}

/* Mobile Board Layout - Bench Above Teams */
@media (max-width: 768px) {
  .board {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
  }
  
  .board .bench {
    order: 1;
  }
  
  .board .teams {
    order: 2;
  }
  
  /* Move lineup panel to bottom on mobile */
  .lineup-panel {
    order: 3;
  }
  
  /* Show mobile actions on mobile */
  .mobile-actions {
    display: flex !important;
    gap: 4px;
  }
  
  .quick-action-btn {
    padding: 4px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 6px;
    border: 1px solid var(--accent);
    background: rgba(249, 115, 22, 0.1);
    color: var(--accent);
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 32px;
    text-align: center;
  }
  
  .quick-action-btn:hover {
    background: var(--accent);
    color: white;
  }
  
  .quick-action-btn[data-team="A"] {
    background: rgba(250, 204, 21, 0.1);
    border-color: #facc15;
    color: #facc15;
  }
  
  .quick-action-btn[data-team="A"]:hover {
    background: #facc15;
    color: #000;
  }
  
  .quick-action-btn[data-team="B"] {
    background: rgba(59, 130, 246, 0.1);
    border-color: #3b82f6;
    color: #3b82f6;
  }
  
  .quick-action-btn[data-team="B"]:hover {
    background: #3b82f6;
    color: white;
  }
  
  .quick-action-btn[data-action="move-to-bench"] {
    background: rgba(148, 163, 184, 0.1);
    border-color: #94a3b8;
    color: #94a3b8;
  }
  
  .quick-action-btn[data-action="move-to-bench"]:hover {
    background: #94a3b8;
    color: white;
  }
  
  /* Mobile Add Player Interface */
  .desktop-form {
    display: none;
  }
  
  .mobile-add-section {
    display: block;
  }
  
  .mobile-input-container {
    display: grid;
    gap: 12px;
    margin-bottom: 20px;
  }
  
  .mobile-player-textarea {
    width: 100%;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(15, 23, 42, 0.7);
    color: var(--text);
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.5;
    resize: vertical;
    min-height: 100px;
    transition: border 0.2s ease, box-shadow 0.2s ease;
  }
  
  .mobile-player-textarea:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: var(--drop-shadow);
  }
  
  .mobile-player-textarea::placeholder {
    color: rgba(148, 163, 184, 0.6);
    line-height: 1.5;
  }
  
  .mobile-input-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
  }
  
  .quick-add-section {
    display: none; /* Hide quick add on mobile - not needed */
  }
  
  .container {
    padding: 16px 12px 60px;
    gap: 16px;
  }
  
  .panel {
    padding: 16px;
  }
  
  .team-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .lineup-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .pitch {
    padding-top: 120%;
  }
  
  .player-list {
    min-height: 80px;
  }
  
  .form-row {
    flex-direction: column;
  }
  
  .form-row input {
    min-width: auto;
  }
  
  .controls {
    flex-direction: column;
    align-items: stretch;
  }
  
  .button-group {
    flex-direction: column;
  }
  
  .button-group .button {
    width: 100%;
  }
  
  .session-panel {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .session-actions {
    justify-content: center;
  }
  
  .score-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* Extra Small Mobile */
@media (max-width: 480px) {
  .container {
    padding: 12px 8px 50px;
    gap: 12px;
  }
  
  .panel {
    padding: 12px;
  }
  
  .pitch {
    padding-top: 100%;
  }
  
  .player {
    padding: 12px 14px;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
  }
  
  .player-name {
    font-size: 0.9rem;
  }
  
  .team-card {
    padding: 12px 14px 16px;
  }
  
  .session-code {
    font-size: 1.2rem;
    letter-spacing: 4px;
  }
  
  .hamburger-menu {
    width: 1.5rem;
    height: 1.5rem;
  }
  
  .hamburger-line {
    width: 1.5rem;
    height: 0.2rem;
  }
  
  /* Mobile Responsive Forms */
  .desktop-form {
    display: none;
  }
  
  .mobile-add-section {
    display: block;
  }
}

.add-player-panel {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.08), rgba(167, 139, 250, 0.12));
}

.add-player-panel .panel-header {
  margin-bottom: 20px;
}

.add-player-panel .hint {
  margin: 8px 0 0 0;
  color: var(--text-secondary);
}

.add-player-form {
  width: 100%;
}

.form-row {
  display: flex;
  gap: 12px;
  align-items: flex-end;
}

.flex-1 {
  flex: 1;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

@media (max-width: 640px) {
  .form-row {
    flex-direction: column;
    align-items: stretch;
  }
  
  .form-row button {
    width: 100%;
  }
}

/* Teams panel improvements */
.panel.teams {
  padding: 0;
  overflow: hidden;
}

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

.team-card {
  padding: 24px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  min-height: 400px;
}

.team-card:last-child {
  border-right: none;
}

.team-header {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.team-name-input {
  font-size: 1.25rem;
  font-weight: 700;
  background: transparent;
  border: 2px solid transparent;
  border-radius: 8px;
  padding: 8px 12px;
  color: var(--text-primary);
  transition: all 0.2s ease;
  width: 100%;
}

.team-name-input:hover {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
}

.team-name-input:focus {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.05);
  outline: none;
}

.team-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.team-total {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
}

.team-total strong {
  font-size: 1.25rem;
  color: var(--accent);
}

.team-share {
  font-size: 0.85rem;
  opacity: 0.7;
}

.team-bar {
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
}

.team-bar::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: var(--share, 0%);
  background: linear-gradient(90deg, var(--accent), rgba(34, 197, 94, 0.8));
  transition: width 0.4s ease;
}

.count-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  font-size: 0.85rem;
  font-weight: 600;
  color: #3b82f6;
}

/* Responsive */
@media (max-width: 768px) {
  .team-grid {
    grid-template-columns: 1fr;
  }
  
  .team-card {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }
  
  .team-card:last-child {
    border-bottom: none;
  }
}

/* Button group fixes */
.button-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.button-group .button {
  min-width: fit-content;
  white-space: nowrap;
}

/* Ensure subtle buttons are visible */
.button.subtle {
  opacity: 1;
  color: var(--text-primary);
}

#clear-teams {
  color: rgba(248, 113, 113, 0.9);
}

#clear-teams:hover {
  background: rgba(248, 113, 113, 0.15);
  color: #f87171;
}

/* Responsive button group */
@media (max-width: 768px) {
  .button-group {
    width: 100%;
  }
  
  .button-group .button {
    flex: 1;
    min-width: 120px;
  }
}

/* Cookie Consent Banner */
.cookie-consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(26, 32, 44, 0.98);
  backdrop-filter: blur(10px);
  color: #fff;
  padding: 1.5rem;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
  z-index: 10000;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.cookie-consent-banner.show {
  transform: translateY(0);
}

.cookie-consent-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.cookie-consent-text {
  flex: 1;
  min-width: 300px;
}

.cookie-consent-text h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.cookie-consent-text p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  opacity: 0.9;
}

.cookie-consent-text a {
  color: #4299e1;
  text-decoration: underline;
}

.cookie-consent-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.cookie-consent-actions .button {
  white-space: nowrap;
}

@media (max-width: 768px) {
  .cookie-consent-content {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }
  
  .cookie-consent-actions {
    flex-direction: column;
  }
  
  .cookie-consent-actions .button {
    width: 100%;
  }
}

/* Footer contact links */
.contact-info a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.contact-info a:hover {
  color: #4299e1;
  text-decoration: underline;
}
