/* ==========================================
   FORMULA ROULETTE - PREMIUM STYLES
   ========================================== */

.roulette-body {
    background: #060e17;
    background-image: none;
}

/* ---- TOP BAR ---- */
.roulette-topbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 32px;
    z-index: 100;
    background: rgba(6, 14, 23, 0.92);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(194, 122, 80, 0.12);
}

.roulette-back {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--beige);
    font-size: 0.88rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: var(--transition);
}
.roulette-back:hover { color: var(--brown-light); }
.roulette-back i { font-size: 1.2rem; }
.roulette-logo { height: 36px; width: auto; }

/* ---- HERO ---- */
.roulette-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 24px 80px;
    overflow: hidden;
}

.roulette-hero-bg {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse at 20% 50%, rgba(194, 122, 80, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(26, 58, 82, 0.3) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 100%, rgba(139, 90, 60, 0.08) 0%, transparent 40%),
        linear-gradient(180deg, #060e17 0%, #0a1e2e 40%, #0d2438 100%);
    z-index: 0;
}

.roulette-particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: var(--size, 3px);
    height: var(--size, 3px);
    background: rgba(194, 122, 80, 0.4);
    border-radius: 50%;
    animation: particleFloat 5s ease-in-out infinite;
}

@keyframes particleFloat {
    0%, 100% { transform: translateY(0) scale(1); opacity: 0.3; }
    50% { transform: translateY(-30px) scale(1.5); opacity: 0.7; }
}

.roulette-hero-content {
    position: relative;
    z-index: 1;
    max-width: 720px;
}

.roulette-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(194, 122, 80, 0.12);
    border: 1px solid rgba(194, 122, 80, 0.25);
    padding: 12px 28px;
    border-radius: 50px;
    margin-bottom: 32px;
    animation: badgePulse 3s ease-in-out infinite;
}

.roulette-badge i { color: var(--brown-light); font-size: 1.4rem; }
.roulette-badge span {
    color: var(--brown-light);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 4px;
}

@keyframes badgePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(194, 122, 80, 0.15); }
    50% { box-shadow: 0 0 30px 8px rgba(194, 122, 80, 0.12); }
}

.roulette-hero-content h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.4rem, 5.5vw, 4rem);
    color: var(--white);
    font-weight: 600;
    line-height: 1.15;
    margin-bottom: 24px;
}

.roulette-hero-content h1 .accent,
.roulette-section-title .accent {
    color: var(--brown-light);
    font-style: italic;
}

.roulette-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.05rem;
    line-height: 1.8;
    max-width: 560px;
    margin: 0 auto 40px;
}

.hero-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 36px;
    background: linear-gradient(135deg, var(--brown-dark), var(--brown-light));
    color: var(--white);
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    transition: all 0.4s ease;
    box-shadow: 0 4px 20px rgba(194, 122, 80, 0.3);
}

.hero-cta-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 35px rgba(194, 122, 80, 0.4);
}

.hero-cta-btn i {
    animation: bounceDown 1.5s ease-in-out infinite;
}

@keyframes bounceDown {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(5px); }
}

/* ---- WHEEL SECTION ---- */
.wheel-section {
    padding: 100px 24px 80px;
    background: linear-gradient(180deg, #0a1e2e 0%, #0d2438 50%, #0a1e2e 100%);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.wheel-section::before {
    content: '';
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(194, 122, 80, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.roulette-container {
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
}

.roulette-section-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    text-align: center;
    color: var(--white);
    margin-bottom: 12px;
}

.wheel-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    margin-bottom: 50px;
}

/* Wheel Wrapper */
.wheel-wrapper {
    position: relative;
    width: 440px;
    height: 440px;
    margin: 0 auto 40px;
}

/* LED dots around wheel */
.wheel-leds {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.led {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #C27A50;
    transform: translate(-50%, -50%);
    animation: ledBlink 1.2s ease-in-out infinite alternate;
    box-shadow: 0 0 6px rgba(194, 122, 80, 0.6);
}

.is-spinning .led {
    animation: ledBlinkFast 0.2s ease-in-out infinite alternate;
}

@keyframes ledBlink {
    0% { opacity: 0.3; box-shadow: 0 0 4px rgba(194, 122, 80, 0.3); }
    100% { opacity: 1; box-shadow: 0 0 10px rgba(194, 122, 80, 0.8); }
}

@keyframes ledBlinkFast {
    0% { opacity: 0.4; background: #C27A50; }
    100% { opacity: 1; background: #F5E6D3; }
}

/* Pointer */
.wheel-pointer {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    filter: drop-shadow(0 3px 6px rgba(0,0,0,0.5));
    transition: transform 0.08s ease;
}

.wheel-pointer.tick {
    transform: translateX(-50%) scaleY(0.85);
}

/* Canvas */
#wheelCanvas {
    border-radius: 50%;
    display: block;
    position: relative;
    z-index: 2;
}

/* Spin button - overlays center of wheel */
.spin-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.spin-btn-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 0;
    font-weight: 800;
    color: transparent;
    letter-spacing: 1px;
    pointer-events: none;
}

.spin-btn:hover {
    transform: translate(-50%, -50%) scale(1.15);
}

.spin-btn.spinning {
    pointer-events: none;
    animation: none;
}

.spin-btn.done {
    pointer-events: none;
}

.spin-btn.done .spin-btn-text {
    font-size: 0;
}

@keyframes shake {
    0%, 100% { transform: translate(-50%, -50%) rotate(0); }
    25% { transform: translate(-50%, -50%) rotate(-8deg); }
    75% { transform: translate(-50%, -50%) rotate(8deg); }
}

.spin-btn.shake {
    animation: shake 0.4s ease-in-out;
}

/* ---- PRIZE RESULT ---- */
.prize-result {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
    position: relative;
    margin-top: 20px;
}

.prize-result.show {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

.prize-confetti {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: visible;
}

.confetti-piece {
    position: absolute;
    top: 0;
    left: var(--x);
    width: var(--size);
    height: var(--size);
    background: var(--color);
    border-radius: 2px;
    animation: confettiFall 2.5s ease-out var(--delay) both;
}

@keyframes confettiFall {
    0% { 
        transform: translateY(-20px) translateX(0) rotate(0deg) scale(0);
        opacity: 1;
    }
    10% { transform: translateY(-40px) scale(1); opacity: 1; }
    100% { 
        transform: translateY(200px) translateX(var(--drift)) rotate(var(--rotation));
        opacity: 0;
    }
}

.prize-card {
    background: linear-gradient(135deg, rgba(194, 122, 80, 0.12), rgba(10, 30, 46, 0.8));
    border: 1px solid rgba(194, 122, 80, 0.3);
    border-radius: 24px;
    padding: 40px;
    backdrop-filter: blur(20px);
    position: relative;
    z-index: 2;
}

.prize-icon {
    margin-bottom: 16px;
}

.prize-icon i {
    font-size: 3rem;
    color: #FFD700;
    filter: drop-shadow(0 0 12px rgba(255, 215, 0, 0.4));
}

.prize-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: var(--white);
    margin-bottom: 12px;
}

.prize-text {
    color: var(--beige);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.prize-code {
    display: inline-block;
    background: rgba(194, 122, 80, 0.15);
    border: 1px dashed rgba(194, 122, 80, 0.4);
    padding: 10px 24px;
    border-radius: 10px;
    color: var(--brown-light);
    font-size: 1rem;
    font-family: 'Montserrat', sans-serif;
    letter-spacing: 2px;
    margin-bottom: 24px;
}

.prize-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    background: linear-gradient(135deg, var(--brown-dark), var(--brown-light));
    color: var(--white);
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(194, 122, 80, 0.3);
}

.prize-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(194, 122, 80, 0.4);
}

/* ---- STEPS SECTION ---- */
.roulette-steps {
    padding: 90px 24px;
    background: linear-gradient(180deg, #0a1e2e, #0d2438);
}

.steps-grid {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.step-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    padding: 40px 28px 36px;
    text-align: center;
    position: relative;
    flex: 1;
    max-width: 260px;
    transition: all 0.4s ease;
}

.step-card:hover {
    transform: translateY(-5px);
    background: rgba(194, 122, 80, 0.05);
    border-color: rgba(194, 122, 80, 0.15);
}

.step-number {
    position: absolute;
    top: -16px;
    left: 50%;
    transform: translateX(-50%);
    width: 34px;
    height: 34px;
    background: linear-gradient(135deg, var(--brown-dark), var(--brown-light));
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    box-shadow: 0 4px 12px rgba(194, 122, 80, 0.35);
}

.step-icon-wrap {
    margin-bottom: 18px;
}

.step-icon-wrap i {
    font-size: 2.2rem;
    color: var(--brown-light);
}

.step-card h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    color: var(--white);
    margin-bottom: 8px;
    font-weight: 600;
}

.step-card p {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.85rem;
    line-height: 1.5;
}

.step-arrow {
    color: rgba(194, 122, 80, 0.3);
    font-size: 1.5rem;
    flex-shrink: 0;
}

/* ---- FORM SECTION ---- */
.roulette-form-section {
    padding: 90px 24px;
    background: linear-gradient(180deg, #0d2438, #0a1e2e);
}

.roulette-form-wrapper {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 24px;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.roulette-form-header {
    background: linear-gradient(135deg, rgba(194, 122, 80, 0.12), rgba(10, 30, 46, 0.5));
    padding: 44px 40px;
    text-align: center;
    border-bottom: 1px solid rgba(194, 122, 80, 0.1);
}

.roulette-form-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: var(--white);
    margin-bottom: 8px;
}

.roulette-form-header p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.92rem;
}

.form-header-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(194, 122, 80, 0.15));
    border: 1px solid rgba(255, 215, 0, 0.25);
    padding: 10px 20px;
    border-radius: 50px;
    margin-bottom: 20px;
    animation: badgePulse 2s ease-in-out infinite;
}

.form-header-badge i {
    color: #FFD700;
    font-size: 1.1rem;
}

.form-header-badge span {
    color: #FFD700;
    font-size: 0.82rem;
    font-weight: 600;
}

.roulette-form {
    padding: 40px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.roulette-form .form-group {
    display: flex;
    flex-direction: column;
}

.roulette-form .form-group.full-width {
    grid-column: 1 / -1;
}

.roulette-form label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 8px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.roulette-form label i {
    color: var(--brown-medium);
    font-size: 1rem;
}

.roulette-form input,
.roulette-form select,
.roulette-form textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.92rem;
    color: var(--white);
    background: rgba(255, 255, 255, 0.04);
    transition: var(--transition);
}

.roulette-form input::placeholder,
.roulette-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.roulette-form select {
    color: rgba(255, 255, 255, 0.85);
}

.roulette-form select option {
    background: #0a1e2e;
    color: var(--white);
}

.roulette-form input:focus,
.roulette-form select:focus,
.roulette-form textarea:focus {
    outline: none;
    border-color: var(--brown-medium);
    box-shadow: 0 0 0 3px rgba(194, 122, 80, 0.12);
    background: rgba(255, 255, 255, 0.06);
}

.roulette-form textarea {
    resize: vertical;
    min-height: 80px;
}

.roulette-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 18px;
    margin-top: 28px;
    background: linear-gradient(135deg, var(--brown-dark), var(--brown-light));
    color: var(--white);
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 1px;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.4s ease;
    box-shadow: 0 4px 20px rgba(194, 122, 80, 0.25);
}

.roulette-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(194, 122, 80, 0.4);
}

.roulette-submit i { font-size: 1.2rem; }

/* ---- MODAL ---- */
.roulette-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(6, 14, 23, 0.9);
    backdrop-filter: blur(8px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.roulette-modal.active { display: flex; }

.roulette-modal-content {
    background: linear-gradient(135deg, #0d2438, #0a1e2e);
    border: 1px solid rgba(194, 122, 80, 0.2);
    border-radius: 24px;
    padding: 56px 44px;
    text-align: center;
    max-width: 420px;
    width: 100%;
    animation: modalIn 0.4s ease;
}

@keyframes modalIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.roulette-modal-icon { margin-bottom: 20px; }
.roulette-modal-icon i { font-size: 4rem; color: #27ae60; }

.roulette-modal-content h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    color: var(--white);
    margin-bottom: 12px;
}

.roulette-modal-content p {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.92rem;
    margin-bottom: 28px;
}

.roulette-modal-btn {
    display: inline-block;
    padding: 14px 32px;
    background: linear-gradient(135deg, var(--brown-dark), var(--brown-light));
    color: var(--white);
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    transition: var(--transition);
}

.roulette-modal-btn:hover {
    box-shadow: 0 6px 20px rgba(194, 122, 80, 0.35);
}

/* ---- FOOTER ---- */
.roulette-footer {
    padding: 28px;
    text-align: center;
    background: #060e17;
    color: rgba(255, 255, 255, 0.25);
    font-size: 0.78rem;
    letter-spacing: 0.5px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 768px) {
    .roulette-topbar { padding: 12px 20px; }
    .roulette-logo { height: 28px; }

    .roulette-hero {
        min-height: 85vh;
        padding: 100px 20px 60px;
    }

    .wheel-wrapper {
        width: 320px;
        height: 320px;
    }

    #wheelCanvas {
        width: 320px;
        height: 320px;
    }

    .steps-grid {
        flex-direction: column;
        gap: 40px;
    }

    .step-arrow {
        transform: rotate(90deg);
    }

    .step-card { max-width: 100%; }

    .roulette-steps { padding: 60px 20px; }
    .roulette-form-section { padding: 50px 16px; }

    .form-row { grid-template-columns: 1fr; gap: 16px; }

    .roulette-form { padding: 28px 20px; }
    .roulette-form-header { padding: 28px 20px; }
    .roulette-form-header h2 { font-size: 1.4rem; }

    .prize-card { padding: 30px 24px; }
}

@media (max-width: 480px) {
    .roulette-hero-content h1 { font-size: 1.8rem; }
    .roulette-subtitle { font-size: 0.92rem; }
    .roulette-back span { display: none; }

    .wheel-wrapper {
        width: 280px;
        height: 280px;
    }

    #wheelCanvas {
        width: 280px;
        height: 280px;
    }
}
