/* ==========================================================================
   MEGACUBIERTAS LUCKY WHEEL - DESIGN SYSTEM & LAYOUT (IMAGE 2 MATCH)
   ========================================================================== */

:root {
    --bg-dark-navy: #020817;
    --bg-card-navy: rgba(10, 25, 50, 0.85);
    --primary-blue: #0088ff;
    --primary-glow: #00d5ff;
    --text-white: #ffffff;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    --border-color: rgba(0, 136, 255, 0.25);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: var(--font-body);
}

html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    position: relative;
}

body {
    background-color: var(--bg-dark-navy);
    background-image: 
        radial-gradient(circle at 50% 30%, rgba(0, 136, 255, 0.18) 0%, transparent 60%),
        radial-gradient(circle at 10% 80%, rgba(0, 213, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 90% 80%, rgba(0, 85, 255, 0.12) 0%, transparent 50%);
    color: var(--text-white);
    min-height: 100vh;
    margin: 0;
    padding: 24px 0 40px 0;
}

/* Background Ambient Glows (Contained) */
.bg-glow-container {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
    width: 100%;
    height: 100%;
}

.bg-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    pointer-events: none;
}

.bg-glow-1 {
    top: -100px;
    left: -100px;
    width: 500px;
    height: 500px;
    background: rgba(0, 136, 255, 0.25);
}

.bg-glow-2 {
    bottom: -100px;
    right: -100px;
    width: 600px;
    height: 600px;
    background: rgba(0, 213, 255, 0.18);
}

/* App Outer Container */
.app-layout {
    width: 100%;
    max-width: 1380px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

/* Mobile Header (Hidden on Desktop) */
.mobile-header {
    display: none;
    text-align: center;
    margin-bottom: 20px;
}

.mobile-promo-badge {
    display: inline-block;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 800;
    padding: 6px 16px;
    border-radius: 20px;
    margin-top: 10px;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

/* Transparent White-Text Logo */
.brand-header {
    background: transparent;
    padding: 0;
    margin-bottom: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    box-shadow: none;
}

.brand-logo-img {
    max-width: 260px;
    height: auto;
    display: block;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.5));
}

/* Hero 3-Column Grid */
.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1.25fr 1fr;
    gap: 32px;
    align-items: center;
    margin-bottom: 40px;
}

/* Left Hero Section */
.hero-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.promo-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 136, 255, 0.15);
    border: 1px solid rgba(0, 213, 255, 0.35);
    border-radius: 20px;
    padding: 6px 16px;
    font-size: 0.8rem;
    font-weight: 800;
    color: #7dd3fc;
    margin-bottom: 16px;
    letter-spacing: 0.5px;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 3vw, 2.8rem);
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #ffffff 0%, #7dd3fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 0.98rem;
    color: #cbd5e1;
    line-height: 1.6;
    margin-bottom: 28px;
}

.hero-subtitle strong {
    color: #5eead4;
}

/* 4 Steps Grid */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    width: 100%;
}

.step-card {
    background: rgba(10, 25, 50, 0.6);
    border: 1px solid rgba(0, 136, 255, 0.2);
    border-radius: 14px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.step-card:hover {
    border-color: var(--primary-glow);
    transform: translateY(-2px);
    background: rgba(10, 25, 50, 0.9);
}

.step-icon {
    font-size: 1.3rem;
}

.step-text {
    font-size: 0.82rem;
    font-weight: 700;
    color: #f8fafc;
}

/* Center Column: WHEEL STAGE (PROTAGONIST) */
.hero-center {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.wheel-stage {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.wheel-glow-backdrop {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -55%);
    width: 520px;
    height: 520px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 213, 255, 0.35) 0%, rgba(0, 85, 255, 0.15) 50%, transparent 75%);
    filter: blur(40px);
    pointer-events: none;
    z-index: 1;
}

.wheel-container {
    position: relative;
    width: 480px;
    height: 480px;
    max-width: 92vw;
    z-index: 2;
}

#wheelCanvas {
    width: 100%;
    height: 100%;
    display: block;
    filter: drop-shadow(0 15px 35px rgba(0, 0, 0, 0.8));
}

/* Glowing LED Ring */
.led-ring {
    position: absolute;
    inset: -14px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 4;
}

.led-bulb {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    background: #ffffff;
    box-shadow: 0 0 10px #ffffff;
    transition: all 0.3s ease;
}

.led-bulb.active {
    background: #00d5ff;
    box-shadow: 0 0 15px #00d5ff, 0 0 25px #00d5ff;
}

.led-bulb.off {
    background: #1e293b;
    box-shadow: none;
}

/* Metallic Pointer */
.pointer-wrapper {
    position: absolute;
    top: -24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    filter: drop-shadow(0 8px 15px rgba(0, 0, 0, 0.7));
}

.pointer {
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-top: 48px solid #00d5ff;
    position: relative;
}

.pointer::after {
    content: '';
    position: absolute;
    top: -48px;
    left: -14px;
    width: 0;
    height: 0;
    border-left: 14px solid transparent;
    border-right: 14px solid transparent;
    border-top: 36px solid #ffffff;
}

/* Center Logo Dome */
.center-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
    box-shadow: 
        0 0 30px rgba(0, 213, 255, 0.6),
        inset 0 4px 10px rgba(255, 255, 255, 0.9),
        0 10px 25px rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 5;
    border: 4px solid #0088ff;
}

.badge-inner {
    width: 78px;
    height: 78px;
    border-radius: 50%;
    background: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
}

.center-badge-logo {
    width: 52px;
    height: auto;
}

/* Wheel 3D Stage Pedestal */
.wheel-pedestal {
    width: 280px;
    height: 35px;
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    border: 2px solid rgba(0, 213, 255, 0.3);
    border-radius: 0 0 30px 30px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.9);
    margin-top: -15px;
    position: relative;
    z-index: 1;
}

/* Right Column: Lead Form & Terms */
.hero-right {
    display: flex;
    justify-content: center;
}

.form-card {
    background: var(--bg-card-navy);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 28px 24px;
    width: 100%;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.terms-card {
    background: rgba(5, 18, 38, 0.7);
    border: 1px solid rgba(0, 136, 255, 0.2);
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 20px;
}

.terms-card h4 {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.terms-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.terms-list li {
    font-size: 0.8rem;
    color: #94a3b8;
    line-height: 1.35;
    display: flex;
    gap: 6px;
}

.terms-bullet {
    color: var(--primary-glow);
}

/* Form Inputs */
.input-group {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.input-group label {
    font-size: 0.83rem;
    font-weight: 600;
    color: var(--text-muted);
}

.input-hint {
    font-size: 0.76rem;
    color: var(--primary-glow);
    font-weight: 600;
}

.quote-sub-hint {
    font-size: 0.76rem;
    color: #94a3b8;
    margin-top: 4px;
    display: block;
    line-height: 1.35;
}

.quote-sub-hint strong {
    color: #5eead4;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 16px;
    width: 18px;
    height: 18px;
    color: var(--text-dim);
}

.input-wrapper input {
    width: 100%;
    padding: 14px 16px 14px 44px;
    background: rgba(5, 18, 38, 0.9);
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    color: var(--text-white);
    font-size: 0.92rem;
    outline: none;
    transition: all 0.3s ease;
}

.input-wrapper input:focus {
    border-color: var(--primary-glow);
    box-shadow: 0 0 15px rgba(0, 213, 255, 0.25);
}

.error-msg {
    font-size: 0.78rem;
    color: #ff4d4d;
    display: none;
    margin-top: 2px;
}

.form-notice {
    background: rgba(234, 179, 8, 0.15);
    border: 1px solid rgba(234, 179, 8, 0.3);
    color: #fde047;
    padding: 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    margin-bottom: 16px;
}

/* Spin CTA Button */
.btn-spin {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #0088ff 0%, #0044cc 100%);
    border: none;
    border-radius: 16px;
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 102, 255, 0.4);
    transition: all 0.3s ease;
}

.btn-spin:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(0, 136, 255, 0.6), 0 0 20px rgba(0, 213, 255, 0.8);
}

.btn-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transform: skewX(-20deg);
    animation: shine 4s infinite;
}

@keyframes shine {
    0% { left: -100%; }
    20% { left: 200%; }
    100% { left: 200%; }
}

/* Sound Toggle */
.sound-toggle-container {
    margin-top: 16px;
    display: flex;
    justify-content: center;
}

.btn-sound {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 6px 14px;
    color: var(--text-dim);
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

/* Bottom Features Bar (Matching Image 2) */
.bottom-features {
    background: rgba(10, 25, 50, 0.7);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(0, 136, 255, 0.2);
    border-radius: 20px;
    padding: 18px 28px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    width: 100%;
    margin-top: 36px;
    box-sizing: border-box;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 14px;
}

.feature-icon {
    font-size: 1.6rem;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(0, 136, 255, 0.15);
    border: 1px solid rgba(0, 213, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.feature-info strong {
    display: block;
    font-size: 0.9rem;
    color: #ffffff;
}

.feature-info span {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* Extra Bottom Return Bar (Volver a Megacubiertastlp.com.co) */
.back-web-bar {
    width: 100%;
    text-align: center;
    margin-top: 28px;
    margin-bottom: 8px;
}

.btn-back-web {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(0, 136, 255, 0.2) 0%, rgba(0, 213, 255, 0.1) 100%);
    border: 1.5px solid rgba(0, 213, 255, 0.4);
    border-radius: 30px;
    padding: 12px 28px;
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
}

.btn-back-web:hover {
    background: linear-gradient(135deg, #0088ff 0%, #00d5ff 100%);
    border-color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 136, 255, 0.6);
    color: #ffffff;
}

.brand-header-link {
    text-decoration: none;
    display: inline-block;
    transition: transform 0.3s ease;
}

.brand-header-link:hover {
    transform: scale(1.03);
}

/* Admin Gear Button */
.btn-admin-gear {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(10, 25, 50, 0.85);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
}

.btn-admin-gear:hover {
    border-color: var(--primary-glow);
    color: #ffffff;
    transform: scale(1.05);
}

.btn-admin-gear .admin-text {
    display: none;
}

/* Winner Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2, 8, 20, 0.88);
    backdrop-filter: blur(12px);
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

#confettiCanvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 101;
}

.modal-card {
    background: linear-gradient(135deg, rgba(10, 30, 65, 0.95) 0%, rgba(5, 15, 35, 0.98) 100%);
    border: 2px solid var(--primary-glow);
    border-radius: 28px;
    padding: 32px 24px;
    max-width: 460px;
    width: 100%;
    text-align: center;
    position: relative;
    z-index: 102;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 50px rgba(0, 213, 255, 0.4);
    max-height: 92vh;
    overflow-y: auto;
}

.trophy-badge {
    font-size: 3.2rem;
    margin-bottom: 8px;
    animation: bounce 1.5s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.modal-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-white);
    margin-bottom: 4px;
}

.modal-subtitle {
    font-size: 0.9rem;
    color: var(--text-dim);
    margin-bottom: 18px;
}

.prize-box {
    background: rgba(0, 136, 255, 0.12);
    border: 1px dashed var(--primary-glow);
    border-radius: 18px;
    padding: 18px 16px;
    margin-bottom: 16px;
}

.prize-name {
    font-size: 1.5rem;
    font-weight: 900;
    color: #ffffff;
    margin-bottom: 8px;
}

.prize-code-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.code-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.code-value {
    font-family: monospace;
    font-size: 1.2rem;
    font-weight: 800;
    color: #5eead4;
    background: rgba(0, 0, 0, 0.4);
    padding: 8px 16px;
    border-radius: 10px;
    letter-spacing: 2px;
}

.btn-copy {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.78rem;
    cursor: pointer;
    margin-top: 4px;
}

.modal-instructions {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.45;
    margin-bottom: 18px;
}

.btn-close-modal {
    width: 100%;
    padding: 14px;
    background: var(--primary-blue);
    border: none;
    border-radius: 14px;
    color: #ffffff;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
}

/* ==========================================================================
   RESPONSIVE LAYOUT (TABLET & MOBILE MATCHING IMAGE 2 RIGHT SCREEN)
   ========================================================================== */
@media (max-width: 1100px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .desktop-only {
        display: none;
    }

    .mobile-header {
        display: block;
    }

    .hero-left {
        align-items: center;
        text-align: center;
    }

    .steps-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    /* Admin Gear Access Button (Mobile: Centered Text Link at Bottom) */
    .btn-admin-gear {
        position: relative;
        bottom: auto;
        right: auto;
        width: auto;
        height: auto;
        border-radius: 0;
        background: transparent;
        border: none;
        box-shadow: none;
        color: var(--text-dim);
        font-size: 0.83rem;
        margin: 24px auto 12px auto;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        text-decoration: underline;
        cursor: pointer;
    }

    .btn-admin-gear .gear-icon {
        font-size: 0.9rem;
    }

    .btn-admin-gear .admin-text {
        display: inline;
        font-weight: 600;
        color: var(--text-muted);
    }
}

@media (max-width: 600px) {
    html, body {
        overflow-x: hidden !important;
        width: 100vw;
    }

    .app-layout {
        padding: 0 8px;
        overflow-x: hidden;
        width: 100%;
        max-width: 100%;
    }

    .steps-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .wheel-container {
        width: 290px;
        height: 290px;
        max-width: 82vw;
    }

    .wheel-glow-backdrop {
        width: 290px;
        height: 290px;
    }

    .wheel-pedestal {
        width: 200px;
        height: 22px;
    }

    .pointer-wrapper {
        top: -18px;
    }

    .pointer {
        border-left-width: 14px;
        border-right-width: 14px;
        border-top-width: 34px;
    }

    .bottom-features {
        grid-template-columns: repeat(2, 1fr);
        padding: 14px;
        gap: 12px;
        margin-top: 24px;
        width: 100%;
    }

    .feature-item {
        gap: 10px;
    }

    .feature-icon {
        width: 36px;
        height: 36px;
        font-size: 1.2rem;
    }

    .feature-info strong {
        font-size: 0.8rem;
    }

    .feature-info span {
        font-size: 0.7rem;
    }

    /* Admin Gear Access Button (Mobile: Centered Text Link at Bottom) */
    .btn-admin-gear {
        position: relative;
        bottom: auto;
        right: auto;
        width: auto;
        height: auto;
        border-radius: 0;
        background: transparent;
        border: none;
        box-shadow: none;
        color: var(--text-dim);
        font-size: 0.83rem;
        margin: 24px auto 12px auto;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        text-decoration: underline;
        cursor: pointer;
    }

    .btn-admin-gear .gear-icon {
        font-size: 0.9rem;
    }

    .btn-admin-gear .admin-text {
        display: inline;
        font-weight: 600;
        color: var(--text-muted);
    }

    /* Winner Modal iPhone 16 / Mobile Responsive Fix */
    .modal-overlay {
        padding: 10px;
        align-items: center;
        justify-content: center;
    }

    .modal-card {
        width: calc(100vw - 24px);
        max-width: 340px;
        padding: 20px 14px;
        border-radius: 20px;
        max-height: 88vh;
        overflow-y: auto;
        margin: auto;
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.9), 0 0 30px rgba(0, 213, 255, 0.35);
    }

    .trophy-badge {
        font-size: 2.4rem;
        margin-bottom: 4px;
    }

    .modal-title {
        font-size: 1.4rem;
        margin-bottom: 4px;
    }

    .modal-subtitle {
        font-size: 0.78rem;
        margin-bottom: 12px;
    }

    .prize-box {
        padding: 10px 8px;
        margin-bottom: 12px;
        border-radius: 14px;
    }

    .prize-name {
        font-size: 1.25rem;
        margin-bottom: 6px;
    }

    .code-label {
        font-size: 0.7rem;
    }

    .code-value {
        font-size: 0.95rem;
        padding: 6px 10px;
        letter-spacing: 1px;
    }

    .btn-copy {
        font-size: 0.7rem;
        padding: 4px 10px;
    }

    .modal-instructions {
        font-size: 0.74rem;
        line-height: 1.35;
        margin-bottom: 14px;
    }

    .btn-close-modal {
        padding: 12px;
        font-size: 0.9rem;
        border-radius: 12px;
    }
}
