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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: transparent;
    backdrop-filter: blur(10px);
    min-height: calc(100dvh - 3.5rem);
    color: white;
    overflow: hidden;
}

/* Screens */
.screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: #001201;
    z-index: 100;
}

.hidden {
    display: none !important;
}

/* Loader */
.loader {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: #fad900;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Login */
.login-box {
    text-align: center;
    padding: 40px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
}

/* Game Container */
#game-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    max-width: 420px;
    margin: 0 auto;
    padding: 10px;
}

/* Header */
.game-header {
    display: flex;
    justify-content: center;
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    margin-bottom: 10px;
}

.balance-display {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 18px;
    font-weight: 600;
}

.balance-label {
    color: #888;
}

#balance-value {
    color: #22c55e;
    transition: all 0.3s ease;
}

.currency {
    color: #fbbf24;
    font-weight: 700;
}

/* Game Area */
.game-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    background: linear-gradient(180deg, #00420c 0%, #001201 100%);
    border-radius: 16px;
    position: relative;
}

/* Title */
.game-title {
    margin-bottom: 10px;
}

.title-text {
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, #fad900 0%, #b8860b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Prize Table */
.prize-table {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 5px 15px;
    margin-bottom: 15px;
    padding: 10px 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    font-size: 12px;
}

.prize-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.prize-value {
    color: #fbbf24;
    font-weight: 700;
}

/* Spin Machine */
.slot-machine {
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
}

.slot-frame {
    background: linear-gradient(180deg, #3a2a5a 0%, #2a1a4a 100%);
    border: 6px solid #ffd700;
    border-radius: 20px;
    padding: 20px;
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.5),
        inset 0 2px 10px rgba(255, 255, 255, 0.1);
    position: relative;
}

.reels-container {
    display: flex;
    gap: 10px;
}

.reel {
    width: 80px;
    height: 100px;
    background: linear-gradient(180deg, #1a1a2e 0%, #0f0f1a 100%);
    border: 3px solid #4a3a6a;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.reel-inner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: top 0.1s ease-out;
}

.reel.spinning .reel-inner {
    animation: reelSpin 0.1s linear infinite;
}

@keyframes reelSpin {
    0% { top: 0; }
    100% { top: -100px; }
}

.symbol {
    width: 80px;
    height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 50px;
}

.reel.stopped .symbol {
    animation: symbolLand 0.3s ease;
}

@keyframes symbolLand {
    0% { transform: scale(1.2); }
    50% { transform: scale(0.9); }
    100% { transform: scale(1); }
}

.win-line {
    position: absolute;
    top: 50%;
    left: 10px;
    right: 10px;
    height: 4px;
    background: transparent;
    border-radius: 2px;
    transform: translateY(-50%);
    pointer-events: none;
}

.win-line.active {
    background: linear-gradient(90deg, #ffd700, #ff8c00, #ffd700);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
    animation: winLinePulse 0.5s ease infinite;
}

@keyframes winLinePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Result Display */
.result-display {
    margin-top: 10px;
    text-align: center;
    animation: resultIn 0.3s ease;
}

@keyframes resultIn {
    from {
        transform: scale(0.5);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.result-text {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 5px;
}

.result-text.win {
    color: #22c55e;
}

.result-text.lose {
    color: #888;
}

.result-amount {
    font-size: 28px;
    font-weight: 800;
    color: #fbbf24;
}

/* Controls */
.controls {
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 16px;
    margin-top: 10px;
}

.bet-controls {
    margin-bottom: 15px;
}

.bet-label {
    font-size: 14px;
    color: #888;
    margin-bottom: 8px;
}

.amount-buttons {
    display: flex;
    gap: 8px;
}

.amount-btn {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.amount-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.amount-btn.active {
    background: linear-gradient(135deg, #fad900 0%, #b8860b 100%);
    color: #001201;
    box-shadow: 0 0 15px rgba(250, 217, 0, 0.4);
}

.amount-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Action Button */
.action-button {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #fad900 0%, #b8860b 100%);
    color: #001201;
    font-size: 22px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.action-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(250, 217, 0, 0.4);
}

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

.action-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Message Display */
.message-display {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    padding: 12px 24px;
    border-radius: 8px;
    z-index: 50;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.message-display.visible {
    opacity: 1;
}
