/* CSS Custom Properties for consistent theming */
:root {
    --casino-green: #0f5132;
    --casino-dark-green: #0a3d24;
    --casino-gold: #ffd700;
    --casino-red: #dc3545;
    --casino-black: #1a1a1a;
    --casino-white: #ffffff;
    --casino-gray: #6c757d;
    --casino-light-gray: #e9ecef;
    --casino-border: #28a745;
    --casino-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    --casino-card-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: 
        radial-gradient(circle at 50% 50%, var(--casino-green) 0%, var(--casino-dark-green) 100%),
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 10px,
            rgba(255, 255, 255, 0.03) 10px,
            rgba(255, 255, 255, 0.03) 20px
        );
    min-height: 100vh;
    color: var(--casino-white);
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
}

/* Casino table border effect */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 8px solid var(--casino-border);
    border-radius: 20px;
    pointer-events: none;
    z-index: 1;
    box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.5);
}

/* Game Container */
.game-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: relative;
    z-index: 2;
}

/* Casino table felt texture overlay */
.game-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 70% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* Header Styles */
.game-header {
    text-align: center;
    padding: 1.5rem 0;
    background: linear-gradient(135deg, var(--casino-black) 0%, #2c2c2c 100%);
    border-radius: 15px;
    border: 3px solid var(--casino-gold);
    box-shadow: var(--casino-shadow);
    margin-bottom: 1rem;
    position: relative;
    overflow: hidden;
}

.game-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.3), transparent);
    animation: casinoShine 3s infinite;
}

@keyframes casinoShine {
    0% { left: -100%; }
    100% { left: 100%; }
}

.game-title {
    font-size: 3rem;
    font-weight: 800;
    color: var(--casino-gold);
    margin-bottom: 0.5rem;
    text-shadow: 
        2px 2px 4px rgba(0, 0, 0, 0.8),
        0 0 20px rgba(255, 215, 0, 0.5);
    font-family: 'Georgia', serif;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.game-subtitle {
    font-size: 1.2rem;
    color: var(--casino-white);
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

/* Game Status */
.game-status {
    background: linear-gradient(135deg, var(--casino-black) 0%, #2c2c2c 100%);
    padding: 1.5rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: var(--casino-shadow);
    border: 3px solid var(--casino-gold);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* Status State Styles */
.game-status.status-waiting {
    border-color: #ffa500;
    background: linear-gradient(135deg, rgba(255, 165, 0, 0.2) 0%, #2c2c2c 100%);
    animation: pulse-waiting 2s infinite;
}

.game-status.status-ready {
    border-color: #00ff00;
    background: linear-gradient(135deg, rgba(0, 255, 0, 0.2) 0%, #2c2c2c 100%);
    animation: pulse-ready 1.5s infinite;
}

.game-status.status-playing {
    border-color: #00bfff;
    background: linear-gradient(135deg, rgba(0, 191, 255, 0.2) 0%, #2c2c2c 100%);
    animation: pulse-playing 1s infinite;
}

.game-status.status-dealer {
    border-color: #ff6b6b;
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.2) 0%, #2c2c2c 100%);
    animation: pulse-dealer 1.2s infinite;
}

.game-status::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(255, 215, 0, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 215, 0, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.status-text {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--casino-gold);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    position: relative;
    z-index: 1;
}

/* Money Display */
.money-display {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.money-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 215, 0, 0.08);
    border-radius: 12px;
    border: 1px solid rgba(255, 215, 0, 0.2);
    min-width: 80px;
}

.money-label {
    font-size: 0.8rem;
    color: var(--casino-gold);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.money-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--casino-white);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

/* Betting Controls */
.betting-controls {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    position: relative;
    z-index: 1;
    border-top: 1px solid rgba(255, 215, 0, 0.3);
    padding-top: 1rem;
}

.bet-amounts {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.bet-btn {
    padding: 0.6rem 1.25rem;
    font-size: 1rem;
    font-weight: 700;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: 2px solid #1e7e34;
    box-shadow: var(--casino-card-shadow);
    position: relative;
    overflow: hidden;
    min-width: 70px;
}

.bet-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.bet-btn:hover::before {
    left: 100%;
}

.bet-btn:hover {
    background: linear-gradient(135deg, #20c997 0%, #28a745 100%);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.bet-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
    filter: grayscale(100%);
}

.bet-actions {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
}

.bet-action-btn {
    padding: 0.6rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 700;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: var(--casino-card-shadow);
    position: relative;
    overflow: hidden;
    min-width: 100px;
}

#placeBetBtn {
    background: linear-gradient(135deg, var(--casino-gold) 0%, #ffed4e 100%);
    color: var(--casino-black);
    border: 2px solid var(--casino-black);
}

#placeBetBtn:hover:not(:disabled) {
    background: linear-gradient(135deg, #ffed4e 0%, var(--casino-gold) 100%);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
}

#clearBetBtn {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: white;
    border: 2px solid #495057;
}

#clearBetBtn:hover {
    background: linear-gradient(135deg, #495057 0%, #6c757d 100%);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.4);
}

.bet-action-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
    filter: grayscale(100%);
}

/* Player Sections */
.player-section {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.5) 100%);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--casino-shadow);
    border: 3px solid var(--casino-gold);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.player-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 30% 30%, rgba(255, 215, 0, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 70% 70%, rgba(255, 215, 0, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.player-title {
    font-size: 1.8rem;
    color: var(--casino-gold);
    margin-bottom: 1.5rem;
    text-align: center;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    z-index: 1;
}

.score-display {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, var(--casino-gold) 0%, #ffed4e 100%);
    border-radius: 25px;
    border: 2px solid var(--casino-black);
    box-shadow: var(--casino-card-shadow);
    position: relative;
    z-index: 1;
}

.score-display::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    background: linear-gradient(135deg, var(--casino-gold) 0%, #ffed4e 100%);
    border-radius: 23px;
    z-index: -1;
}

.score-label {
    font-weight: 700;
    color: var(--casino-black);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.score-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--casino-black);
    min-width: 2.5rem;
    text-align: center;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.5);
}

/* Cards Container */
.cards-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    min-height: 140px;
    align-items: center;
    padding: 1rem;
    background: 
        radial-gradient(circle at 50% 50%, rgba(255, 215, 0, 0.05) 0%, transparent 70%),
        linear-gradient(45deg, transparent 49%, rgba(255, 215, 0, 0.02) 50%, transparent 51%);
    background-size: 100% 100%, 20px 20px;
    border-radius: 15px;
    border: 1px solid rgba(255, 215, 0, 0.2);
    position: relative;
    z-index: 1;
}

/* Casino table felt texture for cards area */
.cards-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 2px,
            rgba(255, 255, 255, 0.01) 2px,
            rgba(255, 255, 255, 0.01) 4px
        );
    border-radius: 15px;
    pointer-events: none;
    z-index: -1;
}

/* Card Styles */
.card {
    width: 90px;
    height: 130px;
    background: linear-gradient(135deg, var(--casino-white) 0%, #f8f9fa 100%);
    border: 2px solid var(--casino-black);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 0.75rem;
    box-shadow: var(--casino-card-shadow);
    transition: var(--transition);
    position: relative;
    transform: translateY(0) rotate(0deg);
    animation: dealCard 0.6s ease-out;
    cursor: pointer;
}

.card:hover {
    transform: translateY(-8px) rotate(2deg);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
}

.card.hidden {
    background: 
        linear-gradient(135deg, var(--casino-black) 0%, #2c2c2c 100%),
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 8px,
            rgba(255, 215, 0, 0.3) 8px,
            rgba(255, 215, 0, 0.3) 16px
        );
    border-color: var(--casino-gold);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

.card.hidden::before {
    content: '♠';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    color: var(--casino-gold);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.card-value {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--casino-black);
    font-family: 'Georgia', serif;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.card-suit {
    font-size: 2rem;
    color: var(--casino-red);
    text-align: center;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.card.red .card-suit,
.card.red .card-value {
    color: var(--casino-red);
}

.card.black .card-suit,
.card.black .card-value {
    color: var(--casino-black);
}

/* Card corner indicators */
.card::before {
    content: attr(data-value);
    position: absolute;
    top: 5px;
    left: 8px;
    font-size: 1rem;
    font-weight: 800;
    color: inherit;
}

.card::after {
    content: attr(data-suit);
    position: absolute;
    top: 20px;
    left: 8px;
    font-size: 1.2rem;
    color: inherit;
}

/* Card Animation */
@keyframes dealCard {
    from {
        opacity: 0;
        transform: translateY(-100px) rotate(-15deg) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translateY(0) rotate(0deg) scale(1);
    }
}

/* Card dealing sound effect simulation */
.card {
    animation: dealCard 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Staggered card dealing */
.card:nth-child(1) { animation-delay: 0s; }
.card:nth-child(2) { animation-delay: 0.1s; }
.card:nth-child(3) { animation-delay: 0.2s; }
.card:nth-child(4) { animation-delay: 0.3s; }
.card:nth-child(5) { animation-delay: 0.4s; }

/* Main Game Area */
.main-game-area {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

/* Game Controls */
.game-controls {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.6) 100%);
    padding: 1.5rem;
    border-radius: 20px;
    box-shadow: var(--casino-shadow);
    border: 3px solid var(--casino-gold);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    min-width: 300px;
    flex-shrink: 0;
}

.game-controls::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(255, 215, 0, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 215, 0, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.control-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
    margin-bottom: 1.5rem;
}

.control-btn {
    padding: 1rem 2rem;
    font-size: 1.2rem;
    font-weight: 700;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    min-width: 120px;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--casino-card-shadow);
}

.control-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.control-btn:hover::before {
    left: 100%;
}

.hit-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: 2px solid #1e7e34;
}

.hit-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #20c997 0%, #28a745 100%);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.4);
}

.stand-btn {
    background: linear-gradient(135deg, #fd7e14 0%, #ffc107 100%);
    color: white;
    border: 2px solid #e55a00;
}

.stand-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(253, 126, 20, 0.4);
}

.new-game-btn {
    background: linear-gradient(135deg, #007bff 0%, #6610f2 100%);
    color: white;
    border: 2px solid #0056b3;
}

.new-game-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #6610f2 0%, #007bff 100%);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.4);
}

.control-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
    filter: grayscale(100%);
}

/* Game Statistics */
.game-stats {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.6) 100%);
    padding: 1.5rem;
    border-radius: 20px;
    box-shadow: var(--casino-shadow);
    border: 3px solid var(--casino-gold);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    flex: 1;
    min-height: 200px;
}

.game-stats::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 30% 30%, rgba(255, 215, 0, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 70% 70%, rgba(255, 215, 0, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    z-index: 1;
    padding: 1rem;
    background: rgba(255, 215, 0, 0.1);
    border-radius: 15px;
    border: 1px solid rgba(255, 215, 0, 0.3);
    min-width: 80px;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--casino-gold);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--casino-white);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-content {
    background: linear-gradient(135deg, var(--casino-black) 0%, #2c2c2c 100%);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: var(--casino-shadow);
    max-width: 500px;
    width: 90%;
    text-align: center;
    border: 3px solid var(--casino-gold);
    position: relative;
    overflow: hidden;
}

.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(255, 215, 0, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 215, 0, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.modal-content h3 {
    color: var(--casino-gold);
    margin-bottom: 1.5rem;
    font-size: 2rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    position: relative;
    z-index: 1;
}

.modal-content ul {
    text-align: left;
    margin: 1.5rem 0;
    padding-left: 2rem;
    position: relative;
    z-index: 1;
}

.modal-content li {
    margin-bottom: 0.75rem;
    color: var(--casino-white);
    font-size: 1.1rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.modal-close {
    background: linear-gradient(135deg, var(--casino-gold) 0%, #ffed4e 100%);
    color: var(--casino-black);
    border: none;
    padding: 1rem 2rem;
    border-radius: 15px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 2px solid var(--casino-black);
    box-shadow: var(--casino-card-shadow);
    position: relative;
    z-index: 1;
}

.modal-close:hover {
    background: linear-gradient(135deg, #ffed4e 0%, var(--casino-gold) 100%);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4);
}

/* Help Button */
.help-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--casino-gold) 0%, #ffed4e 100%);
    color: var(--casino-black);
    border: 3px solid var(--casino-black);
    font-size: 2rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: var(--casino-shadow);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 100;
    position: relative;
    overflow: hidden;
}

.help-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s;
}

.help-btn:hover::before {
    left: 100%;
}

.help-btn:hover {
    background: linear-gradient(135deg, #ffed4e 0%, var(--casino-gold) 100%);
    transform: scale(1.15) rotate(5deg);
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.5);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .game-container {
        padding: 0.5rem;
        gap: 1rem;
    }

    .game-title {
        font-size: 2.2rem;
        letter-spacing: 2px;
    }

    .game-subtitle {
        font-size: 1rem;
    }

    .player-section {
        padding: 1.5rem;
    }

    .player-title {
        font-size: 1.4rem;
        letter-spacing: 1px;
    }

    .card {
        width: 75px;
        height: 110px;
    }

    .control-buttons {
        flex-direction: column;
        align-items: center;
    }

    .control-btn {
        width: 100%;
        max-width: 250px;
        padding: 1.2rem;
        font-size: 1.1rem;
    }

    .main-game-area {
        flex-direction: column;
        gap: 1.5rem;
    }

    .game-controls {
        min-width: auto;
        width: 100%;
    }

    .game-stats {
        flex-direction: column;
        gap: 1rem;
        min-height: auto;
    }

    .money-display {
        flex-direction: column;
        gap: 0.75rem;
        margin-bottom: 1rem;
    }

    .control-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .control-btn {
        width: 100%;
        max-width: 250px;
        padding: 1.2rem;
        font-size: 1.1rem;
    }

    .bet-amounts {
        flex-direction: row;
        justify-content: center;
        gap: 0.5rem;
        flex-wrap: wrap;
    }

    .bet-btn {
        min-width: 60px;
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .bet-actions {
        flex-direction: row;
        justify-content: center;
        gap: 0.5rem;
    }

    .bet-action-btn {
        min-width: 80px;
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }

    .help-btn {
        bottom: 1rem;
        right: 1rem;
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }

    .modal-content {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    /* Casino table border adjustment for mobile */
    body::before {
        border-width: 4px;
        border-radius: 15px;
    }
}

@media (max-width: 480px) {
    .game-title {
        font-size: 1.8rem;
    }

    .card {
        width: 60px;
        height: 90px;
    }

    .card-value {
        font-size: 1rem;
    }

    .card-suit {
        font-size: 1.2rem;
    }

    .score-value {
        font-size: 1.3rem;
    }

    .control-btn {
        padding: 0.875rem;
        font-size: 0.95rem;
    }
}

/* Landscape Mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .game-container {
        gap: 0.75rem;
    }

    .game-header {
        padding: 0.5rem 0;
    }

    .game-title {
        font-size: 1.8rem;
        margin-bottom: 0.25rem;
    }

    .player-section {
        padding: 0.75rem;
    }

    .card {
        width: 60px;
        height: 90px;
    }

    .help-btn {
        bottom: 0.5rem;
        right: 0.5rem;
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .card {
        border-width: 1px;
    }
    
    .control-btn {
        border-width: 1px;
    }
}

/* Status Pulse Animations */
@keyframes pulse-waiting {
    0%, 100% { 
        box-shadow: 0 0 20px rgba(255, 165, 0, 0.3);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 0 30px rgba(255, 165, 0, 0.6);
        transform: scale(1.02);
    }
}

@keyframes pulse-ready {
    0%, 100% { 
        box-shadow: 0 0 20px rgba(0, 255, 0, 0.3);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 0 30px rgba(0, 255, 0, 0.6);
        transform: scale(1.02);
    }
}

@keyframes pulse-playing {
    0%, 100% { 
        box-shadow: 0 0 20px rgba(0, 191, 255, 0.3);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 0 30px rgba(0, 191, 255, 0.6);
        transform: scale(1.02);
    }
}

@keyframes pulse-dealer {
    0%, 100% { 
        box-shadow: 0 0 20px rgba(255, 107, 107, 0.3);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 0 30px rgba(255, 107, 107, 0.6);
        transform: scale(1.02);
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .card {
        animation: none;
        transition: none;
    }
    
    .control-btn {
        transition: none;
    }
    
    .help-btn {
        transition: none;
    }
    
    .game-status {
        animation: none;
    }
}
