:root {
    --primary-color: #6c5ce7;
    --primary-dark: #5649c0;
    --primary-light: #a29bfe;
    --secondary-color: #00cec9;
    --secondary-dark: #00b5b2;
    --background-color: #121212;
    --card-color: #1e1e1e;
    --text-color: #f1f1f1;
    --text-muted: #b8b8b8;
    --success-color: #00b894;
    --danger-color: #d63031;
    --warning-color: #fdcb6e;
    --highlight-color: #ffeaa7;
}

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

body {
    font-family: 'Inter', sans-serif;
    background: var(--background-color);
    color: var(--text-color);
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    margin-bottom: 30px;
}

.logo {
    font-size: 32px;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    letter-spacing: 1px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.balance-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: var(--card-color);
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.balance-box i {
    color: var(--warning-color);
}

.balance-actions button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.balance-actions button:hover {
    background-color: var(--primary-dark);
    transform: scale(1.1);
}

.game-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.game-tab {
    flex: 1;
    padding: 15px;
    background-color: var(--card-color);
    border: none;
    color: var(--text-muted);
    font-size: 16px;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.game-tab i {
    font-size: 18px;
}

.game-tab.active {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(108, 92, 231, 0.3);
}

.game-container {
    background-color: var(--card-color);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
}

.game {
    display: none;
}

.game.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

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

/* Slots Game Styles */
.slots-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 30px 0;
    perspective: 1000px;
}

.slots-reel {
    width: 100px;
    height: 100px;
    background-color: #fff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    font-weight: 700;
    color: var(--background-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.slots-reel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to bottom, rgba(255,255,255,0.8), rgba(255,255,255,0));
    z-index: 1;
}

.slots-reel::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to top, rgba(255,255,255,0.8), rgba(255,255,255,0));
    z-index: 1;
}

/* Rocket Game Styles */
.rocket-container {
    position: relative;
    height: 300px;
    margin: 30px 0;
}

.rocket-track {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 250px;
    background: linear-gradient(to top, var(--primary-color), var(--secondary-color));
    border-radius: 5px;
    box-shadow: 0 0 20px rgba(108, 92, 231, 0.5);
}

.rocket {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    font-size: 30px;
    color: var(--warning-color);
    transition: bottom 0.1s linear;
    z-index: 2;
    text-shadow: 0 0 10px rgba(253, 203, 110, 0.7);
    animation: rocketGlow 2s infinite alternate;
}

@keyframes rocketGlow {
    0% { filter: drop-shadow(0 0 5px rgba(253, 203, 110, 0.7)); }
    100% { filter: drop-shadow(0 0 15px rgba(253, 203, 110, 0.9)); }
}

.multiplier-markers {
    position: absolute;
    right: 30px;
    top: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.multiplier-markers span {
    background-color: var(--card-color);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Coin Flip Game Styles */
.coin-container {
    display: flex;
    justify-content: center;
    margin: 40px 0;
    perspective: 1000px;
}

.coin {
    width: 120px;
    height: 120px;
    position: relative;
    transform-style: preserve-3d;
    cursor: pointer;
    transition: transform 1s ease-in-out;
}

.coin-front, .coin-back {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.coin-front {
    background-color: #f9f9f9;
    color: var(--success-color);
}

.coin-back {
    background-color: var(--warning-color);
    color: #000;
    transform: rotateY(180deg);
}

.coin.flipping {
    animation: flip-coin 1.5s ease-in-out;
}

@keyframes flip-coin {
    0% { transform: rotateY(0); }
    50% { transform: rotateY(1800deg); }
    100% { transform: rotateY(3600deg); }
}

.coin-choices {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.coin-choice {
    padding: 15px 30px;
    background-color: var(--card-color);
    border: 2px solid var(--primary-color);
    color: var(--text-color);
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.coin-choice:hover {
    background-color: var(--primary-color);
    color: white;
}

.coin-choice.selected {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-dark);
    box-shadow: 0 0 15px rgba(108, 92, 231, 0.5);
}

/* Bet Controls */
.bet-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.bet-amount {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 20px;
    font-weight: 600;
    background-color: rgba(0, 0, 0, 0.2);
    padding: 10px 20px;
    border-radius: 50px;
}

.bet-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background-color: var(--primary-color);
    color: white;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.bet-btn:hover {
    background-color: var(--primary-dark);
    transform: scale(1.1);
}

.action-btn {
    padding: 15px 40px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    width: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.3);
}

.action-btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 92, 231, 0.4);
}

.action-btn:active {
    transform: translateY(0);
}

.action-btn.secondary {
    background-color: var(--secondary-color);
    box-shadow: 0 4px 15px rgba(0, 206, 201, 0.3);
}

.action-btn.secondary:hover {
    background-color: var(--secondary-dark);
    box-shadow: 0 6px 20px rgba(0, 206, 201, 0.4);
}

.action-btn:disabled {
    background-color: #555;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Result Messages */
.result-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    font-weight: 600;
    font-size: 18px;
    opacity: 0;
    height: 0;
    transition: all 0.3s;
    transform: scale(0.9);
}

.result-message.show {
    opacity: 1;
    height: auto;
    transform: scale(1);
}

.result-message.win {
    background-color: rgba(0, 184, 148, 0.2);
    color: var(--success-color);
    border: 1px solid var(--success-color);
}

.result-message.lose {
    background-color: rgba(214, 48, 49, 0.2);
    color: var(--danger-color);
    border: 1px solid var(--danger-color);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 100;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: var(--card-color);
    padding: 30px;
    border-radius: 15px;
    max-width: 400px;
    width: 100%;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-content h3 {
    margin-bottom: 20px;
    text-align: center;
    color: var(--text-color);
    font-size: 24px;
}

.balance-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.balance-option {
    padding: 15px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.balance-option:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(108, 92, 231, 0.3);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    transition: color 0.3s;
}

.close-modal:hover {
    color: var(--text-color);
}

/* Sad Face Animation */
.sad-face {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 100px;
    opacity: 0;
    pointer-events: none;
    z-index: 1001;
    transition: all 0.5s;
}

.sad-face.show {
    opacity: 1;
    animation: floatUp 2s forwards;
}

@keyframes floatUp {
    0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0; }
    20% { transform: translate(-50%, -60%) scale(1); opacity: 1; }
    80% { opacity: 1; }
    100% { transform: translate(-50%, -150%) scale(0.5); opacity: 0; }
}

/* Floating coins animation */
.floating-coins {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
}

.floating-coin {
    position: absolute;
    font-size: 24px;
    opacity: 0;
    animation: floatCoin 3s forwards;
}

@keyframes floatCoin {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; }
    100% { transform: translateY(-100vh) rotate(360deg); opacity: 0; }
}

footer {
    margin-top: 40px;
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
    font-size: 14px;
    position: relative;
    z-index: 2;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .slots-reel {
        width: 80px;
        height: 80px;
        font-size: 30px;
    }
    
    .bet-amount {
        font-size: 18px;
    }
    
    .action-btn {
        padding: 12px 30px;
        font-size: 16px;
        width: 180px;
    }
    
    .coin {
        width: 100px;
        height: 100px;
    }
    
    .coin-front, .coin-back {
        font-size: 30px;
    }

    .game-tab {
        font-size: 14px;
        padding: 10px;
    }

    .game-tab i {
        font-size: 16px;
    }

    .logo {
        font-size: 24px;
    }

    .balance-box {
        font-size: 16px;
        padding: 10px 15px;
    }
}

@media (max-width: 480px) {
    .slots-container {
        gap: 10px;
    }
    
    .slots-reel {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }
    
    .coin-choices {
        flex-direction: column;
        gap: 10px;
    }
    
    .coin-choice {
        width: 100%;
        justify-content: center;
    }
    
    .game-container {
        padding: 20px;
    }
}
