/* ============================================================================
   NUMBER ONE - Card Game Styling
   MathsVault Interactive Games
   ============================================================================ */

/* ============================================================================
   GAME MENU CUSTOMIZATION (Numero Uno)
   ============================================================================ */
:root {
    --game-primary: #E74C3C;
    --game-primary-dark: #C0392B;
    --game-secondary: #F1C40F;
}

/* Special title styling for Numero Uno */
.numero-uno-title {
    display: inline-flex;
    gap: 0.5rem;
    align-items: baseline;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: clamp(2.75rem, 6vw, 4.5rem);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    text-shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
}

.title-number {
    color: var(--colour-red);
}

.title-one {
    color: var(--colour-yellow);
    font-weight: 700;
}

.numero-uno-menu .game-menu-hero__title h1 {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.numero-uno-menu .game-menu-container {
    max-width: var(--menu-container-max, 1080px);
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.numero-uno-menu .game-menu-hero {
    display: flex;
    flex-direction: column;
    gap: 18px;
    text-align: center;
}

.numero-uno-menu .game-menu-hero__icon {
    font-size: 3rem;
    color: var(--colour-yellow);
    filter: drop-shadow(0 12px 28px rgba(241, 196, 15, 0.35));
}

.numero-uno-menu .game-menu-hero__subtitle {
    margin: 0 auto;
    max-width: 620px;
    font-size: 1.15rem;
    color: rgba(236, 240, 241, 0.85);
}

.numero-uno-menu .game-menu-hero__meta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.numero-uno-menu .game-menu-hero__meta div {
    background: rgba(44, 62, 80, 0.6);
    border-radius: 12px;
    padding: 0.75rem 1.25rem;
    border: 1px solid rgba(236, 240, 241, 0.12);
}

.numero-uno-menu .game-menu-hero__meta dt {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
    color: rgba(236, 240, 241, 0.65);
}

.numero-uno-menu .game-menu-hero__meta dd {
    margin: 0;
    font-weight: 600;
    color: #fff;
}

.numero-uno-menu .game-menu-stats .stat-card {
    background: rgba(44, 62, 80, 0.72);
    border-radius: 18px;
    border: 1px solid rgba(241, 196, 15, 0.25);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
}

.numero-uno-menu .game-menu-stats .stat-value {
    color: var(--colour-yellow);
}

.numero-uno-menu .game-menu-preview {
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.2) 0%, rgba(241, 196, 15, 0.2) 100%);
    border: 1px solid rgba(241, 196, 15, 0.35);
    box-shadow: 0 22px 48px rgba(0, 0, 0, 0.45);
}

.numero-uno-menu .game-menu-preview__badge {
    background: rgba(231, 76, 60, 0.75);
    color: #fff;
    box-shadow: 0 12px 28px rgba(231, 76, 60, 0.35);
}

.numero-uno-menu .game-menu-preview__date {
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
}

.numero-uno-menu .game-menu-preview__countdown,
.numero-uno-menu .game-menu-preview__extras li {
    color: rgba(236, 240, 241, 0.8);
}

.numero-uno-menu .game-menu-preview__extras li strong {
    color: rgba(241, 196, 15, 0.95);
}

.numero-uno-menu .game-menu-preview__status {
    color: var(--colour-red);
    background: rgba(231, 76, 60, 0.18);
    border: 1px solid rgba(231, 76, 60, 0.35);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.numero-uno-menu .game-menu-actions {
    gap: 18px;
}

.numero-uno-menu .game-menu-button.primary {
    background: linear-gradient(135deg, var(--colour-red) 0%, #c0392b 100%);
    border-color: rgba(231, 76, 60, 0.65);
    color: #fff;
}

.numero-uno-menu .game-menu-button.primary:hover {
    background: linear-gradient(135deg, #c0392b 0%, var(--colour-red) 100%);
    transform: translateY(-3px);
}

.numero-uno-menu .game-menu-button {
    background: rgba(44, 62, 80, 0.65);
    border: 1px solid rgba(236, 240, 241, 0.12);
    color: #ECF0F1;
}

.numero-uno-menu .game-menu-button:hover {
    border-color: rgba(241, 196, 15, 0.55);
    color: #fff;
}

.numero-uno-menu .game-menu-button.outline {
    border-color: rgba(236, 240, 241, 0.4);
}

.numero-uno-menu .game-menu-button.outline:hover {
    border-color: rgba(236, 240, 241, 0.8);
}

/* ============================================================================
   ROOT VARIABLES & RESET
   ============================================================================ */
:root {
    /* Game Colours */
    --colour-red: #E74C3C;
    --colour-yellow: #F1C40F;
    --colour-green: #27AE60;
    --colour-blue: #3498DB;
    
    /* UI Colours */
    --bg-primary: #2C3E50;
    --bg-secondary: #34495E;
    --bg-card: #FFFFFF;
    --text-light: #ECF0F1;
    --text-dark: #2C3E50;
    --border-colour: #7F8C8D;
    
    /* Card Dimensions - doubled for better visibility */
    --card-width: 180px;
    --card-height: 252px;
    --card-radius: 10px;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    
    /* Animation */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

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

body {
    font-family: 'Rockwell', 'Rockwell Nova', 'Roboto Slab', serif;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    color: var(--text-light);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Override when game menu is active */
body.game-menu-active {
    --menu-bg-image: url('/interactive/shared/backgrounds/numerouno.png');
}

/* ============================================================================
   SCREEN MANAGEMENT
   ============================================================================ */
.screen {
    display: none;
    min-height: 100vh;
    padding: var(--spacing-md);
}

.screen.active {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Override for game-menu-screen */
.game-menu-screen.active {
    display: flex !important;
}

/* ============================================================================
   MAIN MENU - Now using shared game-menu.css
   ============================================================================ */

/* Button styling for NON-menu screens (setup, lobby, etc.) */
.menu-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
    font-size: 1.1rem;
    font-family: inherit;
    background: var(--bg-secondary);
    color: var(--text-light);
    border: 2px solid var(--border-colour);
    border-radius: 12px;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.menu-button:hover {
    background: #3d566e;
    border-color: var(--colour-yellow);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.menu-button.primary {
    background: linear-gradient(135deg, var(--colour-red) 0%, #c0392b 100%);
    border-color: var(--colour-red);
    font-weight: bold;
}

.menu-button.primary:hover {
    background: linear-gradient(135deg, #c0392b 0%, var(--colour-red) 100%);
    transform: translateY(-2px) scale(1.02);
}

.button-icon {
    font-size: 1.5rem;
}

/* ============================================================================
   MULTIPLAYER LOBBY
   ============================================================================ */
.lobby-container {
    max-width: 900px;
    width: 100%;
    text-align: center;
}

.lobby-container h2 {
    color: var(--colour-yellow);
    margin-bottom: var(--spacing-xl);
    font-size: 2.5rem;
}

.lobby-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.lobby-card {
    background: var(--bg-secondary);
    padding: var(--spacing-xl);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    transition: all var(--transition-normal);
}

.lobby-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}

.lobby-card h3 {
    color: var(--colour-yellow);
    margin-bottom: var(--spacing-sm);
    font-size: 1.5rem;
}

.lobby-card p {
    margin-bottom: var(--spacing-md);
    opacity: 0.9;
}

.lobby-card .menu-button {
    width: 100%;
}

.game-code-input {
    width: 100%;
    padding: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
    font-size: 1rem;
    font-family: 'Courier New', monospace;
    text-align: center;
    text-transform: uppercase;
    background: var(--bg-primary);
    color: var(--text-light);
    border: 2px solid var(--border-colour);
    border-radius: 8px;
}

.game-code-input:focus {
    outline: none;
    border-color: var(--colour-yellow);
}

/* Waiting Room */
.waiting-container {
    max-width: 600px;
    width: 100%;
    background: var(--bg-secondary);
    padding: var(--spacing-xl);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    text-align: center;
}

.waiting-container h2 {
    color: var(--colour-yellow);
    margin-bottom: var(--spacing-lg);
}

.waiting-content {
    margin: var(--spacing-xl) 0;
}

.waiting-content p {
    font-size: 1.1rem;
    margin: var(--spacing-md) 0;
}

.game-code-display {
    margin: var(--spacing-lg) 0;
    padding: var(--spacing-lg);
    background: var(--bg-primary);
    border-radius: 12px;
}

.game-code-display.hidden {
    display: none;
}

.game-code {
    margin: var(--spacing-md) 0;
    padding: var(--spacing-md);
    background: var(--bg-secondary);
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 2rem;
    font-weight: bold;
    color: var(--colour-yellow);
    letter-spacing: 0.1em;
}

.players-waiting {
    margin-top: var(--spacing-lg);
}

.player-waiting-item {
    padding: var(--spacing-sm);
    margin: var(--spacing-xs) 0;
    background: var(--bg-primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
}

/* ============================================================================
   GAME SETUP
   ============================================================================ */
.setup-container {
    background: var(--bg-secondary);
    padding: var(--spacing-xl);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    max-width: 500px;
    width: 100%;
}

.setup-container h2 {
    text-align: center;
    margin-bottom: var(--spacing-lg);
    colour: var(--colour-yellow);
}

.setup-option {
    margin-bottom: var(--spacing-md);
}

.setup-option label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: bold;
}

.setup-select {
    width: 100%;
    padding: var(--spacing-sm);
    font-size: 1rem;
    font-family: inherit;
    background: var(--bg-primary);
    colour: var(--text-light);
    border: 2px solid var(--border-colour);
    border-radius: 8px;
    cursor: pointer;
}

.setup-buttons {
    display: flex;
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.setup-buttons .menu-button {
    flex: 1;
}

/* ============================================================================
   INSTRUCTIONS
   ============================================================================ */
.instructions-container {
    max-width: 800px;
    width: 100%;
    background: var(--bg-secondary);
    padding: var(--spacing-xl);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    max-height: 80vh;
    overflow-y: auto;
}

.instructions-container h2 {
    text-align: center;
    colour: var(--colour-yellow);
    margin-bottom: var(--spacing-lg);
}

.instructions-content {
    margin-bottom: var(--spacing-lg);
}

.instruction-section {
    margin-bottom: var(--spacing-lg);
}

.instruction-section h3 {
    colour: var(--colour-red);
    margin-bottom: var(--spacing-sm);
}

.instruction-section ul {
    list-style-position: inside;
    line-height: 1.8;
}

.instruction-section p {
    line-height: 1.6;
}

#btn-back-from-instructions {
    width: 100%;
}

/* ============================================================================
   GAME BOARD
   ============================================================================ */
#game-board {
    padding: 0;
    display: none;
}

#game-board.active {
    display: grid;
    grid-template-rows: auto 1fr auto 1fr auto;
    height: 100vh;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm);
    padding-top: 0.75rem; /* Small top padding */
    padding-left: 0; /* Remove left padding so player cards can span full width */
    padding-right: 0; /* Remove right padding so player cards can span full width */
    width: 100vw;
    max-width: 100vw;
}

/* Hide mobile burger when game header is showing */
body.with-game-header .mobile-burger-btn {
    display: none !important;
}

/* Top UI Bar - Removed (using game header instead) */
#game-ui-bar {
    display: none !important;
}

.ui-left, .ui-center, .ui-right {
    display: none !important;
}

.game-info {
    display: none !important;
}

.icon-button {
    display: none !important;
}

.uno-button {
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: 1rem;
    font-weight: bold;
    background: var(--colour-yellow);
    colour: var(--text-dark);
    border: 3px solid #f39c12;
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-fast);
    animation: pulse 2s infinite;
}

.uno-button:hover {
    background: #f39c12;
    transform: scale(1.05);
}

.uno-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    animation: none;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Opponent Area */
#opponent-area {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.opponent-info {
    text-align: center;
    white-space: nowrap;
}

/* Play Area (Centre) */
#play-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
}

#deck-area {
    display: flex;
    gap: var(--spacing-xl);
    align-items: center;
    justify-content: center;
}

.pile {
    position: relative;
    width: var(--card-width);
    height: var(--card-height);
}

#discard-pile .card {
    pointer-events: none; /* Discard pile cards aren't clickable */
}

#draw-pile {
    cursor: pointer;
    transition: transform var(--transition-fast);
    position: relative;
}

#draw-pile .stacked-card {
    pointer-events: none; /* Only the container is clickable */
}

#draw-pile:hover {
    transform: translateY(-5px);
}

#draw-pile:hover .stacked-card {
    transform: translate(var(--offset-x, 0), var(--offset-y, 0)) rotate(var(--rotation, 0)) translateY(-5px) !important;
}

.deck-count {
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-secondary);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: bold;
    z-index: 100; /* Ensure count stays on top of stack */
    pointer-events: none; /* Don't block clicking the pile */
}

/* Colour Indicator - Hidden (background color now indicates current colour) */
.colour-indicator {
    display: none !important;
}

.colour-display {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.colour-display.red { background: var(--colour-red); }
.colour-display.yellow { background: var(--colour-yellow); }
.colour-display.green { background: var(--colour-green); }
.colour-display.blue { background: var(--colour-blue); }

/* Player Area */
#player-area {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: var(--spacing-sm);
    width: 100%;
    max-width: 100%;
}

.player-info {
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
    position: relative;
    z-index: 10; /* Above colour word (z-index: 1) */
}

.player-name {
    font-weight: bold;
    font-size: 1.1rem;
}

.player-stats {
    display: flex;
    gap: var(--spacing-md);
    position: relative;
    z-index: 10; /* Above colour word (z-index: 1) */
}

/* Card count moved to game header - hide in-game displays */
.card-count {
    display: none !important;
}

/* Hide inline score displays - scores are now in game header */
.score-display {
    display: none !important;
}

/* Current Colour Display - Large Glass Effect Text */
.current-colour-display-large {
    position: fixed;
    top: 35%; /* Halfway between old (50%) and current (20%) */
    left: 2rem;
    transform: translateY(-50%);
    z-index: 1; /* Behind all playable elements */
    pointer-events: none;
    user-select: none;
    transition: all 0.5s ease;
}

.current-colour-display-large.hidden {
    display: none;
}

#current-colour-text {
    display: block !important;
    font-family: "Rockwell", "Rockwell Nova", "Roboto Slab", serif !important;
    font-size: clamp(3.6rem, 10.8vw, 9rem) !important; /* 10% smaller (0.9x) */
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.1em !important;
    color: rgba(255, 255, 255, 0.9) !important;
    text-shadow: 
        0 0 30px rgba(255, 255, 255, 0.8),
        0 0 60px rgba(255, 255, 255, 0.6),
        0 0 90px rgba(255, 255, 255, 0.4),
        2px 2px 10px rgba(0, 0, 0, 0.6),
        -2px -2px 10px rgba(255, 255, 255, 0.3) !important;
    filter: blur(0.5px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    backdrop-filter: blur(10px) !important;
    transition: all 0.5s ease !important;
}

/* Colour-specific glass text effects */
.current-colour-display-large[data-colour="red"] #current-colour-text {
    color: rgba(231, 76, 60, 0.95) !important;
    text-shadow: 
        0 0 30px rgba(231, 76, 60, 0.9),
        0 0 60px rgba(231, 76, 60, 0.7),
        0 0 90px rgba(231, 76, 60, 0.5),
        2px 2px 10px rgba(0, 0, 0, 0.6),
        -2px -2px 10px rgba(231, 76, 60, 0.4) !important;
}

.current-colour-display-large[data-colour="yellow"] #current-colour-text {
    color: rgba(241, 196, 15, 0.95) !important;
    text-shadow: 
        0 0 30px rgba(241, 196, 15, 0.9),
        0 0 60px rgba(241, 196, 15, 0.7),
        0 0 90px rgba(241, 196, 15, 0.5),
        2px 2px 10px rgba(0, 0, 0, 0.6),
        -2px -2px 10px rgba(241, 196, 15, 0.4) !important;
}

.current-colour-display-large[data-colour="green"] #current-colour-text {
    color: rgba(39, 174, 96, 0.95) !important;
    text-shadow: 
        0 0 30px rgba(39, 174, 96, 0.9),
        0 0 60px rgba(39, 174, 96, 0.7),
        0 0 90px rgba(39, 174, 96, 0.5),
        2px 2px 10px rgba(0, 0, 0, 0.6),
        -2px -2px 10px rgba(39, 174, 96, 0.4) !important;
}

.current-colour-display-large[data-colour="blue"] #current-colour-text {
    color: rgba(52, 152, 219, 0.95) !important;
    text-shadow: 
        0 0 30px rgba(52, 152, 219, 0.9),
        0 0 60px rgba(52, 152, 219, 0.7),
        0 0 90px rgba(52, 152, 219, 0.5),
        2px 2px 10px rgba(0, 0, 0, 0.6),
        -2px -2px 10px rgba(52, 152, 219, 0.4) !important;
}

/* Card Container */
.card-container {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
    justify-content: center;
    padding: var(--spacing-sm);
    position: relative;
    min-height: 150px; /* Allow space for rotated cards */
}

/* Player hand container - override gap */
#player-hand.card-container {
    gap: 0 !important; /* No gap - spacing handled by JavaScript marginLeft */
}

/* Player hand - always single line, no wrapping, full width */
#player-hand.card-container {
    flex-wrap: nowrap;
    overflow-x: hidden;
    justify-content: flex-start;
    width: 100%;
    max-width: 100%;
    padding-left: calc(var(--card-width)); /* 1 card width padding on left */
    padding-right: calc(var(--card-width)); /* 1 card width padding on right */
    margin-left: 0;
    margin-right: 0;
    gap: 0 !important; /* Remove gap - we use marginLeft for spacing/overlap */
}

/* Opponent cards - 25% size for all screen types except mobile */
#opponent-hand .card {
    width: calc(var(--card-width) * 0.25) !important;
    height: calc(var(--card-height) * 0.25) !important;
    font-size: 1rem !important; /* Scaled down font */
}

#opponent-hand .card-value {
    font-size: 1.25rem !important; /* Scaled down */
}

#opponent-hand .card-symbol {
    font-size: 0.75rem !important; /* Scaled down */
}

/* ============================================================================
   CARD STYLING
   ============================================================================ */
.card {
    width: var(--card-width);
    height: var(--card-height);
    background: var(--bg-card);
    border-radius: var(--card-radius);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    position: relative;
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 4rem; /* Doubled from 2rem for doubled card size */
    font-weight: bold;
    transform-origin: center center;
}

.card:hover {
    transform: translateY(-10px) rotate(0deg) !important;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
    z-index: 100;
}

.card.playable {
    border: 3px solid var(--colour-yellow);
    animation: glow 1.5s infinite;
}

@keyframes glow {
    0%, 100% { box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); }
    50% { box-shadow: 0 4px 16px rgba(241, 196, 15, 0.6); }
}

.card.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.card.disabled:hover {
    transform: none;
}

/* Card Back */
.card-back {
    background: linear-gradient(135deg, var(--colour-red) 0%, #c0392b 100%);
    color: var(--colour-yellow);
    font-size: 3rem;
    cursor: default;
    position: relative;
    overflow: hidden;
}

.card-back.with-image {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.card-back.with-image .card-logo {
    display: none; /* Hide text when image is present */
}

.card-logo {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* Card Colours */
.card.red { 
    border-top: 8px solid var(--colour-red); 
    color: var(--colour-red); 
    background: var(--bg-card);
}
.card.yellow { 
    border-top: 8px solid var(--colour-yellow); 
    color: var(--colour-yellow); 
    background: var(--bg-card);
}
.card.green { 
    border-top: 8px solid var(--colour-green); 
    color: var(--colour-green); 
    background: var(--bg-card);
}
.card.blue { 
    border-top: 8px solid var(--colour-blue); 
    color: var(--colour-blue); 
    background: var(--bg-card);
}
.card.wild { 
    background: linear-gradient(135deg, var(--colour-red) 0%, var(--colour-yellow) 25%, var(--colour-green) 50%, var(--colour-blue) 75%); 
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

/* Card Value - scaled for doubled card size */
.card-value {
    font-size: 5rem;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.5);
    font-weight: bold;
}

.card-symbol {
    font-size: 3rem;
    margin-top: var(--spacing-xs);
    text-align: center;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.5);
}

/* Image-based cards */
.card.card-image {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 0;
}

.card.card-image .card-value,
.card.card-image .card-symbol {
    display: none;
}

/* ============================================================================
   MODALS
   ============================================================================ */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    max-width: 500px;
    width: 90%;
    text-align: center;
    position: relative;
    animation: slideUp 0.4s ease-out;
    color: var(--text-dark);
}

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

/* Colour Picker Modal */
.colour-picker h3 {
    margin-bottom: var(--spacing-md);
    color: var(--text-dark);
}

.hand-colour-summary {
    margin-bottom: var(--spacing-lg);
    padding: var(--spacing-md);
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px solid #dee2e6;
}

.summary-label {
    font-weight: bold;
    margin-bottom: var(--spacing-sm);
    color: var(--text-dark);
}

.colour-counts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-sm);
}

.colour-count-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem;
    color: var(--text-dark);
}

.colour-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.colour-dot.red { background: var(--colour-red); }
.colour-dot.yellow { background: var(--colour-yellow); }
.colour-dot.green { background: var(--colour-green); }
.colour-dot.blue { background: var(--colour-blue); }

.colour-count-label {
    font-size: 0.9rem;
    color: var(--text-dark);
}

.summary-hint {
    font-size: 0.85rem;
    font-style: italic;
    color: #666;
    margin-top: var(--spacing-sm);
    margin-bottom: 0;
    text-align: center;
}

.colour-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
}

.colour-option {
    padding: var(--spacing-lg);
    font-size: 1.2rem;
    font-weight: bold;
    border: 3px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: all var(--transition-normal);
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.colour-option.red { background: var(--colour-red); }
.colour-option.yellow { 
    background: var(--colour-yellow); 
    color: var(--text-dark);
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.5);
}
.colour-option.green { background: var(--colour-green); }
.colour-option.blue { background: var(--colour-blue); }

.colour-option:hover {
    border-color: white;
    transform: scale(1.05);
}

.colour-option .option-name {
    font-size: 1.2rem;
}

.colour-option .option-count {
    font-size: 1.5rem;
    font-weight: bold;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
}

.colour-option.yellow .option-count {
    background: rgba(255, 255, 255, 0.3);
}

/* Round End Modal */
.round-summary h2 {
    color: var(--colour-green);
    margin-bottom: var(--spacing-lg);
    font-size: 2rem;
    font-weight: bold;
}

#round-results {
    margin: var(--spacing-lg) 0;
    padding: var(--spacing-lg);
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px solid var(--colour-green);
}

#round-results h3 {
    color: var(--text-dark);
    font-size: 1.3rem;
    margin-bottom: var(--spacing-sm);
}

#round-results p {
    font-size: 1.1rem;
    margin: var(--spacing-xs) 0;
    color: var(--text-dark);
}

/* Game Over Modal */
.game-over h2 {
    margin-bottom: var(--spacing-lg);
    font-size: 2.5rem;
    font-weight: bold;
}

#game-over-results {
    margin: var(--spacing-lg) 0;
    padding: var(--spacing-lg);
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px solid var(--colour-blue);
}

#game-over-results h3 {
    color: var(--text-dark);
    font-size: 1.3rem;
    margin-bottom: var(--spacing-sm);
}

#game-over-results p {
    font-size: 1.1rem;
    margin: var(--spacing-xs) 0;
    color: var(--text-dark);
}

.game-over-buttons {
    display: flex;
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.game-over-buttons .menu-button {
    flex: 1;
}

/* Settings Modal */
.settings-panel h2 {
    color: var(--colour-blue);
    margin-bottom: var(--spacing-md);
}

.settings-options {
    margin-bottom: var(--spacing-lg);
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
    background: #f8f9fa;
    border-radius: 6px;
    color: var(--text-dark);
}

.setting-item label {
    color: var(--text-dark);
    font-weight: 500;
}

.setting-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* Game Message */
.game-message {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: var(--spacing-sm) var(--spacing-lg);
    background: var(--colour-yellow);
    colour: var(--text-dark);
    font-weight: bold;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: opacity var(--transition-normal);
    pointer-events: none;
}

.game-message.show {
    opacity: 1;
}

/* Hint Display */
.hint-display {
    position: fixed;
    top: 80px;
    right: 20px;
    max-width: 350px;
    padding: var(--spacing-md);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
    animation: slideInRight 0.4s ease-out;
    z-index: 500;
}

.hint-display.hidden {
    display: none;
}

.hint-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.hint-text {
    flex: 1;
    line-height: 1.5;
    font-size: 0.95rem;
}

.hint-close {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background var(--transition-fast);
    flex-shrink: 0;
}

.hint-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

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

/* ============================================================================
   MOBILE-SPECIFIC COMPONENTS (hidden on desktop)
   ============================================================================ */
.mobile-burger-btn {
    display: none;
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 1001;
    background: var(--colour-red);
    border: none;
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    flex-direction: column;
    gap: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.3s;
}

.mobile-burger-btn span {
    display: block;
    width: 24px;
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s;
}

.mobile-burger-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-burger-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-burger-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

.mobile-drawer-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-in-out;
}

.mobile-drawer-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.mobile-drawer {
    display: none;
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 320px;
    height: 100%;
    background: white;
    z-index: 1000;
    overflow-y: auto;
    box-shadow: -4px 0 12px rgba(0, 0, 0, 0.2);
    transition: right 0.3s ease-in-out;
}

.mobile-drawer.open {
    right: 0;
}

.mobile-drawer-header {
    background: var(--colour-red);
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
}

.mobile-drawer-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: white;
}

.close-drawer-btn {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.close-drawer-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.mobile-drawer-content {
    padding: 1rem;
}

.drawer-section {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px solid #dee2e6;
    color: var(--text-dark);
}

.drawer-section h3 {
    color: var(--colour-red);
    margin-bottom: 0.75rem;
    font-size: 1.2rem;
}

.drawer-section p {
    color: var(--text-dark);
    margin: 0.5rem 0;
}

.drawer-section.controls {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.drawer-section.controls .menu-button {
    width: 100%;
}

.mobile-scoreboard {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 3px solid var(--colour-red);
    padding: 0.75rem 1rem;
    z-index: 998;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.15);
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
}

.mobile-score-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.mobile-score-item .score-label {
    font-size: 0.75rem;
    color: #666;
    font-weight: bold;
    text-transform: uppercase;
}

.mobile-score-item .score-number {
    font-size: 1.5rem;
    font-weight: bold;
}

.mobile-score-item .player-score-mobile {
    color: var(--colour-green);
}

.mobile-score-item .ai-score-mobile {
    color: var(--colour-red);
}

.mobile-uno-button {
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    font-weight: bold;
    background: var(--colour-yellow);
    color: var(--text-dark);
    border: 2px solid #f39c12;
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.mobile-uno-button:hover {
    background: #f39c12;
}

.mobile-uno-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.desktop-only {
    display: block;
}

/* ============================================================================
   RESPONSIVE DESIGN
   ============================================================================ */
@media (max-width: 1200px) {
    :root {
        --card-width: 150px;
        --card-height: 210px;
    }
    
    .game-title {
        font-size: 3rem;
    }
    
    /* Opponent cards remain 25% of current size */
    #opponent-hand .card {
        width: calc(var(--card-width) * 0.25);
        height: calc(var(--card-height) * 0.25);
    }
}

@media (max-width: 768px) {
    :root {
        --card-width: 120px;
        --card-height: 168px;
        --spacing-sm: 0.5rem;
        --spacing-md: 1rem;
    }
    
    body {
        padding-bottom: 80px; /* Space for mobile scoreboard */
    }
    
    /* Adjust large colour display for mobile */
    .current-colour-display-large {
        top: 35%; /* Halfway between old (50%) and current (20%) */
        left: 1rem;
        transform: translateY(-50%);
    }
    
    #current-colour-text {
        font-size: clamp(2.7rem, 9vw, 5.4rem) !important; /* 10% smaller (0.9x) */
    }
    
    .game-title {
        font-size: 2.5rem;
    }
    
    /* Show mobile elements */
    .mobile-burger-btn {
        display: flex !important;
    }
    
    .mobile-drawer-overlay {
        display: block !important;
    }
    
    .mobile-drawer {
        display: block !important;
    }
    
    .mobile-scoreboard {
        display: flex !important;
    }
    
    /* Hide desktop elements */
    .desktop-only {
        display: none !important;
    }
    
    #game-board.active {
        padding: 0.5rem;
        padding-top: 0.75rem; /* Small top padding */
        padding-left: 0; /* Remove left padding so player cards can span full width */
        padding-right: 0; /* Remove right padding so player cards can span full width */
        gap: 0.5rem;
        overflow-x: hidden; /* Prevent horizontal scroll */
        width: 100vw;
        max-width: 100vw;
    }
    
    /* Show mobile burger when header is hidden */
    body:not(.with-game-header) .mobile-burger-btn {
        display: flex !important;
    }
    
    #opponent-area {
        margin-bottom: 0.5rem;
        min-height: auto;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 0.75rem;
    }
    
    /* Hide opponent card pill */
    .mobile-opponent-count {
        display: none !important;
    }
    
    .opponent-card-info {
        display: none !important;
    }
    
    /* Hide opponent hand container children on mobile, show our custom display */
    #opponent-hand {
        min-height: auto;
        height: auto;
        padding: 0.5rem 0;
        width: 100%;
    }
    
    .opponent-info {
        font-size: 0.9rem;
    }
    
    #opponent-hand {
        justify-content: center;
        max-width: 100vw;
        overflow-x: auto;
        padding: 0.25rem;
    }
    
    /* Play area - keep centered */
    #play-area {
        margin: 0.5rem 0;
        width: 100%;
        align-items: center;
        justify-content: center;
    }
    
    #deck-area {
        gap: 2rem;
        justify-content: center;
        width: 100%;
    }
    
    .pile {
        flex-shrink: 0;
    }
    
    .colour-indicator {
        font-size: 0.85rem;
        padding: 0.5rem;
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
    
    .colour-display {
        width: 30px;
        height: 30px;
    }
    
    .colour-options {
        grid-template-columns: 1fr 1fr;
    }
    
    /* Player hand - full width */
    #player-area {
        width: 100%;
        max-width: 100vw;
        overflow: hidden;
        padding-left: 0;
        padding-right: 0;
    }
    
    .card-container {
        overflow-x: hidden; /* Prevent cards from going off screen */
        overflow-y: visible;
        flex-wrap: wrap; /* Allow cards to wrap to next line */
        justify-content: flex-start;
        align-items: flex-start;
        padding: 0.5rem 0.25rem;
        max-width: 100vw;
        width: 100%;
        gap: 0.5rem; /* Add gap between cards when wrapped */
    }
    
    /* Ensure player hand cards stay within viewport and span full width */
    #player-hand {
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
        padding-bottom: 1rem;
        padding-left: 0;
        padding-right: 0;
    }
    
    /* Player hand - always single line, no wrapping even on mobile, full width */
    #player-hand .card-container {
        display: flex;
        justify-content: flex-start;
        align-items: flex-start;
        flex-wrap: nowrap; /* Never wrap - always single line */
        max-width: 100vw;
        width: 100vw;
        overflow-x: auto; /* Allow horizontal scroll if needed */
        padding-left: 0;
        padding-right: 0;
        box-sizing: border-box;
        gap: 0; /* No gap - JavaScript handles spacing/overlap */
    }
    
    #player-hand .card {
        margin: 0;
        flex-shrink: 0;
    }
    
    /* JavaScript handles dynamic spacing - cards will fill width before overlapping */
    /* Max overlap is limited to 10% of card width in JavaScript */
    
    /* Opponent cards - keep normal size on mobile (not 25%) */
    #opponent-hand .card {
        margin: 0 !important;
        width: var(--card-width);
        height: var(--card-height);
        font-size: 4rem;
    }
    
    #opponent-hand .card-value {
        font-size: 5rem;
    }
    
    #opponent-hand .card-symbol {
        font-size: 3rem;
    }
    
    .hint-display {
        top: 50px;
        right: 10px;
        left: 10px;
        max-width: none;
        font-size: 0.85rem;
        padding: var(--spacing-sm);
    }
    
    .modal-content {
        width: 95%;
        padding: 1.5rem;
        max-height: 85vh;
        overflow-y: auto;
    }
}

@media (max-width: 480px) {
    :root {
        --card-width: 100px;
        --card-height: 140px;
    }
    
    .game-title {
        font-size: 2rem;
    }
    
    .menu-button {
        font-size: 1rem;
        padding: var(--spacing-sm);
    }
    
    #deck-area {
        gap: 1rem;
    }
    
    .card-container {
        gap: 0.15rem;
    }
    
    .colour-indicator {
        font-size: 0.75rem;
        padding: 0.4rem;
    }
}

/* ============================================================================
   ANIMATIONS & EFFECTS
   ============================================================================ */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes cardDeal {
    from {
        opacity: 0;
        transform: translateY(-100px) rotate(-180deg);
    }
    to {
        opacity: 1;
        transform: translateY(0) rotate(0deg);
    }
}

@keyframes cardPlay {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    50% {
        transform: translateY(-50px) scale(1.2) rotate(5deg);
        opacity: 0.8;
    }
    100% {
        transform: translateY(-100px) scale(0.9);
        opacity: 0;
    }
}

@keyframes cardDraw {
    from {
        opacity: 0;
        transform: translateX(-100px) rotate(-90deg) scale(0.5);
    }
    to {
        opacity: 1;
        transform: translateX(0) rotate(0deg) scale(1);
    }
}

@keyframes cardFlip {
    0% {
        transform: rotateY(0deg);
    }
    50% {
        transform: rotateY(90deg);
    }
    100% {
        transform: rotateY(0deg);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

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

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

.screen.active {
    animation: fadeIn var(--transition-slow);
}

.card.dealing {
    animation: cardDeal 0.5s ease-out;
}

.card.playing {
    animation: cardPlay 0.5s ease-out forwards;
}

.card.drawing {
    animation: cardDraw 0.4s ease-out;
}

.card.invalid {
    animation: shake 0.5s ease-in-out;
}

.card.wild {
    /* Rainbow animation removed - was affecting card image colours */
}

/* Entrance animations for cards */
.card-container .card {
    animation: slideIn 0.3s ease-out;
}

.card-container .card:nth-child(1) { animation-delay: 0.05s; }
.card-container .card:nth-child(2) { animation-delay: 0.1s; }
.card-container .card:nth-child(3) { animation-delay: 0.15s; }
.card-container .card:nth-child(4) { animation-delay: 0.2s; }
.card-container .card:nth-child(5) { animation-delay: 0.25s; }
.card-container .card:nth-child(6) { animation-delay: 0.3s; }
.card-container .card:nth-child(7) { animation-delay: 0.35s; }

/* Hover animations */
.menu-button {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-button:hover {
    animation: bounce 0.6s ease-in-out;
}

/* Wild card sparkle effect */
@keyframes sparkle {
    0%, 100% {
        box-shadow: 
            0 0 5px rgba(255, 255, 255, 0.5),
            0 0 10px rgba(255, 255, 255, 0.3),
            0 0 15px rgba(255, 255, 255, 0.2);
    }
    50% {
        box-shadow: 
            0 0 10px rgba(255, 255, 255, 0.8),
            0 0 20px rgba(255, 255, 255, 0.5),
            0 0 30px rgba(255, 255, 255, 0.3);
    }
}

.card.wild:hover {
    animation: sparkle 1.5s ease-in-out infinite;
}

/* Deck shuffle animation */
@keyframes shuffle {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px) rotate(-5deg); }
    75% { transform: translateX(10px) rotate(5deg); }
}

#draw-pile.shuffling {
    animation: shuffle 0.6s ease-in-out infinite;
}

/* Turn indicator pulse */
@keyframes turnPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

#turn-indicator {
    animation: turnPulse 2s ease-in-out infinite;
}

/* Score increment animation */
@keyframes scoreUp {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    50% {
        transform: translateY(-20px) scale(1.5);
        opacity: 1;
    }
    100% {
        transform: translateY(-40px) scale(1);
        opacity: 0;
    }
}

.score-increment {
    position: absolute;
    animation: scoreUp 1s ease-out forwards;
    font-weight: bold;
    colour: var(--colour-green);
    pointer-events: none;
}

/* Modal entrance */
.modal.active .modal-content {
    animation: slideIn 0.4s ease-out;
}

/* Confetti animation for wins */
@keyframes confetti {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

.confetti-piece {
    position: fixed;
    width: 10px;
    height: 10px;
    top: -10px;
    z-index: 9999;
    animation: confetti 3s ease-out forwards;
}

/* Loading spinner */
@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-spinner {
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-colour: var(--colour-yellow);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

/* ============================================================================
   UTILITY CLASSES
   ============================================================================ */
.hidden {
    display: none !important;
}

.text-centre {
    text-align: center;
}

.text-bold {
    font-weight: bold;
}

.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }

.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }

/* ============================================================================
   CARD HAND ANIMATIONS
   ============================================================================ */

/* Card entering animation (flying in from deck) */
.card-entering {
    opacity: 0 !important;
    transform: translateY(300px) scale(0.3) rotate(-20deg) !important;
    animation: card-fly-in 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards !important;
}

@keyframes card-fly-in {
    0% {
        opacity: 0;
        transform: translateY(300px) scale(0.3) rotate(-20deg);
    }
    60% {
        opacity: 1;
        transform: translateY(-20px) scale(1.05) rotate(5deg);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1) rotate(0deg);
    }
}

/* Card removing animation (flying out to discard) */
.card-removing {
    animation: card-fly-out 0.5s cubic-bezier(0.55, 0.085, 0.68, 0.53) forwards !important;
    pointer-events: none !important;
    z-index: 1000 !important;
}

@keyframes card-fly-out {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1) rotate(0deg);
    }
    50% {
        opacity: 0.8;
        transform: translateY(-150px) translateX(100px) scale(0.9) rotate(25deg);
    }
    100% {
        opacity: 0;
        transform: translateY(-300px) translateX(200px) scale(0.5) rotate(45deg);
    }
}

