body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #0F0F1B 0%, #1A1A2E 100%);
    color: white;
    min-height: 100vh;
    overflow-x: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, #6C63FF 0%, #5A52D9 100%);
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(108, 99, 255, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(108, 99, 255, 0.5);
}

.btn-secondary {
    background: linear-gradient(135deg, #FF6584 0%, #FF8E8E 100%);
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(255, 101, 132, 0.4);
}

.btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(255, 101, 132, 0.5);
}

.game-container {
    background: rgba(26, 26, 46, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid rgba(108, 99, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 15px rgba(108, 99, 255, 0.2);
}

.form-input {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
}

.form-input:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: #6C63FF;
    box-shadow: 0 0 0 2px rgba(108, 99, 255, 0.2);
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.progress-bar-bg {
    background: rgba(255, 255, 255, 0.1);
    height: 10px;
    border-radius: 5px;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, #32E0C4 0%, #5FFBF1 100%);
    height: 10px;
    border-radius: 5px;
    transition: width 0.5s;
}

.header-logo {
    background: rgba(15, 15, 27, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.balance-display {
    background: linear-gradient(135deg, #32E0C4 0%, #5FFBF1 100%);
    color: #1A1A2E;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    position: fixed;
    top: 80px;
    right: 20px;
    padding: 10px 15px;
    border-radius: 12px;
    font-weight: bold;
    z-index: 100;
    transform-origin: center right;
    animation: pulse-balance 2s infinite alternate;
}

@keyframes pulse-balance {
    0% { transform: scale(1); }
    100% { transform: scale(1.05); }
}

@keyframes float-balance {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

.floating {
    animation: float-balance 3s ease-in-out infinite;
}

@keyframes entrance {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.entrance-animation {
    animation: entrance 0.5s forwards;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.pulse {
    animation: pulse 2s infinite;
}

.modal-overlay {
    backdrop-filter: blur(5px);
    background: rgba(0, 0, 0, 0.7);
}

.modal-content {
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.3s;
}

.modal-active .modal-content {
    transform: scale(1);
    opacity: 1;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.roulette-wheel {
    position: relative;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    overflow: hidden;
    transition: transform 3s cubic-bezier(0.17, 0.67, 0.83, 0.67);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5), 
                inset 0 0 20px rgba(255, 255, 255, 0.2),
                0 0 15px #6C63FF,
                0 0 30px rgba(108, 99, 255, 0.3);
}

.roulette-segment {
    position: absolute;
    width: 50%;
    height: 50%;
    transform-origin: bottom right;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 20px;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.roulette-segment span {
    transform-origin: center;
    width: 60px;
    text-align: center;
    font-size: 16px;
    margin-top: 10px;
}

.wheel-pointer {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 30px;
    background-color: #FF6584;
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    z-index: 10;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.wheel-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: radial-gradient(circle, #fff 0%, #ddd 60%, #bbb 100%);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    z-index: 5;
}

.slot-machine {
    background: linear-gradient(135deg, #2A2A3C 0%, #1A1A2E 100%);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    max-width: 320px;
    margin: 0 auto;
}

.slot-display {
    display: flex;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
}

.slot-reel {
    width: 80px;
    height: 100px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 0 10px rgba(108, 99, 255, 0.5);
}

.slot-item {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    position: absolute;
    transition: transform 0.5s cubic-bezier(0.17, 0.67, 0.83, 0.67);
}

.slot-lever {
    width: 30px;
    height: 120px;
    background: linear-gradient(90deg, #FF6584 0%, #FF8E8E 100%);
    border-radius: 15px;
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    box-shadow: 0 0 15px rgba(255, 101, 132, 0.5);
    transition: transform 0.3s ease;
}

.slot-lever:before {
    content: '';
    position: absolute;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #FF6584 0%, #FF8E8E 100%);
    border-radius: 50%;
    top: -20px;
    left: -5px;
    box-shadow: 0 0 10px rgba(255, 101, 132, 0.5);
}

.scratch-card {
    width: 280px;
    height: 200px;
    background: linear-gradient(135deg, #6C63FF 0%, #5A52D9 100%);
    border-radius: 16px;
    position: relative;
    margin: 0 auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.scratch-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #32E0C4 0%, #5FFBF1 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    cursor: pointer;
}

.scratch-content {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 32px;
    font-weight: bold;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.memory-game {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-gap: 10px;
    max-width: 300px;
    margin: 0 auto;
}

.memory-card {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, #6C63FF 0%, #5A52D9 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    cursor: pointer;
    transition: transform 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transform-style: preserve-3d;
    perspective: 1000px;
}

.memory-card-front, .memory-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

.memory-card-front {
    background: linear-gradient(135deg, #6C63FF 0%, #5A52D9 100%);
    transform: rotateY(0deg);
}

.memory-card-back {
    background: white;
    transform: rotateY(180deg);
}

.memory-card.flipped {
    transform: rotateY(180deg);
}

.dice-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
}

.dice {
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 12px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    padding: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.dice-dot {
    width: 16px;
    height: 16px;
    background: #1A1A2E;
    border-radius: 50%;
    margin: 4px;
}

.card-flip-container {
    perspective: 1000px;
    width: 200px;
    height: 300px;
    margin: 0 auto;
}

.card-flip {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s;
    cursor: pointer;
}

.card-flip.flipped {
    transform: rotateY(180deg);
}

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.card-front {
    background: linear-gradient(135deg, #6C63FF 0%, #5A52D9 100%);
    color: white;
    font-size: 24px;
    font-weight: bold;
}

.card-back {
    background: white;
    transform: rotateY(180deg);
    color: #1A1A2E;
    font-size: 36px;
    font-weight: bold;
}

.number-guess-container {
    max-width: 300px;
    margin: 0 auto;
}

.number-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-gap: 10px;
    margin-top: 20px;
}

.number-button {
    background: linear-gradient(135deg, #6C63FF 0%, #5A52D9 100%);
    border-radius: 10px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    color: white;
    cursor: pointer;
    transition: transform 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.treasure-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    max-width: 320px;
    margin: 0 auto;
}

.treasure-chest {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, #FFBE0B 0%, #FB5607 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    cursor: pointer;
    transition: transform 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.balloon-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    max-width: 320px;
    margin: 0 auto;
}

.balloon {
    width: 80px;
    height: 100px;
    background: radial-gradient(circle at 30% 30%, #6C63FF 0%, #5A52D9 100%);
    border-radius: 50%;
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.balloon:before {
    content: '';
    position: absolute;
    width: 10px;
    height: 20px;
    background: #888;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 5px;
}

.balloon.popped {
    transform: scale(0);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.coin-container {
    perspective: 1000px;
    width: 150px;
    height: 150px;
    margin: 0 auto;
}

.coin {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 1s ease-in-out;
    cursor: pointer;
}

.coin-heads, .coin-tails {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: bold;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.coin-heads {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: white;
}

.coin-tails {
    background: linear-gradient(135deg, #C0C0C0 0%, #A9A9A9 100%);
    color: white;
    transform: rotateY(180deg);
}

.coin.flipping {
    animation: flip-coin 2s ease-out forwards;
}

@keyframes flip-coin {
    0% { transform: rotateY(0deg); }
    100% { transform: rotateY(1800deg); }
}

.game-difficulty {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: bold;
}

.difficulty-easy {
    background: rgba(50, 224, 196, 0.2);
    color: #32E0C4;
}

.difficulty-medium {
    background: rgba(255, 190, 11, 0.2);
    color: #FFBE0B;
}

.difficulty-hard {
    background: rgba(255, 101, 132, 0.2);
    color: #FF6584;
}

.game-timer {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: bold;
}

.timer-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    margin-top: 3px;
    overflow: hidden;
}

.timer-progress {
    height: 100%;
    background: #32E0C4;
    border-radius: 2px;
    transition: width 0.1s linear;
}

.timer-warning .timer-progress {
    background: #FFBE0B;
}

.timer-danger .timer-progress {
    background: #FF6584;
}

.shake {
    animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes shake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
    40%, 60% { transform: translate3d(4px, 0, 0); }
}

.loss-effect {
    animation: loss-flash 0.5s ease;
}

@keyframes loss-flash {
    0% { background-color: rgba(255, 0, 0, 0); }
    50% { background-color: rgba(255, 0, 0, 0.3); }
    100% { background-color: rgba(255, 0, 0, 0); }
}

.win-effect {
    animation: win-flash 0.5s ease;
}

@keyframes win-flash {
    0% { background-color: rgba(0, 255, 0, 0); }
    50% { background-color: rgba(0, 255, 0, 0.3); }
    100% { background-color: rgba(0, 255, 0, 0); }
}