/* Font Loading Optimization and Fallbacks */
@font-face {
    font-family: 'Roboto-Fallback';
    src: local('Roboto'), local('Roboto-Regular'), local('Arial'), local('Helvetica'), local('sans-serif');
    font-display: swap; /* Ensures text remains visible during font load */
}

/* Detect if Google Fonts failed to load and apply fallbacks */
@supports (font-display: swap) {
    /* Modern browsers with font-display support */
    .fonts-loading {
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', Arial, sans-serif;
    }
}

/* Preload critical fonts for better performance */
@media (prefers-reduced-motion: no-preference) {
    :root {
        --font-roboto: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', Arial, sans-serif;
        --font-bebas: 'Bebas Neue', 'Arial Black', 'Helvetica Bold', Arial, sans-serif;
    }
}

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

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-roboto, 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', Arial, sans-serif);
    background: linear-gradient(135deg, #0f2027 0%, #203a43 50%, #2c5364 100%);
    color: white;
    min-height: 100vh;
    padding-top: 60px; /* Add padding to account for fixed prize pool banner */
}

/* Game Container */
.game-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    position: fixed;
    top: 60px; /* Position below the banner */
    left: 0;
    right: 0;
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 999; /* Below banner but above content */
    padding: 15px 0;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 2px solid #ffd700;
    margin-bottom: 20px;
}

.header-left {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.table-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 20px;
    font-size: 0.9rem;
    color: #ffd700;
    font-weight: 500;
}

.table-indicator i {
    font-size: 0.8rem;
}

.game-title {
    font-family: 'Bebas Neue', cursive;
    font-size: 3rem;
    color: #ffd700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: 2px;
}

.player-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-buttons {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-profile {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(255, 215, 0, 0.1);
    border: 2px solid #ffd700;
    border-radius: 8px;
    color: #ffd700;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.btn-profile:hover {
    background: rgba(255, 215, 0, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.3);
}

.btn-lobby {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(255, 107, 53, 0.1);
    border: 2px solid #ff6b35;
    border-radius: 8px;
    color: #ff6b35;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.btn-lobby:hover {
    background: rgba(255, 107, 53, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 53, 0.3);
}

.btn-logout {
    padding: 10px 20px;
    background: rgba(255, 68, 68, 0.1);
    border: 2px solid #ff4444;
    border-radius: 8px;
    color: #ff4444;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.btn-logout:hover {
    background: rgba(255, 68, 68, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 68, 68, 0.3);
}

.balance-display {
    background: rgba(255, 215, 0, 0.1);
    border: 2px solid #ffd700;
    border-radius: 10px;
    padding: 10px 20px;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    display: none; /* Hide the original balance display since it's now in the prize pool banner */
}

.balance-display.winning {
    background: rgba(68, 255, 68, 0.2);
    border-color: #44ff44;
    box-shadow: 0 0 20px rgba(68, 255, 68, 0.4);
}

.balance-label {
    color: #ffd700;
    margin-right: 10px;
}

.balance-amount {
    font-weight: 700;
    color: #fff;
}

/* Balance update animation */
@keyframes balanceUpdate {
    0% {
        transform: scale(1);
        color: #fff;
    }
    50% {
        transform: scale(1.1);
        color: #44ff44;
        text-shadow: 0 0 20px rgba(68, 255, 68, 0.8);
    }
    100% {
        transform: scale(1);
        color: #fff;
        text-shadow: none;
    }
}

.balance-amount.updating {
    animation: balanceUpdate 0.8s ease-out;
}

/* Game Status Bar */
.game-status {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-label {
    color: #aaa;
    font-size: 0.9rem;
}

.status-value {
    font-weight: 700;
    font-size: 1.1rem;
    color: #ffd700;
}

.point-number {
    background: #ff4444;
    color: #fff;
    padding: 5px 15px;
    border-radius: 5px;
    font-size: 1.3rem;
}

/* Game Area */
.game-area {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
    margin-bottom: 30px;
}

/* Craps Table - Authentic Casino Design */
.craps-table {
    background: linear-gradient(135deg, #1a5d1a 0%, #0f4a0f 50%, #1a5d1a 100%);
    border: 12px solid #8b4513;
    border-radius: 25px;
    padding: 30px;
    position: relative;
    box-shadow: 
        0 15px 35px rgba(0, 0, 0, 0.6),
        inset 0 2px 10px rgba(255, 255, 255, 0.1);
    min-height: 700px;
    background-image: 
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.03) 0%, transparent 50%);
}

/* Table felt texture */
.craps-table::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        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;
}

/* Betting Areas - Casino Style */
.bet-area {
    position: absolute;
    border: 3px solid #ffd700;
    background: rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px;
    overflow: visible;
    border-radius: 8px;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.3);
}

.bet-area:hover {
    background: rgba(255, 215, 0, 0.15);
    box-shadow: 
        inset 0 2px 5px rgba(0, 0, 0, 0.3),
        0 0 25px rgba(255, 215, 0, 0.4);
    transform: translateY(-1px);
    cursor: crosshair;
}

/* Visual feedback for free chip placement */
.bet-area::after {
    content: 'Click anywhere to place chips';
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: #ffd700;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.6rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 20;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.bet-area:hover::after {
    opacity: 1;
}

.bet-label {
    font-weight: 900;
    color: #ffd700;
    text-align: center;
    font-size: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    letter-spacing: 1px;
    font-family: 'Arial Black', Arial, sans-serif;
}

/* Pass Line - Curved like real table */
.pass-line {
    bottom: 25px;
    left: 25px;
    right: 350px;
    height: 90px;
    border-radius: 45px;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.1));
}

/* Don't Pass Bar */
.dont-pass {
    bottom: 125px;
    left: 25px;
    right: 350px;
    height: 70px;
    border-radius: 35px;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.15));
}

.dont-pass .bet-label {
    font-size: 0.9rem;
}

/* Field Bet - Distinctive styling */
.field {
    bottom: 210px;
    left: 25px;
    right: 350px;
    height: 90px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 215, 0, 0.05));
    border-color: #ffed4e;
}

.field-numbers {
    font-size: 1.1rem;
    color: #ffed4e;
    margin-top: 8px;
    font-weight: 700;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
    letter-spacing: 3px;
}

/* Place Bets - Number boxes like real casino */
.place-bets {
    position: absolute;
    top: 30px;
    left: 30px;
    right: 30px;
    display: flex;
    justify-content: space-around;
    gap: 10px;
}

.place-bet {
    width: 90px;
    height: 90px;
    border: 4px solid #ffd700;
    background: linear-gradient(145deg, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.1));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: visible;
    border-radius: 12px;
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.4),
        inset 0 2px 4px rgba(255, 255, 255, 0.1);
}

.place-bet:hover {
    background: linear-gradient(145deg, rgba(255, 215, 0, 0.2), rgba(255, 215, 0, 0.1));
    transform: translateY(-3px);
    box-shadow: 
        0 8px 16px rgba(0, 0, 0, 0.5),
        inset 0 2px 4px rgba(255, 255, 255, 0.2);
    cursor: crosshair;
}

/* Place bet tooltip */
.place-bet::after {
    content: 'Click anywhere to place chips';
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: #ffd700;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.6rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 20;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.place-bet:hover::after {
    opacity: 1;
}

.place-number {
    font-size: 2.5rem;
    font-weight: 900;
    color: #ffd700;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.8);
    font-family: 'Arial Black', Arial, sans-serif;
}

/* Come/Don't Come - Right side positioning */
.come {
    top: 140px;
    right: 30px;
    width: 180px;
    height: 90px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.1));
}

.dont-come {
    top: 250px;
    right: 30px;
    width: 180px;
    height: 70px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.15));
}

/* Dice Area - Center stage */
.dice-area {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    gap: 25px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 15px;
    border: 2px dashed rgba(255, 215, 0, 0.3);
}

.dice {
    width: 70px;
    height: 70px;
    background: linear-gradient(145deg, #ffffff, #f0f0f0);
    border-radius: 12px;
    box-shadow: 
        0 8px 16px rgba(0, 0, 0, 0.4),
        inset 0 2px 4px rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    border: 2px solid #ddd;
}

.dice:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 
        0 15px 30px rgba(0, 0, 0, 0.5),
        inset 0 2px 4px rgba(255, 255, 255, 0.9);
}

.dice:active {
    transform: translateY(-4px) scale(1.02);
}

/* Dice dots - More realistic */
.dot {
    width: 14px;
    height: 14px;
    background: #333;
    border-radius: 50%;
    position: absolute;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Dice face container */
.dice-face {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    padding: 12px;
}

/* Dice dot positions for different values */
.dice[data-value="1"] .dot { 
    top: 50%; 
    left: 50%; 
    transform: translate(-50%, -50%); 
}

.dice[data-value="2"] .dot:nth-child(1) { 
    top: 20%; 
    left: 20%; 
}
.dice[data-value="2"] .dot:nth-child(2) { 
    bottom: 20%; 
    right: 20%; 
}

.dice[data-value="3"] .dot:nth-child(1) { 
    top: 20%; 
    left: 20%; 
}
.dice[data-value="3"] .dot:nth-child(2) { 
    top: 50%; 
    left: 50%; 
    transform: translate(-50%, -50%); 
}
.dice[data-value="3"] .dot:nth-child(3) { 
    bottom: 20%; 
    right: 20%; 
}

.dice[data-value="4"] .dot:nth-child(1) { 
    top: 20%; 
    left: 20%; 
}
.dice[data-value="4"] .dot:nth-child(2) { 
    top: 20%; 
    right: 20%; 
}
.dice[data-value="4"] .dot:nth-child(3) { 
    bottom: 20%; 
    left: 20%; 
}
.dice[data-value="4"] .dot:nth-child(4) { 
    bottom: 20%; 
    right: 20%; 
}

.dice[data-value="5"] .dot:nth-child(1) { 
    top: 20%; 
    left: 20%; 
}
.dice[data-value="5"] .dot:nth-child(2) { 
    top: 20%; 
    right: 20%; 
}
.dice[data-value="5"] .dot:nth-child(3) { 
    top: 50%; 
    left: 50%; 
    transform: translate(-50%, -50%); 
}
.dice[data-value="5"] .dot:nth-child(4) { 
    bottom: 20%; 
    left: 20%; 
}
.dice[data-value="5"] .dot:nth-child(5) { 
    bottom: 20%; 
    right: 20%; 
}

.dice[data-value="6"] .dot:nth-child(1) { 
    top: 15%; 
    left: 20%; 
}
.dice[data-value="6"] .dot:nth-child(2) { 
    top: 15%; 
    right: 20%; 
}
.dice[data-value="6"] .dot:nth-child(3) { 
    top: 50%; 
    left: 15%; 
    transform: translateY(-50%); 
}
.dice[data-value="6"] .dot:nth-child(4) { 
    top: 50%; 
    right: 15%; 
    transform: translateY(-50%); 
}
.dice[data-value="6"] .dot:nth-child(5) { 
    bottom: 15%; 
    left: 20%; 
}
.dice[data-value="6"] .dot:nth-child(6) { 
    bottom: 15%; 
    right: 20%; 
}

/* Table rail/edge styling */
.craps-table::after {
    content: '';
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    border: 4px solid #654321;
    border-radius: 30px;
    box-shadow: 
        0 0 0 2px #8b4513,
        0 0 20px rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

/* Betting area labels - More casino-like typography */
.pass-line .bet-label {
    font-size: 1.3rem;
    letter-spacing: 2px;
}

.field .bet-label {
    font-size: 1.2rem;
    letter-spacing: 2px;
}

.come .bet-label,
.dont-come .bet-label {
    font-size: 1.1rem;
    letter-spacing: 1px;
}

/* Add casino-style corner decorations */
.craps-table .corner-decoration {
    position: absolute;
    width: 30px;
    height: 30px;
    border: 3px solid #ffd700;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.3), transparent);
}

.corner-decoration.top-left { top: 15px; left: 15px; }
.corner-decoration.top-right { top: 15px; right: 15px; }
.corner-decoration.bottom-left { bottom: 15px; left: 15px; }
.corner-decoration.bottom-right { bottom: 15px; right: 15px; }

/* Control Panel */
.control-panel {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Chip Selector - Enhanced Casino Style */
.chip-selector h3 {
    text-align: center;
    color: #ffd700;
    margin-bottom: 15px;
}

.chip-options {
    display: flex;
    justify-content: space-around;
    gap: 10px;
}

.chip {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 4px solid transparent;
    font-size: 0.85rem;
    position: relative;
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.3),
        inset 0 2px 4px rgba(255, 255, 255, 0.3);
}

/* Casino chip ridged edge effect */
.chip::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 50%;
    background: repeating-conic-gradient(
        from 0deg,
        rgba(0, 0, 0, 0.4) 0deg 3deg,
        transparent 3deg 6deg
    );
    z-index: -1;
}

/* Inner ring for casino chip authenticity */
.chip::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    bottom: 8px;
    border: 2px dashed rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    z-index: 1;
}

.chip:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 
        0 8px 16px rgba(0, 0, 0, 0.4),
        inset 0 2px 4px rgba(255, 255, 255, 0.4);
}

.chip.selected {
    border-color: #ffd700;
    transform: scale(1.15);
    box-shadow: 
        0 6px 12px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(255, 215, 0, 0.6),
        inset 0 2px 4px rgba(255, 255, 255, 0.4);
}

/* Disabled chip styles */
.chip.chip-disabled {
    opacity: 0.3;
    filter: grayscale(100%);
    cursor: not-allowed;
    transform: none !important;
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.2),
        inset 0 1px 2px rgba(255, 255, 255, 0.1) !important;
}

.chip.chip-disabled:hover {
    transform: none !important;
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.2),
        inset 0 1px 2px rgba(255, 255, 255, 0.1) !important;
}

.chip.chip-disabled::before,
.chip.chip-disabled::after {
    opacity: 0.3;
}

/* Enhanced chip colors with gradients */
.chip-1 { 
    background: radial-gradient(circle at 30% 30%, #ffffff, #f0f0f0, #e0e0e0);
    color: #333; 
    border-color: #ddd;
}

.chip-5 { 
    background: radial-gradient(circle at 30% 30%, #ff6666, #ff4444, #cc0000);
    color: #fff; 
    border-color: #990000;
}

.chip-10 { 
    background: radial-gradient(circle at 30% 30%, #6666ff, #4444ff, #0000cc);
    color: #fff; 
    border-color: #000099;
}

.chip-25 { 
    background: radial-gradient(circle at 30% 30%, #66ff66, #44ff44, #00cc00);
    color: #333; 
    border-color: #009900;
}

.chip-100 { 
    background: radial-gradient(circle at 30% 30%, #555, #333, #111);
    color: #ffd700; 
    border-color: #ffd700;
}

/* Chips on table - Enhanced casino style */
.chip-on-table {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 3px 8px rgba(0, 0, 0, 0.4),
        inset 0 2px 4px rgba(255, 255, 255, 0.3);
    border: 3px solid rgba(255, 255, 255, 0.3);
    position: relative;
    background-image: linear-gradient(145deg, rgba(255,255,255,0.2) 0%, transparent 50%, rgba(0,0,0,0.2) 100%);
}

/* Casino chip ridged edge for table chips */
.chip-on-table::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 50%;
    background: repeating-conic-gradient(
        from 0deg,
        rgba(0, 0, 0, 0.5) 0deg 4deg,
        transparent 4deg 8deg
    );
    z-index: -1;
}

/* Inner dashed ring for table chips */
.chip-on-table::after {
    content: '';
    position: absolute;
    top: 6px;
    left: 6px;
    right: 6px;
    bottom: 6px;
    border: 1px dashed rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    z-index: 1;
}

/* Enhanced chip colors for table chips with gradients */
.chip-on-table.chip-1 { 
    background: radial-gradient(circle at 30% 30%, #ffffff, #f0f0f0, #e0e0e0);
    color: #333; 
    border-color: #ddd;
}

.chip-on-table.chip-5 { 
    background: radial-gradient(circle at 30% 30%, #ff6666, #ff4444, #cc0000);
    color: #fff; 
    border-color: #990000;
}

.chip-on-table.chip-10 { 
    background: radial-gradient(circle at 30% 30%, #6666ff, #4444ff, #0000cc);
    color: #fff; 
    border-color: #000099;
}

.chip-on-table.chip-25 { 
    background: radial-gradient(circle at 30% 30%, #66ff66, #44ff44, #00cc00);
    color: #333; 
    border-color: #009900;
}

.chip-on-table.chip-100 { 
    background: radial-gradient(circle at 30% 30%, #555, #333, #111);
    color: #ffd700; 
    border-color: #ffd700;
}

/* Chips on table */
.chips-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    pointer-events: none;
    z-index: 10;
    justify-content: center;
    align-items: center;
    max-width: 90%;
}

.chip-on-table {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    font-size: 0.65rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.3),
        0 4px 8px rgba(0, 0, 0, 0.2),
        inset 0 1px 2px rgba(255, 255, 255, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.3);
    position: relative;
    background-image: linear-gradient(145deg, rgba(255,255,255,0.2) 0%, transparent 50%, rgba(0,0,0,0.2) 100%);
}

/* Chip edge pattern */
.chip-on-table::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    border-radius: 50%;
    border: 1px dashed rgba(255, 255, 255, 0.2);
}

/* Place number styling when chips are present */
.place-bet.has-chips .place-number {
    opacity: 0.7;
    font-size: 1.5rem;
}

/* Bet label styling when chips are present */
.bet-area.has-chips .bet-label {
    opacity: 0.8;
    font-size: 0.8rem;
}

/* Chip removal animation */
@keyframes chipRemove {
    0% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
    50% {
        transform: scale(1.2) translateY(-10px);
    }
    100% {
        transform: scale(0) translateY(-20px);
        opacity: 0;
    }
}

.chip-on-table.removing {
    animation: chipRemove 0.5s ease-out forwards;
}

/* Stack chips when multiple are placed */
.chip-stack {
    position: relative;
    display: inline-block;
}

.chip-stack .chip-on-table:not(:first-child) {
    position: absolute;
    top: -3px;
    left: 3px;
}

/* Chip colors matching the selector */
.chip-on-table.chip-1 { 
    background: #fff; 
    color: #333; 
    border-color: #ddd;
}
.chip-on-table.chip-5 { 
    background: #ff4444; 
    color: #fff; 
    border-color: #cc0000;
}
.chip-on-table.chip-10 { 
    background: #4444ff; 
    color: #fff; 
    border-color: #0000cc;
}
.chip-on-table.chip-25 { 
    background: #44ff44; 
    color: #333; 
    border-color: #00cc00;
}
.chip-on-table.chip-100 { 
    background: #333; 
    color: #ffd700; 
    border-color: #ffd700;
}

/* Specific positioning for different bet areas */
.pass-line .chips-container {
    bottom: 20px;
    top: auto;
    transform: translate(-50%, 0);
}

.dont-pass .chips-container {
    bottom: 15px;
    top: auto;
    transform: translate(-50%, 0);
}

.field .chips-container {
    top: 60%;
}

.place-bet .chips-container {
    top: 65%;
}

.come .chips-container,
.dont-come .chips-container {
    top: 50%;
}

/* Chip count display */
.chip-count {
    position: absolute;
    bottom: -18px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: #ffd700;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 700;
    white-space: nowrap;
    z-index: 11;
    transition: all 0.3s ease;
}

.chip-limit-warning .chip-count {
    background: rgba(255, 170, 0, 0.9);
    color: #000;
    box-shadow: 0 0 10px rgba(255, 170, 0, 0.6);
}

.chip-limit-reached .chip-count {
    background: rgba(68, 255, 68, 0.9);
    color: #000;
    box-shadow: 0 0 10px rgba(68, 255, 68, 0.6);
    animation: chipLimitPulse 1s ease-in-out infinite alternate;
}

@keyframes chipLimitPulse {
    0% {
        transform: translateX(-50%) scale(1);
    }
    100% {
        transform: translateX(-50%) scale(1.1);
    }
}

/* Bet area hover effect when chips are present */
.bet-area.has-chips,
.place-bet.has-chips {
    background: rgba(255, 215, 0, 0.15);
}

/* Animation for placing chips */
@keyframes chipPlace {
    0% {
        transform: scale(0) rotate(0deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotate(180deg);
        opacity: 0.8;
    }
    100% {
        transform: scale(1) rotate(360deg);
        opacity: 1;
    }
}

.chip-on-table {
    animation: chipPlace 0.3s ease-out;
}

/* Chip glow effect */
.chip-on-table::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.chip-on-table:hover::after {
    opacity: 1;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

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

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.btn-primary {
    background: #ffd700;
    color: #333;
}

.btn-primary:hover {
    background: #ffed4e;
}

.btn-secondary {
    background: #666;
    color: #fff;
}

.btn-secondary:hover {
    background: #777;
}

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

/* Current Bets */
.current-bets h3 {
    color: #ffd700;
    margin-bottom: 10px;
}

.bets-list {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 15px;
    max-height: 200px;
    overflow-y: auto;
}

.bet-item {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.no-bets {
    text-align: center;
    color: #666;
    font-style: italic;
}

/* Message Display */
.message-display {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    border: 3px solid #ffd700;
    border-radius: 15px;
    padding: 30px 50px;
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    z-index: 1000;
    display: none;
    animation: messageSlide 0.5s ease;
}

@keyframes messageSlide {
    from {
        transform: translate(-50%, -60%);
        opacity: 0;
    }
    to {
        transform: translate(-50%, -50%);
        opacity: 1;
    }
}

.message-display.win {
    color: #44ff44;
    border-color: #44ff44;
}

.message-display.lose {
    color: #ff4444;
    border-color: #ff4444;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-content {
    background: #1a1a2e;
    border: 2px solid #ffd700;
    border-radius: 15px;
    padding: 40px;
    max-width: 400px;
    width: 90%;
    text-align: center;
}

.modal-content h2 {
    color: #ffd700;
    margin-bottom: 20px;
}

.login-options {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 30px;
}

.btn-google {
    background: #fff;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-google img {
    width: 20px;
    height: 20px;
}

.divider {
    color: #666;
    margin: 10px 0;
}

#emailLoginForm {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#emailLoginForm input {
    padding: 12px;
    border: 1px solid #444;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 1rem;
}

#emailLoginForm input::placeholder {
    color: #999;
}

.signup-link {
    margin-top: 20px;
    color: #999;
}

.signup-link a {
    color: #ffd700;
    text-decoration: none;
}

.signup-link a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .game-area {
        grid-template-columns: 1fr;
    }
    
    .control-panel {
        order: -1;
    }
    
    .craps-table {
        min-height: 500px;
    }
}

@media (max-width: 768px) {
    .game-title {
        font-size: 2rem;
    }
    
    .game-header {
        flex-direction: column;
        gap: 15px;
    }
    
    .game-status {
        flex-wrap: wrap;
    }
    
    .place-bets {
        flex-wrap: wrap;
    }
    
    .place-bet {
        width: 60px;
        height: 60px;
    }
    
    .place-number {
        font-size: 1.5rem;
    }
}

/* Animations */
@keyframes rollDice {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(720deg); }
}

.dice.rolling {
    animation: rollDice 1s ease-out;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #ffd700;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #ffed4e;
}

/* On/Off Puck */
.puck {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    border: 3px solid #333;
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.3),
        inset 0 2px 4px rgba(255, 255, 255, 0.2);
    transition: all 0.5s ease;
    z-index: 15;
}

.puck.off {
    background: linear-gradient(145deg, #2c2c2c, #1a1a1a);
    color: #fff;
    border-color: #555;
    left: -1px; /* Moved 35% to the left (21px) from original 20px position */
}

.puck.on {
    background: linear-gradient(145deg, #f0f0f0, #d0d0d0);
    color: #000;
    border-color: #999;
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.3),
        inset 0 2px 4px rgba(255, 255, 255, 0.4);
}

.puck:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 6px 12px rgba(0, 0, 0, 0.4),
        inset 0 2px 4px rgba(255, 255, 255, 0.3);
}

/* Puck positions when on point numbers - aligned with place bet boxes */
.puck.on-point-4 {
    top: -15px; /* Moved up by 50% of puck height (30px) */
    left: calc(8.33% - 30px); /* First position in 6-column layout */
}

.puck.on-point-5 {
    top: -15px; /* Moved up by 50% of puck height (30px) */
    left: calc(25% - 30px); /* Second position */
}

.puck.on-point-6 {
    top: -15px; /* Moved up by 50% of puck height (30px) */
    left: calc(41.67% - 30px); /* Third position */
}

.puck.on-point-8 {
    top: -15px; /* Moved up by 50% of puck height (30px) */
    left: calc(58.33% - 30px); /* Fourth position */
}

.puck.on-point-9 {
    top: -15px; /* Moved up by 50% of puck height (30px) */
    left: calc(75% - 30px); /* Fifth position */
}

.puck.on-point-10 {
    top: -15px; /* Moved up by 50% of puck height (30px) */
    left: calc(91.67% - 30px); /* Sixth position */
}

/* Dice Roll History */
.dice-history {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    border: 2px solid rgba(255, 215, 0, 0.2);
}

.dice-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 215, 0, 0.3);
}

.dice-history-header h3 {
    color: #ffd700;
    margin: 0;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dice-history-header h3::before {
    content: '🎲';
    font-size: 1.5rem;
}

.history-controls {
    display: flex;
    gap: 10px;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.8rem;
}

.dice-history-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    min-height: 80px;
    align-items: center;
    justify-content: flex-start;
}

.no-history {
    color: #666;
    font-style: italic;
    text-align: center;
    width: 100%;
    padding: 20px;
}

/* History Roll Item */
.history-roll {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 215, 0, 0.2);
    transition: all 0.3s ease;
    position: relative;
    min-width: 60px;
}

.history-roll:hover {
    background: rgba(255, 215, 0, 0.1);
    border-color: rgba(255, 215, 0, 0.4);
    transform: translateY(-2px);
}

.history-roll.new-roll {
    animation: rollAppear 0.5s ease-out;
    border-color: #44ff44;
    box-shadow: 0 0 15px rgba(68, 255, 68, 0.3);
}

.history-roll.removing {
    animation: rollRemove 0.3s ease-in forwards;
}

@keyframes rollAppear {
    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;
    }
}

@keyframes rollRemove {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(0);
        opacity: 0;
    }
}

/* History Dice Pair */
.history-dice-pair {
    display: flex;
    gap: 3px;
}

.history-die {
    width: 24px;
    height: 24px;
    background: linear-gradient(145deg, #ffffff, #f0f0f0);
    border-radius: 4px;
    border: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.3),
        inset 0 1px 2px rgba(255, 255, 255, 0.8);
}

.history-die .dot {
    width: 3px;
    height: 3px;
    background: #333;
    border-radius: 50%;
    position: absolute;
}

/* History die dot positions */
.history-die[data-value="1"] .dot { 
    top: 50%; 
    left: 50%; 
    transform: translate(-50%, -50%); 
}

.history-die[data-value="2"] .dot:nth-child(1) { 
    top: 25%; 
    left: 25%; 
}
.history-die[data-value="2"] .dot:nth-child(2) { 
    bottom: 25%; 
    right: 25%; 
}

.history-die[data-value="3"] .dot:nth-child(1) { 
    top: 25%; 
    left: 25%; 
}
.history-die[data-value="3"] .dot:nth-child(2) { 
    top: 50%; 
    left: 50%; 
    transform: translate(-50%, -50%); 
}
.history-die[data-value="3"] .dot:nth-child(3) { 
    bottom: 25%; 
    right: 25%; 
}

.history-die[data-value="4"] .dot:nth-child(1) { 
    top: 25%; 
    left: 25%; 
}
.history-die[data-value="4"] .dot:nth-child(2) { 
    top: 25%; 
    right: 25%; 
}
.history-die[data-value="4"] .dot:nth-child(3) { 
    bottom: 25%; 
    left: 25%; 
}
.history-die[data-value="4"] .dot:nth-child(4) { 
    bottom: 25%; 
    right: 25%; 
}

.history-die[data-value="5"] .dot:nth-child(1) { 
    top: 25%; 
    left: 25%; 
}
.history-die[data-value="5"] .dot:nth-child(2) { 
    top: 25%; 
    right: 25%; 
}
.history-die[data-value="5"] .dot:nth-child(3) { 
    top: 50%; 
    left: 50%; 
    transform: translate(-50%, -50%); 
}
.history-die[data-value="5"] .dot:nth-child(4) { 
    bottom: 25%; 
    left: 25%; 
}
.history-die[data-value="5"] .dot:nth-child(5) { 
    bottom: 25%; 
    right: 25%; 
}

.history-die[data-value="6"] .dot:nth-child(1) { 
    top: 20%; 
    left: 25%; 
}
.history-die[data-value="6"] .dot:nth-child(2) { 
    top: 20%; 
    right: 25%; 
}
.history-die[data-value="6"] .dot:nth-child(3) { 
    top: 50%; 
    left: 20%; 
    transform: translateY(-50%); 
}
.history-die[data-value="6"] .dot:nth-child(4) { 
    top: 50%; 
    right: 20%; 
    transform: translateY(-50%); 
}
.history-die[data-value="6"] .dot:nth-child(5) { 
    bottom: 20%; 
    left: 25%; 
}
.history-die[data-value="6"] .dot:nth-child(6) { 
    bottom: 20%; 
    right: 25%; 
}

/* History Roll Info */
.history-roll-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.history-total {
    font-size: 0.9rem;
    font-weight: 700;
    color: #ffd700;
}

.history-outcome {
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
    text-transform: uppercase;
    font-weight: 600;
}

.history-outcome.win {
    background: rgba(68, 255, 68, 0.2);
    color: #44ff44;
    border: 1px solid #44ff44;
}

.history-outcome.lose {
    background: rgba(255, 68, 68, 0.2);
    color: #ff4444;
    border: 1px solid #ff4444;
}

.history-outcome.point {
    background: rgba(255, 215, 0, 0.2);
    color: #ffd700;
    border: 1px solid #ffd700;
}

.history-outcome.continue {
    background: rgba(255, 255, 255, 0.1);
    color: #ccc;
    border: 1px solid #666;
}

/* Responsive adjustments for history */
@media (max-width: 768px) {
    .dice-history {
        padding: 15px;
    }
    
    .dice-history-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .dice-history-container {
        gap: 8px;
    }
    
    .history-roll {
        min-width: 50px;
        padding: 6px;
    }
    
    .history-die {
        width: 20px;
        height: 20px;
    }
    
    .history-die .dot {
        width: 2px;
        height: 2px;
    }
}

/* Chip flying animations */
@keyframes chipFlyToWin {
    0% {
        transform: scale(1) translateY(0) rotate(0deg);
        opacity: 1;
        filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.8));
    }
    20% {
        transform: scale(1.2) translateY(-20px) rotate(90deg);
        opacity: 0.9;
        filter: drop-shadow(0 0 15px rgba(255, 215, 0, 1));
    }
    60% {
        transform: scale(1.0) translate(calc(var(--dest-x) * 0.6), calc(var(--dest-y) * 0.6)) rotate(270deg);
        opacity: 0.7;
        filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.6));
    }
    100% {
        transform: scale(0.5) translate(var(--dest-x), var(--dest-y)) rotate(360deg);
        opacity: 0;
        filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.3));
    }
}

@keyframes chipFlyToLose {
    0% {
        transform: scale(1) translateY(0) rotate(0deg);
        opacity: 1;
        filter: drop-shadow(0 0 10px rgba(255, 68, 68, 0.8));
    }
    20% {
        transform: scale(1.1) translateY(-15px) rotate(-45deg);
        opacity: 0.9;
        filter: drop-shadow(0 0 15px rgba(255, 68, 68, 1));
    }
    60% {
        transform: scale(0.8) translate(calc(var(--dest-x) * 0.6), calc(var(--dest-y) * 0.6)) rotate(-180deg);
        opacity: 0.5;
        filter: drop-shadow(0 0 20px rgba(255, 68, 68, 0.6));
    }
    100% {
        transform: scale(0.3) translate(var(--dest-x), var(--dest-y)) rotate(-270deg);
        opacity: 0;
        filter: drop-shadow(0 0 5px rgba(255, 68, 68, 0.3));
    }
}

@keyframes chipTrail {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0.3);
    }
}

.chip-flying-win {
    animation: chipFlyToWin 2s ease-out forwards;
    z-index: 1000;
    pointer-events: none;
    box-shadow: 0 8px 20px rgba(255, 215, 0, 0.6);
}

.chip-flying-lose {
    animation: chipFlyToLose 1.5s ease-out forwards;
    z-index: 1000;
    pointer-events: none;
    box-shadow: 0 8px 20px rgba(255, 68, 68, 0.6);
}

/* Particle trail effect */
.chip-trail {
    position: fixed;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 999;
    animation: chipTrail 0.8s ease-out forwards;
}

.chip-trail.win {
    background: radial-gradient(circle, #ffd700, #ffed4e);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
}

.chip-trail.lose {
    background: radial-gradient(circle, #ff4444, #ff6666);
    box-shadow: 0 0 10px rgba(255, 68, 68, 0.8);
}

/* Chip limit visual feedback */
.bet-area.chip-limit-warning,
.place-bet.chip-limit-warning {
    border-color: #ffaa00;
    background: rgba(255, 170, 0, 0.2);
    box-shadow: 
        inset 0 2px 5px rgba(0, 0, 0, 0.3),
        0 0 15px rgba(255, 170, 0, 0.4);
}

.bet-area.chip-limit-reached,
.place-bet.chip-limit-reached {
    border-color: #44ff44;
    background: rgba(68, 255, 68, 0.2);
    box-shadow: 
        inset 0 2px 5px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(68, 255, 68, 0.5);
    cursor: not-allowed;
}

.bet-area.chip-limit-reached:hover,
.place-bet.chip-limit-reached:hover {
    transform: none;
    background: rgba(68, 255, 68, 0.25);
}

/* Prize Pool Banner */
.prize-pool-banner {
    background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
    color: #fff;
    padding: 12px 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    border-bottom: 2px solid #ffd700;
}

.prize-pool-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0 20px;
}

.prize-pool-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 140px; /* Slightly smaller to fit 4 items */
}

.prize-pool-label {
    font-size: 0.9rem;
    color: #b8c5d1;
    margin-bottom: 4px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.prize-pool-amount {
    font-size: 1.4rem;
    font-weight: bold;
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
    font-family: 'Bebas Neue', cursive;
}

.prize-pool-icon {
    margin-right: 8px;
    font-size: 1.2rem;
}

.hourly-pool .prize-pool-icon {
    color: #ff6b35;
}

.weekly-pool .prize-pool-icon {
    color: #4ecdc4;
}

.monthly-pool .prize-pool-icon {
    color: #ffd700;
}

.user-balance .prize-pool-icon {
    color: #44ff44;
}

/* Responsive design for banner */
@media (max-width: 768px) {
    .prize-pool-container {
        flex-direction: column;
        gap: 8px;
        padding: 8px 20px;
    }
    
    .prize-pool-item {
        flex-direction: row;
        min-width: auto;
        gap: 10px;
    }
    
    .prize-pool-label {
        margin-bottom: 0;
        font-size: 0.8rem;
    }
    
    .prize-pool-amount {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .prize-pool-banner {
        padding: 8px 0;
    }
    
    .prize-pool-amount {
        font-size: 1rem;
    }
    
    .prize-pool-label {
        font-size: 0.7rem;
    }
} 

/* Tournament Styles */
.tournament-banner {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: white;
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.tournament-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.tournament-timer {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.2rem;
    font-weight: bold;
}

.tournament-timer i {
    color: #ffd700;
    animation: pulse 2s infinite;
}

.tournament-name {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
    font-weight: 600;
}

.tournament-name i {
    color: #ffd700;
}

.tournament-score {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 15px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.score-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

.score-value {
    font-size: 1.3rem;
    font-weight: bold;
    color: #ffd700;
}

/* Tournament Leaderboard */
.tournament-leaderboard {
    position: fixed;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 280px;
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid #ffd700;
    border-radius: 15px;
    padding: 20px;
    z-index: 100;
    max-height: 70vh;
    overflow-y: auto;
}

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

.leaderboard-header h3 {
    color: #ffd700;
    margin: 0;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.refresh-leaderboard {
    background: none;
    border: 1px solid #ffd700;
    color: #ffd700;
    padding: 5px 8px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.refresh-leaderboard:hover {
    background: #ffd700;
    color: #000;
}

.leaderboard-list {
    color: white;
}

.leaderboard-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 215, 0, 0.2);
}

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

.player-position {
    font-weight: bold;
    color: #ffd700;
    width: 30px;
}

.player-info {
    flex: 1;
    margin-left: 10px;
}

.player-name {
    font-size: 0.9rem;
    font-weight: 600;
}

.player-score {
    font-size: 0.8rem;
    color: #ccc;
}

.player-score-value {
    font-weight: bold;
    color: #ffd700;
}

.loading-leaderboard {
    text-align: center;
    color: #ccc;
    padding: 20px 0;
}

/* Tournament Results Modal */
.tournament-results {
    max-width: 500px;
    width: 90%;
}

.tournament-results .modal-header {
    text-align: center;
    padding-bottom: 20px;
    border-bottom: 2px solid #ffd700;
    margin-bottom: 20px;
}

.tournament-results h2 {
    color: #ffd700;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.final-position {
    text-align: center;
    margin-bottom: 20px;
}

.position-display {
    margin-bottom: 15px;
}

.position-label {
    display: block;
    font-size: 1.1rem;
    color: #ccc;
    margin-bottom: 5px;
}

.position-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: #ffd700;
}

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

.final-score .score-label {
    color: #ccc;
}

.final-score .score-value {
    font-weight: bold;
    color: #ffd700;
}

.prize-info {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    margin-bottom: 20px;
    color: white;
}

.prize-amount {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.prize-amount i {
    color: #ffd700;
}

.balance-update {
    font-size: 1rem;
    opacity: 0.9;
}

.no-prize {
    background: rgba(255, 107, 53, 0.1);
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 20px;
    color: #ff6b35;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.modal-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.modal-actions .btn {
    flex: 1;
    max-width: 150px;
}

/* Responsive Tournament Styles */
@media (max-width: 1200px) {
    .tournament-leaderboard {
        position: relative;
        left: auto;
        top: auto;
        transform: none;
        width: 100%;
        margin-bottom: 20px;
        max-height: 300px;
    }
    
    .game-area {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .tournament-info {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .tournament-timer,
    .tournament-name,
    .tournament-score {
        justify-content: center;
    }
    
    .tournament-leaderboard {
        width: 100%;
        position: relative;
        left: auto;
        top: auto;
        transform: none;
        margin-bottom: 20px;
    }
    
    .position-value {
        font-size: 2rem;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .modal-actions .btn {
        max-width: none;
    }
}

/* Animation for tournament timer */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* Spectator Mode Styles */
.spectator-banner {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: white;
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 10;
}

.spectator-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.spectator-info > span {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 600;
}

.spectator-info i {
    color: #ffd700;
    font-size: 1.2rem;
    animation: fadeInOut 2s ease-in-out infinite;
}

.exit-spectator {
    background: rgba(220, 53, 69, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.exit-spectator:hover {
    background: #dc3545;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(220, 53, 69, 0.4);
}

/* Bot Activity Indicator */
.bot-activity-indicator {
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.3);
    border-radius: 8px;
    padding: 10px 15px;
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.bot-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.bot-status i {
    color: #4caf50;
    font-size: 1.1rem;
}

.status-active {
    color: #4caf50;
    font-weight: 600;
}

.bot-style {
    font-size: 0.85rem;
    color: #ffd700;
    font-weight: 500;
}

/* Spectator Mode UI Adjustments */
.spectator-mode .bet-area,
.spectator-mode .place-bet {
    opacity: 0.6;
    cursor: not-allowed;
}

.spectator-mode .chip {
    opacity: 0.5;
    cursor: not-allowed;
}

.spectator-mode .chip-selector h3::after {
    content: " (Viewing Only)";
    color: #ff9800;
    font-size: 0.8rem;
    font-weight: normal;
}

/* Enhanced Tournament Banner for Spectator */
#spectatorTournamentBanner {
    background: linear-gradient(135deg, #9c27b0 0%, #673ab7 100%);
    margin-top: -10px;
}

#spectatorTournamentBanner .tournament-info {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 15px;
}

#spectatorTournamentBanner .score-label {
    color: #e1bee7;
}

#spectatorTournamentBanner .score-value {
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    animation: scorePulse 1.5s ease-in-out infinite;
}

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

/* Responsive Spectator Mode */
@media (max-width: 768px) {
    .spectator-banner {
        padding: 12px 15px;
    }
    
    .spectator-info {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .exit-spectator {
        width: 100%;
        justify-content: center;
    }
    
    .bot-activity-indicator {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
} 

/* Chip limit indicator for betting areas */
.chip-limit-warning {
    position: absolute;
    top: -25px;
    right: 0;
    background: #ff5252;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    display: none;
    animation: pulse 1s ease-in-out infinite;
}

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

/* Spectator Mode Styles */
.spectator-banner {
    background: linear-gradient(135deg, #6B46C1 0%, #9333EA 100%);
    padding: 15px;
    border-bottom: 3px solid #7C3AED;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.spectator-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    color: white;
}

.spectator-info i {
    margin-right: 10px;
    font-size: 1.2rem;
}

.spectator-info span {
    font-size: 1.1rem;
    font-weight: 600;
}

.exit-spectator {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid white;
    color: white;
    padding: 8px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.exit-spectator:hover {
    background: white;
    color: #7C3AED;
    transform: scale(1.05);
}

.spectator-status-indicator {
    position: fixed;
    top: 120px;
    right: 20px;
    z-index: 100;
    animation: slideInRight 0.5s ease;
}

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

.spectator-message {
    background: rgba(0, 0, 0, 0.7);
    padding: 20px;
    border-radius: 10px;
    margin: 20px auto;
    max-width: 400px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

#spectatorTournamentBanner {
    background: linear-gradient(135deg, #059669 0%, #10B981 100%);
    margin: 10px 0;
    animation: fadeIn 0.5s ease;
}

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

.bot-activity-indicator {
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #4CAF50;
    border-radius: 10px;
    padding: 15px;
    margin: 10px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bot-status {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
}

.status-active {
    color: #4CAF50;
    font-weight: 600;
}

.bot-style {
    color: #FFC107;
    font-style: italic;
}

/* Disabled controls in spectator mode */
.spectator-mode .chip {
    opacity: 0.4;
    cursor: not-allowed;
}

.spectator-mode .bet-area {
    opacity: 0.6;
    cursor: not-allowed;
}

.spectator-mode .roll-button:disabled {
    opacity: 0.8;
}

/* Processing Button Styles */
.roll-dice.processing {
    background: linear-gradient(135deg, #FF9800 0%, #F57C00 100%);
    color: white;
    cursor: not-allowed;
    position: relative;
    overflow: hidden;
}

.roll-dice.processing::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: processing-shimmer 1.5s infinite;
}

@keyframes processing-shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

.roll-dice:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Tournament Processing Message */
.message-display.processing {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    color: white;
    border-left: 4px solid #FFC107;
}

/* Prize pool banner balance animations */
.prize-pool-amount.updating {
    animation: balanceUpdate 0.8s ease-out;
}