/* TheWaiting.Games - Modern Minimalist Dark Theme */

/* ========================================
   BASE STYLES
   ======================================== */

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-secondary);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  max-width: 100vw;
}

/* ========================================
   TYPOGRAPHY
   ======================================== */

h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

/* ========================================
   GLASSMORPHISM COMPONENTS
   ======================================== */

.glass-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
}

.glass-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-medium);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

/* ========================================
   GAME CARDS
   ======================================== */

.game-card {
  position: relative;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 2px solid transparent;
  border-radius: var(--radius-lg);
  padding: var(--space-sm);
  cursor: pointer;
  transition: all var(--transition-normal);
  overflow: hidden;
}

.duration-badge {
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  background: var(--accent-gradient);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.2rem 0.4rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  z-index: 10;
  white-space: nowrap;
}

/* Collapsible game sections */
details summary {
  list-style: none;
  user-select: none;
  transition: all var(--transition-fast);
}

details summary::-webkit-details-marker {
  display: none;
}

details summary::before {
  content: '▶';
  display: inline-block;
  margin-right: 0.5rem;
  transition: transform var(--transition-fast);
  font-size: 0.7rem;
  color: var(--text-muted);
}

details[open] summary::before {
  transform: rotate(90deg);
}

details summary:hover {
  color: var(--text-primary);
}

/* Quick Play Button */
#quickPlayBtn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px 0 rgba(16, 185, 129, 0.6);
}

#quickPlayBtn:active:not(:disabled) {
  transform: translateY(0);
}

.game-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-xl);
  padding: 2px;
  background: linear-gradient(135deg, transparent, var(--border-subtle));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.5;
  transition: opacity var(--transition-normal);
}

.game-card:hover::before {
  opacity: 1;
}

.game-card:hover {
  transform: translateY(-4px) scale(1.02);
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  border-color: #10b981;
  box-shadow: var(--shadow-lg), 0 0 30px rgba(16, 185, 129, 0.4);
}

.game-card:hover h3,
.game-card:hover p,
.game-card:hover .game-card-icon {
  color: white !important;
}

.game-card:hover .duration-badge {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

.game-card.selected {
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.2), var(--shadow-glow);
  transform: scale(1.05);
}

.game-card-icon {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
  transition: transform var(--transition-slow);
  display: inline-block;
}

.game-card:hover .game-card-icon {
  transform: scale(1.15) rotate(5deg);
}

/* ========================================
   BUTTONS
   ======================================== */

button {
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  border: none;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  min-height: 44px;
  min-width: 44px;
  outline: none;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

.btn-primary {
  background: var(--accent-gradient);
  color: white;
  padding: var(--space-sm) var(--space-lg);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover:not(:disabled) {
  box-shadow: var(--shadow-md), var(--shadow-glow);
  transform: translateY(-2px);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  padding: var(--space-sm) var(--space-lg);
  border: 1px solid var(--border-subtle);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--bg-tertiary);
  border-color: var(--border-medium);
}

/* ========================================
   INPUTS
   ======================================== */

input[type="text"],
input[type="number"],
select {
  font-family: inherit;
  font-size: 1rem;
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-md);
  transition: all var(--transition-fast);
  min-height: 44px;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
  background: var(--bg-tertiary);
}

input::placeholder {
  color: var(--text-muted);
}

/* ========================================
   GAME BOARD
   ======================================== */

#gameBoard {
  user-select: none;
  -webkit-user-select: none;
}

#gameBoard button {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 1.5rem;
  font-weight: 700;
  transition: all var(--transition-fast);
}

#gameBoard button:hover:not(:disabled) {
  background: var(--bg-tertiary);
  transform: scale(1.05);
  box-shadow: var(--shadow-sm);
}

#gameBoard button:disabled {
  opacity: 1;
}

/* ========================================
   MODALS
   ======================================== */

.modal-backdrop {
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
}

.modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ========================================
   TOAST NOTIFICATIONS
   ======================================== */

#toast {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-md) var(--space-lg);
  box-shadow: var(--shadow-lg);
  animation: toastSlideIn 0.3s ease-out;
}

@keyframes toastSlideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ========================================
   HEADER
   ======================================== */

header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.9), rgba(59, 130, 246, 0.9));
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-md);
}

/* ========================================
   PLAYER INFO CARDS
   ======================================== */

.player-card {
  background: var(--glass-bg);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  transition: all var(--transition-fast);
}

.player-card.active {
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2), var(--shadow-glow);
  animation: playerPulse 2s infinite;
}

@keyframes playerPulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
}

/* ========================================
   STATUS INDICATORS
   ======================================== */

.status-waiting {
  color: var(--warning);
}

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

.status-finished {
  color: var(--info);
}

/* ========================================
   LEADERBOARD TABLE
   ======================================== */

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

th {
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-weight: 600;
  text-align: left;
  padding: var(--space-md);
  border-bottom: 2px solid var(--border-medium);
}

td {
  padding: var(--space-md);
  border-bottom: 1px solid var(--border-subtle);
}

tr:hover {
  background: var(--glass-bg);
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

.hidden {
  display: none !important;
}

.gradient-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ========================================
   SCROLLBAR
   ======================================== */

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-medium);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-purple);
}

/* ========================================
   ANIMATIONS
   ======================================== */

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

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

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

.animate-fade-in {
  animation: fadeIn var(--transition-normal);
}

.animate-slide-down {
  animation: slideDown var(--transition-slow);
}

.animate-bounce {
  animation: bounce 0.6s ease-in-out;
}

/* ========================================
   MOBILE RESPONSIVENESS
   ======================================== */

/* Tablets (portrait) and below */
@media (max-width: 820px) {
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }

  .modal-content {
    margin: 1rem;
    max-width: calc(100vw - 2rem) !important;
  }
}

/* Standard mobile devices */
@media (max-width: 768px) {
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.25rem; }
  h3 { font-size: 1.125rem; }

  .game-card {
    padding: var(--space-md);
  }

  .game-card-icon {
    font-size: 2rem;
  }

  #gameBoard button {
    font-size: 1.125rem;
  }

  .rps-choice {
    font-size: 2.5rem;
    padding: var(--space-lg);
  }

  table {
    font-size: 0.875rem;
  }

  th, td {
    padding: var(--space-sm);
  }

  .overflow-x-auto {
    -webkit-overflow-scrolling: touch;
  }
}

/* Small mobile devices (most phones) */
@media (max-width: 640px) {
  :root {
    --space-md: 0.75rem;
    --space-lg: 1rem;
    --space-xl: 1.5rem;
  }

  main {
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
  }

  .glass-card {
    padding: 0.5rem !important;
    margin-bottom: 0.5rem !important;
  }

  .game-card {
    padding: 0.4rem !important;
  }

  .game-card-icon {
    font-size: 1.5rem;
    margin-bottom: 0.125rem;
  }

  button {
    padding: 0.5rem 0.75rem !important;
    font-size: 0.875rem;
  }

  .btn-primary {
    padding: 0.5rem 0.75rem !important;
  }

  #quickPlayBtn {
    padding: 0.75rem !important;
    font-size: 0.875rem !important;
  }

  #showLeaderboardsBtn {
    padding: 0.6rem !important;
    font-size: 0.875rem !important;
  }

  #gameBoard {
    max-width: 100%;
    overflow: hidden;
  }

  #gameBoard button {
    font-size: 1rem;
  }

  .rps-choice {
    font-size: 2rem;
    padding: var(--space-md);
  }

  .simon-button {
    width: min(90px, 18vw);
    height: min(90px, 18vw);
  }

  /* Reduce logo size */
  img[alt="TheWaiting.Games"] {
    height: 1.5rem !important;
  }

  /* Make input fields more compact */
  input[type="text"],
  input[type="number"] {
    font-size: 0.875rem !important;
    padding: 0.5rem !important;
    min-height: 38px !important;
  }

  /* Compact the game code display */
  .text-4xl {
    font-size: 1.75rem !important;
  }

  .text-3xl {
    font-size: 1.5rem !important;
  }

  .text-2xl {
    font-size: 1.25rem !important;
  }

  .text-xl {
    font-size: 1.125rem !important;
  }

  .text-lg {
    font-size: 1rem !important;
  }

  /* Hide tagline to save space on mobile */
  .glass-card p.text-xs {
    font-size: 0 !important;
    line-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
  }

  .glass-card .mb-1 {
    margin-bottom: 0 !important;
  }

  /* Compact How to Play section */
  #howToPlaySection {
    padding: 0.4rem !important;
  }

  #howToPlaySection h3 {
    font-size: 0.75rem !important;
    margin-bottom: 0.25rem !important;
  }

  #howToPlayContent {
    font-size: 0.7rem !important;
    line-height: 1.3 !important;
  }

  /* Make game cards grid more compact */
  .grid {
    gap: 0.4rem !important;
  }

  /* Reduce space in game view */
  #gameView .glass-card {
    padding: 0.5rem !important;
  }

  /* Compact game board header */
  #gameView .mb-6 {
    margin-bottom: 0.75rem !important;
  }

  #gameView .pb-4 {
    padding-bottom: 0.5rem !important;
  }

  /* Compact lobby sections */
  #lobbyView .glass-card {
    padding: 0.5rem !important;
    margin-bottom: 0.5rem !important;
  }

  #lobbyView h2 {
    margin-bottom: 0.5rem !important;
  }

  /* Compact active games list */
  .active-game-item {
    padding: 0.4rem !important;
    margin-bottom: 0.25rem !important;
  }

  /* Quick Play button more compact */
  #quickPlayBtn span {
    gap: 0.4rem !important;
  }

  #quickPlayBtn .text-xs {
    display: none !important;
  }

  /* Compact game code section */
  #gameCode {
    font-size: 1.5rem !important;
    padding: 0.5rem 1rem !important;
  }

  /* Compact action buttons in game */
  #gameView button {
    padding: 0.5rem 0.75rem !important;
    font-size: 0.875rem !important;
  }

  /* Make copy/share buttons smaller */
  #copyCodeBtn,
  #shareCodeBtn {
    padding: 0.4rem 0.6rem !important;
    font-size: 0.75rem !important;
  }

  /* Compact action buttons */
  #callStartingBtn,
  #leaveGameBtn {
    padding: 0.6rem !important;
    font-size: 0.875rem !important;
  }

  /* Compact score/round display */
  #gameStatus {
    font-size: 0.875rem !important;
  }

  /* Player info cards more compact */
  #player1Info,
  #player2Info {
    padding: 0.5rem !important;
  }
}

/* Small phones (425px and below) */
@media (max-width: 425px) {
  h1 { font-size: 1.125rem !important; }
  h2 { font-size: 1rem !important; }
  h3 { font-size: 0.875rem !important; }

  main {
    padding: 0.4rem !important;
  }

  .glass-card {
    padding: 0.4rem !important;
    margin-bottom: 0.4rem !important;
  }

  .game-card {
    padding: 0.3rem !important;
  }

  .game-card-icon {
    font-size: 1.25rem;
  }

  .duration-badge {
    font-size: 0.55rem;
    padding: 0.125rem 0.3rem;
  }

  button {
    font-size: 0.8125rem !important;
    padding: 0.4rem 0.6rem !important;
  }

  #quickPlayBtn {
    padding: 0.6rem !important;
    font-size: 0.8125rem !important;
  }

  #showLeaderboardsBtn {
    padding: 0.5rem !important;
    font-size: 0.8125rem !important;
  }

  #gameBoard button {
    font-size: 0.875rem;
    padding: 0.4rem;
  }

  .rps-choice {
    font-size: 1.5rem;
    padding: 0.5rem;
  }

  .simon-button {
    width: min(75px, 18vw);
    height: min(75px, 18vw);
  }

  .tab-btn {
    font-size: 0.7rem;
    padding: 0.35rem 0.5rem;
  }

  table {
    font-size: 0.7rem;
  }

  th, td {
    padding: 0.3rem;
  }

  img[alt="TheWaiting.Games"] {
    height: 1.25rem !important;
  }

  input[type="text"],
  input[type="number"] {
    font-size: 0.8125rem !important;
    padding: 0.4rem !important;
    min-height: 36px !important;
  }

  .text-4xl {
    font-size: 1.5rem !important;
  }

  .text-3xl {
    font-size: 1.25rem !important;
  }

  .text-2xl {
    font-size: 1.125rem !important;
  }

  .text-xl {
    font-size: 1rem !important;
  }

  .text-lg {
    font-size: 0.9375rem !important;
  }

  .text-base {
    font-size: 0.875rem !important;
  }

  /* Player cards more compact */
  .player-card {
    padding: 0.5rem !important;
  }

  .player-card h3,
  .player-card p {
    font-size: 0.8125rem !important;
    word-break: break-word;
    overflow-wrap: break-word;
  }

  /* Mobile indicator for "you" player */
  .player-is-you {
    border: 2px solid var(--accent-purple) !important;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(59, 130, 246, 0.1) 100%) !important;
  }

  .player-is-you::before {
    content: '👤 ';
  }

  /* Reduce gap between elements */
  .gap-3 {
    gap: 0.5rem !important;
  }

  .gap-2 {
    gap: 0.375rem !important;
  }

  .mb-3 {
    margin-bottom: 0.5rem !important;
  }

  .mb-2 {
    margin-bottom: 0.4rem !important;
  }

  /* Add all the compact styles from 640px */
  #howToPlaySection {
    padding: 0.35rem !important;
  }

  #howToPlaySection h3 {
    font-size: 0.7rem !important;
    margin-bottom: 0.2rem !important;
  }

  #howToPlayContent {
    font-size: 0.65rem !important;
    line-height: 1.25 !important;
  }

  #lobbyView .glass-card,
  #gameView .glass-card {
    padding: 0.4rem !important;
    margin-bottom: 0.4rem !important;
  }

  #lobbyView h2 {
    margin-bottom: 0.4rem !important;
  }

  .active-game-item {
    padding: 0.35rem !important;
    margin-bottom: 0.2rem !important;
  }

  #gameCode {
    font-size: 1.25rem !important;
    padding: 0.4rem 0.75rem !important;
  }

  #copyCodeBtn,
  #shareCodeBtn {
    padding: 0.35rem 0.5rem !important;
    font-size: 0.7rem !important;
  }

  #gameView .mb-6 {
    margin-bottom: 0.5rem !important;
  }

  #gameView .pb-4 {
    padding-bottom: 0.4rem !important;
  }

  #quickPlayBtn .text-xs {
    display: none !important;
  }

  #callStartingBtn,
  #leaveGameBtn {
    padding: 0.5rem !important;
    font-size: 0.8125rem !important;
  }

  #gameStatus {
    font-size: 0.8125rem !important;
  }

  #player1Info,
  #player2Info {
    padding: 0.4rem !important;
  }
}

/* Very small phones (375px and below - iPhone SE) */
@media (max-width: 375px) {
  h1 { font-size: 1rem !important; }
  h2 { font-size: 0.9375rem !important; }
  h3 { font-size: 0.8125rem !important; }

  .game-card-icon {
    font-size: 1.125rem;
  }

  button {
    font-size: 0.75rem !important;
    padding: 0.35rem 0.5rem !important;
  }

  #quickPlayBtn {
    padding: 0.5rem !important;
    font-size: 0.75rem !important;
  }

  #showLeaderboardsBtn {
    padding: 0.45rem !important;
    font-size: 0.75rem !important;
  }

  .active-game-type {
    font-size: 0.65rem;
  }

  .active-game-players {
    font-size: 0.6rem;
  }

  .join-quick-btn {
    font-size: 0.65rem;
    padding: 0.2rem 0.5rem;
  }

  table {
    font-size: 0.65rem;
  }

  th, td {
    padding: 0.25rem;
  }

  img[alt="TheWaiting.Games"] {
    height: 1.125rem !important;
  }

  input[type="text"],
  input[type="number"] {
    font-size: 0.75rem !important;
    padding: 0.35rem !important;
    min-height: 34px !important;
  }

  .text-xs {
    font-size: 0.65rem !important;
  }

  /* Hide tagline on very small screens */
  .glass-card p.text-xs {
    display: none;
  }

  /* Super compact for tiny screens */
  #howToPlaySection {
    padding: 0.3rem !important;
  }

  #howToPlaySection h3 {
    font-size: 0.65rem !important;
  }

  #howToPlayContent {
    font-size: 0.6rem !important;
  }

  .glass-card {
    padding: 0.35rem !important;
    margin-bottom: 0.35rem !important;
  }

  #gameCode {
    font-size: 1.125rem !important;
    padding: 0.35rem 0.6rem !important;
  }

  #copyCodeBtn,
  #shareCodeBtn {
    padding: 0.3rem 0.45rem !important;
    font-size: 0.65rem !important;
  }

  .active-game-item {
    padding: 0.3rem !important;
  }

  #quickPlayBtn .text-xs {
    display: none !important;
  }

  #callStartingBtn,
  #leaveGameBtn {
    padding: 0.45rem !important;
    font-size: 0.75rem !important;
  }

  #gameStatus {
    font-size: 0.75rem !important;
  }

  #player1Info,
  #player2Info {
    padding: 0.35rem !important;
  }
}

/* ========================================
   FOCUS STATES (Accessibility)
   ======================================== */

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent-purple);
  outline-offset: 2px;
}

/* ========================================
   LOADING STATES
   ======================================== */

.loading {
  position: relative;
  pointer-events: none;
  opacity: 0.6;
}

.loading::after {
  content: '';
  position: absolute;
  inset: 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ========================================
   GAME-SPECIFIC STYLES
   ======================================== */

/* Tic Tac Toe */
.ttt-cell {
  aspect-ratio: 1;
  font-size: 2rem;
}

/* Connect 4 */
.c4-cell {
  aspect-ratio: 1;
  border-radius: 50%;
  margin: 2px;
}

.c4-red {
  background: radial-gradient(circle, #ef4444 0%, #dc2626 100%);
}

.c4-yellow {
  background: radial-gradient(circle, #f59e0b 0%, #d97706 100%);
}

/* Rock Paper Scissors */
.rps-choice {
  font-size: 3rem;
  padding: var(--space-xl);
  background: var(--glass-bg);
  border: 2px solid var(--border-subtle);
}

.rps-choice:hover {
  transform: scale(1.1);
  border-color: var(--accent-purple);
}

.rps-choice.selected {
  border-color: var(--accent-purple);
  box-shadow: var(--shadow-glow);
}

/* Simon Says */
.simon-button {
  width: min(120px, 20vw);
  height: min(120px, 20vw);
  border-radius: var(--radius-lg);
  transition: all 0.15s;
  opacity: 0.7;
}

.simon-button:hover {
  opacity: 1;
  transform: scale(1.05);
}

.simon-button.active {
  opacity: 1;
  transform: scale(1.1);
  box-shadow: 0 0 30px currentColor;
}

.simon-red { background-color: #dc2626; }
.simon-blue { background-color: #2563eb; }
.simon-green { background-color: #16a34a; }
.simon-yellow { background-color: #ca8a04; }

/* ========================================
   LEADERBOARD TABS
   ======================================== */

.leaderboard-tabs {
  -webkit-overflow-scrolling: touch;
}

.tab-btn {
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  border: 2px solid var(--border-subtle);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  min-height: auto;
}

.tab-btn:hover {
  background: var(--bg-tertiary);
  border-color: var(--border-medium);
  color: var(--text-primary);
}

.tab-btn.active {
  background: var(--accent-gradient);
  border-color: var(--accent-purple);
  color: white;
  box-shadow: var(--shadow-glow);
}

/* ========================================
   ACTIVE GAMES LIST
   ======================================== */

.active-game-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem;
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-fast);
}

.active-game-item:hover {
  background: var(--bg-tertiary);
  border-color: var(--border-medium);
  transform: translateX(2px);
}

.active-game-item.ready {
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
}

.active-game-item.my-game {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(59, 130, 246, 0.1) 100%);
  border-color: var(--accent-purple);
}

.active-game-info {
  flex: 1;
  min-width: 0;
}

.active-game-type {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.active-game-players {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.active-game-players.ready {
  color: var(--accent-purple);
  font-weight: 600;
}

.join-quick-btn {
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  border-radius: var(--radius-md);
  background: var(--accent-gradient);
  color: white;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-weight: 600;
  white-space: nowrap;
}

.join-quick-btn:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-glow);
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
  header,
  button,
  .glass-card {
    display: none;
  }
}
