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

/* Mobile scrolling - Allow vertical when needed */
@media (max-width: 768px) {
    html, body {
        overflow-x: hidden;
        overflow-y: auto;
        min-height: 100vh;
        width: 100vw;
        margin: 0;
        padding: 0;
    }
    
    .game-container {
        min-height: 100vh;
        width: 100vw;
        overflow: visible;
        margin: 0;
        padding: 0;
    }
    
    * {
        box-sizing: border-box;
    }
}

body {
    font-family: 'Inter', sans-serif;
    background: url('background.jpg') center center / cover no-repeat fixed;
    min-height: 100vh;
    color: #fdfdfd;
}

/* Main Menu Styles */
.main-menu {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.menu-content {
    background: rgba(0, 0, 0, 0.8);
    border-radius: 16px;
    padding: 40px;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.menu-header {
    text-align: center;
    margin-bottom: 50px;
}

.menu-header h1 {
    font-size: 3rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.menu-header h1 i {
    color: #4ade80;
    margin-right: 12px;
}

.game-subtitle {
    color: #a0aec0;
    font-size: 1.1rem;
    font-style: italic;
}

/* Main Menu Buttons */
.main-menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.main-menu-btn {
    background: #4ade80;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 16px 24px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.main-menu-btn:hover {
    background: #22c55e;
    transform: translateY(-1px);
    cursor: pointer;
}

.main-menu-btn i {
    font-size: 1.3rem;
}

/* Game Setup Menu */
.game-setup-menu {
    display: none;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.game-setup-menu.show {
    display: flex;
}

.setup-content {
    background: rgba(0, 0, 0, 0.8);
    border-radius: 12px;
    padding: 24px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.setup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e2e8f0;
}

.setup-header h2 {
    color: #ffffff;
    font-size: 1.8rem;
    font-weight: 700;
}

.back-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #ffffff;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.setup-options h3 {
    color: #ffffff;
    margin-bottom: 20px;
    font-size: 1.3rem;
    font-weight: 600;
    text-align: center;
}

.player-count-buttons,
.game-mode-buttons,
.difficulty-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.count-btn,
.mode-btn,
.difficulty-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
    color: #ffffff;
}

.count-btn:hover,
.mode-btn:hover,
.difficulty-btn:hover {
    border-color: #4ade80;
    transform: translateY(-1px);
}

.count-btn.selected,
.mode-btn.selected,
.difficulty-btn.selected {
    border-color: #4ade80;
    background: #4ade80;
    color: white;
    transform: translateY(-1px);
}

.count-btn i,
.mode-btn i,
.difficulty-btn i {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.count-btn span,
.mode-btn span,
.difficulty-btn span {
    font-weight: 600;
    font-size: 1rem;
}

.count-btn small,
.mode-btn small,
.difficulty-btn small {
    font-size: 0.8rem;
    opacity: 0.8;
}

.setup-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #e2e8f0;
}

.setup-actions .btn {
    padding: 15px 30px;
    font-size: 1.1rem;
    min-width: 150px;
}

/* Game Screen Styles */
.game-screen {
    display: none;
    background: rgba(0, 0, 0, 0.8);
    min-height: 100vh;
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.game-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 10px;
}

.header-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.header-controls .btn {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 0.9rem;
}

.header-controls .btn i {
    margin: 0;
}
.theme-toggle-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #ffffff;
    font-size: 1.2rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

.theme-toggle-btn.light-mode {
    background: rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.3);
    color: #333;
}

.theme-toggle-btn.light-mode:hover {
    background: rgba(0, 0, 0, 0.2);
    border-color: rgba(0, 0, 0, 0.5);
}

.game-mode-info {
    background: rgba(102, 126, 234, 0.1);
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 500;
    color: #667eea;
}

/* Responsive Menu */
@media (max-width: 768px) {
    .menu-content {
        padding: 80px;
    }
    
    .menu-header h1 {
        font-size: 2rem;
    }
    
    .mode-buttons,
    .difficulty-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .menu-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .menu-actions .btn {
        width: 200px;
    }
}

.game-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Styles */
.game-header {
    text-align: center;
    margin-bottom: 30px;
    background: rgba(0, 0, 0, 0.8);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.game-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.game-header h1 i {
    color: #4ade80;
    margin-right: 10px;
}

.header-scoreboard {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.game-mode-display {
    font-size: 0.7rem;
    color: #a0a0a0;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
    margin-bottom: 5px;
}

.scoreboard-content {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    font-size: 1.1rem;
    color: #ffffff;
}

.player-name {
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.score-bracket {
    color: #4ade80;
    font-size: 1.2rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.header-score {
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 800;
    background: linear-gradient(145deg, #4ade80, #22c55e);
    padding: 8px 16px;
    border-radius: 12px;
    min-width: 40px;
    text-align: center;
    border: 2px solid #22c55e;
    box-shadow: 
        0 4px 12px rgba(74, 222, 128, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.round-info {
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 600;
    background: linear-gradient(145deg, #06b6d4, #0891b2);
    padding: 6px 12px;
    border-radius: 10px;
    border: 2px solid #0891b2;
    box-shadow: 
        0 4px 12px rgba(6, 182, 212, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    margin-top: -20px;
}

.header-round-number {
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 700;
}

/* Turn Notification Styles */
.turn-notification {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 12px 20px;
    margin: 10px auto;
    max-width: 400px;
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.1), rgba(34, 197, 94, 0.1));
    border: 1px solid rgba(74, 222, 128, 0.3);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(74, 222, 128, 0.1);
    animation: slideInDown 0.5s ease-out;
}

.turn-notification.show {
    display: flex;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #4ade80;
    font-weight: 600;
    font-size: 0.95rem;
}

.notification-content i {
    font-size: 1.1rem;
    animation: pulse 2s infinite;
}

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

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

.header-round-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 50px;
}

.header-round-number {
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

body.light-mode .game-mode-display {
    color: #2d3748;
}

body.light-mode .header-scores {
    background: rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.2);
}

body.light-mode .header-player-name {
    color: #4a5568;
}

body.light-mode .header-score {
    color: #333;
    background: rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.3);
}

body.light-mode .header-round-number {
    color: #2d3748;
    background: rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.2);
}

/* Exit button styling */
#back-to-menu-btn {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    transition: all 0.2s ease;
}

#back-to-menu-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.5);
    transform: scale(1.05);
}

body.light-mode #back-to-menu-btn {
    background: rgba(220, 38, 38, 0.1);
    border: 1px solid rgba(220, 38, 38, 0.3);
    color: #dc2626;
}

body.light-mode #back-to-menu-btn:hover {
    background: rgba(220, 38, 38, 0.2);
    border: 1px solid rgba(220, 38, 38, 0.5);
}

/* Player turn indicator */
.player-section.player-turn {
    /* Border removed - no visual highlight for player turn */
}

body.light-mode .player-section.player-turn {
    /* Border removed - no visual highlight for player turn */
}

.subtitle {
    color: #a0aec0;
    font-size: 1.1rem;
    margin-bottom: 10px;
    direction: rtl;
    text-align: center;
}

.arabic-description {
    color: #4a5568;
    font-size: 0.9rem;
    margin-bottom: 20px;
    direction: rtl;
    text-align: center;
    font-style: italic;
}

.score-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    font-size: 1.2rem;
    font-weight: 600;
}

.player-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.player-name {
    color: #ffffff;
    font-size: 0.9rem;
    direction: rtl;
    text-align: center;
}

.score {
    background: #4ade80;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 1.5rem;
    min-width: 50px;
    text-align: center;
}

.vs {
    color: #a0aec0;
    font-weight: 300;
    font-size: 1rem;
}

/* Game Board */
.game-board {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.unified-game-area {
    position: relative;
    background: rgba(0, 0, 0, 0.9);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 20px;
    min-height: 500px;
    display: grid;
    grid-template-areas: 
        "deck-left ai-cards deck-right"
        "table table table"
        "player player player";
    grid-template-columns: 1fr 2fr 1fr;
    grid-template-rows: auto 1fr auto;
    gap: 20px;
}

.deck-info {
    position: absolute;
    top: 20px;
    z-index: 5;
}

.deck-top-left {
    left: 20px;
}


.deck-visual {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.7);
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.ai-cards-area {
    grid-area: ai-cards;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.table-cards-area {
    grid-area: table;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    padding: 20px;
    min-height: 200px;
}

.player-cards-area {
    grid-area: player;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* Declaration Buttons */
.declaration-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    justify-content: center;
}

.declaration-buttons .btn {
    padding: 10px 20px;
    font-size: 1rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-weight: 600;
}

.declaration-buttons .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Score Section - REMOVED, now using header scoreboard */
/* .score-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.2), rgba(59, 130, 246, 0.2));
    border-radius: 20px;
    border: 2px solid rgba(74, 222, 128, 0.3);
    margin-bottom: 15px;
    box-shadow: 0 8px 32px rgba(74, 222, 128, 0.2);
}

.player-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 120px;
}

.player-score .player-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.player-score .score {
    font-size: 2.5rem;
    font-weight: 800;
    color: #ffffff;
    background: linear-gradient(135deg, #4ade80, #22c55e);
    padding: 15px 25px;
    border-radius: 15px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(74, 222, 128, 0.4);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.vs-indicator {
    font-size: 1.8rem;
    font-weight: 800;
    color: #ffffff;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    padding: 12px 18px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.round-info top: -10px;    /* Moves UP */
    margin-top: 10px;     /* Moves DOWN */
    margin-bottom: -10px; /* Moves UP */
    margin-bottom: 10px;  /* Moves DOWN */
}

.round-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #a0aec0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.round-number {
    font-size: 2rem;
    font-weight: 700;
    color: #ffffff;
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    padding: 10px 20px;
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

body.light-mode .score-section {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.15));
    border: 2px solid rgba(0, 0, 0, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

body.light-mode .player-score .player-name {
    color: #2d3748;
}

body.light-mode .player-score .score {
    color: #ffffff;
    background: linear-gradient(135deg, #333, #000);
    border: 3px solid rgba(0, 0, 0, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

body.light-mode .vs-indicator {
    color: #ffffff;
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    border: 3px solid rgba(0, 0, 0, 0.3);
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.4);
}

body.light-mode .round-label {
    color: #4a5568;
}

body.light-mode .round-number {
    color: #ffffff;
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    border: 2px solid rgba(0, 0, 0, 0.3);
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.4);
} */

/* Player Sections */
.player-section {
    padding: 15px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.player-section.ai-section {
    /* No background styling */
}

.player-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.player-info .player-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #ffffff;
}

.player-stats {
    display: flex;
    gap: 15px;
    align-items: center;
}

.cards-in-hand,
.cards-collected {
    font-size: 0.9rem;
    color: #a0aec0;
    background: rgba(255, 255, 255, 0.1);
    padding: 5px 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.cards-collected {
    color: #4ade80;
    background: rgba(74, 222, 128, 0.1);
    border: 1px solid rgba(74, 222, 128, 0.3);
}

body.light-mode .player-section {
    /* No background styling */
}

body.light-mode .player-section.ai-section {
    /* No background styling */
}

body.light-mode .player-info .player-name {
    color: #2d3748;
}

body.light-mode .cards-in-hand,
body.light-mode .cards-collected {
    color: #4a5568;
    background: rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.2);
}

body.light-mode .cards-collected {
    color: #333;
    background: rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.3);
}

/* Notification Container */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

/* Notifications */
.notification {
    padding: 15px 25px;
    border-radius: 12px;
    color: #ffffff;
    font-weight: 600;
    font-size: 1.1rem;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    max-width: 300px;
    word-wrap: break-word;
}

.notification.show {
    transform: translateX(0);
    opacity: 1;
}

.notification-info {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border: 2px solid rgba(59, 130, 246, 0.3);
}

.notification-success {
    background: linear-gradient(135deg, #10b981, #059669);
    border: 2px solid rgba(16, 185, 129, 0.3);
}

.notification-error {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border: 2px solid rgba(239, 68, 68, 0.3);
}

body.light-mode .notification {
    color: #ffffff;
}

body.light-mode .notification-info {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
}

body.light-mode .notification-success {
    background: linear-gradient(135deg, #059669, #047857);
}

body.light-mode .notification-error {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
}

.table-section {
    background: rgba(0, 0, 0, 0.9);
    padding: 15px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.7);
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    text-align: center;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.table-header h3 {
    color: #ffffff;
    margin: 0;
    font-size: 1.1rem;
    flex: 1;
    text-align: center;
}

.table-cards {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    width: 100%;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.deck-visual {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(0, 0, 0, 0.3);
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.deck-stack {
    position: relative;
    width: 50px;
    height: 70px;
}

.deck-card {
    position: absolute;
    width: 45px;
    height: 65px;
    background: linear-gradient(145deg, #1a202c, #2d3748);
    border: 2px solid #4a5568;
    border-radius: 6px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #ffffff;
}

.deck-card::before {
    content: '🂠';
    font-size: 1.3rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
}

.deck-card:nth-child(1) {
    transform: translate(0, 0);
    z-index: 3;
}

.deck-card:nth-child(2) {
    transform: translate(2px, 2px);
    z-index: 2;
}

.deck-card:nth-child(3) {
    transform: translate(4px, 4px);
    z-index: 1;
}

.deck-count-text {
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 700;
    background: rgba(74, 222, 128, 0.2);
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid rgba(74, 222, 128, 0.4);
    min-width: 40px;
    text-align: center;
}

body.light-mode .deck-count-text {
    color: #2d3748;
    background: rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.2);
}

body.light-mode .deck-card {
    background: linear-gradient(145deg, #e2e8f0, #cbd5e0);
    border: 2px solid #a0aec0;
    color: #2d3748;
}

.player-area {
    background: rgba(0, 0, 0, 0.8);
    padding: 15px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.player-2 {
    order: -1;
}

.player-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-weight: 600;
    color: #2d3748;
}

.cards-count {
    background: #e2e8f0;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.9rem;
    color: #4a5568;
}

.player-hand {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    transform-style: preserve-3d;
}

/* AI Cards - Face down, fanned upward */
#player2-hand .card {
    transition: transform 0.2s ease;
    pointer-events: auto;
    z-index: 10;
    position: relative;
    cursor: not-allowed;
    transform: rotate(180deg);
}

#player2-hand .card:nth-child(1) {
    transform: rotate(178deg);
}

#player2-hand .card:nth-child(2) {
    transform: rotate(180deg);
}

#player2-hand .card:nth-child(3) {
    transform: rotate(182deg);
}

/* Player Cards - Face up, fanned downward */
#player1-hand .card {
    transition: transform 0.2s ease;
    pointer-events: auto !important;
    z-index: 100;
    position: relative;
    cursor: pointer !important;
}

#player1-hand .card:hover {
    transform: translateY(-5px) !important;
    z-index: 101;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
    border-color: #667eea !important;
}

#player1-hand .card:nth-child(1) {
    transform: rotate(-2deg);
}

#player1-hand .card:nth-child(2) {
    transform: rotate(0deg);
}

#player1-hand .card:nth-child(3) {
    transform: rotate(2deg);
}

/* Card Styles */
.card {
    width: 70px;
    height: 105px;
    background: white;
    border: 2px solid #2d3748;
    border-radius: 12px;
    transition: all 0.3s ease;
    transform-origin: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: relative;
    font-family: 'Inter', sans-serif;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: #667eea;
}

.card.selected {
    transform: translateY(-10px);
    border-color: #667eea;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

/* Card movement animations */
.card.moving-to-table {
    animation: moveToTable 0.6s ease-out forwards;
    z-index: 1000;
}

.card.moving-to-collected {
    animation: moveToCollected 0.8s ease-out forwards;
    z-index: 1000;
}

.card.collecting {
    animation: collectCard 0.5s ease-out forwards;
    z-index: 1000;
}

@keyframes moveToTable {
    0% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
    50% {
        transform: scale(1.1) rotate(5deg);
        opacity: 0.9;
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

@keyframes moveToCollected {
    0% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
    30% {
        transform: scale(1.2) rotate(-10deg);
        opacity: 0.8;
    }
    60% {
        transform: scale(0.9) rotate(5deg);
        opacity: 0.9;
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

@keyframes collectCard {
    0% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
    50% {
        transform: scale(1.3) rotate(15deg);
        opacity: 0.7;
    }
    100% {
        transform: scale(0.8) rotate(-5deg);
        opacity: 0.9;
    }
}

/* Stacking animation for collected cards */
.collected-card-stack {
    position: relative;
    display: inline-block;
}

.collected-card-stack .card {
    position: absolute;
    top: 0;
    left: 0;
    transition: all 0.3s ease;
}

.collected-card-stack .card:nth-child(1) { z-index: 1; }
.collected-card-stack .card:nth-child(2) { z-index: 2; transform: translate(2px, 2px); }
.collected-card-stack .card:nth-child(3) { z-index: 3; transform: translate(4px, 4px); }
.collected-card-stack .card:nth-child(4) { z-index: 4; transform: translate(6px, 6px); }
.collected-card-stack .card:nth-child(5) { z-index: 5; transform: translate(8px, 8px); }
.collected-card-stack .card:nth-child(n+6) { z-index: 6; transform: translate(10px, 10px); }

/* Collected cards container styles */
.collected-cards-container {
    margin-top: 10px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.collected-cards-label {
    font-size: 0.8rem;
    color: #a0aec0;
    margin-bottom: 8px;
    font-weight: 500;
}

.collected-cards-stack {
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.collected-count {
    font-size: 0.9rem;
    color: #4ade80;
    font-weight: 600;
    background: rgba(74, 222, 128, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid rgba(74, 222, 128, 0.2);
}

.card.played {
    opacity: 0.7;
    cursor: not-allowed;
}

.card-value {
    font-weight: 800;
    font-size: 1.4rem;
    color: #1a202c;
    line-height: 1;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    letter-spacing: -0.5px;
}

.card-suit {
    font-size: 1.9rem;
    line-height: 1;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.card-suit.clubs { color: #2d3748; }
.card-suit.cups { color: #e53e3e; }
.card-suit.swords { color: #38a169; }
.card-suit.coins { color: #d69e2e; }

/* Spanish Card Layout */
.card.spanish-card {
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border: 2px solid #2d3748;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.card.spanish-card::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    right: 4px;
    bottom: 4px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    pointer-events: none;
}

.card.spanish-card::after {
    content: '';
    position: absolute;
    top: 6px;
    left: 6px;
    right: 6px;
    bottom: 6px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 6px;
    pointer-events: none;
}

.card-top {
    position: absolute;
    top: 6px;
    left: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.7rem;
    line-height: 0.8;
}

.card-bottom {
    position: absolute;
    bottom: 6px;
    right: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.7rem;
    line-height: 0.8;
    transform: rotate(180deg);
}

.card-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    font-size: 1.4rem;
    line-height: 1;
}

/* Face Cards Special Styling */
.card.face-card .card-center {
    font-size: 1.1rem;
    font-weight: 600;
    background: linear-gradient(135deg, #f7fafc, #edf2f7);
    border-radius: 8px;
    padding: 4px;
    margin: 2px;
    border: 1px solid #e2e8f0;
}

.card.face-card .card-value {
    font-size: 1.2rem;
    font-weight: 800;
    color: #1a202c;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    letter-spacing: -0.3px;
}

.card.face-card .card-suit {
    font-size: 1.2rem;
}

/* Number Cards with Pips */
.card.number-card .card-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
}

.card.number-card .card-center .pip {
    font-size: 0.7rem;
    line-height: 0.8;
    display: inline-block;
    margin: 1px;
}

/* Special layouts for different card counts */
.card[data-count="1"] .card-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.card[data-count="2"] .card-center {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.card[data-count="3"] .card-center {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.card[data-count="4"] .card-center {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2px;
}

.card[data-count="5"] .card-center {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2px;
    position: relative;
}

.card[data-count="5"] .card-center::after {
    content: attr(data-center-pip);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.8rem;
}

.card[data-count="6"] .card-center {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2px;
}

.card[data-count="7"] .card-center {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2px;
    position: relative;
}

.card[data-count="7"] .card-center::after {
    content: attr(data-center-pip);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.8rem;
}

/* High number cards (10, 11, 12) - hide center content and show pips */
.card[data-count="10"] .card-center,
.card[data-count="11"] .card-center,
.card[data-count="12"] .card-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
}

.card[data-count="10"] .card-center .card-value,
.card[data-count="11"] .card-center .card-value,
.card[data-count="12"] .card-center .card-value {
    display: none;
}

.card[data-count="10"] .card-center .card-suit,
.card[data-count="11"] .card-center .card-suit,
.card[data-count="12"] .card-center .card-suit {
    display: none;
}

/* Show pips for high number cards */
.card[data-count="10"] .card-center::before {
    content: "♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥";
    font-size: 0.6rem;
    line-height: 0.8;
    text-align: center;
    white-space: pre-line;
}

.card[data-count="11"] .card-center::before {
    content: "♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥";
    font-size: 0.6rem;
    line-height: 0.8;
    text-align: center;
    white-space: pre-line;
}

.card[data-count="12"] .card-center::before {
    content: "♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥";
    font-size: 0.6rem;
    line-height: 0.8;
    text-align: center;
    white-space: pre-line;
}






/* Card Images */
.card-image-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.card-fallback {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
}

/* Face down card */
.card.face-down {
    background: linear-gradient(145deg, #2d3748, #4a5568);
    color: white;
    border: 2px solid #4a5568;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.card.face-down .card-value,
.card.face-down .card-suit {
    display: none;
}

.card.face-down::before {
    content: '🂠';
    font-size: 2rem;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Playable Card Styling */
.card.playable-card {
    border: 3px solid #667eea;
    box-shadow: 0 0 15px rgba(102, 126, 234, 0.3);
    animation: pulse 2s infinite;
}

.card.playable-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.4);
}

@keyframes pulse {
    0% { box-shadow: 0 0 15px rgba(102, 126, 234, 0.3); }
    50% { box-shadow: 0 0 25px rgba(102, 126, 234, 0.5); }
    100% { box-shadow: 0 0 15px rgba(102, 126, 234, 0.3); }
}

/* Game Controls moved to header */

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
}

.btn-primary {
    background: #4ade80;
    color: white;
    border: 1px solid #4ade80;
}

.btn-primary:hover {
    background: #22c55e;
    border-color: #22c55e;
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.btn-success {
    background: #48bb78;
    color: white;
}

.btn-warning {
    background: #ed8936;
    color: white;
}

/* Game Messages */
.game-messages {
    background: rgba(0, 0, 0, 0.8);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: rgba(0, 0, 0, 0.9);
    padding: 30px;
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px);
    color: #ffffff;
}

.modal-content.large {
    max-width: 800px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: none;
}

.modal-header h2 {
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.modal-header h2 i {
    color: #4ade80;
    margin-right: 10px;
}

.close-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: bold;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

.modal-body {
    color: #4a5568;
    line-height: 1.6;
}

.rules-section {
    margin-bottom: 25px;
}

.rules-section h3 {
    color: #2d3748;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.rules-section ul {
    margin-left: 20px;
}

.rules-section li {
    margin-bottom: 5px;
}

.announcement-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

/* Light Mode Styles */
body.light-mode {
    background: url('background white.jpg') center center / cover no-repeat fixed;
    color: #1a202c;
}

body.light-mode .menu-content,
body.light-mode .setup-content,
body.light-mode .game-header,
body.light-mode .player-area,
body.light-mode .table-section {
    background: rgba(0, 0, 0, 0.1);
    border: 2px solid rgba(0, 0, 0, 0.3);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

body.light-mode .table-header {
    background: rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.2);
}

body.light-mode .table-header h3 {
    color: #2d3748;
}

/*body.light-mode .table-cards {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
}*/

body.light-mode .deck-visual {
    background: rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.2);
}

body.light-mode .deck-card {
    background: linear-gradient(145deg, #f7fafc, #edf2f7);
    border: 2px solid #cbd5e0;
    color: #2d3748;
}

body.light-mode .deck-card::before {
    color: #4a5568;
}

body.light-mode .game-screen {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

body.light-mode .unified-game-area {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

body.light-mode .table-cards-area {
    background: rgba(0, 0, 0, 0.05);
}

body.light-mode .deck-visual {
    background: rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.2);
}

body.light-mode .game-messages,
body.light-mode .modal-content {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Light mode modal header border removed */

body.light-mode .modal-body {
    color: #2d3748;
}

body.light-mode .menu-header h1,
body.light-mode .game-header h1,
body.light-mode .setup-header h2,
body.light-mode .setup-options h3,
body.light-mode .table-area h3,
body.light-mode .modal-header h2 {
    color: #2d3748;
}

body.light-mode .player-name,
body.light-mode .subtitle,
body.light-mode .game-messages {
    color: #4a5568;
}

body.light-mode .theme-toggle-btn {
    background: rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.3);
    color: #333;
}

body.light-mode .theme-toggle-btn:hover {
    background: rgba(0, 0, 0, 0.2);
    border-color: rgba(0, 0, 0, 0.5);
}

body.light-mode .count-btn,
body.light-mode .mode-btn,
body.light-mode .difficulty-btn {
    background: white;
    border: 2px solid #e2e8f0;
    color: #333;
}

body.light-mode .count-btn:hover,
body.light-mode .mode-btn:hover,
body.light-mode .difficulty-btn:hover {
    border-color: #333;
}

body.light-mode .count-btn.selected,
body.light-mode .mode-btn.selected,
body.light-mode .difficulty-btn.selected {
    background: #333;
    border-color: #333;
    color: white;
}

body.light-mode .btn-secondary {
    background: #f7fafc;
    color: #4a5568;
    border: 1px solid #e2e8f0;
}

body.light-mode .btn-secondary:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
}

body.light-mode .btn-primary {
    background: #333;
    color: white;
    border: 1px solid #333;
}

body.light-mode .btn-primary:hover {
    background: #000;
    border-color: #000;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

body.light-mode .main-menu-btn {
    background: #333;
    color: white;
}

body.light-mode .main-menu-btn:hover {
    background: #000;
    transform: translateY(-1px);
}

body.light-mode .score {
    background: #333;
    color: white;
}

/* AI Difficulty Menu Styles */
.ai-difficulty-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.difficulty-options {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    max-width: 400px;
}

.difficulty-option-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 25px;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
}

.difficulty-option-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: #4ade80;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(74, 222, 128, 0.3);
}

.difficulty-option-btn i {
    font-size: 2rem;
    color: #4ade80;
    margin-bottom: 5px;
}

.difficulty-option-btn span {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.difficulty-option-btn small {
    font-size: 0.9rem;
    opacity: 0.8;
    color: #a0aec0;
}

body.light-mode .difficulty-option-btn {
    background: rgba(0, 0, 0, 0.1);
    border: 2px solid rgba(0, 0, 0, 0.2);
    color: #2d3748;
}

body.light-mode .difficulty-option-btn:hover {
    background: rgba(0, 0, 0, 0.2);
    border-color: #333;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

body.light-mode .difficulty-option-btn i {
    color: #333;
}

body.light-mode .difficulty-option-btn small {
    color: #4a5568;
}

/* Settings Modal Styles */
.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.setting-item:last-child {
    border-bottom: none;
}

.setting-label {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.1rem;
    font-weight: 500;
    color: #ffffff;
}

.setting-label i {
    color: #4ade80;
    width: 20px;
    font-size: 1.2rem;
}

/* Light mode setting item styles removed - no borders needed */

body.light-mode .setting-label {
    color: #2d3748;
}

body.light-mode .setting-label i {
    color: #333;
}

/* Sound Toggle Buttons */
.sound-toggle-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #ffffff;
    font-size: 1.2rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sound-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

.sound-toggle-btn.disabled {
    background: rgba(255, 0, 0, 0.2);
    border-color: rgba(255, 0, 0, 0.4);
    color: #ff6b6b;
}

.sound-toggle-btn.disabled:hover {
    background: rgba(255, 0, 0, 0.3);
    border-color: rgba(255, 0, 0, 0.6);
}

.sound-toggle-btn i {
    color: inherit;
    font-size: inherit;
}

body.light-mode .sound-toggle-btn {
    background: rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.3);
    color: #333;
}

body.light-mode .sound-toggle-btn:hover {
    background: rgba(0, 0, 0, 0.2);
    border-color: rgba(0, 0, 0, 0.5);
}

body.light-mode .sound-toggle-btn.disabled {
    background: rgba(255, 0, 0, 0.1);
    border-color: rgba(255, 0, 0, 0.3);
    color: #dc2626;
}

body.light-mode .sound-toggle-btn.disabled:hover {
    background: rgba(255, 0, 0, 0.2);
    border-color: rgba(255, 0, 0, 0.5);
}

body.light-mode .modal-header h2 {
    color: #2d3748;
}

body.light-mode .modal-header h2 i {
    color: #333;
}

body.light-mode .close-btn {
    background: rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.3);
    color: #333;
}

body.light-mode .close-btn:hover {
    background: rgba(0, 0, 0, 0.2);
    border-color: rgba(0, 0, 0, 0.5);
    transform: scale(1.1);
}

/* Dark theme modal styles */
body:not(.light-mode) .modal-content {
    background: rgba(0, 0, 0, 0.9) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    backdrop-filter: blur(20px) !important;
    color: #ffffff !important;
}

body:not(.light-mode) .modal-header h2 {
    color: #ffffff !important;
}

body:not(.light-mode) .modal-header h2 i {
    color: #4ade80 !important;
}

body:not(.light-mode) .modal-body {
    color: #ffffff !important;
}

body:not(.light-mode) .close-btn {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    color: #ffffff !important;
}

body:not(.light-mode) .close-btn:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
}

/* Theme toggle button specific styles */
.theme-toggle-btn {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    color: #ffffff !important;
    border-radius: 8px !important;
    padding: 10px !important;
    transition: all 0.2s ease !important;
    width: 40px !important;
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.2rem !important;
    cursor: pointer !important;
}

.theme-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    transform: translateY(-1px) !important;
}

.theme-toggle-btn i {
    color: inherit !important;
    font-size: inherit !important;
}

body.light-mode .theme-toggle-btn {
    background: rgba(0, 0, 0, 0.1) !important;
    border: 1px solid rgba(0, 0, 0, 0.3) !important;
    color: #333 !important;
}

body.light-mode .theme-toggle-btn:hover {
    background: rgba(0, 0, 0, 0.2) !important;
    border-color: rgba(0, 0, 0, 0.5) !important;
    transform: translateY(-1px) !important;
}

body.light-mode .theme-toggle-btn i {
    color: inherit !important;
}

/* Card Drawing Animations */
.drawing-card {
    position: relative;
    animation: cardDraw 0.5s ease-out;
    z-index: 10;
}

@keyframes cardDraw {
    0% {
        transform: scale(0) rotate(180deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotate(90deg);
        opacity: 0.8;
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

/* Duplicate face-down styles removed - using the main ones above */

/* Responsive Design */
@media (max-width: 768px) {
    .game-container {
        padding: 10px;
    }
    
    .game-header h1 {
        font-size: 2rem;
    }
    
    .score-display {
        flex-direction: column;
        gap: 15px;
    }
    
    .card {
        width: 50px;
        height: 75px;
    }
    
    .card-value {
        font-size: 0.9rem;
    }
    
    .card-suit {
        font-size: 1rem;
    }
    
    .game-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 200px;
        justify-content: center;
    }
}

/* Animations */
@keyframes cardPlay {
    0% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.1) rotate(5deg); }
    100% { transform: scale(1) rotate(0deg); }
}

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

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

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* Game State Indicators */
.game-state {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.player-turn {
    /* Border removed - no visual highlight for player turn */
}

/* Captured Cards Display */
.captured-cards {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Last played card highlight */
.last-played-card {
    border: 3px solid #ffd700 !important;
    box-shadow: 0 0 15px #ffd700, 0 0 25px #ffd700 !important;
    transform: scale(1.05) !important;
    z-index: 1000 !important;
    animation: lastPlayedPulse 1.5s ease-in-out infinite alternate;
}

@keyframes lastPlayedPulse {
    0% {
        box-shadow: 0 0 15px #ffd700, 0 0 25px #ffd700;
    }
    100% {
        box-shadow: 0 0 25px #ffd700, 0 0 35px #ffd700;
    }
}

/* AI Card Reveal - Flip Effect */
.ai-revealed {
    transform: rotateY(180deg);
    transition: transform 0.6s ease-in-out;
}

.just-revealed {
    border: 3px solid #4299e1 !important;
    box-shadow: 0 0 20px #4299e1, 0 0 30px #4299e1 !important;
    transform: scale(1.05) !important;
    z-index: 1000 !important;
    animation: aiRevealPulse 1s ease-in-out;
}

@keyframes aiRevealPulse {
    0% {
        box-shadow: 0 0 20px #4299e1, 0 0 30px #4299e1;
        transform: scale(1.05);
    }
    50% {
        box-shadow: 0 0 30px #4299e1, 0 0 40px #4299e1;
        transform: scale(1.1);
    }
    100% {
        box-shadow: 0 0 20px #4299e1, 0 0 30px #4299e1;
        transform: scale(1.05);
    }
}

/* Next Card Spot */
.next-card-spot {
    position: absolute;
    width: 70px;
    height: 105px;
    border: 2px dashed #4299e1;
    border-radius: 12px;
    background: rgba(66, 153, 225, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1;
    pointer-events: none;
}

.next-card-spot::before {
    content: "↓";
    color: #4299e1;
    font-size: 1.5rem;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.next-card-spot:hover {
    opacity: 0.8;
    border-color: #3182ce;
    background: rgba(66, 153, 225, 0.2);
}

/* Missa Animation */
.missa-animation {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: linear-gradient(145deg, #ff6b6b, #ee5a52);
    color: #ffffff;
    font-size: 2rem;
    font-weight: bold;
    padding: 20px 40px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(255, 107, 107, 0.4);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    opacity: 0;
    transition: all 0.5s ease;
    pointer-events: none;
}

.missa-animation.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    animation: missaPulse 1.5s ease-in-out;
}

@keyframes missaPulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        box-shadow: 0 8px 32px rgba(255, 107, 107, 0.4);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
        box-shadow: 0 12px 48px rgba(255, 107, 107, 0.6);
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        box-shadow: 0 8px 32px rgba(255, 107, 107, 0.4);
    }
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    /* Mobile Menu Adjustments */
    .main-menu {
        padding: 20px;
    }
    
    .menu-content {
        width: 100%;
        max-width: 100%;
    }
    
    .main-menu-btn {
        width: 100%;
        padding: 20px;
        font-size: 1.2rem;
        margin: 10px 0;
    }
    
    /* Game Screen Mobile - Allow expansion */
    .game-screen {
        padding: 5px;
        border-radius: 8px;
        min-height: 100vh;
        overflow: visible;
        display: flex;
        flex-direction: column;
        box-sizing: border-box;
    }
    
    /* Perfect header for mobile */
    .game-header {
        flex-direction: row;
        gap: 12px;
        flex-wrap: nowrap;
        flex-shrink: 0;
        max-height: 950px;
        padding: 12px 15px;
        align-items: center;
        justify-content: space-between;
        background: rgba(0, 0, 0, 0.4);
        border-radius: 12px;
        margin-bottom: 10px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        box-sizing: border-box;
        overflow: hidden;
    }
    
    .scoreboard-content {
        flex-direction: row;
        gap: 12px;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        flex: 1;
        padding: 0 10px;
    }
    
    .player-section {
        padding: 12px 14px;
        flex: 1;
        min-width: 80px;
        max-width: 100px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        background: rgba(255, 255, 255, 0.08);
        border-radius: 10px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        min-height: 55px;
        box-sizing: border-box;
    }
    
    .player-name {
        font-size: 0.75rem;
        font-weight: 600;
        color: #ffffff;
        margin-bottom: 4px;
        text-align: center;
        line-height: 1;
    }
    
    .header-score {
        font-size: 1.2rem;
        font-weight: 700;
        color: #4ade80;
        text-align: center;
        line-height: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
        background: rgba(74, 222, 128, 0.1);
        border-radius: 50%;
        border: 2px solid rgba(74, 222, 128, 0.3);
    }
    
    .round-info {
        margin-top: 0;
        padding: 12px 18px;
        font-size: 0.9rem;
        flex-shrink: 0;
        white-space: nowrap;
        background: linear-gradient(145deg, #06b6d4, #0891b2);
        border-radius: 10px;
        border: 1px solid rgba(8, 145, 178, 0.3);
        box-shadow: 0 2px 8px rgba(6, 182, 212, 0.2);
        min-height: 55px;
        display: flex;
        align-items: center;
        justify-content: center;
        max-width: 120px;
        box-sizing: border-box;
    }
    
    /* Game mode display */
    .game-mode-display {
        font-size: 0.9rem;
        font-weight: 700;
        color: #ffffff;
        text-align: center;
        margin-bottom: 5px;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    }
    
    /* Cards Mobile - Proper size for mobile */
    .card {
        width: 65px;
        height: 98px;
        font-size: 0.9rem;
        min-width: 65px;
        min-height: 98px;
    }
    
    .card-value {
        font-size: 1rem;
    }
    
    .card-suit {
        font-size: 0.9rem;
    }
    
    /* Player Hands Mobile - Better spacing */
    .player-hand {
        gap: 8px;
        padding: 10px;
        flex-wrap: wrap;
        justify-content: center;
        overflow: hidden;
        max-height: 120px;
        flex-shrink: 0;
    }
    
    .player-hand .card {
        margin: 2px;
        flex-shrink: 0;
    }
    
    /* Table Cards Mobile - Multi-line layout */
    .table-cards {
        padding: 15px;
        gap: 8px;
        flex-wrap: wrap;
        justify-content: center;
        overflow: visible;
        min-height: 120px;
        flex-shrink: 0;
        align-content: flex-start;
    }
    
    .table-cards .card {
        flex-shrink: 0;
        margin: 2px;
    }
    
    /* Hide header controls on mobile - use hamburger menu */
    .header-controls {
        display: none;
    }
    
    /* Hamburger menu button */
    .hamburger-menu {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 42px;
        height: 42px;
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 10px;
        cursor: pointer;
        transition: all 0.3s ease;
        flex-shrink: 0;
    }
    
    .hamburger-menu:hover {
        background: rgba(255, 255, 255, 0.2);
        transform: scale(1.05);
        border-color: rgba(255, 255, 255, 0.4);
    }
    
    .hamburger-line {
        width: 18px;
        height: 2px;
        background: #ffffff;
        margin: 2px 0;
        transition: all 0.3s ease;
        border-radius: 1px;
        opacity: 0.9;
    }
    
    .hamburger-menu.active .hamburger-line:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .hamburger-menu.active .hamburger-line:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger-menu.active .hamburger-line:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    /* Mobile sidebar */
    .mobile-sidebar {
        position: fixed;
        top: 0;
        right: -300px;
        width: 280px;
        height: 100vh;
        background: rgba(0, 0, 0, 0.95);
        backdrop-filter: blur(10px);
        border-left: 1px solid rgba(255, 255, 255, 0.2);
        z-index: 1000;
        transition: right 0.3s ease;
        padding: 20px;
        display: flex;
        flex-direction: column;
        gap: 20px;
    }
    
    .mobile-sidebar.show {
        right: 0;
    }
    
    .mobile-sidebar-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding-bottom: 15px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    }
    
    .mobile-sidebar-title {
        color: #ffffff;
        font-size: 1.2rem;
        font-weight: 600;
    }
    
    .mobile-sidebar-close {
        background: none;
        border: none;
        color: #ffffff;
        font-size: 1.5rem;
        cursor: pointer;
        padding: 5px;
        border-radius: 4px;
        transition: background 0.2s ease;
    }
    
    .mobile-sidebar-close:hover {
        background: rgba(255, 255, 255, 0.1);
    }
    
    .mobile-sidebar-controls {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }
    
    .mobile-sidebar-btn {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 15px 20px;
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 10px;
        color: #ffffff;
        text-decoration: none;
        transition: all 0.3s ease;
        cursor: pointer;
    }
    
    .mobile-sidebar-btn:hover {
        background: rgba(255, 255, 255, 0.2);
        transform: translateX(5px);
    }
    
    .mobile-sidebar-btn i {
        font-size: 1.2rem;
        width: 20px;
        text-align: center;
    }
    
    .mobile-sidebar-btn span {
        font-size: 1rem;
        font-weight: 500;
    }
    
    /* Sidebar overlay */
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    
    .sidebar-overlay.show {
        opacity: 1;
        visibility: visible;
    }
    
    /* Modal Mobile */
    .modal-content {
        width: 95%;
        max-width: 95%;
        padding: 20px;
        margin: 10px;
    }
    
    .modal-header h2 {
        font-size: 1.3rem;
    }
    
    /* Settings Mobile */
    .setting-item {
        flex-direction: row;
        gap: 10px;
        text-align: left;
        justify-content: space-between;
    }
    
    .setting-label {
        font-size: 0.9rem;
    }
    
    /* Game Messages Mobile - Compact */
    .turn-notification {
        font-size: 0.7rem;
        /*padding: 4px 8px;*/
        text-align: center;
        flex-shrink: 0;
        max-height: 30px;
        /*margin: 2px 0;*/
    }
    
    /* Declaration Buttons Mobile */
    .declaration-buttons {
        flex-direction: row;
        gap: 10px;
        flex-wrap: wrap;
    }
    
    .declaration-buttons .btn {
        flex: 1;
        padding: 10px;
        font-size: 0.8rem;
        min-width: 120px;
    }
    
    /* Collected Cards Mobile - Move to top right */
    .collected-cards-container {
        position: fixed;
        top: 20px;
        right: 20px;
        background: rgba(0, 0, 0, 0.8);
        border-radius: 10px;
        padding: 10px;
        border: 1px solid rgba(255, 255, 255, 0.2);
        backdrop-filter: blur(10px);
        z-index: 100;
        max-width: 120px;
        text-align: center;
    }
    
    .collected-cards-stack {
        justify-content: center;
        flex-wrap: wrap;
        gap: 2px;
    }
    
    .collected-cards-container .card {
        width: 25px;
        height: 35px;
        font-size: 0.5rem;
        margin: 1px;
    }
    
    .collected-cards-container .card-value {
        font-size: 0.6rem;
    }
    
    .collected-cards-container .card-suit {
        font-size: 0.5rem;
    }
    
    .collected-cards-label {
        font-size: 0.7rem;
        margin-bottom: 5px;
        color: #ffffff;
        font-weight: 600;
    }
    
    /* Game area layout fixes - Allow expansion */
    .game-area {
        display: flex;
        flex-direction: column;
        gap: 15px;
        padding: 10px;
        flex: 1;
        overflow: visible;
        min-height: calc(100vh - 100px);
    }
    
    .game-section {
        display: flex;
        flex-direction: column;
        gap: 10px;
        flex: 1;
        overflow: visible;
        min-height: calc(100vh - 150px);
    }
    
    /* Player cards area mobile */
    .player-cards-area {
        display: flex;
        flex-direction: column;
        gap: 8px;
        flex-shrink: 0;
        min-height: 120px;
    }
    
    /* AI cards area mobile */
    .ai-cards-area {
        display: flex;
        flex-direction: column;
        gap: 8px;
        flex-shrink: 0;
        min-height: 120px;
    }
    
    /* Table section - Allow expansion */
    .table-section {
        flex-shrink: 0;
        min-height: 120px;
        overflow: visible;
    }
    
    /* Allow scrolling when needed */
    body {
        overflow-x: hidden;
        overflow-y: auto;
        min-height: 100vh;
        width: 100vw;
    }
    
    .game-container {
        min-height: 100vh;
        width: 100vw;
        overflow: visible;
    }
}

@media (max-width: 480px) {
    /* Extra Small Mobile - Proper sized cards */
    .card {
        width: 60px;
        height: 90px;
        font-size: 0.8rem;
        min-width: 60px;
        min-height: 90px;
    }
    
    .card-value {
        font-size: 0.9rem;
    }
    
    .card-suit {
        font-size: 0.8rem;
    }
    
    .main-menu-btn {
        padding: 15px;
        font-size: 1rem;
    }
    
    .game-header {
        padding: 8px;
        gap: 8px;
    }
    
    .scoreboard-content {
        gap: 8px;
    }
    
    .player-section {
        padding: 6px;
    }
    
    .round-info {
        padding: 5px 10px;
        font-size: 0.7rem;
    }
    
    .header-controls .btn {
        padding: 6px 8px;
        font-size: 0.7rem;
        min-width: 35px;
        max-width: 40px;
        height: 35px;
    }
    
    .header-controls .btn i {
        font-size: 0.9rem;
    }
    
    .modal-content {
        padding: 15px;
    }
    
    .modal-header h2 {
        font-size: 1.1rem;
    }
    
    .setting-item {
        gap: 8px;
    }
    
    .setting-label {
        font-size: 0.8rem;
    }
    
    .declaration-buttons .btn {
        padding: 8px;
        font-size: 0.7rem;
        min-width: 100px;
    }
    
    /* Make sure cards don't get too small */
    .player-hand .card,
    .table-cards .card {
        width: 40px;
        height: 60px;
    }
    
    /* Collected Cards for extra small mobile */
    .collected-cards-container {
        top: 15px;
        right: 15px;
        max-width: 100px;
        padding: 8px;
    }
    
    .collected-cards-container .card {
        width: 20px;
        height: 30px;
        font-size: 0.4rem;
    }
    
    .collected-cards-container .card-value {
        font-size: 0.5rem;
    }
    
    .collected-cards-container .card-suit {
        font-size: 0.4rem;
    }
    
    .collected-cards-label {
        font-size: 0.6rem;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    /* Touch devices */
    .card {
        cursor: pointer;
        transition: transform 0.2s ease;
    }
    
    .card:hover {
        transform: translateY(-5px) scale(1.05);
    }
    
    .btn {
        min-height: 44px; /* iOS recommended touch target */
        min-width: 44px;
    }
    
    .main-menu-btn {
        min-height: 50px;
    }
    
    .header-controls .btn {
        min-height: 44px;
    }
    
    .declaration-buttons .btn {
        min-height: 44px;
    }
}

/* Landscape mobile orientation */
@media (max-width: 768px) and (orientation: landscape) {
    .game-screen {
        padding: 5px;
        min-height: 100vh;
    }
    
    .game-header {
        flex-direction: row;
        gap: 8px;
        padding: 5px;
    }
    
    .scoreboard-content {
        flex-direction: row;
        gap: 10px;
    }
    
    .player-hand {
        gap: 5px;
        padding: 8px;
    }
    
    /* Better sized cards in landscape */
    .card {
        width: 45px;
        height: 68px;
        font-size: 0.7rem;
        min-width: 45px;
        min-height: 68px;
    }
    
    .card-value {
        font-size: 0.8rem;
    }
    
    .card-suit {
        font-size: 0.7rem;
    }
    
    .table-cards {
        gap: 5px;
        padding: 8px;
    }
    
    /* Make header more compact in landscape */
    .header-controls .btn {
        padding: 6px 8px;
        font-size: 0.7rem;
        min-width: 32px;
        max-width: 36px;
        height: 32px;
    }
    
    .header-controls .btn i {
        font-size: 0.8rem;
    }
    
    .round-info {
        padding: 4px 8px;
        font-size: 0.7rem;
    }
    
    .player-section {
        padding: 4px;
    }
    
    /* Collected Cards for landscape mobile */
    .collected-cards-container {
        top: 10px;
        right: 10px;
        max-width: 80px;
        padding: 5px;
    }
    
    .collected-cards-container .card {
        width: 18px;
        height: 25px;
        font-size: 0.4rem;
    }
    
    .collected-cards-container .card-value {
        font-size: 0.5rem;
    }
    
    .collected-cards-container .card-suit {
        font-size: 0.4rem;
    }
    
    .collected-cards-label {
        font-size: 0.5rem;
    }
}

