/* ==========================================================================
   LEAGUE OF TRUCO - HEXTECH DESIGN SYSTEM (VANILLA CSS)
   ========================================================================== */

/* Font & Global Variables */
:root {
  --font-title: 'Cinzel', serif;
  --font-body: 'Inter', sans-serif;
  
  /* LoL Client Palette */
  --bg-darkest: #010a13;
  --bg-dark: #091420;
  --bg-medium: #0a0e15;
  --gold-dark: #c89b3c;
  --gold-light: #f0e6d2;
  --gold-glow: rgba(200, 155, 60, 0.4);
  --cyan-bright: #00eaef;
  --cyan-medium: #005a82;
  --cyan-glow: rgba(0, 234, 239, 0.35);
  --red-dark: #8c1616;
  --red-glow: rgba(140, 22, 22, 0.5);
  --border-gold: 2px solid var(--gold-dark);
  --border-cyan: 2px solid var(--cyan-medium);
  --text-primary: #f0e6d2;
  --text-muted: #a09b8c;
  
  /* Card Dimensions (62 x 95 mm physical proportions) */
  --card-width: 62mm;
  --card-height: 95mm;
}

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

body {
  background-color: #000;
  color: var(--text-primary);
  font-family: var(--font-body);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  overflow: hidden;
}

/* Base Window Container (similar to LoL Client frame) */
.lol-client-window {
  width: 100%;
  height: 100vh;
  height: 100dvh;
  background-color: var(--bg-darkest);
  border: none;
  box-shadow: none;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Font Helper Classes */
.font-cinzel {
  font-family: var(--font-title);
  letter-spacing: 0.1em;
}

.gold-text {
  color: var(--gold-dark);
}

/* ==========================================================================
   SCREEN MANAGEMENT
   ========================================================================== */
.client-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.client-screen.active {
  display: block;
  opacity: 1;
}

/* ==========================================================================
   LOBBY SCREEN
   ========================================================================== */
#lobby-screen {
  background: radial-gradient(circle, var(--bg-dark) 0%, var(--bg-darkest) 100%);
}

.lobby-background-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(0, 90, 130, 0.15) 0%, rgba(1, 10, 19, 0.4) 100%);
  z-index: 1;
}

.lobby-content {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2rem;
}

.lobby-header {
  margin-bottom: 3.5rem;
  text-align: center;
}

.game-logo {
  font-family: var(--font-title);
  font-size: 4rem;
  font-weight: 900;
  background: linear-gradient(to bottom, #fff 20%, #f0e6d2 50%, #c89b3c 80%, #785a28 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 25px rgba(200, 155, 60, 0.45);
  letter-spacing: 0.15em;
  margin-bottom: 0.5rem;
}

.game-subtitle {
  font-size: 1.1rem;
  color: var(--cyan-bright);
  text-shadow: 0 0 10px var(--cyan-glow);
}

.summoner-form-panel {
  background: rgba(9, 20, 32, 0.75);
  border: 1px solid var(--gold-dark);
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.6), 0 0 15px rgba(0, 0, 0, 0.5);
  padding: 2.5rem;
  border-radius: 4px;
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  backdrop-filter: blur(8px);
}

.input-container {
  width: 100%;
  margin-bottom: 2rem;
  position: relative;
  display: flex;
  flex-direction: column;
}

.input-label {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

#summoner-name {
  background-color: rgba(1, 10, 19, 0.85);
  border: 1px solid var(--cyan-medium);
  padding: 0.8rem 1rem;
  font-size: 1.1rem;
  color: #fff;
  border-radius: 2px;
  text-align: center;
  transition: border-color 0.3s, box-shadow 0.3s;
}

#summoner-name:focus {
  outline: none;
  border-color: var(--cyan-bright);
  box-shadow: 0 0 12px var(--cyan-glow);
}

/* Hextech Gold Button */
.lol-btn-gold {
  position: relative;
  background: linear-gradient(135deg, #1e2328 0%, #111317 100%);
  border: 1px solid var(--gold-dark);
  color: var(--gold-light);
  font-size: 1.1rem;
  font-weight: 700;
  padding: 0.9rem 2.2rem;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4), inset 0 0 8px rgba(200, 155, 60, 0.2);
  transition: all 0.2s ease-in-out;
}

.lol-btn-gold::before {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  bottom: -1px;
  border: 1px solid transparent;
  transition: border-color 0.3s;
}

.lol-btn-gold:hover {
  color: #fff;
  box-shadow: 0 4px 20px var(--gold-glow), inset 0 0 10px rgba(200, 155, 60, 0.4);
  transform: translateY(-1px);
}

.lol-btn-gold:active {
  transform: translateY(1px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}

.lol-btn-gold.decline {
  border-color: var(--red-dark);
  background: linear-gradient(135deg, #281e1e 0%, #171111 100%);
}

.lol-btn-gold.decline:hover {
  box-shadow: 0 4px 20px var(--red-glow);
}

.lobby-footer {
  margin-top: auto;
  color: var(--text-muted);
  font-size: 0.8rem;
  opacity: 0.8;
}

/* ==========================================================================
   SEARCHING / QUEUE SCREEN
   ========================================================================== */
#searching-screen {
  background: radial-gradient(circle, var(--bg-dark) 0%, var(--bg-darkest) 100%);
}

.queue-container {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.queue-ring-outer {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 2rem;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.7);
  background-color: var(--bg-darkest);
  border: 2px solid rgba(200, 155, 60, 0.1);
}

.queue-ring-spinner {
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border-radius: 50%;
  border: 4px solid transparent;
  border-top-color: var(--cyan-bright);
  border-bottom-color: var(--cyan-medium);
  animation: spin 3s linear infinite;
  box-shadow: 0 0 15px var(--cyan-glow);
}

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

.queue-ring-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

#queue-timer {
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.queue-status-text {
  font-size: 0.75rem;
  color: var(--cyan-bright);
  letter-spacing: 0.15em;
  margin-top: 0.3rem;
}

.queue-info-text {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 3rem;
}

/* ==========================================================================
   MATCH FOUND MODAL
   ========================================================================== */
.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(1, 10, 19, 0.4); /* transparent tint */
  z-index: 999;
  display: none;
  justify-content: center;
  align-items: flex-start; /* top align popups */
  padding-top: 5vh;
  backdrop-filter: none; /* remove blur to keep cards fully visible */
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

.modal-overlay.active {
  display: flex;
  opacity: 1;
}

/* ==========================================================================
   ACTION DIALOG (centered big text for truco/envido/quiero)
   ========================================================================== */
.action-dialog-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
  background: radial-gradient(circle at center, rgba(0,0,0,0.55), rgba(0,0,0,0.0) 70%);
}
.action-dialog-overlay.visible {
  opacity: 1;
}
.action-dialog-content {
  background: linear-gradient(145deg, rgba(20, 8, 40, 0.95), rgba(10, 4, 25, 0.95));
  border: 4px solid #d9b873;
  border-radius: 24px;
  padding: 2rem 4rem;
  box-shadow: 0 0 60px rgba(217, 184, 115, 0.7), inset 0 2px 0 rgba(255, 255, 255, 0.15);
  text-align: center;
  transform: scale(0.4);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.6);
  min-width: 320px;
}
.action-dialog-overlay.visible .action-dialog-content {
  transform: scale(1);
}
.action-dialog-text {
  font-family: 'Cinzel', serif;
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 900;
  color: #ffd54f;
  text-shadow: 0 0 30px rgba(255, 213, 79, 0.8), 0 4px 8px rgba(0, 0, 0, 0.6);
  letter-spacing: 0.08em;
  line-height: 1;
}
.action-dialog-subtitle {
  font-family: 'Cinzel', serif;
  font-size: clamp(1rem, 2vw, 1.4rem);
  color: #c0a062;
  margin-top: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.action-dialog-overlay.variant-quiero .action-dialog-text { color: #81c784; text-shadow: 0 0 30px rgba(129, 199, 132, 0.8), 0 4px 8px rgba(0, 0, 0, 0.6); }
.action-dialog-overlay.variant-no-quiero .action-dialog-text { color: #e57373; text-shadow: 0 0 30px rgba(229, 115, 115, 0.8), 0 4px 8px rgba(0, 0, 0, 0.6); }
.action-dialog-overlay.variant-retruco,
.action-dialog-overlay.variant-vale-cuatro { border-color: #ff8f00; }
.action-dialog-overlay.variant-retruco .action-dialog-text,
.action-dialog-overlay.variant-vale-cuatro .action-dialog-text { color: #ff8f00; text-shadow: 0 0 30px rgba(255, 143, 0, 0.9), 0 4px 8px rgba(0, 0, 0, 0.6); }
.action-dialog-overlay.variant-envido .action-dialog-text { color: #4fc3f7; text-shadow: 0 0 30px rgba(79, 195, 247, 0.8), 0 4px 8px rgba(0, 0, 0, 0.6); }
.action-dialog-overlay.variant-real-envido,
.action-dialog-overlay.variant-falta-envido { border-color: #4fc3f7; }
.action-dialog-overlay.variant-real-envido .action-dialog-text,
.action-dialog-overlay.variant-falta-envido .action-dialog-text { color: #4fc3f7; text-shadow: 0 0 30px rgba(79, 195, 247, 0.9), 0 4px 8px rgba(0, 0, 0, 0.6); }

.match-found-dialog {
  background-color: var(--bg-dark);
  border: 2px solid var(--gold-dark);
  box-shadow: 0 0 35px rgba(0, 0, 0, 0.9), 0 0 15px var(--gold-glow);
  width: 100%;
  max-width: 480px;
  padding: 2.5rem;
  border-radius: 4px;
  text-align: center;
  position: relative;
}

.hextech-border-top {
  position: absolute;
  top: 0;
  left: 10%;
  width: 80%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold-dark), transparent);
}

.modal-title {
  font-size: 1.8rem;
  color: var(--gold-light);
  margin-bottom: 0.5rem;
  text-shadow: 0 0 10px var(--gold-glow);
}

.modal-subtitle {
  color: var(--text-muted);
  margin-bottom: 1.8rem;
}

.accept-timer-bar {
  width: 100%;
  height: 4px;
  background-color: rgba(0, 0, 0, 0.6);
  margin-bottom: 1.8rem;
  border-radius: 2px;
  overflow: hidden;
}

.timer-fill {
  width: 100%;
  height: 100%;
  background-color: var(--cyan-bright);
  box-shadow: 0 0 8px var(--cyan-bright);
  transition: width 0.1s linear;
}

.players-accept-status {
  display: flex;
  justify-content: space-around;
  margin-bottom: 2rem;
}

.player-accept-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.indicator-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--cyan-medium);
  background-color: var(--bg-darkest);
  margin-bottom: 0.5rem;
  position: relative;
  transition: all 0.3s ease;
}

.player-accept-indicator.accepted .indicator-circle {
  border-color: var(--gold-dark);
  background-color: var(--gold-dark);
  box-shadow: 0 0 12px var(--gold-glow);
}

.player-accept-indicator.accepted .indicator-circle::before {
  content: '✓';
  color: var(--bg-darkest);
  font-size: 1.3rem;
  font-weight: bold;
  line-height: 40px;
}

.indicator-name {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.modal-actions {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

/* ==========================================================================
   GAME BOARD SCREEN
   ========================================================================== */
#game-screen {
  background-color: var(--bg-darkest);
}

.game-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  height: 100%;
  width: 100%;
}

@media (max-width: 900px) {
  .game-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }
}

/* Game Sidebar (Score & Log) */
.game-sidebar {
  background-color: var(--bg-dark);
  border-right: 2px solid var(--gold-dark);
  display: flex;
  flex-direction: column;
  padding: 1.2rem;
  height: 100%;
  overflow: hidden;
}

@media (max-width: 900px) {
  .game-sidebar {
    border-right: none;
    border-bottom: 2px solid var(--gold-dark);
    height: auto;
    max-height: 180px;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.scoreboard-panel {
  margin-bottom: 1.5rem;
}

@media (max-width: 900px) {
  .scoreboard-panel {
    margin-bottom: 0;
    flex-grow: 1;
    margin-right: 1.5rem;
  }
}

.score-header {
  font-size: 0.85rem;
  color: var(--gold-dark);
  border-bottom: 1px solid var(--gold-dark);
  padding-bottom: 0.3rem;
  margin-bottom: 0.8rem;
  text-align: center;
}

.scores-container {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

@media (max-width: 900px) {
  .scores-container {
    flex-direction: row;
    gap: 1rem;
  }
}

.score-card {
  background-color: rgba(1, 10, 19, 0.7);
  border: 1px solid var(--cyan-medium);
  padding: 0.5rem 0.8rem;
  border-radius: 2px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
}

.score-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.score-number {
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  text-align: right;
  grid-row: 1;
  grid-column: 2;
}

.score-bar-fill {
  grid-column: 1 / span 2;
  height: 3px;
  background-color: rgba(255, 255, 255, 0.1);
  margin-top: 0.3rem;
  border-radius: 1px;
  overflow: hidden;
}

.score-fill-inner {
  height: 100%;
  background-color: var(--gold-dark);
  transition: width 0.4s ease;
}

.log-panel {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background-color: rgba(1, 10, 19, 0.8);
  border: 1px solid rgba(200, 155, 60, 0.15);
  margin-bottom: 1rem;
}

@media (max-width: 900px) {
  .log-panel {
    display: none; /* Hide chat logs on mobile/tablets for vertical space */
  }
}

.panel-header {
  font-size: 0.75rem;
  color: var(--gold-light);
  background-color: rgba(200, 155, 60, 0.05);
  padding: 0.4rem;
  text-align: center;
  border-bottom: 1px solid rgba(200, 155, 60, 0.15);
}

.log-messages {
  padding: 0.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  height: 100%;
  scroll-behavior: smooth;
}

/* Custom scrollbar for Log Panel */
.log-messages::-webkit-scrollbar {
  width: 4px;
}
.log-messages::-webkit-scrollbar-track {
  background: transparent;
}
.log-messages::-webkit-scrollbar-thumb {
  background: var(--gold-dark);
  border-radius: 2px;
}

.log-messages div {
  padding: 2px 4px;
  border-radius: 2px;
  border-left: 2px solid transparent;
}

.log-messages div:first-child {
  color: #fff;
  border-left-color: var(--cyan-bright);
  background-color: rgba(0, 90, 130, 0.15);
}

.fold-btn {
  width: 100%;
  font-size: 0.9rem;
  padding: 0.7rem 0;
}

@media (max-width: 900px) {
  .fold-btn {
    width: auto;
    padding: 0.7rem 1.2rem;
  }
}

/* Main Game Arena */
.game-arena {
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 1.5rem;
  height: 100%;
  position: relative;
  background-color: #0b0f17;
  background-image: 
    radial-gradient(circle at center, rgba(14, 28, 48, 0.85) 0%, rgba(3, 7, 12, 0.98) 100%),
    linear-gradient(rgba(200, 155, 60, 0.025) 1.5px, transparent 1.5px),
    linear-gradient(90deg, rgba(200, 155, 60, 0.025) 1.5px, transparent 1.5px);
  background-size: auto, 50px 50px, 50px 50px;
  box-shadow: inset 0 0 100px rgba(0, 0, 0, 0.9);
}

.arena-top-bar, .arena-bottom-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1rem;
  z-index: 10;
}

/* Player Info Panel */
.player-info {
  display: flex;
  flex-direction: column; /* segmented HP bar above avatar */
  align-items: center;
  gap: 0.5rem;
  background: rgba(9, 20, 32, 0.8);
  border: 1px solid var(--cyan-medium);
  padding: 0.8rem 1rem;
  border-radius: 4px;
  min-width: 165px;
}

.player-info.player-self-info {
  border-color: var(--gold-dark);
  box-shadow: 0 0 10px rgba(200, 155, 60, 0.1);
}

.avatar-glow {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background-color: var(--bg-darkest);
  border: 2px solid var(--cyan-medium);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.player-self-info .avatar-glow {
  border-color: var(--gold-dark);
  box-shadow: 0 0 8px var(--gold-glow);
}

.name-status-group {
  display: flex;
  flex-direction: column;
}

.player-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--gold-light);
}

.turn-indicator {
  font-size: 0.65rem;
  color: var(--cyan-bright);
  letter-spacing: 0.05em;
  font-weight: bold;
  opacity: 0;
  transition: opacity 0.3s;
}

/* Activate state based on turn */
.player-self-info.active-turn .turn-indicator,
.opponent-info.active-turn .turn-indicator {
  opacity: 1;
}

.player-self-info.active-turn {
  border-color: var(--cyan-bright);
  box-shadow: 0 0 15px var(--cyan-glow);
}

/* Cards Container Hand */
.cards-container {
  display: flex;
  gap: 0.5rem;
}

#opponent-cards-hand {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%) scale(0.6);
  transform-origin: center top;
  display: flex;
  gap: 0.3rem;
  z-index: 10;
}

#my-cards-hand {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) translateY(30%);
  display: flex;
  gap: 0.5rem;
  z-index: 15;
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

#my-cards-hand .card-wrapper {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#my-cards-hand .card-wrapper:hover {
  transform: translateY(-12px) scale(1.04);
  box-shadow: 0 10px 25px rgba(0,0,0,0.8), 0 0 15px rgba(217, 184, 115, 0.4);
  z-index: 25;
}

/* ==========================================================================
   GAME TABLE
   ========================================================================== */
.arena-center-table {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.magic-circle-table {
  width: 360px; /* decreased from 440px to prevent overflow */
  height: 360px;
  border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, 0.08);
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: transparent;
  box-shadow: none;
}

.table-core-portal {
  display: none; /* remove background portal layer to de-emphasize table weight */
}

.played-cards-board {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  z-index: 5;
}

.played-cards-row {
  display: flex;
  gap: 0.8rem;
  justify-content: center;
}

.played-card-slot {
  width: 75px; /* scaled down from 100px to fit 360px table */
  height: 116px;
  border: 1px dashed rgba(200, 155, 60, 0.25);
  border-radius: 6px;
  background-color: rgba(1, 10, 19, 0.4);
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.8);
}

.slot-placeholder {
  font-size: 0.85rem;
  font-weight: bold;
  color: var(--text-muted);
  opacity: 0.25;
  text-align: center;
}

/* Drop Zone Highlight Overlay */
.drop-zone-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-color: rgba(0, 234, 239, 0.1);
  border: 2px solid var(--cyan-bright);
  box-shadow: inset 0 0 30px var(--cyan-glow), 0 0 20px var(--cyan-glow);
  z-index: 20;
  display: none;
  justify-content: center;
  align-items: center;
}

.drop-zone-overlay.active {
  display: flex;
  pointer-events: none; /* Allow card's mouseup to pass through */
}

.drop-text {
  font-size: 1.1rem;
  font-weight: bold;
  color: var(--cyan-bright);
  text-shadow: 0 0 10px var(--cyan-glow);
  animation: pulse 1.5s infinite;
}

/* Round Circles Indicators inside circle */
.round-indicators {
  position: absolute;
  bottom: 15px;
  display: flex;
  gap: 10px;
  z-index: 5;
}

.round-circle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--cyan-medium);
  background-color: var(--bg-darkest);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: bold;
  color: var(--text-muted);
  transition: all 0.3s ease;
}

.round-circle.won-self {
  border-color: var(--gold-dark);
  background-color: var(--gold-dark);
  color: var(--bg-darkest);
  box-shadow: 0 0 8px var(--gold-glow);
}

.round-circle.won-opp {
  border-color: var(--red-dark);
  background-color: var(--red-dark);
  color: #fff;
  box-shadow: 0 0 8px var(--red-glow);
}

.round-circle.won-draw {
  border-color: var(--text-muted);
  background-color: var(--text-muted);
  color: var(--bg-darkest);
}

/* ==========================================================================
   HUD & MY HAND BOTTOM BAR
   ========================================================================== */
.hud-center-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  height: calc(var(--card-height) * 0.7 + 55px);
  width: 100%;
  transition: height 0.3s ease;
}

.hud-center-controls:hover {
  height: calc(var(--card-height) + 55px);
}

.hud-center-controls:hover #my-cards-hand {
  transform: translateX(-50%) translateY(0%);
}

.action-buttons-group {
  position: absolute;
  bottom: calc(var(--card-height) * 0.7 + 15px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  gap: 0.5rem;
  opacity: 0.4;
  pointer-events: none;
  transition: opacity 0.3s, bottom 0.3s ease;
}

.hud-center-controls:hover .action-buttons-group {
  bottom: calc(var(--card-height) + 15px);
}

.action-buttons-group.active {
  opacity: 1;
  pointer-events: auto;
}

.hud-action-btn {
  background: rgba(9, 20, 32, 0.9);
  border: 1px solid var(--gold-dark);
  color: var(--gold-light);
  padding: 0.4rem 0.8rem;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  border-radius: 2px;
  transition: all 0.2s;
}

.hud-action-btn:hover {
  background-color: var(--gold-dark);
  color: var(--bg-darkest);
  box-shadow: 0 0 8px var(--gold-glow);
}

.hud-action-btn.truco-action {
  border-color: var(--cyan-bright);
  color: var(--cyan-bright);
}

.hud-action-btn.truco-action:hover {
  background-color: var(--cyan-bright);
  color: var(--bg-darkest);
  box-shadow: 0 0 8px var(--cyan-glow);
}

/* ==========================================================================
   SPANISH CARDS STYLING
   ========================================================================== */
.card-wrapper {
  width: var(--card-width);
  height: var(--card-height);
  border-radius: 6px;
  position: relative;
  container-type: size;
  cursor: grab;
  perspective: 1000px;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  user-drag: none;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

.card-wrapper img, .card-wrapper .card-face {
  -webkit-user-drag: none;
  user-drag: none;
  user-select: none;
  -webkit-user-select: none;
  pointer-events: none;
}

.card-wrapper:hover {
  transform: translateY(-10px) scale(1.05);
  box-shadow: 0 8px 20px rgba(0,0,0,0.6), 0 0 8px var(--gold-glow);
}

.card-wrapper.dragging {
  cursor: grabbing;
  opacity: 0.85;
  transform: scale(1.1) rotate(2deg);
  box-shadow: 0 15px 30px rgba(0,0,0,0.7), 0 0 15px var(--cyan-bright);
  transition: none;
  z-index: 100;
}

/* Card Back Design */
.card-back {
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, #0e2236 0%, #050e18 100%);
  border: 2px solid var(--cyan-medium);
  border-radius: 6px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  box-shadow: inset 0 0 15px rgba(0, 234, 239, 0.2);
}

/* Base skin (pastel background with transparent PNGs) */
.skin-base .card-face,
.skin-base2 .card-face {
  background-color: #f5f0e6 !important;
  border: none !important;
  box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.1) !important;
  position: relative;
}

.skin-base .card-pinta-border,
.skin-base2 .card-pinta-border {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.skin-base .card-index,
.skin-base2 .card-index {
  position: absolute;
  font-family: 'Cinzel', serif;
  font-weight: 700;
}

.skin-base .card-index-top,
.skin-base2 .card-index-top {
  top: 4px;
  left: 6px;
}

.skin-base .card-index-bottom,
.skin-base2 .card-index-bottom {
  bottom: 4px;
  right: 6px;
}

.skin-base .index-num,
.skin-base2 .index-num {
  font-size: 0.9rem;
}

.skin-base:hover,
.skin-base2:hover {
  transform: translateY(-10px) scale(1.05);
  box-shadow: 0 8px 25px rgba(0,0,0,0.3), 0 0 10px rgba(200, 184, 115, 0.3);
}

/* Custom LoL back crest logo */
.card-back::before {
  content: '';
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 1px solid var(--gold-dark);
  background-color: rgba(200, 155, 60, 0.05);
  box-shadow: 0 0 12px rgba(0, 234, 239, 0.4);
}

.card-back::after {
  content: 'L';
  position: absolute;
  font-family: var(--font-title);
  color: var(--gold-dark);
  font-size: 1.5rem;
  font-weight: 900;
  text-shadow: 0 0 6px var(--gold-glow);
}

/* Card Face Design */
/* Card Face Design (Abstract Minimalist Split-Circle) */
.card-face {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #0e131b 0%, #05080c 100%);
  border: 2px solid var(--gold-dark);
  border-radius: 6px;
  position: relative;
  box-shadow: inset 0 0 12px rgba(0,0,0,0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.card-abstract-circle {
  width: 60%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px solid var(--gold-dark);
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.4);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.3s ease;
}

/* Color codes and glows per suit */
.card-face.suit-espada {
  border-color: var(--cyan-bright);
  box-shadow: inset 0 0 15px rgba(0, 234, 239, 0.2), 0 0 10px rgba(0, 234, 239, 0.25);
}
.card-face.suit-espada .card-abstract-circle {
  border-color: var(--cyan-bright);
  box-shadow: 0 0 12px rgba(0, 234, 239, 0.3);
}

.card-face.suit-basto {
  border-color: #22c55e;
  box-shadow: inset 0 0 15px rgba(34, 197, 94, 0.2), 0 0 10px rgba(34, 197, 94, 0.25);
}
.card-face.suit-basto .card-abstract-circle {
  border-color: #22c55e;
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.3);
}

.card-face.suit-copa {
  border-color: #ef4444;
  box-shadow: inset 0 0 15px rgba(239, 68, 68, 0.2), 0 0 10px rgba(239, 68, 68, 0.25);
}
.card-face.suit-copa .card-abstract-circle {
  border-color: #ef4444;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.3);
}

.card-face.suit-oro {
  border-color: #fbbf24;
  box-shadow: inset 0 0 15px rgba(251, 191, 36, 0.2), 0 0 10px rgba(251, 191, 36, 0.25);
}
.card-face.suit-oro .card-abstract-circle {
  border-color: #fbbf24;
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.3);
}

/* Card inside a Slot (static size and centered) */
.played-card-slot .card-wrapper {
  cursor: default !important;
  pointer-events: none !important;
  width: 100% !important;
  height: 100% !important;
  left: 0 !important;
  top: 0 !important;
  transform: none !important; /* fills slot container cleanly */
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
  position: absolute;
}

/* ==========================================================================
   MODAL DIALOGS AND PENDING CALLS
   ========================================================================== */
.pending-call-dialog {
  background-color: var(--bg-dark);
  border: 2px solid var(--gold-dark);
  box-shadow: 0 0 35px rgba(0, 0, 0, 0.9), 0 0 15px var(--gold-glow);
  width: 100%;
  max-width: 480px;
  padding: 2.2rem;
  border-radius: 4px;
  text-align: center;
  position: relative;
}

.call-dialog-title {
  font-size: 1.6rem;
  color: var(--gold-light);
  margin-bottom: 0.5rem;
}

.call-dialog-subtitle {
  color: var(--text-muted);
  margin-bottom: 1.8rem;
  font-size: 0.9rem;
}

.call-response-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.counter-calls-container {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  width: 100%;
}

.counter-calls-container .lol-btn-gold {
  padding: 0.6rem 1.2rem;
  font-size: 0.85rem;
}

/* Envido Reveal Modal */
.envido-reveal-dialog {
  background-color: var(--bg-dark);
  border: 2px solid var(--gold-dark);
  box-shadow: 0 0 35px rgba(0, 0, 0, 0.9);
  padding: 2rem;
  border-radius: 4px;
  text-align: center;
  width: 100%;
  max-width: 400px;
}

.envido-showdown {
  display: flex;
  justify-content: space-around;
  align-items: center;
  margin: 1.5rem 0;
}

.envido-player-score {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.envido-player-name {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.envido-points {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--cyan-bright);
  text-shadow: 0 0 10px var(--cyan-glow);
}

.vs-divider {
  color: var(--gold-dark);
  font-size: 1.1rem;
}

.envido-result-msg {
  font-size: 1rem;
  color: var(--gold-light);
  margin-top: 1rem;
}

/* ==========================================================================
   GAME OVER SCREEN
   ========================================================================== */
#game-over-modal {
  background-color: rgba(1, 10, 19, 0.95);
}

.game-over-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.end-game-banner {
  margin-bottom: 2rem;
}

.splash-text {
  font-size: 5rem;
  font-weight: 900;
  letter-spacing: 0.2em;
  line-height: 1;
  background: linear-gradient(to bottom, #fff 0%, var(--gold-light) 40%, var(--gold-dark) 80%, #785a28 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 35px var(--gold-glow);
  animation: gold-shine 3s ease-in-out infinite alternate;
}

/* Victory/Defeat alternate color theme for banner */
#game-over-modal.defeat .splash-text {
  background: linear-gradient(to bottom, #fff 0%, #f1a5a5 40%, var(--red-dark) 80%, #4a0d0d 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 35px var(--red-glow);
}

@keyframes gold-shine {
  0% { filter: brightness(1); }
  100% { filter: brightness(1.2) drop-shadow(0 0 10px var(--gold-glow)); }
}

.game-over-stats {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 3.5rem;
}

/* ==========================================================================
   TOAST NOTIFICATION BANNER
   ========================================================================== */
.toast-notification {
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--red-dark);
  border: 1px solid var(--gold-dark);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.8), 0 0 10px var(--red-glow);
  padding: 0.8rem 2rem;
  font-size: 0.9rem;
  border-radius: 4px;
  color: #fff;
  z-index: 1000;
  transition: top 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast-notification.active {
  top: 20px;
}

/* ==========================================================================
   GENERIC KEYFRAME ANIMATIONS
   ========================================================================== */
.animate-fade-in {
  animation: fadeIn 0.8s ease-out forwards;
}

.animate-slide-up {
  animation: slideUp 0.8s cubic-bezier(0.19, 1, 0.22, 1) forwards;
}

.animate-scale-up {
  animation: scaleUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.1) forwards;
}

.animate-pulse {
  animation: pulse 2s infinite ease-in-out;
}

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

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

@keyframes scaleUp {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes pulse {
  0% { opacity: 0.6; }
  50% { opacity: 1; }
  100% { opacity: 0.6; }
}

/* Segmented Health Bar Style (LoL Vibe) */
.summoner-lifebar-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 5px;
}

.lifebar-value {
  font-family: var(--font-title);
  font-size: 0.65rem;
  color: var(--cyan-bright);
  text-align: center;
  letter-spacing: 0.05em;
  font-weight: bold;
}

.player-self-info .lifebar-value {
  color: var(--gold-light);
}

.summoner-lifebar {
  display: flex;
  height: 18px;
  background-color: transparent;
  border: none;
  overflow: visible;
  gap: 6px;
}

.life-segment {
  width: 12px;
  height: 12px;
  background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(200, 155, 60, 0.2);
  transform: rotate(45deg);
  margin-top: 3px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Green filled segment for player self */
.player-self-info .life-segment.filled {
  background: radial-gradient(circle, #22c55e 0%, #15803d 100%);
  border: 1px solid #4ade80;
  box-shadow: 0 0 10px #22c55e, 0 0 3px #22c55e;
}

/* Gold/Orange filled segment for opponent */
.opponent-info .life-segment.filled {
  background: radial-gradient(circle, #fbbf24 0%, #b45309 100%);
  border: 1px solid #fcd34d;
  box-shadow: 0 0 10px #fbbf24, 0 0 3px #fbbf24;
}

/* Envido Helper Display Panel Inside Response Overlay */
.envido-helper-panel {
  margin-top: 1.2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(200, 155, 60, 0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.helper-divider {
  width: 100px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-dark), transparent);
  margin-bottom: 0.8rem;
}

.helper-title {
  font-size: 0.8rem;
  color: var(--gold-dark);
  letter-spacing: 0.15em;
  margin-bottom: 0.6rem;
}

.envido-helper-cards {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 0.8rem;
}

/* Style for mini cards in helper overlay */
.envido-helper-cards .card-wrapper.mini-card {
  width: 58px;
  height: 90px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
  cursor: default;
  pointer-events: none;
}

.envido-helper-cards .card-wrapper.mini-card .card-face {
  padding: 4px;
}

.envido-helper-cards .card-wrapper.mini-card .index-num {
  font-size: 0.75rem;
}

.envido-helper-cards .card-wrapper.mini-card .suit-svg-large {
  width: 26px;
  height: 26px;
}

.envido-helper-cards .card-wrapper.mini-card .card-face::after {
  width: 8px;
  height: 8px;
  bottom: -4px;
  border-width: 1px;
}

.envido-helper-math {
  font-size: 0.75rem;
  color: var(--cyan-bright);
  text-shadow: 0 0 5px var(--cyan-glow);
  text-align: center;
}

/* Golden runic highlighting for Envido contributing cards in hand */
.envido-highlight {
  animation: envido-glow-anim 1.5s infinite alternate ease-in-out;
}

@keyframes envido-glow-anim {
  0% {
    box-shadow: 0 4px 10px rgba(0,0,0,0.5), 0 0 8px rgba(34, 197, 94, 0.4), inset 0 0 8px rgba(34, 197, 94, 0.2);
    transform: translateY(0);
  }
  100% {
    box-shadow: 0 10px 25px rgba(0,0,0,0.6), 0 0 20px rgba(34, 197, 94, 0.9), inset 0 0 12px rgba(34, 197, 94, 0.5);
    transform: translateY(-10px);
  }
}

/* ==========================================================================
   DYNAMIC CARD RENDERING & SKIN SYSTEM
   ========================================================================== */

/* Pinta border SVG overlay */
.card-pinta-border {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

/* Base style for dynamic rendered card face */
.dynamic-card-render .card-face {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 4cqw;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

/* Corner index: number only, positioned 8px inside the inner border */
.dynamic-card-render .card-index {
  position: absolute;
  z-index: 5;
  pointer-events: none;
  line-height: 1;
}

.dynamic-card-render .card-index-top {
  /* Inner border is 6 units from each edge (6% x, 6/150=4% y) + 8px padding */
  top: calc(4cqh + 8px);
  left: calc(6cqw + 8px);
}

.dynamic-card-render .card-index-bottom {
  bottom: calc(4cqh + 8px);
  right: calc(6cqw + 8px);
  transform: rotate(180deg);
}

.dynamic-card-render .index-num {
  font-size: 11cqw;
  font-weight: 800;
  font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  letter-spacing: -0.5cqw;
}

/* Central Graphic Container */
.card-center-graphic-container,
.card-illustration-container {
  position: absolute;
  top: 15cqh;
  bottom: 15cqh;
  left: 15cqw;
  right: 15cqw;
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none;
  z-index: 3;
}

.card-illustration-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Individual centered graphic items placed by absolute grid coordinates */
.centered-graphic-item {
  position: absolute;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 17.5cqw;
  height: 17.5cqw;
}

.centered-graphic-item svg,
.centered-graphic-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Blend settings for the Ancient paper images */
.ancient-center-image {
  width: 100% !important;
  height: 100% !important;
}

.ancient-mini-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  margin-top: 2px;
}

/* Court badges overlay (watermarks) for sota, caballo, rey */
.court-badge {
  position: absolute;
  width: 80%;
  height: 80%;
  top: 10%;
  left: 10%;
  opacity: 0.15;
  pointer-events: none;
  z-index: 1;
}

/* Symmetrical card back logo crest for skins */
.card-back-crest {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid;
  background-color: rgba(0, 0, 0, 0.4);
  display: flex;
  justify-content: center;
  align-items: center;
}

.card-back-letter {
  font-family: 'Cinzel', serif;
  font-size: 1.3rem;
  font-weight: 900;
}

/* ==========================================================================
   SKIN SPECIFIC OVERRIDES & TYPOGRAPHY
   ========================================================================== */

/* 1. Ancient Skin (Valencia 1778) & Ancient2 Skin (Con Aire) */
.skin-ancient .card-face,
.skin-ancient2 .card-face {
  border: none;
  box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.35);
  color: #3b2307 !important;
}
.skin-ancient .index-num,
.skin-ancient2 .index-num {
  text-shadow: none;
  font-weight: 900;
}
.skin-ancient .card-pinta-border path,
.skin-ancient2 .card-pinta-border path {
  opacity: 0.8;
  stroke-dasharray: none;
}
.skin-ancient:hover,
.skin-ancient2:hover {
  transform: translateY(-10px) scale(1.05);
  box-shadow: 0 8px 25px rgba(0,0,0,0.55), 0 0 10px rgba(217, 184, 115, 0.5);
}

/* 2. Hextech Skin (Default modern tech-magic) */
.skin-hextech .card-face {
  box-shadow: inset 0 0 10px rgba(0,0,0,0.6);
}
.skin-hextech:hover {
  box-shadow: 0 8px 20px rgba(0,0,0,0.6), 0 0 8px var(--gold-glow);
}

/* 3. PROJECT Skin (Cyberpunk Neon) */
.skin-project .card-face {
  border-width: 2px;
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.8);
}
.skin-project .index-num {
  font-weight: 800;
  letter-spacing: -1px;
}
.skin-project .card-back {
  background: linear-gradient(135deg, #181922 0%, #0d0e14 100%);
  border: 2.5px solid #ff6b00;
  box-shadow: inset 0 0 20px rgba(255, 107, 0, 0.3);
}
.skin-project:hover {
  transform: translateY(-10px) scale(1.05);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.7), 0 0 15px rgba(255, 107, 0, 0.6);
}

/* 4. Ruined Skin (Ghostly mist) */
.skin-ruined .card-face {
  box-shadow: inset 0 0 15px rgba(0, 255, 204, 0.15);
}
.skin-ruined .card-back {
  background: radial-gradient(circle, #091717 0%, #030808 100%);
  border: 2px solid #00ffcc;
  box-shadow: inset 0 0 15px rgba(0, 255, 204, 0.2);
}
.skin-ruined:hover {
  transform: translateY(-10px) scale(1.05);
  box-shadow: 0 8px 25px rgba(0,0,0,0.7), 0 0 15px rgba(0, 255, 204, 0.5);
}
.filter-spectral {
  filter: drop-shadow(0 0 3px rgba(0, 255, 204, 0.5));
}

/* 5. Elderwood Skin (Mystic nature) */
.skin-elderwood .card-face {
  box-shadow: inset 0 0 15px rgba(192, 132, 252, 0.15);
}
.skin-elderwood .card-back {
  background: linear-gradient(135deg, #11201d 0%, #060d0b 100%);
  border: 2px solid #c084fc;
  box-shadow: inset 0 0 15px rgba(192, 132, 252, 0.25);
}
.skin-elderwood:hover {
  transform: translateY(-10px) scale(1.05);
  box-shadow: 0 8px 25px rgba(0,0,0,0.65), 0 0 15px rgba(192, 132, 252, 0.55);
}

/* ==========================================================================
   MOBILE & RESPONSIVE LAYOUT OVERHAULS
   ========================================================================== */
@media (max-width: 768px) {
  :root {
    --card-width: 80px;
    --card-height: 123px; /* maintaining 62:95 aspect ratio */
  }

  .lol-client-window {
    height: 100vh;
    height: 100dvh;
    max-height: 100%;
    border: none;
  }

  /* Compact top utility sidebar */
  .game-sidebar {
    padding: 0.4rem 0.8rem;
    max-height: 54px;
    border-bottom: 1.5px solid var(--gold-dark);
    flex-direction: row !important;
    justify-content: space-between;
    align-items: center;
    background-color: #05080c;
  }

  .scoreboard-panel {
    margin-bottom: 0 !important;
    margin-right: 0 !important;
    flex-grow: unset !important;
  }

  .score-header {
    display: none !important;
  }

  .scores-container {
    flex-direction: row !important;
    gap: 1.2rem !important;
  }

  .score-card {
    padding: 0.2rem 0.5rem !important;
    min-width: unset !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: 0.4rem;
  }

  .score-label {
    font-size: 0.75rem !important;
    margin-bottom: 0 !important;
  }

  .score-number {
    font-size: 1.1rem !important;
  }

  .score-bar-fill {
    display: none !important;
  }

  .log-panel {
    display: none !important; /* Hide chat logs on mobile to clear screen space */
  }

  .fold-btn {
    margin-top: 0 !important;
    padding: 0.35rem 0.8rem !important;
    font-size: 0.7rem !important;
    height: unset !important;
    min-height: unset !important;
  }

  /* Game Arena Spacing */
  .game-arena {
    padding: 0.5rem;
    gap: 0.5rem;
  }

  .arena-top-bar, .arena-bottom-bar {
    flex-direction: column !important;
    padding: 0.2rem !important;
    gap: 0.4rem !important;
    width: 100%;
  }

  /* Horizontal Compact Player Info */
  .player-info {
    flex-direction: row !important;
    width: 100%;
    min-width: unset !important;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 0.8rem !important;
    gap: 0.5rem !important;
  }

  .summoner-lifebar-container {
    margin-bottom: 0 !important;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }

  .lifebar-value {
    font-size: 0.75rem !important;
  }

  .summoner-lifebar {
    gap: 2px !important;
  }

  .life-segment {
    width: 10px !important;
    height: 10px !important;
  }

  .avatar-glow {
    width: 32px !important;
    height: 32px !important;
    font-size: 0.95rem !important;
  }

  .name-status-group {
    text-align: right;
  }

  .player-name {
    font-size: 0.8rem !important;
  }

  .turn-indicator {
    font-size: 0.65rem !important;
  }

  #opponent-cards-hand {
    position: absolute;
    top: 6px !important;
    left: 50% !important;
    transform: translateX(-50%) scale(0.5) !important;
    transform-origin: center top !important;
    display: flex !important;
    gap: 0.2rem !important;
    z-index: 10 !important;
  }

  /* Scaled-down central table board */
  .magic-circle-table {
    width: 290px !important;
    height: 290px !important;
  }

  .played-card-slot {
    width: 58px !important;
    height: 90px !important;
  }

  .played-cards-row {
    gap: 0.4rem !important;
  }

  .slot-placeholder {
    font-size: 0.7rem !important;
  }

  .round-indicators {
    right: 6px !important;
    gap: 6px !important;
  }

  .round-circle {
    width: 20px !important;
    height: 20px !important;
    font-size: 0.7rem !important;
    line-height: 18px !important;
  }

  .hud-center-controls {
    height: auto !important;
    position: relative !important;
  }
  
  .hud-center-controls:hover {
    height: auto !important;
  }
  
  #my-cards-hand {
    position: relative !important;
    bottom: unset !important;
    left: unset !important;
    transform: none !important;
    margin-top: 5px;
  }
  
  .hud-center-controls:hover #my-cards-hand {
    transform: none !important;
  }
  
  .action-buttons-group {
    position: relative !important;
    bottom: unset !important;
    left: unset !important;
    transform: none !important;
    flex-wrap: wrap !important;
    justify-content: center;
    gap: 0.3rem !important;
    width: 100%;
  }
  
  .hud-center-controls:hover .action-buttons-group {
    bottom: unset !important;
  }

  .hud-action-btn {
    padding: 0.35rem 0.6rem !important;
    font-size: 0.7rem !important;
    min-width: 75px !important;
  }

  /* Modals */
  .lol-modal {
    width: 92% !important;
    padding: 20px 15px !important;
  }

  .modal-title {
    font-size: 1.5rem !important;
  }

  /* Envido Helper Mini-cards */
  .mini-card {
    width: 44px !important;
    height: 68px !important;
  }
}

@media (max-width: 480px) {
  .game-logo {
    font-size: 2.2rem !important;
  }
  .lobby-header {
    margin-bottom: 1.5rem !important;
  }
  .summoner-form-panel {
    padding: 1.5rem 1.2rem !important;
  }
  .input-container {
    margin-bottom: 1rem !important;
  }
}

