/* ==========================================================================
   Live Counter Assistant - Esports & Broadcast Design System
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Outfit:wght@400;600;700;800;900&family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* Color Tokens */
  --bg-primary: #080a10;
  --bg-secondary: #0f1322;
  --bg-card: rgba(18, 24, 40, 0.72);
  --bg-card-hover: rgba(26, 34, 58, 0.85);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(0, 240, 255, 0.35);

  --text-main: #f3f6fc;
  --text-muted: #8b99b5;
  --text-dim: #54627d;

  --accent-cyan: #00f0ff;
  --accent-rose: #ff2a6d;
  --accent-gold: #ffc837;
  --accent-emerald: #05ffa1;
  --accent-purple: #b537f2;
  --accent-orange: #ff7700;

  /* Typography */
  --font-score: 'Bebas Neue', sans-serif;
  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Elevation & Shadows */
  --shadow-card: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(0, 0, 0, 0.4);
  --shadow-neon: 0 0 25px rgba(0, 240, 255, 0.4);

  /* Transitions */
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Base Reset & Setup */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
}

body {
  display: flex;
  flex-direction: column;
  position: relative;
  background-image: 
    radial-gradient(circle at 15% 20%, rgba(0, 240, 255, 0.08) 0%, transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(255, 42, 109, 0.08) 0%, transparent 45%),
    linear-gradient(180deg, #090c14 0%, #05060a 100%);
  transition: background-color var(--transition-normal);
}

/* Background Theme Variations (Chroma & Transparent for OBS) */
body.theme-chroma-green {
  background: #00b140 !important;
}
body.theme-chroma-green .app-header {
  background: rgba(0, 0, 0, 0.7);
}
body.theme-chroma-blue {
  background: #0047bb !important;
}
body.theme-transparent {
  background: transparent !important;
}
body.theme-transparent .arena-container {
  background: transparent !important;
}

/* Top Broadcast Header / Control Bar */
.app-header {
  height: 72px;
  min-height: 72px;
  background: rgba(12, 16, 28, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 100;
  transition: transform var(--transition-normal), opacity var(--transition-normal);
}

/* Streamer / OBS Overlay Mode: Auto hides header */
body.stream-mode .app-header {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

/* Hover reveal zone for stream mode */
.stream-mode-trigger {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 18px;
  z-index: 1000;
  cursor: pointer;
}
body.stream-mode .stream-mode-trigger {
  display: block;
}
body.stream-mode .stream-mode-trigger:hover + .app-header,
body.stream-mode .app-header:hover {
  transform: translateY(0);
  opacity: 1;
  pointer-events: all;
}

/* Brand & Match Ticker */
.brand-group {
  display: flex;
  align-items: center;
  gap: 14px;
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 42, 109, 0.15);
  border: 1px solid rgba(255, 42, 109, 0.4);
  color: var(--accent-rose);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--accent-rose);
  box-shadow: 0 0 10px var(--accent-rose);
  animation: pulse-live 1.4s infinite ease-in-out;
}

@keyframes pulse-live {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.4; }
}

.brand-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.brand-title span {
  color: var(--accent-cyan);
}

/* Center Match Controls (Target & Timer) */
.match-controls-center {
  display: flex;
  align-items: center;
  gap: 20px;
}

.control-pill-group {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 4px;
  gap: 4px;
}

.preset-pill-btns {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.control-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 0 8px;
}

.target-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.target-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.target-btn.active {
  background: var(--accent-cyan);
  color: #080a10;
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.4);
}

.target-custom-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.target-custom-input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 5px 8px;
  width: 72px;
  border-radius: 8px;
  text-align: center;
  outline: none;
  transition: all var(--transition-fast);
}

.target-custom-input::placeholder {
  color: var(--text-dim);
  font-weight: 600;
}

.target-custom-input:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.target-custom-input:focus,
.target-custom-input.active {
  border-color: var(--accent-cyan);
  color: #fff;
  background: rgba(0, 240, 255, 0.1);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.35);
}

/* Hide default browser up/down arrows on number input */
.target-custom-input::-webkit-outer-spin-button,
.target-custom-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.target-custom-input[type=number] {
  -moz-appearance: textfield;
}

/* Initial Score Buttons & Input */
.initial-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.initial-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.initial-btn.active {
  background: var(--accent-emerald, #05ffa1);
  color: #080a10;
  box-shadow: 0 0 15px rgba(5, 255, 161, 0.4);
}

.initial-custom-input:focus,
.initial-custom-input.active {
  border-color: var(--accent-emerald, #05ffa1) !important;
  color: #fff;
  background: rgba(5, 255, 161, 0.1) !important;
  box-shadow: 0 0 12px rgba(5, 255, 161, 0.35) !important;
}


/* Stopwatch Widget */
.timer-widget {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 4px 8px;
  gap: 10px;
}

.timer-display {
  font-family: var(--font-score);
  font-size: 1.5rem;
  letter-spacing: 1.5px;
  color: #fff;
  min-width: 68px;
  text-align: center;
}

.timer-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.timer-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.timer-btn.active {
  color: var(--accent-emerald);
}

/* Header Action Toolbar */
.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
}

.secondary-actions-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-more-btn {
  display: none;
}

.action-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 8px 14px;
  border-radius: 10px;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition-fast);
}

.action-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.action-btn.icon-only {
  padding: 8px;
  width: 38px;
  height: 38px;
  justify-content: center;
}

.action-btn.primary {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.2), rgba(0, 150, 255, 0.3));
  border-color: rgba(0, 240, 255, 0.5);
  color: var(--accent-cyan);
}
.action-btn.primary:hover {
  background: var(--accent-cyan);
  color: #080a10;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.4);
}

/* Main Arena Container */
.arena-container {
  flex: 1;
  display: flex;
  position: relative;
  overflow: hidden;
  padding: 20px;
  gap: 20px;
  align-items: stretch;
}

/* Arena Grid System */
.arena-grid {
  position: relative;
  display: grid;
  width: 100%;
  height: 100%;
  gap: 20px;
  transition: all var(--transition-normal);
}

/* 1 Player */
.arena-grid.players-1 {
  grid-template-columns: minmax(320px, 700px);
  justify-content: center;
}

/* 2 Players: 50/50 Split Screen */
.arena-grid.players-2 {
  grid-template-columns: 1fr 1fr;
}

/* 3 Players: 3 Columns */
.arena-grid.players-3 {
  grid-template-columns: repeat(3, 1fr);
}

/* 4 Players: 4 Columns or 2x2 */
.arena-grid.players-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* 5+ Players */
.arena-grid.players-many {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

/* Versus Emblem (Center Badge for 2 players) - 3X Epic Championship Size */
.vs-divider {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: clamp(120px, 14vw, 174px);
  height: clamp(120px, 14vw, 174px);
  border-radius: 50%;
  background: 
    radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.15) 0%, transparent 60%),
    radial-gradient(circle at 50% 50%, #151d30 0%, #0c101c 65%, #05070d 100%);
  border: 4px solid rgba(255, 255, 255, 0.22);
  outline: 3px solid rgba(0, 240, 255, 0.45);
  outline-offset: 4px;
  box-shadow: 
    0 0 60px rgba(0, 0, 0, 0.95),
    0 0 45px rgba(0, 240, 255, 0.4),
    0 0 65px rgba(255, 42, 109, 0.35),
    inset 0 0 25px rgba(0, 0, 0, 0.8),
    inset 0 0 15px rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-score);
  font-size: clamp(3.6rem, 5vw, 5.4rem);
  font-weight: 900;
  letter-spacing: 3px;
  color: #fff;
  text-shadow: 
    0 0 20px rgba(0, 240, 255, 0.8),
    0 0 40px rgba(255, 42, 109, 0.6),
    0 4px 15px rgba(0, 0, 0, 0.9);
  z-index: 50;
  pointer-events: none;
  animation: pulse-vs 3s infinite ease-in-out;
}

@keyframes pulse-vs {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
    box-shadow: 
      0 0 50px rgba(0, 0, 0, 0.95),
      0 0 40px rgba(0, 240, 255, 0.4),
      0 0 55px rgba(255, 42, 109, 0.3),
      inset 0 0 25px rgba(0, 0, 0, 0.8);
    outline-color: rgba(0, 240, 255, 0.45);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.06);
    box-shadow: 
      0 0 75px rgba(0, 0, 0, 0.95),
      0 0 60px rgba(0, 240, 255, 0.65),
      0 0 80px rgba(255, 42, 109, 0.55),
      inset 0 0 30px rgba(0, 0, 0, 0.8);
    outline-color: rgba(255, 42, 109, 0.65);
  }
}

/* ==========================================================================
   Player Card Architecture
   ========================================================================== */

.player-card {
  --player-color: var(--accent-cyan);
  position: relative;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 24px;
  border: 2px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-fast), border-color var(--transition-normal), box-shadow var(--transition-normal);
  cursor: default;
  touch-action: none; /* Crucial for custom gestures */
}

.player-card:hover {
  border-color: rgba(255, 255, 255, 0.25);
}

/* Full-bleed Player Background Artwork Layer */
.card-bg-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 1;
  pointer-events: none;
  border-radius: 22px;
}

.card-bg-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  filter: brightness(0.78) contrast(1.18) saturate(1.1);
  transform: scale(1.02);
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.4s ease;
}

.player-card:hover .card-bg-photo {
  transform: scale(1.06);
  filter: brightness(0.85) contrast(1.22) saturate(1.15);
}

.card-bg-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(7, 10, 18, 0.82) 0%,
    rgba(7, 10, 18, 0.2) 30%,
    rgba(7, 10, 18, 0.3) 65%,
    rgba(7, 10, 18, 0.92) 100%
  );
}

.card-bg-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(var(--player-color-rgb, 0, 240, 255), 0.16) 0%,
    transparent 75%
  );
  mix-blend-mode: screen;
}

/* Leader Glow */
.player-card.is-leader {
  border-color: var(--player-color);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 35px rgba(var(--player-color-rgb, 0, 240, 255), 0.3);
}

/* Near Match Point Tension Pulse */
.player-card.tension-mode {
  animation: tension-pulse 1s infinite alternate ease-in-out;
}
@keyframes tension-pulse {
  0% { box-shadow: 0 0 20px rgba(255, 42, 109, 0.4); border-color: rgba(255, 42, 109, 0.6); }
  100% { box-shadow: 0 0 50px rgba(255, 42, 109, 0.85); border-color: rgba(255, 42, 109, 1); }
}

/* Swipe Direction Highlights */
.player-card.swipe-up-active {
  transform: translateY(-6px);
  border-color: var(--accent-emerald);
  box-shadow: 0 0 35px rgba(5, 255, 161, 0.5);
}
.player-card.swipe-down-active {
  transform: translateY(6px);
  border-color: var(--accent-rose);
  box-shadow: 0 0 35px rgba(255, 42, 109, 0.5);
}

/* Card Header Section */
.card-header {
  padding: 14px 18px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10;
  position: relative;
}

.player-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(10, 14, 26, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 6px 14px 6px 8px;
  border-radius: 40px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.avatar-wrapper {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  padding: 2px;
  background: linear-gradient(135deg, var(--player-color), rgba(255, 255, 255, 0.2));
  box-shadow: 0 0 12px rgba(var(--player-color-rgb, 0, 240, 255), 0.4);
  flex-shrink: 0;
}

.avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background-color: #121828;
  display: block;
}

.leader-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--accent-gold);
  color: #080a10;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  box-shadow: 0 0 10px var(--accent-gold);
  opacity: 0;
  transform: scale(0.5);
  transition: all var(--transition-spring);
}

.player-card.is-leader .leader-badge {
  opacity: 1;
  transform: scale(1);
}

.player-details {
  display: flex;
  flex-direction: column;
}

.player-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.player-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.3px;
  line-height: 1.2;
}

.player-tag {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--player-color);
  letter-spacing: 1px;
}

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

.card-icon-btn {
  background: rgba(10, 14, 26, 0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  cursor: pointer;
  padding: 8px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.card-icon-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

/* ==========================================================================
   Interactive Score Zone & Draggable Counter
   ========================================================================== */

.score-zone {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 100%;
  padding: 10px 20px;
  z-index: 5;
  min-height: 220px;
}

/* Visual swipe instruction hints */
.swipe-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  opacity: 0.5;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
  z-index: 6;
  pointer-events: none;
}
.swipe-hint.hint-up {
  position: absolute;
  top: 10px;
}
.swipe-hint.hint-down {
  position: absolute;
  bottom: 10px;
}
.player-card:hover .swipe-hint {
  opacity: 0.85;
}

.score-display-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* Draggable Score Badge (Click to +1, Drag to move freely) */
.score-draggable-badge {
  position: absolute;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  touch-action: none;
  z-index: 25;
  padding: 4px 20px;
  border-radius: 20px;
  background: rgba(8, 12, 22, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.65), 0 0 25px rgba(var(--player-color-rgb, 0, 240, 255), 0.2);
  transition: box-shadow var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast);
  user-select: none;
}

.score-draggable-badge:hover {
  background: rgba(8, 12, 22, 0.8);
  border-color: var(--player-color);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8), 0 0 35px rgba(var(--player-color-rgb, 0, 240, 255), 0.45);
}

.score-draggable-badge.is-dragging {
  cursor: grabbing !important;
  transform: translate(-50%, -50%) scale(1.08);
  border-color: var(--player-color);
  background: rgba(6, 9, 18, 0.94);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9), 0 0 45px var(--player-color);
  z-index: 60;
  transition: transform 0.05s ease, box-shadow 0.1s ease;
}

.score-number {
  font-family: var(--font-score);
  font-size: clamp(5.5rem, 14vw, 12rem);
  line-height: 0.92;
  letter-spacing: 2px;
  color: #fff;
  text-shadow: 
    0 0 20px rgba(var(--player-color-rgb, 0, 240, 255), 0.6),
    0 10px 40px rgba(0, 0, 0, 0.9);
  transition: transform var(--transition-fast);
  will-change: transform;
  pointer-events: none; /* Let the parent badge handle pointer events cleanly */
}

/* Pop animation on score increase */
.score-number.pop-up {
  animation: number-pop-up 0.22s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes number-pop-up {
  0% { transform: scale(1); }
  50% { transform: scale(1.15) translateY(-5px); color: var(--accent-emerald); }
  100% { transform: scale(1); }
}

/* Drop animation on score decrease */
.score-number.pop-down {
  animation: number-pop-down 0.22s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes number-pop-down {
  0% { transform: scale(1); }
  50% { transform: scale(0.9) translateY(5px); color: var(--accent-rose); }
  100% { transform: scale(1); }
}

/* Floating Particles (+1 / -1) */
.floating-particle {
  position: absolute;
  font-family: var(--font-score);
  font-size: 2.8rem;
  letter-spacing: 1px;
  font-weight: 900;
  pointer-events: none;
  z-index: 99;
  animation: float-and-fade 0.75s forwards cubic-bezier(0.1, 0.8, 0.3, 1);
}

.floating-particle.increment {
  color: var(--accent-emerald);
  text-shadow: 0 0 20px var(--accent-emerald), 0 0 40px rgba(5, 255, 161, 0.5);
}

.floating-particle.decrement {
  color: var(--accent-rose);
  text-shadow: 0 0 20px var(--accent-rose), 0 0 40px rgba(255, 42, 109, 0.5);
}

@keyframes float-and-fade {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(0.6);
  }
  30% {
    transform: translate(-50%, -80%) scale(1.3);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -150%) scale(1);
  }
}

/* ==========================================================================
   Card Bottom: Quick Action Controls & Target Progress Bar
   ========================================================================== */

.card-footer {
  padding: 4px 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 10;
}

.card-footer:empty {
  display: none;
  padding: 0;
}

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

.target-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.2), var(--player-color));
  box-shadow: 0 0 10px var(--player-color);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.quick-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.quick-btn {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: #fff;
  padding: 12px;
  border-radius: 12px;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

.quick-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.quick-btn:active {
  transform: translateY(0);
}

.quick-btn.inc {
  background: rgba(5, 255, 161, 0.12);
  border-color: rgba(5, 255, 161, 0.3);
  color: var(--accent-emerald);
}
.quick-btn.inc:hover {
  background: rgba(5, 255, 161, 0.25);
  border-color: var(--accent-emerald);
  box-shadow: 0 0 15px rgba(5, 255, 161, 0.3);
}

.quick-btn.dec {
  background: rgba(255, 42, 109, 0.12);
  border-color: rgba(255, 42, 109, 0.3);
  color: var(--accent-rose);
}
.quick-btn.dec:hover {
  background: rgba(255, 42, 109, 0.25);
  border-color: var(--accent-rose);
  box-shadow: 0 0 15px rgba(255, 42, 109, 0.3);
}

/* ==========================================================================
   Modals (Winner Celebration & Player Editor & Shortcuts)
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 15, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
  padding: 20px;
}

.modal-backdrop.show {
  opacity: 1;
  pointer-events: all;
}

.modal-dialog {
  background: #0f1424;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 28px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(0, 240, 255, 0.2);
  width: 100%;
  max-width: 520px;
  overflow: hidden;
  transform: translateY(20px) scale(0.95);
  transition: transform var(--transition-spring);
}

.modal-backdrop.show .modal-dialog {
  transform: translateY(0) scale(1);
}

/* Winner Modal Specific Styling */
#winner-modal {
  z-index: 12000;
}
#winner-modal.show {
  z-index: 12000 !important;
}

#confetti-canvas {
  z-index: 13000 !important;
  pointer-events: none;
}

.winner-card-content {
  padding: 40px 30px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.trophy-glow {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 200, 55, 0.3) 0%, transparent 70%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  margin-bottom: 14px;
  animation: float-trophy 2.5s infinite ease-in-out;
}
@keyframes float-trophy {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.winner-subtitle {
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent-gold);
  margin-bottom: 6px;
}

.winner-name {
  font-family: var(--font-display);
  font-size: 2.8rem;
  font-weight: 900;
  color: #fff;
  line-height: 1.1;
  margin-bottom: 16px;
  text-shadow: 0 0 25px rgba(255, 200, 55, 0.5);
}

.winner-avatar-frame {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  padding: 5px;
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-cyan));
  box-shadow: 0 0 35px rgba(255, 200, 55, 0.5);
  margin-bottom: 24px;
}

.winner-avatar-frame img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.winner-score-tag {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 8px 24px;
  border-radius: 20px;
  font-family: var(--font-score);
  font-size: 1.6rem;
  letter-spacing: 1px;
  color: #fff;
  margin-bottom: 30px;
}

.modal-actions {
  display: flex;
  gap: 12px;
  width: 100%;
}

.modal-btn {
  flex: 1;
  padding: 14px;
  border-radius: 12px;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  border: none;
  transition: all var(--transition-fast);
}

.modal-btn.primary {
  background: var(--accent-cyan);
  color: #080a10;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.4);
}
.modal-btn.primary:hover {
  background: #33f3ff;
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.6);
  transform: translateY(-2px);
}

.modal-btn.secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid var(--border-subtle);
}
.modal-btn.secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Edit Player Modal Form */
.modal-header {
  padding: 24px 28px 16px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
}

.modal-body {
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

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

.form-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.form-input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 12px 16px;
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  transition: border-color var(--transition-fast);
}

.form-input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.25);
}

.color-swatches {
  display: flex;
  gap: 10px;
}

.color-swatch {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform var(--transition-fast);
}
.color-swatch:hover {
  transform: scale(1.1);
}
.color-swatch.active {
  border-color: #fff;
  box-shadow: 0 0 15px currentColor;
}

.avatar-preview-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.preview-avatar-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent-cyan);
}

/* Floating OBS Overlay Mode Exit Button */
.exit-stream-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: rgba(12, 16, 28, 0.7);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 10px 16px;
  border-radius: 20px;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  display: none;
  align-items: center;
  gap: 8px;
  z-index: 500;
  transition: all var(--transition-fast);
}
body.stream-mode .exit-stream-btn {
  display: flex;
}
.exit-stream-btn:hover {
  background: var(--accent-cyan);
  color: #080a10;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.4);
}

/* Keyboard Shortcuts Modal List */
.shortcuts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.shortcut-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.04);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
}

.key-kbd {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
  font-weight: 700;
  color: var(--accent-cyan);
}

/* ==========================================================================
   Responsive by Importance Layout Engine
   Optimized for Desktop, Tablet, and Mobile Landscape Orientations
   ========================================================================== */

/* Keyframe for floating secondary action popover menu */
@keyframes menuFadeIn {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Medium & Compact Screens, and Mobile Landscape (height <= 560px or width <= 1180px) */
@media (max-width: 1180px), (orientation: landscape) and (max-height: 560px) {
  .app-header {
    height: 54px;
    min-height: 54px;
    padding: 0 10px;
    gap: 8px;
    justify-content: space-between;
    flex-wrap: nowrap;
    overflow: visible;
  }

  /* Compact Brand */
  .brand-group {
    gap: 6px;
    flex-shrink: 0;
  }
  .brand-title {
    font-size: 0.92rem;
  }
  .brand-title span {
    display: none; /* Hides 'COUNTER', keeps 'ARENA' */
  }

  /* Match Controls (Target, Initial, Timer) */
  .match-controls-center {
    gap: 6px;
    flex-shrink: 1;
    justify-content: center;
  }

  /* HIDE preset pill buttons (20, 50, 100, ∞ and 0, 10, 50) to save 350px+ */
  .preset-pill-btns {
    display: none !important;
  }

  .control-pill-group {
    padding: 2px 4px;
    gap: 2px;
    border-radius: 8px;
  }

  .control-label {
    font-size: 0.65rem;
    padding: 0 4px;
    letter-spacing: 0.5px;
  }

  /* Directly display active Target and Initial values */
  .target-custom-input {
    width: 60px;
    padding: 3px 5px;
    font-size: 0.82rem;
    border-radius: 6px;
  }

  /* Stopwatch Timer Widget */
  .timer-widget {
    padding: 2px 6px;
    gap: 6px;
    border-radius: 8px;
    flex-shrink: 0;
  }

  .timer-display {
    font-size: 1.15rem;
    min-width: 50px;
    letter-spacing: 1px;
  }

  .timer-btn {
    width: 24px;
    height: 24px;
  }

  /* Toolbar Actions - Keep user's marked priorities in single line */
  .toolbar-actions {
    gap: 6px;
    flex-shrink: 0;
    position: relative;
  }

  .action-btn {
    padding: 5px 8px;
    font-size: 0.78rem;
    gap: 5px;
    border-radius: 8px;
    height: 32px;
  }

  .action-btn.icon-only {
    width: 32px;
    height: 32px;
    padding: 6px;
  }

  /* Show the More button */
  .header-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
  }

  /* Popover Floating Menu for Secondary Actions */
  .secondary-actions-group {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: linear-gradient(180deg, rgba(14, 20, 36, 0.98) 0%, rgba(8, 12, 22, 0.99) 100%);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(0, 240, 255, 0.35);
    border-radius: 14px;
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.95), 0 0 25px rgba(0, 240, 255, 0.2);
    padding: 10px;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    min-width: 195px;
    z-index: 10000;
  }

  .secondary-actions-group.show {
    display: flex;
    animation: menuFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .secondary-actions-group select.action-btn {
    width: 100%;
    height: 36px;
  }

  .secondary-actions-group .secondary-action-item {
    width: 100%;
    justify-content: flex-start;
    padding: 8px 12px;
    height: 36px;
  }
}

/* Extra Compact Screens (< 760px) in Landscape */
@media (max-width: 760px) {
  .brand-title {
    display: none; /* Keeps the glowing [• LIVE] badge */
  }
  .action-btn .btn-text {
    display: none; /* Shows icon only for UNDO, ADD PLAYER, RESET */
  }
  .action-btn {
    padding: 6px;
    width: 32px;
    height: 32px;
    justify-content: center;
  }
}

/* Portrait Mobile Devices (Tall Screen: width <= 768px and orientation: portrait, or narrow screens) */
@media (max-width: 768px) and (orientation: portrait), (max-width: 768px) and (max-aspect-ratio: 1/1), (max-width: 600px) {
  .app-header {
    height: auto;
    padding: 10px 12px;
    flex-wrap: wrap;
    gap: 8px;
  }
  .brand-group {
    order: 1;
  }
  .toolbar-actions {
    order: 2;
  }
  .match-controls-center {
    order: 3;
    width: 100%;
    justify-content: space-between;
  }
  .arena-grid.players-2 {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 16px;
  }
  .vs-divider {
    display: flex;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: clamp(68px, 18vw, 88px);
    height: clamp(68px, 18vw, 88px);
    font-size: clamp(1.95rem, 5.2vw, 2.6rem);
    letter-spacing: 2px;
    border-width: 3px;
    outline-width: 2.5px;
    outline-offset: 3px;
    box-shadow: 
      0 0 45px rgba(0, 0, 0, 0.95),
      0 0 30px rgba(0, 240, 255, 0.45),
      0 0 35px rgba(255, 42, 109, 0.4),
      inset 0 0 18px rgba(0, 0, 0, 0.8),
      inset 0 0 10px rgba(255, 255, 255, 0.15);
    z-index: 60;
    pointer-events: none;
  }
}

/* Compact Mobile Landscape VS sizing */
@media (max-height: 560px) and (orientation: landscape) {
  .vs-divider {
    width: clamp(65px, 13vh, 88px);
    height: clamp(65px, 13vh, 88px);
    font-size: clamp(1.8rem, 8vh, 2.4rem);
    border-width: 3px;
    outline-width: 2px;
    outline-offset: 2px;
  }
}

/* ==========================================================================
   Penalty Shootout Mini-Game Styling
   ========================================================================== */

/* Floating Launcher Action Button */
.penalty-floating-btn {
  position: fixed;
  bottom: 24px;
  right: 28px;
  z-index: 850;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px 10px 12px;
  background: linear-gradient(135deg, rgba(14, 22, 40, 0.92) 0%, rgba(8, 12, 24, 0.95) 100%);
  border: 1.5px solid rgba(0, 240, 255, 0.4);
  border-radius: 40px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(0, 240, 255, 0.25);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  cursor: pointer;
  transition: all var(--transition-normal);
  animation: floatBounce 3s ease-in-out infinite;
}

@keyframes floatBounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

.penalty-floating-btn:hover {
  transform: translateY(-4px) scale(1.04);
  border-color: var(--accent-cyan);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7), 0 0 32px rgba(0, 240, 255, 0.5);
  background: linear-gradient(135deg, rgba(20, 32, 58, 0.95) 0%, rgba(10, 16, 32, 0.98) 100%);
}

.penalty-floating-btn:active {
  transform: translateY(0) scale(0.98);
}

.penalty-ball-icon-wrap {
  position: relative;
  width: 44px;
  height: 44px;
  background: radial-gradient(circle, rgba(0, 240, 255, 0.25) 0%, rgba(0, 240, 255, 0.05) 70%);
  border: 1px solid rgba(0, 240, 255, 0.5);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.penalty-ball-icon {
  display: inline-block;
  animation: ballSpin 12s linear infinite;
}

@keyframes ballSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.penalty-pulse-ring {
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border-radius: 50%;
  border: 2px solid var(--accent-cyan);
  opacity: 0.6;
  animation: pulseExpand 2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
  pointer-events: none;
}

@keyframes pulseExpand {
  0% {
    transform: scale(0.9);
    opacity: 0.9;
  }
  100% {
    transform: scale(1.6);
    opacity: 0;
  }
}

.penalty-btn-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.penalty-title {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 1.2px;
  color: #ffffff;
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
}

.penalty-subtitle {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.6px;
  color: var(--accent-cyan);
}

/* Hide launcher when stream mode is active */
body.stream-mode .penalty-floating-btn,
body.stream-mode .random-goal-floating-btn {
  display: none !important;
}

/* ==========================================================================
   Random Mystery Goal Floating Button & Shuffle Overlay
   ========================================================================== */

.random-goal-floating-btn {
  position: fixed;
  bottom: 24px;
  left: 28px;
  z-index: 850;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px 10px 12px;
  background: linear-gradient(135deg, rgba(24, 18, 42, 0.94) 0%, rgba(12, 10, 24, 0.96) 100%);
  border: 1.5px solid rgba(255, 200, 55, 0.45);
  border-radius: 40px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 22px rgba(255, 200, 55, 0.25);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  cursor: pointer;
  transition: all var(--transition-normal);
  animation: floatBounceAlt 3.4s ease-in-out infinite;
}

@keyframes floatBounceAlt {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

.random-goal-floating-btn:hover {
  transform: translateY(-4px) scale(1.04);
  border-color: var(--accent-gold);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7), 0 0 35px rgba(255, 200, 55, 0.55);
  background: linear-gradient(135deg, rgba(35, 26, 62, 0.96) 0%, rgba(18, 14, 36, 0.98) 100%);
}

.random-goal-floating-btn:active {
  transform: translateY(0) scale(0.98);
}

.random-goal-floating-btn.is-shuffling {
  border-color: #05ffa1;
  box-shadow: 0 0 35px rgba(5, 255, 161, 0.6);
  cursor: wait;
}

.random-dice-icon-wrap {
  position: relative;
  width: 44px;
  height: 44px;
  background: radial-gradient(circle, rgba(255, 200, 55, 0.3) 0%, rgba(255, 200, 55, 0.05) 70%);
  border: 1px solid rgba(255, 200, 55, 0.5);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.random-dice-icon {
  display: inline-block;
  transition: transform 0.2s ease;
}

.random-goal-floating-btn.is-shuffling .random-dice-icon {
  animation: diceRollSpin 0.28s linear infinite;
}

@keyframes diceRollSpin {
  0% { transform: rotate(0deg) scale(1.1); }
  50% { transform: rotate(180deg) scale(0.9); }
  100% { transform: rotate(360deg) scale(1.1); }
}

.random-pulse-ring {
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border-radius: 50%;
  border: 2px solid var(--accent-gold);
  opacity: 0.6;
  animation: pulseExpandAlt 2.2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
  pointer-events: none;
}

@keyframes pulseExpandAlt {
  0% {
    transform: scale(0.9);
    opacity: 0.9;
  }
  100% {
    transform: scale(1.6);
    opacity: 0;
  }
}

.random-btn-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.random-title {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 1.2px;
  color: #ffffff;
  text-shadow: 0 0 10px rgba(255, 200, 55, 0.5);
}

.random-subtitle {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.6px;
  color: var(--accent-gold);
}

/* Card highlight during roulette shuffle */
.player-card.shuffle-highlight {
  border-color: var(--accent-gold) !important;
  box-shadow: 0 0 50px rgba(255, 200, 55, 0.8), inset 0 0 30px rgba(255, 200, 55, 0.3) !important;
  transform: translateY(-8px) scale(1.025) !important;
  z-index: 40 !important;
  transition: all 0.08s ease !important;
}

/* Card winner celebration flash */
.player-card.shuffle-winner-pop {
  animation: cardWinnerBlast 1.2s ease-out;
}

@keyframes cardWinnerBlast {
  0% {
    transform: scale(1.04);
    box-shadow: 0 0 60px rgba(5, 255, 161, 0.9), inset 0 0 40px rgba(5, 255, 161, 0.4);
    border-color: #05ffa1;
  }
  50% {
    transform: scale(1.02);
    box-shadow: 0 0 35px rgba(5, 255, 161, 0.5);
  }
  100% {
    transform: scale(1);
  }
}

/* ==========================================================================
   Arena Grid Slot Reel Engine (100% on card grid - No modal!)
   ========================================================================== */

.card-reel-track {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  z-index: 1;
  pointer-events: none;
  will-change: transform;
}

/* Default single photo in track */
.card-reel-track .reel-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  filter: brightness(0.78) contrast(1.18) saturate(1.1);
  display: block;
}

/* Rolling strip of player avatars inside arena cards */
.card-reel-track.is-rolling .reel-photo {
  width: 100%;
  height: calc(100% / var(--strip-count, 4));
  flex-shrink: 0;
  object-fit: cover;
  object-position: center 20%;
  display: block;
}

/* Motion blur & saturation on spinning images */
.card-reel-track.spin-roll-up .reel-photo,
.card-reel-track.spin-roll-down .reel-photo {
  filter: brightness(0.92) contrast(1.25) saturate(1.2) blur(0.6px);
}

.card-reel-track.spin-brake-up .reel-photo,
.card-reel-track.spin-brake-down .reel-photo {
  filter: brightness(0.85) contrast(1.2) saturate(1.15) blur(0.2px);
  transition: filter 0.5s ease;
}

/* 1. UPWARDS ROLL: image goes UP and enters from BOTTOM ("uporedike gie nice theke ber hobe") */
.card-reel-track.spin-roll-up {
  animation: slotRollUp 0.38s linear infinite;
}

@keyframes slotRollUp {
  0% {
    transform: translate3d(0, 0%, 0);
  }
  100% {
    transform: translate3d(0, -50%, 0);
  }
}

/* 2. DOWNWARDS ROLL: opposite effect, image goes DOWN and enters from TOP ("konota tar oposite effect") */
.card-reel-track.spin-roll-down {
  animation: slotRollDown 0.38s linear infinite;
}

@keyframes slotRollDown {
  0% {
    transform: translate3d(0, -50%, 0);
  }
  100% {
    transform: translate3d(0, 0%, 0);
  }
}

/* Smooth Deceleration / Braking Animations */
.card-reel-track.spin-brake-up {
  animation: slotBrakeUp 0.8s cubic-bezier(0.15, 0.85, 0.25, 1) forwards;
}

@keyframes slotBrakeUp {
  0% {
    transform: translate3d(0, 0%, 0);
  }
  100% {
    transform: translate3d(0, -50%, 0);
  }
}

.card-reel-track.spin-brake-down {
  animation: slotBrakeDown 0.8s cubic-bezier(0.15, 0.85, 0.25, 1) forwards;
}

@keyframes slotBrakeDown {
  0% {
    transform: translate3d(0, -50%, 0);
  }
  100% {
    transform: translate3d(0, 0%, 0);
  }
}

/* Card Spinning State Glow */
.player-card.card-slot-spinning {
  box-shadow: 
    0 15px 45px rgba(0, 0, 0, 0.85),
    0 0 35px rgba(var(--player-color-rgb, 0, 240, 255), 0.45) !important;
  border-color: rgba(var(--player-color-rgb, 0, 240, 255), 0.75) !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

/* Subtle Winner Card Highlight on Arena Grid ("kintu halka") */
.player-card.shuffle-winner-card {
  border-color: rgba(255, 215, 0, 0.72) !important;
  box-shadow: 
    0 0 22px rgba(255, 215, 0, 0.32),
    0 12px 28px rgba(0, 0, 0, 0.6) !important;
  transform: translateY(-3px);
  transition: transform 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
  z-index: 20 !important;
}

/* ==========================================================================
   Winning Player Counter Number Gentle Zoom & Grow Animation
   "je jiteche tar counter number ta ektu zoom hoe bere abar normal size hobe - kintu halka"
   ========================================================================== */

.score-number.casino-zoom-grow {
  display: inline-block;
  animation: counter-lucky-grow 1.15s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
  z-index: 50 !important;
  will-change: transform, color;
}

@keyframes counter-lucky-grow {
  0% {
    transform: scale(1);
    color: #ffffff;
  }
  35% {
    transform: scale(1.26);
    color: #ffe66d;
    text-shadow: 
      0 0 22px rgba(255, 215, 0, 0.7),
      0 8px 24px rgba(0, 0, 0, 0.8);
  }
  65% {
    transform: scale(1.18);
    color: #ffd700;
    text-shadow: 0 0 16px rgba(255, 215, 0, 0.5);
  }
  100% {
    transform: scale(1);
    color: #ffffff;
    text-shadow: 
      0 0 20px rgba(var(--player-color-rgb, 0, 240, 255), 0.6),
      0 10px 40px rgba(0, 0, 0, 0.9);
  }
}

.score-draggable-badge.casino-badge-pulse {
  animation: badge-lucky-pulse 1.15s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
  z-index: 45 !important;
}

@keyframes badge-lucky-pulse {
  0% {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.65);
    border-color: rgba(255, 255, 255, 0.12);
  }
  35% {
    box-shadow: 
      0 0 24px rgba(255, 215, 0, 0.45),
      0 12px 30px rgba(0, 0, 0, 0.75);
    border-color: rgba(255, 215, 0, 0.65);
    background: rgba(18, 14, 30, 0.85);
  }
  100% {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.65), 0 0 25px rgba(var(--player-color-rgb, 0, 240, 255), 0.2);
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(8, 12, 22, 0.55);
  }
}

/* ==========================================================================
   Subtle On-Card Congratulations Badge ("sudhu je card e goal hoieche sei card e, kintu halka")
   ========================================================================== */

.card-mini-celebration {
  position: absolute;
  top: 72px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  background: rgba(10, 16, 30, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 215, 0, 0.55);
  border-radius: 20px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), 0 0 16px rgba(255, 215, 0, 0.22);
  z-index: 35;
  pointer-events: none;
  animation: cardMiniCeleb 1.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.mini-celeb-sparkle {
  font-size: 0.85rem;
  color: #ffd700;
  display: inline-block;
  animation: sparkleTwinkle 0.8s ease-in-out infinite alternate;
}

@keyframes sparkleTwinkle {
  0% { transform: scale(0.85) rotate(0deg); opacity: 0.7; }
  100% { transform: scale(1.15) rotate(15deg); opacity: 1; }
}

.mini-celeb-text {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #ffd700;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

@keyframes cardMiniCeleb {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(8px) scale(0.92);
  }
  20% {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
  75% {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(-8px) scale(0.96);
  }
}

/* ==========================================================================
   Big Highlighted Player Name in Screen Center on Golden Goal
   "lekhata scrrener ekdom bame cole jacche. kintu center hobe."
   ========================================================================== */

.screen-marked-name-banner {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(40px) scale(0.9);
  min-width: 340px;
  max-width: min(90vw, 560px);
  width: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 36px 12px;
  background: linear-gradient(180deg, rgba(10, 15, 28, 0.95) 0%, rgba(6, 9, 18, 0.98) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 2px solid #ffd700;
  border-radius: 50px;
  box-shadow: 
    0 16px 45px rgba(0, 0, 0, 0.92),
    0 0 35px rgba(255, 215, 0, 0.5),
    inset 0 0 20px rgba(255, 215, 0, 0.18);
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  text-align: center;
  transition: opacity 0.35s ease, transform 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.screen-marked-name-banner.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
}

.marked-name-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 100%;
}

.marked-name-header {
  display: flex;
  align-items: center;
  gap: 6px;
}

.marked-name-tag {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: #ffd700;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.65);
}

.marked-name-text {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.5vw, 2.05rem);
  font-weight: 900;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #ffffff;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  line-height: 1.1;
  text-shadow: 
    0 0 18px rgba(255, 215, 0, 0.85),
    0 0 35px rgba(var(--player-color-rgb, 255, 215, 0), 0.6),
    0 4px 14px rgba(0, 0, 0, 0.95);
  animation: markedNameGlow 1.2s infinite alternate ease-in-out;
}

@keyframes markedNameGlow {
  0% {
    transform: scale(0.99);
    text-shadow: 
      0 0 14px rgba(255, 215, 0, 0.7),
      0 4px 12px rgba(0, 0, 0, 0.95);
  }
  100% {
    transform: scale(1.02);
    text-shadow: 
      0 0 25px rgba(255, 215, 0, 1),
      0 0 50px rgba(255, 200, 55, 0.8),
      0 4px 16px rgba(0, 0, 0, 0.95);
  }
}

/* Penalty Shootout Stadium Modal Backdrop */
.penalty-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(4, 6, 14, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  transition: opacity var(--transition-normal);
  overflow-y: auto;
  overflow-x: hidden;
}

.penalty-modal-backdrop.show {
  display: flex;
  opacity: 1;
}

/* Outer layout holding Left Flank (Extra Info), Center Stadium, and Right Flank (Controls) */
.penalty-modal-outer-layout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  width: 100%;
  max-width: 1680px;
  height: 94vh;
  max-height: 890px;
  position: relative;
  margin: auto;
}

/* Modal Dialog Window (Center Stadium Arena) */
.penalty-modal-dialog {
  flex: 1 1 1140px;
  max-width: 1140px;
  height: 100%;
  background: #080c16;
  border: 1px solid rgba(0, 240, 255, 0.28);
  border-radius: 20px;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.8), 0 0 40px rgba(0, 240, 255, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

/* Top Stadium Bar - Hidden to give full screen to stadium and place score at bottom of images */
.penalty-arena-header {
  display: none !important;
}

.penalty-scoreboard-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: 100%;
  flex-wrap: wrap;
}

/* Player Scoreboard Card / Pill */
.shooter-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 18px 8px 12px;
  background: rgba(18, 26, 44, 0.75);
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  color: var(--text-main);
  position: relative;
  min-width: 220px;
  flex: 0 1 auto;
}

.shooter-pill:hover {
  background: rgba(26, 36, 60, 0.9);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.shooter-pill.active {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.22) 0%, rgba(5, 255, 161, 0.15) 100%);
  border-color: var(--shooter-color, var(--accent-cyan));
  box-shadow: 0 0 25px rgba(0, 240, 255, 0.4), inset 0 0 14px rgba(0, 240, 255, 0.16);
  transform: translateY(-2px) scale(1.02);
}

/* Left side of pill: Avatar + Names */
.shooter-identity {
  display: flex;
  align-items: center;
  gap: 12px;
}

.shooter-avatar-wrap {
  position: relative;
  width: 46px;
  height: 46px;
  flex-shrink: 0;
}

.shooter-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  border: 2.5px solid var(--shooter-color, #ffffff);
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.6);
}

.shooter-active-dot {
  position: absolute;
  bottom: -4px;
  right: -4px;
  font-size: 14px;
  filter: drop-shadow(0 0 6px rgba(0, 0, 0, 0.8));
  animation: pulseRotate 2s infinite ease-in-out;
}

.shooter-info {
  display: flex;
  flex-direction: column;
  text-align: left;
  gap: 2px;
}

.shooter-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.shooter-name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #ffffff;
  white-space: nowrap;
}

.shooter-kicking-pill {
  background: var(--accent-cyan);
  color: #080a10;
  font-family: var(--font-display);
  font-size: 0.6rem;
  font-weight: 900;
  padding: 1px 6px;
  border-radius: 6px;
  letter-spacing: 0.6px;
  box-shadow: 0 0 10px var(--accent-cyan);
  animation: kickerGlow 1.5s infinite alternate;
}

.shooter-tag {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 0.6px;
}

/* Right side of pill: GIGANTIC SCORE NUMBER */
.shooter-score-box {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  padding-left: 14px;
  border-left: 1.5px solid rgba(255, 255, 255, 0.12);
  min-width: 72px;
}

.shooter-score-tag {
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--text-dim);
  text-transform: uppercase;
}

.shooter-score-big {
  font-family: var(--font-score);
  font-size: clamp(2.4rem, 4.2vw, 3.4rem);
  font-weight: 900;
  line-height: 0.92;
  color: #ffffff;
  letter-spacing: -1px;
  text-shadow: 0 0 14px rgba(255, 255, 255, 0.4);
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.shooter-pill.active .shooter-score-big {
  color: var(--accent-gold);
  text-shadow: 0 0 18px rgba(255, 215, 0, 0.8), 0 0 32px var(--shooter-color, rgba(0, 240, 255, 0.45));
}

@keyframes pulseRotate {
  0% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.15) rotate(180deg); }
  100% { transform: scale(1) rotate(360deg); }
}

@keyframes kickerGlow {
  0% { box-shadow: 0 0 6px var(--accent-cyan); }
  100% { box-shadow: 0 0 14px var(--accent-cyan), 0 0 20px var(--accent-cyan); }
}

/* ==========================================================================
   Outer Flank Widgets (In the Marked Empty Space on Left & Right)
   ========================================================================== */
.penalty-flank-widget {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: rgba(10, 15, 28, 0.92);
  border: 1px solid rgba(0, 240, 255, 0.25);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 20px 18px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.75), 0 0 30px rgba(0, 240, 255, 0.12);
  z-index: 20;
  pointer-events: auto;
  transition: all var(--transition-normal);
}

.penalty-flank-widget.left {
  width: 240px;
}

.penalty-flank-widget.right {
  width: 220px;
}

.flank-widget-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.flank-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.flank-arena-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 0.8px;
  color: #ffffff;
  margin: 0;
}

.flank-arena-title span {
  color: var(--accent-cyan);
  margin-left: 4px;
}

.penalty-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  background: rgba(0, 240, 255, 0.12);
  border: 1px solid rgba(0, 240, 255, 0.3);
  border-radius: 12px;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--accent-cyan);
  letter-spacing: 0.5px;
  width: fit-content;
}

.penalty-dot {
  width: 6px;
  height: 6px;
  background: var(--accent-cyan);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-cyan);
}

.flank-subtitle {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--text-dim);
  text-transform: uppercase;
}

/* Stats Grid inside Left Flank */
.flank-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.flank-stat-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  padding: 8px 6px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  transition: all 0.2s;
}

.flank-stat-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(0, 240, 255, 0.3);
}

.flank-stat-pill.full-width {
  grid-column: span 2;
  flex-direction: row;
  justify-content: space-between;
  padding: 8px 14px;
}

.flank-stat-pill .stat-lbl {
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: var(--text-dim);
}

.flank-stat-pill .stat-val {
  font-family: var(--font-score);
  font-size: 1.3rem;
  font-weight: 900;
  color: #ffffff;
  line-height: 1.1;
}

.flank-stat-pill .stat-val.highlight {
  color: var(--accent-emerald);
  text-shadow: 0 0 10px rgba(5, 255, 161, 0.6);
}

.flank-stat-pill .stat-val.streak {
  color: var(--accent-gold);
  text-shadow: 0 0 10px rgba(255, 200, 55, 0.6);
}

/* Tip card inside Left Flank */
.flank-tip-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(0, 240, 255, 0.06);
  border: 1px solid rgba(0, 240, 255, 0.15);
  border-radius: 12px;
  margin-top: 4px;
}

.tip-icon {
  font-size: 1.2rem;
  line-height: 1;
}

.tip-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tip-heading {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.6px;
  color: var(--accent-cyan);
  text-transform: uppercase;
}

.tip-desc {
  font-size: 0.68rem;
  line-height: 1.25;
  color: var(--text-muted);
}

/* Actions inside Right Flank */
.flank-close-btn {
  width: 32px;
  height: 32px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid rgba(255, 42, 109, 0.4);
  color: var(--accent-rose);
  background: rgba(255, 42, 109, 0.12);
  cursor: pointer;
  transition: all 0.2s;
}

.flank-close-btn:hover {
  background: var(--accent-rose);
  color: #080c16;
  transform: scale(1.08);
  box-shadow: 0 0 14px var(--accent-rose);
}

.flank-actions-controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.flank-control-btn {
  width: 100%;
  justify-content: center;
  padding: 10px 14px;
  font-size: 0.82rem;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  color: #ffffff;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.flank-control-btn:hover {
  background: rgba(0, 240, 255, 0.18);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 240, 255, 0.25);
}

.flank-control-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  user-select: none;
  transition: all 0.2s;
}

.flank-control-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
}

.flank-control-toggle input {
  accent-color: var(--accent-cyan);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* Shortcuts helper inside Right Flank */
.flank-shortcuts-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 4px;
}

.flank-info-label {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: var(--text-dim);
  text-transform: uppercase;
}

.flank-key-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Interactive Canvas Stage Container */
.penalty-stage-wrap {
  flex: 1;
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  touch-action: none;
  background: #04060c;
}

#penalty-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: crosshair;
  z-index: 5;
  background: transparent;
}

/* ==========================================================================
   Penalty Arena Player Columns Backdrop (Homepage Style)
   ========================================================================== */
.penalty-players-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 44%;
  display: flex;
  flex-direction: row;
  z-index: 10;
  pointer-events: none;
  border-bottom: 2px solid rgba(0, 240, 255, 0.25);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.85);
  overflow: hidden;
}

.penalty-player-col {
  flex: 1;
  height: 100%;
  position: relative;
  overflow: hidden;
  user-select: none;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.penalty-player-col:last-child {
  border-right: none;
}

/* Active Striker Column Glow */
.penalty-player-col.active {
  box-shadow: inset 0 0 35px rgba(var(--player-color-rgb, 0, 240, 255), 0.3),
              inset 0 0 15px rgba(var(--player-color-rgb, 0, 240, 255), 0.5);
}

.penalty-player-col.active::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--player-color, var(--accent-cyan));
  box-shadow: 0 0 14px var(--player-color, var(--accent-cyan));
  z-index: 10;
}

/* ==========================================================================
   Rotating Colored Border for Active Kicker Image
   "je kick marbe tar image ekta colored border ghurte thakbe.. jotokkhon na kicker result ase."
   ========================================================================== */

/* Outer boundary border of the active kicker image column */
.penalty-rotating-border {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 9;
  opacity: 0;
  transition: opacity 0.35s ease;
  overflow: hidden;
  border-radius: inherit;
  /* Mask out the interior so only a 4px outer frame border is visible */
  padding: 4px;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

.penalty-player-col.is-kicking .penalty-rotating-border {
  opacity: 1;
}

.penalty-rotating-border::before {
  content: '';
  position: absolute;
  top: -65%;
  left: -65%;
  width: 230%;
  height: 230%;
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    transparent 45deg,
    var(--player-color, #00f0ff) 80deg,
    #ffffff 105deg,
    var(--player-color, #00f0ff) 130deg,
    transparent 170deg,
    transparent 225deg,
    var(--player-color, #00f0ff) 260deg,
    #ffffff 285deg,
    var(--player-color, #00f0ff) 310deg,
    transparent 360deg
  );
  animation: rotateKickerBorderSpin 2.5s linear infinite;
  filter: drop-shadow(0 0 14px var(--player-color, #00f0ff));
}

@keyframes rotateKickerBorderSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Rotating colored border around the kicker's circular avatar */
.penalty-player-col.is-kicking .penalty-col-meta .avatar-wrapper {
  position: relative;
}

.penalty-player-col.is-kicking .penalty-col-meta .avatar-wrapper::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    var(--player-color, #00f0ff) 60deg,
    #ffffff 90deg,
    var(--player-color, #00f0ff) 120deg,
    transparent 180deg,
    var(--player-color, #00f0ff) 240deg,
    #ffffff 270deg,
    var(--player-color, #00f0ff) 300deg,
    transparent 360deg
  );
  animation: rotateAvatarRingSpin 1.6s linear infinite;
  z-index: 0;
  box-shadow: 0 0 16px var(--player-color, #00f0ff);
}

.penalty-player-col.is-kicking .penalty-col-meta .avatar-img {
  position: relative;
  z-index: 1;
  border-color: rgba(255, 255, 255, 0.5) !important;
}

@keyframes rotateAvatarRingSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Subtle energetic glow on the active kicker's photo while preparing/taking kick */
.penalty-player-col.is-kicking .penalty-col-photo {
  filter: brightness(0.96) contrast(1.1);
}

.penalty-player-col.is-kicking .penalty-col-glow {
  opacity: 1;
  background: radial-gradient(
    circle at 50% 30%,
    rgba(var(--player-color-rgb, 0, 240, 255), 0.38) 0%,
    transparent 70%
  );
  animation: kickerPhotoGlowPulse 2.2s infinite alternate ease-in-out;
}

@keyframes kickerPhotoGlowPulse {
  0% { opacity: 0.65; transform: scale(1); }
  100% { opacity: 1; transform: scale(1.05); }
}

/* Full Bleed Background Photo */
.penalty-col-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 1;
}

.penalty-col-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: brightness(0.85) contrast(1.05);
  transition: transform 0.4s ease;
}

.penalty-player-col:hover .penalty-col-photo {
  transform: scale(1.04);
}

.penalty-col-gradient {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    180deg,
    rgba(6, 9, 18, 0.75) 0%,
    rgba(8, 12, 22, 0.45) 35%,
    rgba(8, 12, 22, 0.8) 75%,
    rgba(6, 8, 16, 0.98) 100%
  );
  z-index: 2;
}

.penalty-col-glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    circle at 50% 30%,
    rgba(var(--player-color-rgb, 0, 240, 255), 0.28) 0%,
    transparent 70%
  );
  z-index: 3;
}

/* Column Header (Homepage Style: Avatar, Name, Tag) */
.penalty-col-header {
  position: relative;
  z-index: 5;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: linear-gradient(180deg, rgba(4, 6, 12, 0.7) 0%, transparent 100%);
  pointer-events: auto;
  cursor: pointer;
}

.penalty-player-col:last-child .penalty-col-header {
  padding-right: 48px; /* Clean breathing room for top-right close button */
}

.penalty-col-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.penalty-col-meta .avatar-wrapper {
  position: relative;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
}

.penalty-col-meta .avatar-img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--player-color, #ffffff);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
}

.penalty-col-meta .player-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.penalty-col-meta .player-title-row {
  display: flex;
  align-items: center;
  min-width: 0;
}

.penalty-col-meta .player-name {
  font-family: var(--font-display);
  font-size: 0.86rem;
  font-weight: 800;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.3px;
  line-height: 1.15;
}

.penalty-col-meta .player-sub-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 1px;
}

.penalty-col-meta .player-tag {
  font-size: 0.64rem;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 0.5px;
}

.penalty-kicking-pill {
  background: var(--player-color, var(--accent-cyan));
  color: #04060c;
  font-family: var(--font-display);
  font-size: 0.55rem;
  font-weight: 900;
  padding: 1px 6px;
  border-radius: 4px;
  letter-spacing: 0.6px;
  white-space: nowrap;
  box-shadow: 0 0 10px var(--player-color, var(--accent-cyan));
  animation: kickerGlow 1.5s infinite alternate;
}

/* ==========================================================================
   Draggable Big Counter (Centered on Player Image with Drag & Drop)
   ========================================================================== */
.penalty-score-draggable-badge {
  position: absolute;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  touch-action: none;
  z-index: 25;
  pointer-events: auto;
  padding: 6px 24px;
  border-radius: 24px;
  background: rgba(6, 10, 20, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 2px solid var(--player-color, rgba(0, 240, 255, 0.5));
  box-shadow: 
    0 16px 40px rgba(0, 0, 0, 0.88),
    0 0 35px rgba(var(--player-color-rgb, 0, 240, 255), 0.35);
  transition: box-shadow var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast);
  user-select: none;
}

.penalty-score-draggable-badge:hover {
  background: rgba(6, 10, 20, 0.9);
  border-color: var(--player-color, #00f0ff);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.92), 0 0 45px rgba(var(--player-color-rgb, 0, 240, 255), 0.55);
}

.penalty-score-draggable-badge.is-dragging {
  cursor: grabbing !important;
  transform: translate(-50%, -50%) scale(1.1);
  border-color: var(--player-color, #00f0ff);
  background: rgba(4, 8, 16, 0.96);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.95), 0 0 50px var(--player-color, #00f0ff);
  z-index: 35;
  transition: transform 0.05s ease, box-shadow 0.1s ease;
}

.penalty-score-draggable-badge.pop-up {
  animation: scorePopUp 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes scorePopUp {
  0% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.25); border-color: var(--accent-gold); box-shadow: 0 0 45px var(--accent-gold); }
  100% { transform: translate(-50%, -50%) scale(1); }
}

/* BIG COUNTER NUMBER (Centered with Drag & Drop) */
.penalty-score-num {
  font-family: var(--font-score);
  font-size: clamp(4.8rem, 13vw, 7.8rem);
  line-height: 0.9;
  letter-spacing: 2px;
  color: #ffffff;
  text-shadow: 
    0 0 25px rgba(var(--player-color-rgb, 0, 240, 255), 0.85),
    0 8px 25px rgba(0, 0, 0, 0.95);
  pointer-events: none;
}

/* ==========================================================================
   Versus Emblem (3X Epic Championship Size - Centered Between Players)
   ========================================================================== */
.penalty-vs-divider {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: clamp(88px, 18vw, 120px);
  height: clamp(88px, 18vw, 120px);
  border-radius: 50%;
  background: 
    radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.22) 0%, transparent 60%),
    radial-gradient(circle at 50% 50%, #151d30 0%, #0c101c 65%, #05070d 100%);
  border: 3.5px solid rgba(255, 255, 255, 0.3);
  outline: 3px solid rgba(0, 240, 255, 0.55);
  outline-offset: 3px;
  box-shadow: 
    0 0 50px rgba(0, 0, 0, 0.95),
    0 0 40px rgba(0, 240, 255, 0.45),
    0 0 50px rgba(255, 42, 109, 0.35),
    inset 0 0 22px rgba(0, 0, 0, 0.85),
    inset 0 0 12px rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-score);
  font-size: clamp(2.8rem, 6vw, 4rem);
  font-weight: 900;
  letter-spacing: 2px;
  color: #ffffff;
  text-transform: uppercase;
  text-shadow: 
    0 0 18px rgba(0, 240, 255, 0.9),
    0 0 32px rgba(255, 42, 109, 0.7),
    0 4px 12px rgba(0, 0, 0, 0.95);
  z-index: 20;
  pointer-events: none;
  animation: pulse-vs 3s infinite ease-in-out;
}

/* ==========================================================================
   Minimal Outcome Banner (Only Result + Player Name)
   ========================================================================== */
.penalty-outcome-banner {
  position: absolute;
  top: 42%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.7);
  opacity: 0;
  pointer-events: none;
  text-align: center;
  padding: 12px 32px;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 55;
  background: rgba(8, 12, 22, 0.9);
  border: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.penalty-outcome-banner.show {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

.outcome-main-title {
  font-family: var(--font-score);
  font-size: clamp(2.6rem, 7vw, 4rem);
  letter-spacing: 3px;
  line-height: 0.95;
  color: #ffffff;
}

.outcome-player-credit,
.outcome-player-name {
  font-family: var(--font-display);
  font-size: clamp(0.95rem, 2.8vw, 1.25rem);
  font-weight: 800;
  letter-spacing: 1.5px;
  color: rgba(255, 255, 255, 0.9);
  text-transform: uppercase;
}

/* Outcome Card Themes */
.penalty-outcome-banner.goal {
  border-color: var(--accent-emerald, #05ffa1);
  background: radial-gradient(circle at center, rgba(5, 255, 161, 0.2) 0%, rgba(8, 14, 24, 0.96) 80%);
  box-shadow: 0 0 50px rgba(5, 255, 161, 0.45);
}

.penalty-outcome-banner.goal .outcome-main-title {
  color: var(--accent-emerald, #05ffa1);
  text-shadow: 0 0 25px rgba(5, 255, 161, 0.85);
}

.penalty-outcome-banner.saved,
.penalty-outcome-banner.missed,
.penalty-outcome-banner.post {
  border-color: var(--accent-rose, #ff2a6d);
  background: radial-gradient(circle at center, rgba(255, 42, 109, 0.2) 0%, rgba(8, 14, 24, 0.96) 80%);
  box-shadow: 0 0 45px rgba(255, 42, 109, 0.4);
}

.penalty-outcome-banner.saved .outcome-main-title,
.penalty-outcome-banner.missed .outcome-main-title,
.penalty-outcome-banner.post .outcome-main-title {
  color: var(--accent-rose, #ff2a6d);
  text-shadow: 0 0 20px rgba(255, 42, 109, 0.85);
}

/* Responsive Flank Panels & Penalty Arena */
@media (max-width: 1440px) {
  .penalty-modal-outer-layout {
    gap: 14px;
  }
  .penalty-flank-widget.left {
    width: 205px;
    padding: 16px 12px;
  }
  .penalty-flank-widget.right {
    width: 190px;
    padding: 16px 12px;
  }
}

@media (max-width: 1180px) {
  .penalty-modal-outer-layout {
    display: block;
    height: 96vh;
    padding: 0;
  }
  .penalty-modal-dialog {
    width: 100%;
    height: 100%;
  }
  .penalty-flank-widget.left {
    position: absolute;
    top: 90px;
    left: 12px;
    width: 200px;
    z-index: 30;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.85);
  }
  .penalty-flank-widget.right {
    position: absolute;
    top: 90px;
    right: 12px;
    width: 185px;
    z-index: 30;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.85);
  }
}

@media (max-width: 900px) {
  /* Completely hide the left flank panel on mobile */
  .penalty-flank-widget.left {
    display: none !important;
  }

  /* Reset right flank panel to transparent container on mobile */
  .penalty-flank-widget.right {
    position: static !important;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    filter: none !important;
    transform: none !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 0 !important;
    height: 0 !important;
    min-width: 0 !important;
    max-width: none !important;
    overflow: visible !important;
    pointer-events: none !important;
  }

  /* Hide all contents of right panel except the cross button */
  .penalty-flank-widget.right .flank-subtitle,
  .penalty-flank-widget.right .flank-actions-controls,
  .penalty-flank-widget.right .flank-shortcuts-info {
    display: none !important;
  }

  .penalty-flank-widget.right .flank-widget-header,
  .penalty-flank-widget.right .flank-header-row {
    display: contents !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Keep ONLY the cross button in the exact top right corner on mobile */
  .flank-close-btn,
  #close-penalty-btn {
    display: flex !important;
    position: fixed !important;
    top: 10px !important;
    right: 10px !important;
    z-index: 10050 !important;
    width: 36px !important;
    height: 36px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    background: rgba(10, 14, 26, 0.88) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.25) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.85) !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    pointer-events: auto !important;
    transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease !important;
  }

  .flank-close-btn:hover,
  #close-penalty-btn:hover {
    background: #ff2a6d !important;
    border-color: #ff2a6d !important;
    color: #ffffff !important;
    box-shadow: 0 0 20px rgba(255, 42, 109, 0.8) !important;
    transform: scale(1.08) !important;
  }

  .flank-close-btn:active,
  #close-penalty-btn:active {
    transform: scale(0.92) !important;
    background: rgba(255, 42, 109, 0.4) !important;
  }

  .flank-arena-title {
    font-size: 0.85rem;
  }
  .shooter-score-big {
    font-size: 2rem;
  }
  .shooter-pill {
    min-width: 160px;
    padding: 6px 12px 6px 8px;
    gap: 10px;
  }
  .shooter-avatar {
    width: 36px;
    height: 36px;
  }
  .penalty-floating-btn {
    bottom: 18px;
    right: 18px;
    padding: 8px 14px 8px 10px;
  }
  .random-goal-floating-btn {
    bottom: 18px;
    left: 18px;
    padding: 8px 14px 8px 10px;
  }
  .penalty-ball-icon-wrap,
  .random-dice-icon-wrap {
    width: 38px;
    height: 38px;
    font-size: 1.25rem;
  }
  .penalty-title,
  .random-title {
    font-size: 0.8rem;
  }
  .penalty-subtitle,
  .random-subtitle {
    display: none;
  }
  .penalty-modal-dialog {
    height: 98vh;
    border-radius: 12px;
  }
  .penalty-arena-header {
    display: none !important;
  }
  .penalty-players-backdrop {
    height: 38%; /* Elevates goal post and green soccer field significantly */
  }
  .penalty-score-num {
    font-size: clamp(3.2rem, 11vw, 4.6rem);
    line-height: 0.9;
    letter-spacing: 2px;
  }
  .penalty-vs-divider {
    width: clamp(66px, 16vw, 86px);
    height: clamp(66px, 16vw, 86px);
    font-size: clamp(2rem, 5.5vw, 2.8rem);
    outline-width: 2px;
    outline-offset: 2px;
  }
  .penalty-score-draggable-badge {
    padding: 3px 14px;
    border-radius: 18px;
    background: rgba(6, 10, 20, 0.75);
    border: 2px solid var(--player-color, rgba(0, 240, 255, 0.5));
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.9), 0 0 25px rgba(var(--player-color-rgb, 0, 240, 255), 0.4);
  }
  .penalty-col-header {
    padding: 8px 10px;
  }
  .penalty-player-col:last-child .penalty-col-header {
    padding-right: 48px; /* Clean breathing room for close cross button */
  }
  .penalty-col-meta .player-name {
    font-size: 0.82rem;
    font-weight: 800;
  }
  .penalty-col-meta .player-tag {
    font-size: 0.58rem;
  }
  .penalty-outcome-banner {
    padding: 8px 24px;
    border-radius: 16px;
    top: 40%;
  }
  .penalty-outcome-banner .outcome-main-title {
    font-size: clamp(2.2rem, 7.5vw, 3.2rem);
  }
  .penalty-outcome-banner .outcome-player-credit {
    font-size: 0.85rem;
    letter-spacing: 1px;
  }
  .penalty-control-hint {
    font-size: 0.68rem;
    padding: 4px 12px;
    max-width: 90%;
    text-align: center;
  }
}

/* ==========================================================================
   Progressive Web App (PWA) Styling System
   ========================================================================== */

/* Universal hidden helper */
.hidden {
  display: none !important;
}

/* PWA Install Button in Toolbar */
.action-btn.pwa-install-btn {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.16) 0%, rgba(181, 55, 242, 0.22) 100%);
  border: 1px solid rgba(0, 240, 255, 0.5);
  color: #00f0ff;
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.25);
  font-weight: 700;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
  animation: pwaPulseGlow 3s infinite alternate ease-in-out;
}

.action-btn.pwa-install-btn:hover {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.3) 0%, rgba(181, 55, 242, 0.4) 100%);
  border-color: #00f0ff;
  color: #ffffff;
  box-shadow: 0 0 25px rgba(0, 240, 255, 0.5);
  transform: translateY(-2px);
}

@keyframes pwaPulseGlow {
  0% {
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
    border-color: rgba(0, 240, 255, 0.4);
  }
  100% {
    box-shadow: 0 0 22px rgba(181, 55, 242, 0.45), 0 0 10px rgba(0, 240, 255, 0.35);
    border-color: rgba(181, 55, 242, 0.7);
  }
}

/* PWA Offline / Connection Status Badge */
.pwa-offline-badge {
  display: none;
  align-items: center;
  gap: 7px;
  padding: 4px 12px;
  border-radius: 20px;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: all var(--transition-normal);
  white-space: nowrap;
}

.pwa-offline-badge.visible {
  display: inline-flex;
}

.pwa-offline-badge.offline {
  background: rgba(255, 119, 0, 0.16);
  border: 1px solid rgba(255, 119, 0, 0.5);
  color: #ffaa44;
  box-shadow: 0 0 14px rgba(255, 119, 0, 0.25);
}

.pwa-offline-badge.offline .offline-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #ff7700;
  box-shadow: 0 0 8px #ff7700;
  animation: offlineBlink 1.4s infinite;
}

.pwa-offline-badge.online-restored {
  background: rgba(5, 255, 161, 0.16);
  border: 1px solid rgba(5, 255, 161, 0.5);
  color: #05ffa1;
  box-shadow: 0 0 14px rgba(5, 255, 161, 0.3);
}

.pwa-offline-badge.online-restored .online-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #05ffa1;
  box-shadow: 0 0 8px #05ffa1;
}

@keyframes offlineBlink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.85); }
}

/* PWA Update Ready Toast Notification */
.pwa-update-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 100000;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  background: rgba(15, 19, 34, 0.95);
  border: 1px solid rgba(0, 240, 255, 0.4);
  border-radius: 14px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7), 0 0 25px rgba(0, 240, 255, 0.25);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transform: translateY(140%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.35s ease;
  max-width: 440px;
}

.pwa-update-toast.visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.pwa-toast-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pwa-toast-icon {
  font-size: 1.5rem;
  line-height: 1;
  filter: drop-shadow(0 0 8px #00f0ff);
}

.pwa-toast-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pwa-toast-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.92rem;
  color: #f3f6fc;
  letter-spacing: 0.5px;
}

.pwa-toast-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.pwa-update-btn {
  background: linear-gradient(135deg, #00f0ff 0%, #00a8ff 100%);
  color: #05070d;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 0.76rem;
  letter-spacing: 1px;
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.4);
}

.pwa-update-btn:hover {
  background: #ffffff;
  color: #05070d;
  box-shadow: 0 0 20px #00f0ff;
  transform: scale(1.05);
}

/* Transient Feedback Toast */
.pwa-transient-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(40px);
  background: rgba(18, 24, 40, 0.94);
  color: #f3f6fc;
  border: 1px solid rgba(0, 240, 255, 0.4);
  border-radius: 30px;
  padding: 10px 22px;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 18px rgba(0, 240, 255, 0.25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  z-index: 100001;
  transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.pwa-transient-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

@media (max-width: 768px) {
  .pwa-update-toast {
    left: 12px;
    right: 12px;
    bottom: 16px;
    max-width: none;
    padding: 12px 16px;
  }
}


