:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --discord-blurple: #5865F2;
    --discord-green: #57F287;
    --discord-red: #ED4245;
    --discord-yellow: #FEE75C;
    --glass-bg: rgba(0, 0, 0, 0.6);
    --glass-border: rgba(255, 255, 255, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #0f0c29 0%, #1a1a3e 50%, #24243e 100%);
    background-attachment: fixed;
    color: #ffffff;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(88, 101, 242, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(67, 233, 123, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(118, 75, 162, 0.15) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.bj-container {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(20px);
    border-radius: 32px;
    padding: 40px;
    max-width: 800px;
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 1;
}

.bj-container.hidden {
    display: none;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid #5865F2;
}

.user-name {
    font-weight: 600;
    color: white;
    font-size: 16px;
}

.game-header {
    text-align: center;
    margin-bottom: 24px;
}

.game-header h2 {
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(135deg, #43e97b, #38f9d7);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.game-table {
    background: rgba(0, 50, 30, 0.4);
    border-radius: 24px;
    padding: 30px;
    margin: 20px 0;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.dealer-area, .player-area {
    padding: 15px;
}

.hand-label {
    font-size: 14px;
    color: #888;
    margin-bottom: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cards-display {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    min-height: 80px;
    align-items: center;
}

.card {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 80px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    font-size: 24px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
    color: #1a1a2e;
}

.card.back {
    background: linear-gradient(135deg, #2a1a4e, #1a0f2a);
    color: #5865F2;
    font-size: 32px;
    border: 2px solid #5865F2;
}

.hand-value {
    margin-top: 10px;
    font-size: 24px;
    font-weight: 700;
    color: #57F287;
}

.divider {
    text-align: center;
    color: #5865F2;
    font-size: 24px;
    padding: 5px 0;
}

.result-display {
    text-align: center;
    font-size: 20px;
    font-weight: 600;
    padding: 16px;
    margin: 16px 0;
    border-radius: 12px;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.balance-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    margin: 16px 0;
    flex-wrap: wrap;
    gap: 10px;
}

.balance-value {
    font-size: 20px;
    font-weight: 700;
    color: #57F287;
}

.controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 16px 0;
}

.bet-controls {
    display: flex;
    gap: 12px;
}

.action-controls {
    display: inline-flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.bet-input {
    flex: 1;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
    color: white;
    font-size: 16px;
    transition: all 0.3s ease;
}

.bet-input:focus {
    outline: none;
    border-color: #5865F2;
    background: rgba(255, 255, 255, 0.08);
}

.bet-input::placeholder {
    color: #666;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-start {
    background: linear-gradient(135deg, #5865F2, #4752C4);
    color: white;
    min-width: 140px;
}

.btn-start:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(88, 101, 242, 0.4);
}

.btn-start:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-action {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    min-width: 100px;
}

.btn-action:hover {
    background: #5865F2;
    border-color: #5865F2;
    transform: translateY(-2px);
}

.btn-clear {
    background: rgba(237, 66, 69, 0.2);
    border: 1px solid #ED4245;
    color: #ED4245;
}

.btn-clear:hover {
    background: #ED4245;
    color: white;
    transform: translateY(-2px);
}

.btn-login {
    background: linear-gradient(135deg, #5865F2, #4752C4);
    color: white;
    padding: 16px 48px;
    font-size: 18px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(88, 101, 242, 0.4);
}

.message {
    margin-top: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    text-align: center;
    font-weight: 500;
    min-height: 44px;
}

.message.success {
    background: rgba(87, 242, 135, 0.15);
    border: 1px solid #57F287;
    color: #57F287;
}

.message.error {
    background: rgba(237, 66, 69, 0.15);
    border: 1px solid #ED4245;
    color: #ED4245;
}

.message.info {
    background: rgba(88, 101, 242, 0.15);
    border: 1px solid #5865F2;
    color: #5865F2;
}

.login-container {
    text-align: center;
    padding: 60px 40px;
}

.login-container h2 {
    font-size: 36px;
    margin-bottom: 12px;
}

@media (max-width: 600px) {
    .bj-container {
        padding: 20px;
    }
    
    .card {
        width: 45px;
        height: 65px;
        font-size: 18px;
    }
    
    .bet-controls {
        flex-direction: column;
    }
    
    .action-controls {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-action {
        width: 100%;
    }
    
    .game-table {
        padding: 15px;
    }
    
    .balance-info {
        flex-direction: column;
        text-align: center;
    }
}