:root {
    --gold: #c5a059;
    --gold-light: #8e6d2f;
    --gold-dark: #b8860b;
    --deep-blue: #1a2a3a;
    --bg-light: #faf9f6;
    --brand-gradient: linear-gradient(135deg, #c5a059 0%, #b8860b 100%);
    --font-body: 'Manrope', sans-serif;
}

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

body {
    background: #F5F0E8;
    font-family: var(--font-body);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    overflow-y: auto;
    color: var(--deep-blue);
    user-select: none;
    -webkit-user-select: none;
    position: relative;
}

input {
    user-select: text !important; /* Re-enable for inputs */
    -webkit-user-select: text !important;
}

/* ── Keyframe animations for background ── */
@keyframes floatA {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%       { transform: translate(10px, -14px) scale(1.03); }
    66%       { transform: translate(-8px, 8px) scale(0.97); }
}
@keyframes floatB {
    0%, 100% { transform: translate(0, 0) scale(1); }
    40%       { transform: translate(-12px, 10px) scale(1.04); }
    70%       { transform: translate(9px, -9px) scale(0.96); }
}
@keyframes floatC {
    0%, 100% { transform: translate(0, 0); }
    50%       { transform: translate(6px, -10px); }
}
@keyframes glowPulse {
    0%, 100% { opacity: 0.7; transform: scale(1); }
    50%       { opacity: 1;   transform: scale(1.08); }
}
@keyframes dotDrift {
    0%, 100% { transform: translate(0, 0); opacity: 0.7; }
    50%       { transform: translate(4px, -6px); opacity: 1; }
}

/* ── Decorative golden background ── */
.deco-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.deco-bg::before {
    content: '';
    position: absolute;
    top: -120px; left: -120px;
    width: 420px; height: 420px;
    border-radius: 50%;
    border: 40px solid rgba(197, 160, 89, 0.12);
    box-shadow: 0 0 0 20px rgba(197, 160, 89, 0.04);
    animation: floatA 14s ease-in-out infinite;
}

.deco-bg::after {
    content: '';
    position: absolute;
    bottom: -130px; right: -130px;
    width: 480px; height: 480px;
    border-radius: 50%;
    border: 50px solid rgba(197, 160, 89, 0.10);
    box-shadow: 0 0 0 25px rgba(197, 160, 89, 0.04);
    animation: floatB 18s ease-in-out infinite;
}

.deco-circle {
    position: absolute;
    border-radius: 50%;
    border: 2px solid rgba(197, 160, 89, 0.18);
    background: radial-gradient(circle, rgba(197, 160, 89, 0.05) 0%, transparent 70%);
}

.deco-dot {
    position: absolute;
    border-radius: 50%;
    background: rgba(197, 160, 89, 0.18);
}

/* Main Card - Light Glassmorphism */
.glass-card {
    position: relative;
    z-index: 10;
    background: rgba(255, 255, 255, 0.90);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(197, 160, 89, 0.10);
    border-radius: 40px;
    padding: 50px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.07);
    animation: cardEntry 1s cubic-bezier(0.17, 0.67, 0.83, 0.67) forwards;
    opacity: 0;
    transform: translateY(30px);
}

@keyframes cardEntry {
    to { opacity: 1; transform: translateY(0); }
}

.header { text-align: center; margin-bottom: 40px; }

.logo {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    font-weight: 700;
    color: transparent;
    text-decoration: none;
    letter-spacing: 2px;
    position: relative;
    display: inline-block;
    background: linear-gradient(110deg, #c5a059 40%, #8e6d2f 50%, #c5a059 60%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    animation: textShine 6s infinite linear;
    margin-bottom: 25px;
}

.dot {
    color: #c5a059;
    -webkit-text-fill-color: #c5a059;
}

h1 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    font-weight: 700;
    color: var(--deep-blue);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

@keyframes textShine {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

.prize-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(197, 160, 89, 0.1);
    border: 1px solid rgba(197, 160, 89, 0.2);
    padding: 8px 20px;
    border-radius: 100px;
    color: var(--gold-light);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 25px;
    animation: pulse 2s infinite;
    white-space: nowrap;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(197, 160, 89, 0.2); }
    70% { box-shadow: 0 0 0 15px rgba(197, 160, 89, 0); }
    100% { box-shadow: 0 0 0 0 rgba(197, 160, 89, 0); }
}

.subtitle { color: #666; font-size: 1rem; line-height: 1.6; }

/* Form Styling */
.form-group { position: relative; margin-bottom: 30px; }

.form-group i {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gold);
    font-size: 1.2rem;
    transition: 0.3s;
}

input, select, textarea, button {
    font-family: 'Manrope', sans-serif !important;
}

input {
    width: 100%;
    padding: 18px 20px 18px 55px;
    background: #fff;
    border: 2px solid rgba(197, 160, 89, 0.15);
    border-radius: 20px;
    color: var(--deep-blue);
    font-family: 'Manrope', sans-serif !important;
    font-size: 1rem;
    font-weight: 500 !important;
    letter-spacing: 1px;
    outline: none;
    transition: 0.4s;
}

input:focus {
    background: #fff;
    border-color: var(--gold);
    box-shadow: 0 0 25px rgba(197, 160, 89, 0.1);
}

input::placeholder { 
    font-family: 'Manrope', sans-serif !important;
    font-weight: 500 !important;
    letter-spacing: 1px;
    color: #aaa; 
}

input:focus + i { color: var(--gold-dark); transform: translateY(-50%) scale(1.1); }

.checkbox-group {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 35px;
    cursor: pointer;
}

.checkbox-group input { width: auto; margin-top: 0; display: none; }

.custom-check {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(197, 160, 89, 0.3);
    border-radius: 6px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
    background: #fff;
}

.checkbox-group.active .custom-check {
    background: var(--gold);
    border-color: var(--gold);
}

.custom-check i { font-size: 0.8rem; opacity: 0; transform: scale(0); transition: 0.3s; }
.checkbox-group.active .custom-check i { opacity: 1; transform: scale(1); color: #fff; }

.check-text { font-size: 0.85rem; color: #777; line-height: 1.5; }

.btn-submit {
    width: 100%;
    padding: 15px 30px;
    background: linear-gradient(135deg, #c5a059 0%, #b8860b 100%);
    border: none;
    border-radius: 50px;
    color: #fff;
    font-weight: 700;
    font-family: var(--font-body);
    font-size: 0.9rem;
    text-transform: none;
    letter-spacing: 1px;
    cursor: pointer;
    transition: 0.5s;
    box-shadow: 0 10px 30px rgba(184, 134, 11, 0.4);
    position: relative;
    overflow: hidden;
}

.btn-submit:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(184, 134, 11, 0.6);
}

.btn-submit::after {
    content: '';
    position: absolute;
    top: -50%; left: -50%; width: 200%; height: 200%;
    background: rgba(255,255,255,0.2);
    transform: rotate(45deg);
    transition: 0.5s;
    opacity: 0;
}

.btn-submit:hover::after { left: 120%; opacity: 1; }

/* Success & Winner State */
#success-content, #winner-content { display: none; text-align: center; animation: fadeIn 0.8s forwards; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.winner-name {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--gold-dark);
    margin: 20px 0;
    background: linear-gradient(135deg, #c5a059 0%, #b8860b 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.congrats-chip {
    background: rgba(197, 160, 89, 0.1);
    color: var(--gold-dark);
    padding: 8px 25px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
    display: inline-block;
}

.trophy-container {
    width: 120px; height: 120px;
    background: rgba(197, 160, 89, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    font-size: 4rem;
    color: var(--gold);
    border: 2px solid rgba(197, 160, 89, 0.3);
}

.loading-overlay {
    display: none;
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(26, 42, 58, 0.9);
    border-radius: 40px;
    z-index: 20;
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 20px;
}

.spinner {
    width: 50px; height: 50px;
    border: 5px solid rgba(197, 160, 89, 0.2);
    border-top: 5px solid var(--gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin { 100% { transform: rotate(360deg); } }

/* Mobile Optimization */
@media (max-width: 600px) {
    .glass-card { padding: 30px 20px; border-radius: 30px; margin: 15px; }
    .logo { font-size: 2.2rem; }
    h1 { font-size: 1.5rem; }
    .subtitle { font-size: 0.9rem; }
    .form-group { margin-bottom: 20px; }
    input { padding: 15px 15px 15px 50px; font-size: 0.95rem; }
    .btn-submit { padding: 18px; font-size: 1rem; }
    
    /* Stack the grids on mobile */
    div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        gap: 0 !important;
    }
    .prize-chip { padding: 6px 15px; font-size: 0.75rem; }
}

@media (max-height: 700px) {
    .glass-card { padding: 25px; }
    .header { margin-bottom: 20px; }
    .logo { margin-bottom: 10px; }
    .prize-chip { margin-bottom: 15px; }
}

/* Premium Close Button for Rules Modal */
.close-rules {
    background: #B5B5B5;
    border: none;
    border-radius: 50%;
    color: #fff;
    width: 32px;
    height: 32px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    outline: none;
}

.close-rules:hover {
    background: var(--gold);
    transform: rotate(90deg) scale(1.1);
    color: #fff;
}

/* Hide System Scrollbars for Rules Overlay while preserving scrollability */
#rules-overlay {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}
#rules-overlay::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

/* ── Social Proof Bar ── */
.social-proof-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(197, 160, 89, 0.07);
    border: 1px solid rgba(197, 160, 89, 0.18);
    border-radius: 16px;
    padding: 11px 20px;
    margin-bottom: 28px;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--gold-light);
    letter-spacing: 0.3px;
    animation: fadeIn 0.6s ease both;
    animation-delay: 0.3s;
    opacity: 0;
}

.social-proof-bar i { font-size: 1rem; color: var(--gold); flex-shrink: 0; }

.sp-count {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gold-dark);
    display: inline-block;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.sp-pulse {
    display: inline-block;
    width: 7px; height: 7px;
    background: #27ae60;
    border-radius: 50%;
    flex-shrink: 0;
    animation: livePulse 1.8s infinite;
    margin-right: 2px;
}

@keyframes livePulse {
    0%   { box-shadow: 0 0 0 0 rgba(39,174,96,0.5); }
    70%  { box-shadow: 0 0 0 8px rgba(39,174,96,0); }
    100% { box-shadow: 0 0 0 0 rgba(39,174,96,0); }
}

/* ── Countdown Timer ── */
.countdown-block {
    margin-bottom: 20px;
    animation: fadeIn 0.6s ease both;
    animation-delay: 0.3s;
    opacity: 0;
}

.countdown-time {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    color: #c5a059;
    background: rgba(197, 160, 89, 0.06);
    border: 1px solid rgba(197, 160, 89, 0.22);
    padding: 8px 20px;
    border-radius: 50px;
    letter-spacing: 1px;
    transition: all 0.4s ease;
    display: inline-block;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
}

.countdown-time.urgent {
    color: #ff4d4d;
    background: rgba(255, 77, 77, 0.05);
    border-color: rgba(255, 77, 77, 0.28);
    box-shadow: 0 0 12px rgba(255, 77, 77, 0.18);
}
