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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: #ffffff;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    max-width: 600px;
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    background: linear-gradient(45deg, #00ff88, #00ccff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

header p {
    color: #b8c5d6;
    font-size: 1.1rem;
}

/* Header and Authentication Styles */
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.logo-section h1 {
    margin: 0;
    color: #00ff88;
    font-size: 2.5rem;
    font-weight: 700;
}

.logo-section p {
    margin: 5px 0 0 0;
    color: #888;
    font-size: 0.9rem;
}

.auth-section {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.05);
    padding: 12px 20px;
    border-radius: 50px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-size: 150%;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #333;
    border: 2px solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
    overflow: hidden;
    box-sizing: border-box;
}

.user-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.user-name {
    font-weight: 600;
    color: #fff;
    font-size: 0.9rem;
}

.user-wallet {
    font-weight: 500;
    color: #00aaff;
    font-size: 0.75rem;
    font-family: 'Courier New', monospace;
    word-break: break-all;
    max-width: 150px;
}

.user-balance {
    font-size: 0.75rem;
    color: #00ff88;
    font-weight: 500;
}

.logout-btn {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

.game-area {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.balance-section {
    text-align: center;
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.15), rgba(0, 255, 136, 0.05));
    padding: 25px 30px;
    border-radius: 20px;
    border: 3px solid rgba(0, 255, 136, 0.4);
    box-shadow: 0 4px 20px rgba(0, 255, 136, 0.2);
    backdrop-filter: blur(10px);
}

.balance-section h2 {
    font-size: 2.2rem;
    color: #00ff88;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    margin-bottom: 5px;
}

.balance-info {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.treasury-balance, .usdc-balance, .wallet-status {
    padding: 10px 20px;
    background: rgba(0, 255, 136, 0.1);
    border-radius: 10px;
    border: 1px solid rgba(0, 255, 136, 0.2);
    font-size: 0.9rem;
    font-weight: 500;
    color: #00ff88;
}

.treasury-balance {
    background: rgba(255, 193, 7, 0.1);
    border-color: rgba(255, 193, 7, 0.3);
    color: #ffc107;
}

.wallet-status {
    background: rgba(0, 170, 255, 0.1);
    border-color: rgba(0, 170, 255, 0.2);
    color: #00aaff;
}

/* Wallet Section Styles */
.wallet-section {
    margin-top: 20px;
}



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

.wallet-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    min-width: 200px;
}

/* Compact header settings icon button */
.settings-btn {
    min-width: auto;
    padding: 6px 10px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.wallet-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.connect-btn {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
}

.connect-btn:hover {
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.deposit-btn {
    background: linear-gradient(135deg, #00ff88 0%, #00cc66 100%);
}

.deposit-btn:hover {
    box-shadow: 0 6px 20px rgba(0, 255, 136, 0.4);
}

.withdraw-btn {
    background: linear-gradient(135deg, #ffa500 0%, #ff8c00 100%);
}

.withdraw-btn:hover {
    box-shadow: 0 6px 20px rgba(255, 165, 0, 0.4);
}

.verify-btn {
    background: linear-gradient(135deg, #00aaff 0%, #0088cc 100%);
}

.verify-btn:hover {
    box-shadow: 0 6px 20px rgba(0, 170, 255, 0.4);
}

.treasury-info {
    width: 100%;
    max-width: 400px;
    margin-bottom: 15px;
}

.treasury-address-display {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, rgba(255,255,255,0.12), rgba(255,255,255,0.06));
    padding: 10px 12px;
    border-radius: 14px;
    font-size: 0.95rem;
    border: 1px solid rgba(255,255,255,0.15);
    box-shadow: 0 6px 20px rgba(0,0,0,0.25), inset 0 0 20px rgba(255,255,255,0.06);
    backdrop-filter: blur(10px);
    max-width: 100%;
    overflow: hidden;
}

.treasury-icon {
    font-size: 1.1rem;
}

.treasury-label {
    font-weight: 800;
    color: #ffd166;
    letter-spacing: 0.3px;
}

.treasury-address-text {
    font-family: 'Courier New', monospace;
    background: rgba(0, 0, 0, 0.3);
    padding: 5px 8px;
    border-radius: 8px;
    font-size: 0.85rem;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.treasury-dot {
    color: rgba(255, 255, 255, 0.5);
}

.treasury-amount-chip {
    background: linear-gradient(135deg, rgba(255,193,7,0.18), rgba(255,193,7,0.10));
    border: 1px solid rgba(255, 193, 7, 0.45);
    color: #ffd54f;
    font-weight: 800;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.9rem;
    box-shadow: inset 0 0 10px rgba(255, 193, 7, 0.15);
    white-space: nowrap;
}

/* Prevent chip overflow on small screens */
.treasury-address-display .treasury-amount-chip {
    max-width: 40vw;
    text-overflow: ellipsis;
    overflow: hidden;
}

.deposit-verification {
    margin-top: 10px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(0, 255, 136, 0.2);
}

.deposit-verification input {
    width: 100%;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 0.9rem;
    font-family: 'Courier New', monospace;
    margin-bottom: 10px;
}

.deposit-verification input:focus {
    outline: none;
    border-color: #00ff88;
    box-shadow: 0 0 0 2px rgba(0, 255, 136, 0.2);
}

.security-notice {
    width: 100%;
    max-width: 400px;
    background: linear-gradient(135deg, rgba(0, 170, 255, 0.1), rgba(0, 255, 136, 0.1));
    border-radius: 15px;
    padding: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 170, 255, 0.3);
    margin-bottom: 15px;
}

.security-badge {
    color: #00aaff;
    font-size: 0.9rem;
    text-align: center;
    font-weight: 500;
}

.wallet-status {
    width: 100%;
    max-width: 400px;
    background: rgba(0, 255, 136, 0.1);
    border-radius: 15px;
    padding: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 255, 136, 0.3);
    margin-bottom: 15px;
}

.wallet-verified {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #00ff88;
    font-size: 0.9rem;
    font-weight: 500;
}

.verified-icon {
    font-size: 1.1rem;
}

#verified-address {
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    background: rgba(0, 255, 136, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    word-break: break-all;
    max-width: 200px;
}

.wallet-info {
    width: 100%;
    max-width: 400px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.wallet-address {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 15px;
    border-radius: 10px;
    margin-bottom: 15px;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
}

.copy-btn {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 6px;
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 4px;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 0 3px rgba(255,255,255,0.08) inset;
}

.deposit-controls, .withdraw-controls, .buy-tokens-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

.deposit-controls input, .withdraw-controls input, .buy-tokens-controls input {
    flex: 1;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 0.9rem;
}

.deposit-controls input:focus, .withdraw-controls input:focus, .buy-tokens-controls input:focus {
    outline: none;
    border-color: #00ff88;
    box-shadow: 0 0 0 2px rgba(0, 255, 136, 0.2);
}



.transaction-history {
    margin-top: 20px;
    max-width: 400px;
}

.transaction-history h3 {
    color: #00aaff;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.transaction-list {
    max-height: 200px;
    overflow-y: auto;
}

.transaction-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 10px 15px;
    margin-bottom: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

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

.transaction-type {
    font-weight: 600;
    font-size: 0.8rem;
}

.transaction-amount {
    font-size: 0.8rem;
    color: #00ff88;
}

.transaction-tokens {
    font-size: 0.7rem;
    color: #888;
}

.transaction-time {
    font-size: 0.6rem;
    color: #666;
}

#tokenBalance {
    font-weight: 800;
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    font-size: 1.8rem;
}

.bet-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

.bet-controls {
    display: flex;
    align-items: center;
    gap: 20px;
    width: 100%;
    max-width: 600px;
    justify-content: center;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.control-group label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    margin-bottom: 2px;
    display: block;
}

#betAmount {
    padding: 14px 18px;
    font-size: 1.2rem;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.05));
    color: white;
    text-align: center;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    width: 120px;
}

#betAmount:hover {
    border-color: rgba(0, 255, 136, 0.6);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(0, 255, 136, 0.2);
}

#betAmount:focus {
    outline: none;
    border-color: #00ff88;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.5), inset 0 1px 3px rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.15));
    transform: scale(1.02);
}

#betAmount::-webkit-outer-spin-button,
#betAmount::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

#betAmount[type=number] {
    -webkit-appearance: none;
    -moz-appearance: textfield;
    appearance: textfield;
}

#wheelType, #multiplier {
    padding: 14px 18px;
    font-size: 1.1rem;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.05));
    color: white;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    position: relative;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 45px;
}

#wheelType:hover, #multiplier:hover {
    border-color: rgba(0, 255, 136, 0.6);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 255, 136, 0.2);
}

#wheelType:focus, #multiplier:focus {
    outline: none;
    border-color: #00ff88;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.5), inset 0 1px 3px rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.15));
    transform: translateY(-1px);
}

#wheelType option, #multiplier option {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    color: white;
    padding: 12px 16px;
    font-weight: 500;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#wheelType option:hover, #multiplier option:hover {
    background: linear-gradient(135deg, #00ff88, #00cc66);
    color: #000;
}

#wheelType option:first-child, #multiplier option:first-child {
    border-radius: 12px 12px 0 0;
}

#wheelType option:last-child, #multiplier option:last-child {
    border-radius: 0 0 12px 12px;
    border-bottom: none;
}

.bet-button-container {
    display: flex;
    align-items: center;
}

.bet-btn {
    padding: 14px 24px;
    font-size: 1.1rem;
    font-weight: 700;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #00ff88 0%, #00cc66 100%);
    color: #000;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(0, 255, 136, 0.3);
    min-width: 140px;
}

.bet-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 255, 136, 0.5);
    background: linear-gradient(135deg, #00cc66 0%, #00aa55 100%);
}

.bet-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(0, 255, 136, 0.3);
}

.bet-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}



.instant-bet-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 30px 0;
    padding: 20px;
    width: 100%;
    max-width: 600px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border-radius: 25px;
    border: 3px solid rgba(255, 255, 255, 0.15);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 0 20px rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    position: relative;
}

.instant-bet-container::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(45deg, #00ff88, #ffed4e, #ff4444, #00ff88);
    border-radius: 28px;
    z-index: -1;
    opacity: 0.3;
    animation: borderGlow 4s ease-in-out infinite;
}

.dice-full-display {
    position: relative;
    width: 100%;
    height: 350px;
    border-radius: 25px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.1);
    border: 3px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.dice-canvas {
    width: 100%;
    height: calc(100% - 90px);
    background: transparent;
    position: relative;
}

.dice-canvas canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
    border-radius: 13px;
}

.dice-overlay-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px 20px;
    background: transparent;
    border-radius: 0 0 22px 22px;
}

.security-indicator {
    text-align: center;
    margin-bottom: 15px;
}

.server-secure-badge {
    display: inline-block;
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 0.75rem;
    color: #00ff88;
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 8px rgba(0, 255, 136, 0.2);
}

.server-secure-badge strong {
    color: #00ff88;
}

.dice-overlay-controls .bet-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.dice-overlay-controls label {
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 600;
    margin-right: 8px;
}

.dice-overlay-controls .control-group {
    display: flex;
    align-items: center;
}

.dice-overlay-controls input {
    width: 80px;
    padding: 8px 12px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 600;
    backdrop-filter: blur(5px);
    text-align: center;
}

.dice-overlay-controls input:focus {
    outline: none;
    border-color: #00ff88;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

.dice-overlay-controls .bet-btn {
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 700;
    min-width: 120px;
}



@keyframes borderGlow {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

.wheel-wrapper {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 20px 0;
}

.wheel {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    position: relative;
    overflow: hidden;
    box-shadow:
        0 0 30px rgba(0, 255, 136, 0.3),
        0 0 60px rgba(0, 255, 136, 0.1),
        inset 0 0 30px rgba(0, 0, 0, 0.3);
    border: 6px solid rgba(255, 255, 255, 0.3);
    transition: transform 0.1s ease-out;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.1) 0%, rgba(0, 0, 0, 0.2) 100%);
    animation: wheel-glow 3s ease-in-out infinite;
}

@keyframes wheel-glow {
    0%, 100% {
        box-shadow:
            0 0 30px rgba(0, 255, 136, 0.3),
            0 0 60px rgba(0, 255, 136, 0.1),
            inset 0 0 30px rgba(0, 0, 0, 0.3);
    }
    50% {
        box-shadow:
            0 0 40px rgba(0, 255, 136, 0.4),
            0 0 80px rgba(0, 255, 136, 0.2),
            inset 0 0 30px rgba(0, 0, 0, 0.3);
    }
}

.wheel.spinning {
    animation: spin-wheel 2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.wheel.landed {
    animation: wheel-landed 0.3s ease-out;
}

@keyframes wheel-landed {
    0% { transform: scale(1.05); }
    50% { transform: scale(0.98); }
    100% { transform: scale(1); }
}

@keyframes spin-wheel {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(var(--final-rotation)); }
}

.wheel-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: radial-gradient(circle, #ffd700 0%, #ffed4e 50%, #ffd700 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    box-shadow:
        0 0 20px rgba(255, 215, 0, 0.8),
        inset 0 0 10px rgba(255, 215, 0, 0.6);
    border: 3px solid #fff;
}

.wheel-pointer {
    position: absolute;
    top: -35px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-bottom: 25px solid #ff4444;
    filter: drop-shadow(0 2px 4px rgba(255, 68, 68, 0.6));
}

.wheel-pointer::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -10px;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 20px solid #fff;
}

.wheel-segment {
    position: absolute;
    width: 50%;
    height: 50%;
    transform-origin: 100% 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 50px 20px 80px;
    overflow: hidden;
    border-right: 4px solid rgba(255, 255, 255, 0.8);
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.3);
}

.wheel-segment::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    border-left: 150px solid transparent;
    border-right: 150px solid transparent;
    border-bottom: 150px solid currentColor;
    transform: translateX(-50%);
    opacity: 0.9;
}

.wheel-segment.win::before {
    border-bottom-color: rgba(0, 255, 136, 0.8);
}

.wheel-segment.loss::before {
    border-bottom-color: rgba(255, 68, 68, 0.8);
}

.segment-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transform: rotate(0deg);
    position: relative;
    z-index: 2;
}

.segment-text {
    font-size: 18px;
    font-weight: 800;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.segment-multiplier {
    font-size: 24px;
    font-weight: 900;
    color: #ffff00;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.9);
    filter: drop-shadow(0 0 10px rgba(255, 255, 0, 0.8));
}

.wheel-segment.win {
    background: linear-gradient(135deg, #00ff88, #00cc66);
}

.wheel-segment.loss {
    background: linear-gradient(135deg, #ff4444, #cc3333);
}

.wheel-info {
    text-align: center;
    margin-top: 20px;
}

.wheel-result {
    font-size: 1.8rem;
    font-weight: 800;
    color: #ffffff;
    padding: 20px 40px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border: 3px solid rgba(255, 255, 255, 0.2);
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    margin-top: 20px;
}

.wheel-result.win {
    color: #00ff88;
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.2), rgba(0, 255, 136, 0.1));
    border-color: rgba(0, 255, 136, 0.5);
    animation: win-celebration 1.2s ease-out;
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.6);
}

.wheel-result.loss {
    color: #ff4444;
    background: linear-gradient(135deg, rgba(255, 68, 68, 0.2), rgba(255, 68, 68, 0.1));
    border-color: rgba(255, 68, 68, 0.5);
    animation: loss-drama 0.8s ease-in-out;
    box-shadow: 0 0 30px rgba(255, 68, 68, 0.6);
}

@keyframes win-celebration {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    20% {
        transform: scale(1.1);
        opacity: 1;
    }
    40% {
        transform: scale(0.95);
    }
    60% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes loss-drama {
    0% {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
    25% {
        transform: translateX(-8px) scale(1.02);
    }
    50% {
        transform: translateX(8px) scale(0.98);
    }
    75% {
        transform: translateX(-4px) scale(1.01);
    }
    100% {
        transform: translateX(0) scale(1);
    }
}

.result-section {
    text-align: center;
    min-height: 60px; /* Reduced from 100px */
    margin-top: -15px; /* Pull it closer to dice */
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px; /* Space between result and history */
}

.result-display {
    font-size: 1.5rem;
    font-weight: bold;
    min-height: 40px; /* Slightly smaller */
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0; /* Remove margins for proper centering */
}

.win-message {
    color: #00ff88;
    animation: glow 1s ease-in-out;
}

.lose-message {
    color: #ff4444;
    animation: shake 0.5s ease-in-out;
}

.info-message {
    color: #00ccff;
    font-size: 1.2rem;
    font-weight: 500;
}

.error-message {
    color: #ff6b6b;
    animation: shake 0.3s ease-in-out;
}

.ready-message {
    color: #00ff88;
    font-size: 1.3rem;
    font-weight: 600;
    animation: pulse 2s infinite;
}

.game-over-message {
    color: #ff4444;
    font-size: 1.4rem;
    font-weight: 700;
    animation: shake 0.5s ease-in-out;
}

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

@keyframes glow {
    0%, 100% { text-shadow: 0 0 5px #00ff88; }
    50% { text-shadow: 0 0 20px #00ff88, 0 0 30px #00ff88; }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.bet-history {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    padding: 8px;
    max-height: 120px;
    overflow-y: auto;
    font-size: 0.7rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(4px);
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.bet-history::-webkit-scrollbar {
    width: 3px;
}

.bet-history::-webkit-scrollbar-track {
    background: transparent;
}

.bet-history::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 1px;
}

.bet-history div {
    margin-bottom: 2px;
    padding: 3px 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.timestamp {
    color: #00aaff;
    font-size: 0.65rem;
    font-weight: 600;
}

.bet-info {
    color: #999;
    font-size: 0.6rem;
    font-weight: 400;
    flex: 1;
}

.result-text {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.amount-change {
    font-size: 0.75rem;
    font-weight: 700;
}

.stats-section {
    display: flex;
    justify-content: space-around;
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 10px;
    margin-top: 10px;
}

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

.stat-label {
    font-size: 0.9rem;
    color: #b8c5d6;
}

.stat-value {
    font-size: 1.2rem;
    font-weight: bold;
    color: #00ff88;
}

footer {
    text-align: center;
    margin-top: 30px;
    color: #888;
    font-size: 0.9rem;
    position: relative;
    padding-bottom: 40px;
}

.version-info {
    position: absolute;
    bottom: 10px;
    right: 15px;
    font-size: 0.8em;
    color: #6c7b95;
    display: flex;
    gap: 10px;
    align-items: center;
}

.version-info span:first-child {
    background: rgba(108, 123, 149, 0.2);
    padding: 2px 8px;
    border-radius: 10px;
    font-family: 'Courier New', monospace;
    font-weight: bold;
}

.version-date {
    font-style: italic;
}

.game-over {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.game-over-content {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.game-over h2 {
    color: #ff4444;
    margin-bottom: 20px;
}

.game-over button {
    padding: 12px 24px;
    background: #00ff88;
    color: #000;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 20px;
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .container {
        max-width: 100%;
        padding: 20px;
    }

    header h1 {
        font-size: 2rem;
    }

    .logo-section h1 {
        font-size: 2rem;
    }

    .header-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .auth-section {
        justify-content: center;
        gap: 15px;
    }

    .user-info {
        flex-direction: column;
        gap: 10px;
        padding: 10px 15px;
    }

    .user-details {
        flex-direction: column;
        align-items: center;
        gap: 5px;
    }

    .user-wallet {
        max-width: none;
        font-size: 0.7rem;
    }

    .balance-section h2 {
        font-size: 1.8rem;
    }

    .balance-info {
        flex-direction: column;
        gap: 15px;
    }

    .wallet-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .wallet-btn {
        min-width: auto;
        padding: 10px 20px;
    }

    .treasury-info, .security-notice, .wallet-status {
        margin-bottom: 10px;
    }

    .deposit-controls, .withdraw-controls {
        flex-direction: column;
        gap: 10px;
    }

    .deposit-controls input, .withdraw-controls input {
        width: 100%;
    }

    .bet-controls {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }

    .control-group {
        flex-direction: column;
        align-items: stretch;
    }

    .bet-button-container {
        align-items: stretch;
    }

    .bet-btn {
        width: 100%;
        min-width: auto;
    }

    #betAmount {
        width: 100%;
        text-align: center;
    }

    .dice-overlay-controls .bet-controls {
        flex-direction: column;
        gap: 15px;
    }

    .dice-overlay-controls .control-group {
        align-items: stretch;
    }

    .dice-overlay-controls input {
        width: 100%;
    }

    .dice-overlay-controls .bet-btn {
        width: 100%;
        min-width: auto;
    }

    .stats-section {
        flex-direction: column;
        gap: 15px;
    }

    .stat {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 15px;
    }

    header h1 {
        font-size: 1.8rem;
    }

    .logo-section h1 {
        font-size: 1.8rem;
    }

    .balance-section {
        padding: 20px 15px;
    }

    .balance-section h2 {
        font-size: 1.5rem;
    }

    .instant-bet-container {
        padding: 15px;
    }

    .dice-full-display {
        height: 300px;
    }

    .result-display {
        font-size: 1.2rem;
    }

    .wallet-btn {
        padding: 12px 16px;
        font-size: 0.85rem;
    }

    footer {
        font-size: 0.8rem;
    }
}