:root {
    --bg-base: #141414; /* Netflix dark */
    --bg-card: #181818;
    --primary-red: #E50914; /* Netflix red */
    --primary-hover: #b8070f;
    --text-main: #FFFFFF;
    --text-muted: #808080;
    --border-color: #333333;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-base);
    color: var(--text-main);
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
}

/* Cinematic Background */
.bg-vignette {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at center, transparent 30%, #000000 120%);
    pointer-events: none;
    z-index: -1;
}

.app-container {
    width: 100%;
    max-width: 800px;
    padding: 1rem;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    z-index: 1;
}

/* Header & Logo */
.brand-header {
    text-align: center;
    margin-bottom: 1rem;
}

.logo {
    font-weight: 800;
    font-size: 2.5rem;
    letter-spacing: 2px;
    line-height: 1.1;
}

.logo .white { color: #fff; }
.logo .red { color: var(--primary-red); }
.logo .script { 
    font-family: cursive;
    font-weight: 400;
    font-size: 2rem;
    color: #fff;
    text-transform: none;
    letter-spacing: 0;
}

.section-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    transition: opacity 0.3s;
}

.hidden {
    display: none !important;
}

/* Switch Container */
.switch-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    background: rgba(255,255,255,0.03);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.switch-label {
    font-weight: 600;
    font-size: 1.1rem;
}

.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.switch input { 
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #333;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider {
    background-color: var(--primary-red);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

/* Upload Area */
.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: rgba(0,0,0,0.2);
}

.upload-area:hover, .upload-area.dragover {
    border-color: var(--primary-red);
    background: rgba(229, 9, 20, 0.05);
}

.upload-area .icon {
    width: 48px;
    height: 48px;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.upload-area .sub-text {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

/* Stats */
.stats-box {
    text-align: center;
    padding: 2rem;
    background: #000;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.stats-box .count {
    display: block;
    font-size: 4rem;
    font-weight: 800;
    color: var(--primary-red);
    line-height: 1;
}

.stats-box .label {
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    margin-top: 0.5rem;
    display: block;
}

/* Buttons */
.btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary {
    background: var(--primary-red);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: scale(1.02);
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--border-color);
    color: #fff;
}

.btn-secondary:hover {
    border-color: var(--text-main);
}

.btn-text {
    background: none;
    color: var(--text-muted);
    width: 100%;
    text-align: center;
}

.btn-text:hover {
    color: white;
}

.btn-action {
    background: var(--primary-red);
    color: white;
    font-size: 1.2rem;
    padding: 1rem 2rem;
    border-radius: 4px;
    box-shadow: 0 4px 15px rgba(229, 9, 20, 0.4);
    margin-top: 1rem;
    width: 100%;
    max-width: 400px;
}

.btn-action:hover {
    background: var(--primary-hover);
    box-shadow: 0 4px 20px rgba(229, 9, 20, 0.6);
}

.mt-4 { margin-top: 1rem; }
.game-selection {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1rem;
}

/* Slot Machine / Name Pool */
.game-container {
    background: var(--bg-card);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-height: 90vh;
}

.slot-machine-wrapper {
    width: 100%;
    max-width: 500px;
    height: 240px;
    background: #000;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    position: relative;
    margin: 1rem 0;
    overflow: hidden;
    box-shadow: inset 0 0 50px rgba(0,0,0,0.9);
}

.slot-window {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.slot-reel {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    transform: translateY(0); /* Default state */
    will-change: transform;
}

.slot-item {
    height: 60px; /* Fixed height for calculations */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 800;
    color: rgba(255,255,255,0.4);
    width: 100%;
    text-transform: uppercase;
    transition: color 0.1s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 1rem;
    line-height: 1;
}

.slot-item.active {
    color: #fff;
    font-size: 2.2rem;
    text-shadow: 0 0 10px rgba(255,255,255,0.8);
    z-index: 10;
    position: relative;
}

.slot-item.blur {
    filter: blur(2px);
    opacity: 0.7;
}

/* Gradient Overlays for depth */
.slot-overlay {
    position: absolute;
    left: 0; width: 100%; height: 80px;
    z-index: 2;
    pointer-events: none;
}
.slot-overlay.top {
    top: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 100%);
}
.slot-overlay.bottom {
    bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 100%);
}

/* Target Line */
.slot-target {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 60px;
    transform: translateY(-50%);
    border-top: 2px solid var(--primary-red);
    border-bottom: 2px solid var(--primary-red);
    background: rgba(229, 9, 20, 0.1);
    z-index: 1;
    pointer-events: none;
}

/* Roulette Styles adapted to Dark Theme */
.roulette-wrapper {
    position: relative;
    width: 400px;
    height: 400px;
    margin: 2rem auto;
}
.pointer {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0; height: 0; 
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 25px solid var(--primary-red);
    z-index: 10;
}
canvas#roulette-canvas {
    border-radius: 50%;
    box-shadow: 0 0 30px rgba(0,0,0,0.8);
}

/* Modal Winner */
.modal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.cinematic-card {
    background: #141414;
    border: 2px solid var(--primary-red);
    padding: 4rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 0 50px rgba(229, 9, 20, 0.3);
    transform: scale(0.9);
    animation: popIn 0.5s forwards cubic-bezier(0.175, 0.885, 0.32, 1.275);
    max-width: 90%;
    width: 600px;
}

@keyframes popIn {
    to { transform: scale(1); }
}

.winner-label {
    color: var(--primary-red);
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 3px;
    margin-bottom: 1rem;
}

.winner-name {
    font-size: 5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    text-shadow: 0 4px 15px rgba(0,0,0,0.8);
    line-height: 1.1;
}

.winner-email {
    color: var(--text-muted);
    font-size: 1.2rem;
    margin-bottom: 3rem;
}
