/* ==========================================================================
   GEZURTI PWA - MODERN DESIGN SYSTEM (VANILLA CSS)
   ========================================================================== */

:root {
  /* Colors */
  --bg-color-dark: #070913;
  --bg-color-medium: #0f132e;
  --bg-color-card: rgba(26, 32, 66, 0.6);
  --border-color: rgba(255, 255, 255, 0.08);
  
  --text-main: #f3f4f6;
  --text-muted: #9ea3c0;
  --text-dark: #060814;
  
  --color-primary: #ff1a75;    /* Neon Magenta for Liar / Gezurtia */
  --color-secondary: #FFEE00;  /* Brand Yellow */
  --color-accent: #facc15;     /* Gold/Amber */
  --color-success: #10b981;    /* Emerald for wins */
  --color-success-bg: rgba(16, 185, 129, 0.1);
  --color-danger-bg: rgba(239, 68, 68, 0.1);
  
  /* Fonts */
  --font-family: 'Atkinson Hyperlegible', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  
  /* Transitions */
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s ease-out;
}

/* Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-color-dark);
  color: var(--text-main);
  font-family: var(--font-family);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 16px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}

@media (min-width: 768px) {
  body {
    padding: 32px;
  }
}

/* Custom Selection Accent */
.selection-accent ::selection {
  background-color: var(--color-primary);
  color: #ffffff;
}

/* Skip link for keyboard-only users */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  background: var(--color-secondary);
  color: #ffffff;
  padding: 12px 24px;
  border-radius: 12px;
  z-index: 1000;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(168, 85, 247, 0.4);
  transition: top 0.25s ease;
}

.skip-link:focus {
  top: 16px;
  outline: 2px solid #ffffff;
}

/* Utility layout classes */
.space-y-2 > * + * { margin-top: 8px; }
.space-y-3 > * + * { margin-top: 12px; }
.space-y-4 > * + * { margin-top: 16px; }
.space-y-6 > * + * { margin-top: 24px; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.w-full { width: 100%; }
.hidden { display: none !important; }
.text-primary { color: var(--color-primary) !important; }
.text-secondary { color: var(--color-secondary) !important; }
.flex-row { display: flex; flex-direction: row; }
.flex-column { display: flex; flex-direction: column; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.items-center { align-items: center; }

/* --------------------------------------------------------------------------
   HEADER & FOOTER
   -------------------------------------------------------------------------- */
.main-header {
  width: 100%;
  max-width: 440px;
  margin: 0 auto 8px auto;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px 0 8px 0;
  position: relative;
}

.main-header .icon-button {
  position: absolute;
  right: 0;
}

.logo-area {
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-img {
  height: 80px;
  width: auto;
  display: block;
  border-radius: 16px;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
  transition: transform 0.2s ease;
}

.logo-img:hover {
  transform: scale(1.03);
}

.main-container {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  padding-top: 4px;
}

.main-footer {
  width: 100%;
  max-width: 440px;
  margin: 24px auto 0 auto;
  text-align: center;
  padding: 16px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  font-size: 12px;
  color: #9ca3af;
  line-height: 1.5;
}

.footer-credits {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 8px;
  margin: 0;
}

.footer-credits-sep {
  opacity: 0.45;
  user-select: none;
}

.footer-toki-link {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  line-height: 0;
  opacity: 0.88;
  transition: opacity 0.2s ease;
}

.footer-toki-link:hover {
  opacity: 1;
}

.footer-toki-link:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: 2px;
}

.footer-toki-logo {
  display: block;
  height: 18px;
  width: auto;
  max-width: 64px;
}

/* --------------------------------------------------------------------------
   SCREENS & BASIC COMPONENTS
   -------------------------------------------------------------------------- */
.screen {
  width: 100%;
  animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.title-main {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.text-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
  padding: 0 16px;
}

.title-section {
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Card Glass */
.card-glass {
  background: var(--bg-color-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  padding: 20px;
  border-radius: 20px;
  width: 100%;
}

.card-glass-mini {
  background: rgba(20, 26, 54, 0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border-color);
  padding: 12px;
  border-radius: 12px;
  width: 100%;
}

.card-title {
  font-size: 16px;
  font-weight: 700;
  color: #e5e7eb;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Pulsing Logo (Simplified to be static) */
.pulsing-logo-container {
  display: inline-flex;
  padding: 16px;
  background-color: rgba(255, 26, 117, 0.06);
  border-radius: 9999px;
  border: 1px solid rgba(255, 26, 117, 0.15);
  margin-bottom: 8px;
  box-shadow: 0 4px 20px rgba(255, 26, 117, 0.08);
}

.text-red-500 {
  color: var(--color-primary);
}

/* --------------------------------------------------------------------------
   INPUT CONTROLS & SETTINGS
   -------------------------------------------------------------------------- */
.setting-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.setting-label-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
}

.badge-value {
  font-weight: 700;
  color: var(--color-secondary);
}

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

.btn-control {
  width: 40px;
  height: 40px;
  background-color: #1a2042;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 20px;
  font-weight: bold;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.btn-control:hover {
  background-color: #262e5c;
}

.btn-control:active {
  background-color: #323d75;
  transform: scale(0.95);
}

/* Custom Accent Slider */
.slider-accent {
  flex-grow: 1;
  height: 8px;
  background: #1a2042;
  border-radius: 8px;
  outline: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.slider-accent::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--color-secondary);
  box-shadow: 0 0 10px rgba(255, 238, 0, 0.5);
  cursor: pointer;
  transition: var(--transition-fast);
}

.slider-accent::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

/* Setting rows */
.setting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 14px;
}

/* Toggle Group for Impostors */
.btn-toggle-group {
  display: flex;
  gap: 8px;
}

.btn-toggle {
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background-color: #1a2042;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-toggle:hover {
  background-color: #262e5c;
}

.btn-toggle.active {
  background-color: var(--color-primary);
  color: #ffffff;
  border-color: var(--color-primary);
  box-shadow: 0 0 10px rgba(255, 26, 117, 0.3);
}

/* Toggle Option with Checkbox Switch */
.setting-row-checkbox {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.checkbox-label-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: 80%;
}

.checkbox-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
}

.checkbox-description {
  font-size: 13px;
  color: #d1d5db;
  line-height: 1.4;
}

/* Switch Styles */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #1a2042;
  transition: .3s;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: var(--text-main);
  transition: .3s;
  border-radius: 50%;
}

.switch input:checked + .toggle-slider {
  background-color: var(--color-secondary);
}

.switch input:checked + .toggle-slider:before {
  background-color: #060814;
  transform: translateX(20px);
}

/* --------------------------------------------------------------------------
   BUTTONS
   -------------------------------------------------------------------------- */
.btn-primary {
  background: var(--color-primary);
  color: #ffffff;
  border: none;
  font-weight: 700;
  font-size: 16px;
  padding: 16px 24px;
  border-radius: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(255, 26, 117, 0.25);
  transition: var(--transition-smooth);
  width: 100%;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255, 26, 117, 0.35);
  filter: brightness(1.05);
}

.btn-primary:active {
  transform: scale(0.97);
}

.btn-secondary {
  flex: 1;
  background: rgba(26, 32, 66, 0.5);
  color: #e5e7eb;
  border: 1px solid var(--border-color);
  font-weight: 600;
  font-size: 15px;
  padding: 14px;
  border-radius: 16px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-secondary:hover {
  background: rgba(26, 32, 66, 0.8);
  border-color: rgba(255, 255, 255, 0.15);
}

.btn-secondary:active {
  transform: scale(0.97);
}

.button-row {
  display: flex;
  gap: 12px;
  width: 100%;
}

.button-row .btn-primary {
  flex: 1;
  padding: 14px;
}

.icon-button {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.icon-button:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.svg-icon {
  display: block;
}

/* Specific glows */
.bg-red-glow {
  background: var(--color-primary);
  box-shadow: 0 4px 15px rgba(255, 26, 117, 0.35);
}
.bg-red-glow:hover {
  box-shadow: 0 6px 20px rgba(255, 26, 117, 0.45);
}

.bg-green-glow {
  background: var(--color-success);
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.25);
}
.bg-green-glow:hover {
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35);
}

.btn-itsulapikoa {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: nowrap;
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  background: #FFEE00;
  color: #2a1045;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.2;
  text-decoration: none;
  border: 1px solid rgba(42, 16, 69, 0.12);
  box-shadow: 0 4px 14px rgba(255, 238, 0, 0.25);
  transition: var(--transition-smooth);
  -webkit-tap-highlight-color: transparent;
}

.btn-itsulapikoa-text {
  flex-shrink: 0;
}

.btn-itsulapikoa-logo {
  display: block;
  flex-shrink: 0;
  /*height: 22px;*/
  width: auto;
  /*max-width: min(108px, 42vw);*/
  object-fit: contain;
}

.btn-itsulapikoa:hover {
  filter: brightness(0.98);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(255, 238, 0, 0.35);
}

.btn-itsulapikoa:active {
  transform: scale(0.98);
}

.btn-itsulapikoa:focus-visible {
  outline: 2px solid #2a1045;
  outline-offset: 3px;
}

/* --------------------------------------------------------------------------
   PLAYER LISTS & SCROLLABLE ELEMENTS
   -------------------------------------------------------------------------- */
.scrollable-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 320px;
  overflow-y: auto;
  padding-right: 4px;
  width: 100%;
}

.max-h-medium {
  max-height: 300px;
}

.max-h-small {
  max-height: 220px;
}

/* Custom Scrollbar */
.scrollable-list::-webkit-scrollbar {
  width: 4px;
}

.scrollable-list::-webkit-scrollbar-track {
  background: transparent;
}

.scrollable-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
}

.scrollable-list::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Player Input Field Row */
.player-input-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(26, 32, 66, 0.4);
  padding: 8px 12px;
  border-radius: 14px;
  border: 1px solid var(--border-color);
  transition: var(--transition-smooth);
}

.player-input-row:focus-within {
  border-color: var(--color-secondary);
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.15);
}

.player-number-tag {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background-color: #1a2042;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--color-secondary);
  font-size: 14px;
}

.player-name-input {
  flex-grow: 1;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  outline: none;
  color: #ffffff;
  font-weight: 600;
  font-size: 14px;
  padding: 4px 8px;
  transition: var(--transition-fast);
}

.player-name-input:focus {
  border-bottom-color: var(--color-secondary);
}

/* --------------------------------------------------------------------------
   CARD DISTRIBUTION STYLES (3D FLIP)
   -------------------------------------------------------------------------- */
.badge-accent {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.badge-accent.bg-purple {
  background: rgba(26, 32, 66, 0.6);
  color: #9ea3c0;
  border: 1px solid var(--border-color);
}

.badge-accent.bg-red {
  background: rgba(255, 26, 117, 0.15);
  color: #fda4af;
  border: 1px solid rgba(255, 26, 117, 0.3);
}

/* 3D Perspective Card Container */
.perspective {
  perspective: 1200px;
  margin: 16px auto;
  width: 100%;
  max-width: 290px;
  height: 390px;
}

.card-container {
  cursor: pointer;
}

.card-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.card-flipped {
  transform: rotateY(180deg);
}

.card-front, .card-back {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.card-front {
  background-color: #121630;
  transform: rotateY(0deg);
  z-index: 2;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.card-icon-box {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  background-color: rgba(31, 41, 55, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.card-icon-box.bg-purple-glow {
  background-color: rgba(255, 238, 0, 0.04);
  border-color: rgba(255, 238, 0, 0.15);
  box-shadow: 0 0 15px rgba(255, 238, 0, 0.05);
}

.card-text-container {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}

.card-instruction {
  color: var(--text-muted);
  font-size: 14px;
}

.card-player-name {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.text-gradient-purple {
  color: var(--color-secondary);
}

.card-warning-text {
  font-size: 13px;
  color: #fda4af;
  font-weight: 500;
  line-height: 1.4;
  padding: 0 8px;
}

.btn-reveal-fake {
  display: block;
  width: 100%;
  padding: 12px 0;
  background-color: var(--color-secondary);
  color: #070913;
  font-weight: 700;
  font-size: 14px;
  border-radius: 12px;
  pointer-events: none;
}

/* Card Back Styles */
.card-back {
  background-color: #121630;
  border: 1px solid var(--border-color);
  transform: rotateY(180deg);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  z-index: 1;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Flipped states */
.card-flipped .card-front {
  z-index: 1;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.card-flipped .card-back {
  z-index: 2;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.card-back.liar-card-border {
  border-color: rgba(255, 26, 117, 0.4);
  background-color: #1a0812;
  box-shadow: 0 0 30px rgba(255, 26, 117, 0.15);
}

.card-role-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
}

.card-role-icon.bg-purple-dim {
  background-color: rgba(26, 32, 66, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: #9ea3c0;
}

.card-role-icon.bg-red-dim {
  background-color: rgba(255, 26, 117, 0.1);
  border: 1px solid rgba(255, 26, 117, 0.2);
  color: #fda4af;
}

.card-role-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.role-badge-tag {
  display: inline-block;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 1px;
  border-radius: 9999px;
  align-self: center;
}

.role-badge-tag.citizen-badge {
  background: rgba(26, 32, 66, 0.8);
  color: #9ea3c0;
  border: 1px solid var(--border-color);
}

.role-badge-tag.impostor-badge {
  background: rgba(255, 26, 117, 0.15);
  color: #fda4af;
  border: 1px solid rgba(255, 26, 117, 0.25);
}

.card-word-label {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 4px;
}

.card-secret-word {
  font-size: 34px;
  font-weight: 950;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.card-secret-word.word-citizen {
  color: #FFEE00;
}

.card-secret-word.word-impostor {
  color: #fda4af;
}

.card-word-explanation {
  font-size: 13px;
  color: #e2e8f0;
  background: rgba(26, 32, 66, 0.6);
  border: none;
  border-left: 3px solid var(--color-secondary);
  padding: 10px 14px;
  border-radius: 8px;
  margin-top: 8px;
  line-height: 1.5;
  text-align: left;
  max-width: 260px;
  align-self: center;
  font-weight: 500;
}

.card-role-description {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
  max-width: 240px;
}

.card-back.liar-card-border .card-role-description {
  color: #fda4af;
}

.btn-next-card {
  padding: 10px 24px;
  background-color: #1a2042;
  border: 1px solid var(--color-secondary);
  color: var(--color-secondary);
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: 10px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.card-back.liar-card-border .btn-next-card {
  background-color: #1a2042;
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.btn-next-card:hover {
  filter: brightness(1.1);
}

.text-tip {
  font-size: 13px;
  color: #9ca3af;
}

/* --------------------------------------------------------------------------
   GAMEPLAY SCREEN STYLES
   -------------------------------------------------------------------------- */
.starter-avatar {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background-color: rgba(255, 238, 0, 0.1);
  border: 1px solid rgba(255, 238, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.starter-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.starter-label {
  font-size: 13px;
  font-weight: 700;
  color: #FFEE00;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.starter-name {
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
}

.starter-description {
  font-size: 13px;
  color: var(--text-muted);
}

/* Timer Section */
.timer-label {
  font-size: 14px;
  color: var(--text-muted);
}

.timer-number {
  font-size: 48px;
  font-family: monospace;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 1px;
}

.timer-controls {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.btn-timer-play {
  padding: 8px 16px;
  background-color: var(--color-success);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #ffffff;
  font-weight: 700;
  font-size: 14px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-fast);
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.15);
}

.btn-timer-play:hover {
  background-color: #059669;
  box-shadow: 0 6px 14px rgba(16, 185, 129, 0.25);
}

.btn-timer-reset {
  padding: 8px 16px;
  background-color: rgba(17, 24, 39, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  font-size: 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-timer-reset:hover {
  color: #ffffff;
  background-color: rgba(17, 24, 39, 0.7);
}

/* --------------------------------------------------------------------------
   VOTING LIST STYLES
   -------------------------------------------------------------------------- */
.btn-vote-row {
  width: 100%;
  padding: 14px 18px;
  background-color: rgba(26, 32, 66, 0.5);
  color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition-smooth);
}

.btn-vote-row:hover {
  background-color: rgba(255, 26, 117, 0.04);
  border-color: rgba(255, 26, 117, 0.25);
}

.btn-vote-row:active {
  transform: scale(0.98);
}

.vote-player-name {
  font-weight: 700;
  font-size: 15px;
  transition: var(--transition-fast);
}

.btn-vote-row:hover .vote-player-name {
  color: #fda4af;
}

.vote-action-badge {
  font-size: 13px;
  font-weight: 600;
  padding: 4px 10px;
  background-color: #1a2042;
  color: var(--text-muted);
  border-radius: 8px;
  transition: var(--transition-smooth);
}

.btn-vote-row:hover .vote-action-badge {
  background-color: var(--color-primary);
  color: #ffffff;
}

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

.text-white {
  color: #ffffff;
}

/* --------------------------------------------------------------------------
   RESULTS SCREEN STYLES
   -------------------------------------------------------------------------- */
.result-badge-icon {
  display: inline-flex;
  padding: 24px;
  border-radius: 50%;
  margin-bottom: 8px;
  border: 1px solid transparent;
}

.result-badge-icon.win-glow {
  border-color: rgba(16, 185, 129, 0.25);
  background-color: rgba(16, 185, 129, 0.08);
  color: var(--color-success);
  animation: winPulse 3s infinite;
}

.result-badge-icon.lose-glow {
  border-color: rgba(255, 26, 117, 0.25);
  background-color: rgba(255, 26, 117, 0.08);
  color: var(--color-primary);
  animation: losePulse 3s infinite;
}

@keyframes winPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.2); }
  50% { box-shadow: 0 0 25px 8px rgba(16, 185, 129, 0.15); }
}

@keyframes losePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 26, 117, 0.2); }
  50% { box-shadow: 0 0 25px 8px rgba(255, 26, 117, 0.15); }
}

.result-title-text {
  font-size: 32px;
  font-weight: 900;
  letter-spacing: -0.5px;
}

.result-title-text.winner-citizens {
  color: var(--color-success);
}

.result-title-text.winner-impostors {
  color: var(--color-primary);
}

.result-description-text {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 320px;
  margin: 0 auto;
  line-height: 1.5;
}

.results-table-title {
  font-size: 14px;
  font-weight: 700;
  color: #e5e7eb;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 8px;
}

.results-table-rows {
  font-size: 14px;
}

.results-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.row-label {
  color: var(--text-muted);
}

.row-value {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.row-value.citizen-color {
  color: #FFEE00;
}

.row-value.impostor-color {
  color: #fda4af;
}

/* --------------------------------------------------------------------------
   REVEAL OVERLAY (DURING ELIMINATION)
   -------------------------------------------------------------------------- */
.reveal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(3, 7, 18, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  animation: overlayFadeIn 0.3s ease-out forwards;
}

@keyframes overlayFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.reveal-avatar-box {
  padding: 24px;
  border-radius: 50%;
  border-width: 2px;
  border-style: solid;
  margin-bottom: 16px;
}

.reveal-avatar-box.bg-red {
  background-color: rgba(255, 26, 117, 0.1);
  border-color: var(--color-primary);
  color: var(--color-primary);
  animation: bounce 0.8s infinite alternate;
}

.reveal-avatar-box.bg-purple {
  background-color: rgba(255, 238, 0, 0.1);
  border-color: var(--color-secondary);
  color: var(--color-secondary);
}

@keyframes bounce {
  from { transform: translateY(0); }
  to { transform: translateY(-12px); }
}

.reveal-title {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.reveal-title.role-impostor {
  color: var(--color-primary);
}

.reveal-title.role-citizen {
  color: #FFEE00;
}

.reveal-desc {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 260px;
  line-height: 1.5;
  margin-bottom: 24px;
}

.btn-reveal-action {
  padding: 14px 32px;
  background-color: #ffffff;
  color: #000000;
  font-weight: 800;
  border: none;
  font-size: 15px;
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.1);
  transition: var(--transition-smooth);
}

.btn-reveal-action:hover {
  transform: scale(1.05);
}

.btn-reveal-action:active {
  transform: scale(0.97);
}

/* --------------------------------------------------------------------------
   MODAL DIALOG (RULES)
   -------------------------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: overlayFadeIn 0.2s ease-out;
}

.modal-container {
  background-color: var(--bg-color-medium);
  border: 1px solid var(--border-color);
  width: 100%;
  max-width: 400px;
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  animation: modalScaleUp 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes modalScaleUp {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 12px;
  margin-bottom: 16px;
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-body {
  font-size: 14px;
  color: #d1d5db;
  line-height: 1.6;
  text-align: left;
  max-height: min(440px, 60vh) !important;
}

.modal-body p {
  margin-bottom: 12px;
}

.modal-body p:last-child {
  margin-bottom: 0;
}

.modal-body strong {
  color: #ffffff;
}

.modal-body em {
  color: var(--color-secondary);
  font-style: normal;
  font-weight: 600;
}

/* Accessibility support for prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-delay: 0s !important;
    animation-duration: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0s !important;
    scroll-behavior: auto !important;
  }
}

/* Clear outline for focus navigation */
button:focus-visible,
input:focus-visible,
[role="button"]:focus-visible,
[tabindex="0"]:focus-visible {
  outline: 3px solid var(--color-secondary) !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 0 6px rgba(255, 238, 0, 0.4) !important;
}
