* {
    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: linear-gradient(180deg, #00420c 0%, #001201 100%);
    border: 1px solid rgba(250, 217, 0, 0.25);
    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 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.title-icon {
    font-size: 24px;
}

.title-text {
    font-size: 24px;
    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: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
}

.prize-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.prize-match {
    font-size: 12px;
    color: #cdd9c7;
}

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

/* Safe Container */
.safe-container {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.safe {
    width: 280px;
    height: 220px;
    background: linear-gradient(180deg, #4a4a5a 0%, #2a2a3a 100%);
    border-radius: 20px;
    border: 6px solid #3a3a4a;
    box-shadow:
        inset 0 2px 10px rgba(255, 255, 255, 0.1),
        0 10px 30px rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
}

.safe-door {
    width: 240px;
    height: 180px;
    background: linear-gradient(180deg, #5a5a6a 0%, #3a3a4a 100%);
    border-radius: 12px;
    border: 4px solid #4a4a5a;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.safe-handle {
    position: absolute;
    right: 8px;
    top: 8px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, #888 0%, #555 100%);
    border: 3px solid #666;
}

.safe-handle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #333;
}

/* Dials Container */
.dials-container {
    display: flex;
    gap: 15px;
}

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

.dial-btn {
    width: 40px;
    height: 30px;
    border: none;
    border-radius: 6px;
    background: linear-gradient(180deg, #666 0%, #444 100%);
    color: white;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dial-btn:hover:not(:disabled) {
    background: linear-gradient(180deg, #777 0%, #555 100%);
}

.dial-btn:active:not(:disabled) {
    transform: scale(0.95);
}

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

.dial-value {
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #111;
    border: 3px solid #333;
    border-radius: 8px;
    font-size: 28px;
    font-weight: 800;
    color: #fad900;
    font-family: 'Courier New', monospace;
    text-shadow: 0 0 10px rgba(250, 217, 0, 0.5);
}

.dial-value.match {
    color: #fbbf24;
    text-shadow: 0 0 15px rgba(251, 191, 36, 0.8);
    animation: matchPulse 0.5s ease;
}

@keyframes matchPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.dial-value.no-match {
    color: #ef4444;
    text-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}

/* Secret Code */
.secret-code {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
}

.secret-label {
    font-size: 14px;
    color: #888;
}

.secret-value {
    font-size: 20px;
    font-weight: 800;
    color: #fbbf24;
    font-family: 'Courier New', monospace;
    letter-spacing: 5px;
}

/* Result Display */
.result-display {
    position: relative;
    margin: 16px auto 0;
    text-align: center;
    z-index: 20;
    background: rgba(0, 0, 0, 0.95);
    padding: 25px 35px;
    border-radius: 16px;
    animation: resultIn 0.3s ease;
}

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

.result-icon {
    font-size: 42px;
    margin-bottom: 8px;
}

.result-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 5px;
}

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

.result-title.lose {
    color: #ef4444;
}

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

.result-multiplier {
    font-size: 28px;
    font-weight: 800;
    color: #fbbf24;
    margin-bottom: 5px;
}

.result-amount {
    font-size: 18px;
    font-weight: 600;
    color: #4ade80;
}

/* Controls */
.controls {
    padding: 15px;
    background: linear-gradient(180deg, #00420c 0%, #001201 100%);
    border: 1px solid rgba(250, 217, 0, 0.25);
    border-radius: 16px;
    margin-top: 10px;
}

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

.bet-label {
    font-size: 14px;
    color: #e4ecdf;
    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: 20px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.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;
}

.result-matches, .secret-label { color: oklch(0.88 0.01 90); }
.game-title { color: oklch(0.88 0.12 90); text-shadow: none; }
body { overflow-y: auto; }
#game-container { height: auto; min-height: 100dvh; }
