/* ============================================
   ROLETA DE DESAFIOS - NEON NIGHTLIFE THEME
   ============================================ */

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

:root {
    /* Colors */
    --bg-primary: #050505;
    --bg-secondary: #0a0a1a;
    --text-primary: #e0e0e0;
    --text-secondary: #a0a0b0;
    
    --neon-cyan: #00ffff;
    --neon-pink: #ff00ff;
    --neon-purple: #bc13fe;
    --neon-green: #39ff14;
    
    --border-color: #33334d;
    
    /* Fonts */
    --font-display: 'Arial Black', sans-serif;
    --font-mono: 'Courier New', monospace;
}

html, body {
    width: 100%;
    height: 100%;
    overflow-x: hidden;
}

body {
    background-color: var(--bg-primary);
    background-image: url('neon-bar-bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-blend-mode: overlay;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 16px;
    line-height: 1.6;
}

/* ============================================
   BACKGROUND & OVERLAYS
   ============================================ */

#root {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), transparent, rgba(0, 0, 0, 0.8));
    pointer-events: none;
    z-index: 0;
}

.gradient-top {
    position: fixed;
    top: -80px;
    left: -80px;
    width: 256px;
    height: 256px;
    background: radial-gradient(circle, rgba(188, 19, 254, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(100px);
    pointer-events: none;
    z-index: 0;
}

.gradient-bottom {
    position: fixed;
    bottom: 0;
    right: 0;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(0, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(120px);
    pointer-events: none;
    z-index: 0;
}

/* ============================================
   MAIN CONTAINER
   ============================================ */

.main-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 500px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
}

/* ============================================
   HEADER
   ============================================ */

.header {
    text-align: center;
    width: 100%;
}

.header-inner {
    position: relative;
    display: inline-block;
    width: 100%;
}

.title {
    font-size: 2.5rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    background: linear-gradient(90deg, var(--neon-cyan), white, var(--neon-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 5px var(--neon-cyan), 0 0 10px var(--neon-cyan);
    animation: pulse 2s ease-in-out infinite;
    margin-bottom: 8px;
}

.neon-text {
    text-shadow: 0 0 5px var(--neon-cyan), 0 0 10px var(--neon-cyan);
}

.title-underline {
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--neon-purple), transparent);
    box-shadow: 0 0 10px var(--neon-purple);
    margin: 12px auto 0;
    width: 80%;
}

.subtitle {
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-top: 16px;
}

/* ============================================
   ROULETTE
   ============================================ */

.roulette-container {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 16px 0;
}

.roulette-wrapper {
    position: relative;
    width: 100%;
    max-width: 350px;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pointer {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 15;
    width: 24px;
    height: 36px;
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    background: var(--neon-pink);
    filter: drop-shadow(0 0 15px rgba(255, 0, 255, 1));
    box-shadow: 0 0 20px rgba(255, 0, 255, 0.8), inset 0 0 10px rgba(255, 0, 255, 0.5);
}

.roulette-border {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 4px solid var(--neon-cyan);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
    z-index: 10;
    pointer-events: none;
}

.roulette {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(26, 26, 46, 0.9) 0%, rgba(10, 10, 26, 0.9) 100%);
    box-shadow: 0 0 30px rgba(188, 19, 254, 0.3);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.05s linear;
}

.roulette-center {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    pointer-events: none;
}

#centerCanvas {
    width: 100px;
    height: 100px;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.1));
}

/* ============================================
   BUTTON
   ============================================ */

.spin-button {
    width: 100%;
    max-width: 280px;
    height: 64px;
    font-size: 1.25rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    border-radius: 32px;
    border: 2px solid var(--neon-cyan);
    background: black;
    color: var(--neon-cyan);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px var(--neon-cyan);
    font-family: var(--font-mono);
}

.spin-button:hover:not(:disabled) {
    background: var(--neon-cyan);
    color: black;
    box-shadow: 0 0 20px var(--neon-cyan), 0 0 40px var(--neon-cyan);
    transform: scale(1.05);
}

.spin-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.spin-button:active:not(:disabled) {
    transform: scale(0.98);
}

/* ============================================
   FOOTER
   ============================================ */

.footer-info {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    margin-top: 32px;
}

.footer-info p {
    margin: 4px 0;
}

/* ============================================
   MODAL
   ============================================ */

.modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal.open {
    display: flex;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    z-index: 1001;
    width: 90vw;
    max-width: 420px;
    background: rgba(0, 0, 0, 0.95);
    border: 2px solid var(--neon-pink);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 0 50px rgba(255, 0, 255, 0.3);
    animation: slideUp 0.3s ease-out;
}

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

.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 28px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--neon-pink);
}

.modal-header {
    text-align: center;
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--neon-pink);
    text-shadow: 0 0 10px var(--neon-pink);
}

.modal-type {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-secondary);
}

.modal-body {
    text-align: center;
    margin-bottom: 24px;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-text {
    font-size: 1.125rem;
    font-weight: bold;
    line-height: 1.6;
    color: white;
    word-break: break-word;
}

.modal-footer {
    display: flex;
    justify-content: center;
}

.modal-button {
    width: 100%;
    padding: 12px 24px;
    background: var(--neon-pink);
    color: black;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-mono);
    box-shadow: 0 0 10px var(--neon-pink);
}

.modal-button:hover {
    background: white;
    color: var(--neon-pink);
    box-shadow: 0 0 20px var(--neon-pink);
    transform: scale(1.02);
}

.modal-button:active {
    transform: scale(0.98);
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .main-container {
        gap: 24px;
        padding: 16px;
    }

    .title {
        font-size: 2rem;
    }

    .roulette-wrapper {
        max-width: 280px;
    }

    .spin-button {
        max-width: 100%;
        height: 56px;
        font-size: 1rem;
    }

    .modal-content {
        padding: 20px;
    }

    .modal-title {
        font-size: 1.25rem;
    }

    .modal-text {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .main-container {
        gap: 20px;
        padding: 12px;
    }

    .title {
        font-size: 1.5rem;
    }

    .subtitle {
        font-size: 0.7rem;
    }

    .roulette-wrapper {
        max-width: 240px;
    }

    .pointer {
        width: 28px;
        height: 42px;
    }

    .spin-button {
        height: 48px;
        font-size: 0.9rem;
    }

    .modal-content {
        width: 95vw;
        padding: 16px;
    }

    .modal-title {
        font-size: 1.1rem;
    }

    .modal-text {
        font-size: 0.95rem;
    }
}
