:root {
    --bg-color: #0c0e14;
    --panel-bg: rgba(255, 255, 255, 0.05);
    --accent-primary: #8b5cf6;
    --accent-secondary: #06b6d4;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: rgba(255, 255, 255, 0.1);
    --glass-blur: blur(12px);
    --shadow-soft: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', 'Inter', -apple-system, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    background-image: 
        radial-gradient(circle at 20% 20%, rgba(139, 92, 246, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(6, 182, 212, 0.15) 0%, transparent 40%);
}

.app-container {
    display: grid;
    grid-template-columns: 350px 1fr 350px;
    height: 100vh;
    padding: 20px;
    gap: 20px;
}

/* Sidebar Styling */
.sidebar {
    background: var(--panel-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-soft);
    max-height: 100%;
    overflow: hidden;
}

.sidebar h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Input Area */
.input-section textarea {
    width: 100%;
    height: 300px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-main);
    padding: 15px;
    resize: none;
    font-size: 0.9rem;
    margin-bottom: 15px;
    outline: none;
    transition: border-color 0.3s ease;
}

.input-section textarea:focus {
    border-color: var(--accent-primary);
}

.btn {
    padding: 12px 24px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    width: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Main Area */
.main-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.draw-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    height: 400px;
    background: var(--panel-bg);
    border-radius: 32px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-soft);
}

/* Slot Animation Styling */
.slot-machine {
    font-size: 4rem;
    font-weight: 800;
    height: 1.2em;
    overflow: hidden;
    position: relative;
    width: 100%;
}

.slot-reel {
    position: absolute;
    width: 100%;
    transition: transform 0.1s linear;
}

.slot-item {
    height: 1.2em;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(90deg, #fff, #ddd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Winner List area */
.winners-list {
    flex: 1;
    overflow-y: auto;
    margin-top: 10px;
    padding-right: 5px;
    min-height: 0; /* Important for flexbox scrolling */
}

/* Custom Scrollbar for Winners List */
.winners-list::-webkit-scrollbar {
    width: 6px;
}

.winners-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
}

.winners-list::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.3);
    border-radius: 10px;
}

.winners-list::-webkit-scrollbar-thumb:hover {
    background: rgba(139, 92, 246, 0.5);
}

.winner-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px 15px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: slideIn 0.4s ease-out;
}

.winner-rank {
    font-size: 0.8rem;
    color: var(--accent-secondary);
    font-weight: 700;
}

.winner-name {
    font-weight: 600;
    font-size: 1rem;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .app-container {
        grid-template-columns: 1fr;
        height: auto;
        padding: 40px 20px;
    }
    .sidebar {
        max-height: 500px;
    }
}

/* Stats panel */
.stats {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.stat-item {
    flex: 1;
    background: rgba(255, 255, 255, 0.03);
    padding: 10px;
    border-radius: 12px;
    text-align: center;
}

.stat-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent-secondary);
}

.stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.controls {
    margin-top: 40px;
    width: 100%;
    max-width: 400px;
}

.draw-btn {
    height: 80px;
    font-size: 1.5rem;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
}
