:root {
    --bg: #2b1055;
    --primary: #ffd700;
    --accent: #ff007f;
    --machine-bg: #1a0b36;
    --text: #ffffff;
}

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

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    height: 100vh;
    height: 100dvh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.app-container {
    width: 100%;
    max-width: 400px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem 1rem;
    position: relative;
}

header {
    text-align: center;
    margin-bottom: 2rem;
    margin-top: 2.5rem;
    font-family: 'Fredoka One', cursive;
}

h1 {
    font-size: 2.2rem;
    color: var(--primary);
    text-shadow: 0 4px 10px rgba(0,0,0,0.5);
    margin-bottom: 0.5rem;
}

.slot-machine {
    background: var(--machine-bg);
    border: 5px solid #4a1f8f;
    border-radius: 20px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    width: 100%;
    height: 180px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5), inset 0 0 20px rgba(0,0,0,0.8);
    position: relative;
    margin-bottom: 2rem;
}

.reel-container {
    width: 30%;
    height: 100%;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 5px 15px rgba(0,0,0,0.3);
}

.reel {
    position: absolute;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.symbol {
    height: 130px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 4rem;
}

.payline {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255, 0, 127, 0.5);
    transform: translateY(-50%);
    z-index: 10;
    box-shadow: 0 0 10px rgba(255, 0, 127, 0.8);
}

.prediction-box {
    background: rgba(255,255,255,0.1);
    padding: 1.5rem;
    border-radius: 15px;
    text-align: center;
    font-size: 1.1rem;
    line-height: 1.4;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    width: 100%;
    border: 1px solid rgba(255,255,255,0.2);
    transition: all 0.3s;
}

.spin-btn {
    background: linear-gradient(to bottom, #ff007f, #b30059);
    border: none;
    border-radius: 50px;
    color: white;
    font-family: 'Fredoka One', cursive;
    font-size: 1.8rem;
    padding: 1rem 3rem;
    cursor: pointer;
    box-shadow: 0 8px 0 #660033, 0 15px 20px rgba(0,0,0,0.4);
    transition: transform 0.1s, box-shadow 0.1s;
    -webkit-tap-highlight-color: transparent;
}

.spin-btn:active {
    transform: translateY(8px);
    box-shadow: 0 0 0 #660033, 0 5px 10px rgba(0,0,0,0.4);
}

.spin-btn:disabled {
    filter: grayscale(1);
    cursor: not-allowed;
    transform: translateY(8px);
    box-shadow: 0 0 0 #660033;
}

/* Jackpot Overlay */
#jackpot-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(43, 16, 85, 0.95);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    z-index: 100;
    text-align: center;
}

#jackpot-overlay.hidden {
    display: none;
}

.jackpot-title {
    font-family: 'Fredoka One', cursive;
    font-size: 3.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
    text-shadow: 0 0 20px var(--primary);
    animation: pulse 1s infinite alternate;
}

@keyframes pulse {
    from { transform: scale(1); }
    to { transform: scale(1.1); }
}

.jackpot-text {
    font-size: 1.2rem;
    line-height: 1.5;
}

.back-btn {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(255,255,255,0.2);
    color: white;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 12px;
    font-weight: bold;
    z-index: 1000;
    backdrop-filter: blur(5px);
    transition: background 0.2s;
    font-size: 0.9rem;
}
.back-btn:active {
    background: rgba(255,255,255,0.4);
}
