:root {
    --bg-color: #020617;
    --panel-bg: rgba(30, 41, 59, 0.6);
    --primary: #3b82f6;
    --jackpot-gold: #facc15;
    --glass-border: rgba(255, 255, 255, 0.1);
    --text: #f8fafc;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Poppins', sans-serif; }

body {
    background: var(--bg-color);
    background-image: radial-gradient(circle at top right, #1e293b, #020617);
    color: var(--text);
    height: 100vh;
    overflow: hidden;
}

.app-container {
    display: grid;
    grid-template-columns: 320px 1fr;
    height: 100vh;
    gap: 20px;
    padding: 20px;
}

/* Sidebar */
.sidebar {
    background: var(--panel-bg);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

textarea {
    width: 100%;
    height: 180px;
    background: rgba(0,0,0,0.4);
    border: 1px solid var(--primary);
    border-radius: 10px;
    color: #00ffcc;
    padding: 15px;
    resize: none;
    font-family: monospace;
}

.hint { font-size: 11px; color: #94a3b8; }

.buttons { display: flex; flex-direction: column; gap: 8px; }

.btn { border: none; padding: 12px; border-radius: 8px; cursor: pointer; font-weight: 700; color: #fff; transition: 0.3s; }
.btn-save { background: #10b981; }
.btn-clear { background: #ef4444; }
.btn-fullscreen { background: #64748b; }

.history-panel { flex-grow: 1; overflow-y: auto; margin-top: 10px; }
.history-panel li {
    padding: 8px;
    background: rgba(255,255,255,0.05);
    margin-bottom: 5px;
    border-radius: 5px;
    font-size: 12px;
    border-left: 4px solid var(--primary);
}

/* Wheel Area */
.wheel-area { display: flex; flex-direction: column; align-items: center; justify-content: center; }

.main-header { text-align: center; margin-bottom: 20px; }
.main-header h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5rem;
    background: linear-gradient(to bottom, #fff, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 10px rgba(59, 130, 246, 0.8));
}
.header-line { height: 4px; width: 200px; background: var(--primary); margin: 8px auto; border-radius: 10px; box-shadow: 0 0 15px var(--primary); }

.wheel-container {
    position: relative;
    width: 520px;
    height: 520px;
    border: 12px solid #1e293b;
    border-radius: 50%;
    box-shadow: 0 0 50px rgba(0,0,0,0.8);
}

canvas { width: 100%; height: 100%; border-radius: 50%; }

.pointer {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px; height: 60px;
    background: #fff;
    clip-path: polygon(50% 100%, 0 0, 100% 0);
    z-index: 100;
    filter: drop-shadow(0 0 10px #fff);
}

.btn-spin {
    background: linear-gradient(45deg, #ef4444, #f59e0b);
    font-size: 1.5rem;
    font-weight: 900;
    padding: 18px 60px;
    border-radius: 50px;
    margin-top: 25px;
    box-shadow: 0 0 30px rgba(245, 158, 11, 0.4);
}

/* Modal Result */
.overlay {
    position: fixed;
    top:0; left:0; right:0; bottom:0;
    background: rgba(0,0,0,0.9);
    backdrop-filter: blur(15px);
    display: flex; justify-content: center; align-items: center;
    z-index: 1000;
}
.hidden { display: none; }

.modal-content { text-align: center; padding: 50px; border-radius: 30px; min-width: 450px; border: 5px solid #fff; }
.emoji-big { font-size: 120px; display: block; margin-bottom: 10px; }
.result-text { font-size: 3.5rem; font-weight: 900; font-family: 'Orbitron'; margin: 15px 0; }

.res-jackpot { background: radial-gradient(circle, #fef08a, #ca8a04); color: #000; box-shadow: 0 0 100px #facc15; }
.res-biasa { background: linear-gradient(135deg, #3b82f6, #1d4ed8); color: #fff; box-shadow: 0 0 50px #3b82f6; }
.res-zonk { background: #1e293b; color: #94a3b8; border-color: #475569; }

@media (max-width: 900px) {
    .app-container { grid-template-columns: 1fr; overflow-y: auto; }
    .wheel-container { width: 320px; height: 320px; }
}