/* CUSTOM PROPERTIES */
:root {
    --espresso: #2d1b14;
    --cream: #f5e6d3;
    --copper: #b8763a;
    --copper-light: #c8894d;
    --blush: #f4d2c5;
    --white: #ffffff;
    --error: #e53e3e;

    --font-heading: 'Fraunces', serif;
    --font-body: 'Inter', sans-serif;
    --font-script: 'Dancing Script', cursive;
}

/* RESET & BASE */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    background-color: var(--espresso);
    color: var(--espresso);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.hidden { display: none !important; }
.text-center { text-align: center; }

/* BACKGROUND */
.site-wrapper {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}
.bg-overlay {
    background: url('https://offertabs.s3.amazonaws.com/offer/4otmw6/site/media/69f12821de8fc3.50673266.jpg') center/cover no-repeat;
    position: fixed;
    inset: 0;
    z-index: -1;
}
.bg-overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(45,27,20,0.85) 0%, rgba(45,27,20,0.6) 100%);
}

/* LAYOUT */
.main-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 20px;
    flex: 1;
    width: 100%;
}

/* HEADER */
.hero-header {
    text-align: center;
    margin-bottom: 40px;
    color: var(--cream);
}
.sub-headline {
    font-family: var(--font-script);
    font-size: 2.5rem;
    color: var(--blush);
    display: block;
    margin-bottom: -10px;
    transform: rotate(-3deg);
}
.sub-headline.accent { color: var(--copper); transform: none; margin-bottom: 5px;}
.main-headline {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 15px;
}
.main-headline .highlight {
    background: linear-gradient(135deg, var(--cream), var(--copper));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.hero-desc {
    font-size: 1.125rem;
    line-height: 1.6;
    color: rgba(245, 230, 211, 0.85);
    max-width: 500px;
    margin: 0 auto 25px;
}

/* LIVE COUNTER */
.live-counter {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(245, 230, 211, 0.1);
    backdrop-filter: blur(8px);
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid rgba(245, 230, 211, 0.2);
    font-size: 0.875rem;
    font-weight: 500;
}
.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* GLASS CARD (Forms & Results) */
.glass-card {
    background: rgba(245, 230, 211, 0.95);
    backdrop-filter: blur(12px);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    max-width: 500px;
    margin: 0 auto;
}

/* ALERTS */
.alert {
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    font-weight: 500;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}
.alert.error { background: rgba(229, 62, 62, 0.1); color: var(--error); border: 1px solid rgba(229, 62, 62, 0.3); }

/* FORMS */
.form-group { margin-bottom: 20px; text-align: left; }
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--espresso);
}
.form-group input {
    width: 100%;
    padding: 14px 16px;
    font-size: 1rem;
    font-family: inherit;
    border: 1px solid rgba(45, 27, 20, 0.2);
    border-radius: 12px;
    background: var(--white);
    transition: all 0.2s ease;
}
.form-group input:focus {
    outline: none;
    border-color: var(--copper);
    box-shadow: 0 0 0 3px rgba(184, 118, 58, 0.2);
}

/* BUTTONS */
.btn-primary {
    width: 100%;
    background: linear-gradient(135deg, var(--copper) 0%, #9a5e2a 100%);
    color: var(--white);
    border: none;
    padding: 16px;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: inherit;
    border-radius: 12px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 16px rgba(184, 118, 58, 0.3);
}
.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 20px rgba(184, 118, 58, 0.4);
}
.btn-primary:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }

.btn-secondary {
    background: var(--espresso);
    color: var(--cream);
    border: none;
    padding: 12px 20px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-secondary:hover { background: #1a0f0b; }

.btn-outline {
    background: transparent;
    color: var(--espresso);
    border: 2px solid var(--espresso);
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-outline:hover { background: var(--espresso); color: var(--cream); }

/* SPINNER */
.spinner {
    position: absolute;
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* GAME GRID */
.game-prompt {
    font-family: var(--font-heading);
    color: var(--cream);
    text-align: center;
    font-size: 2rem;
    margin-bottom: 30px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}
.tarot-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    max-width: 450px;
    margin: 0 auto;
    perspective: 1000px;
}
.tarot-card {
    aspect-ratio: 2/3;
    position: relative;
    cursor: pointer;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.4, 0.2, 0.2, 1);
    border-radius: 12px;
}
.tarot-card:hover:not(.flipped):not(.disabled) { transform: translateY(-5px) scale(1.03); }
.tarot-card.flipped { transform: rotateY(180deg) scale(1.05); pointer-events: none; z-index: 10; }
.tarot-card.disabled { pointer-events: none; opacity: 0.8; }
.card-face {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
    border: 2px solid rgba(255,255,255,0.1);
}
.card-front {
    background: url('https://offertabs.s3.amazonaws.com/offer/4otmw6/site/media/69f12808a74415.78390392.jpg') center/cover;
}
.card-back {
    background: var(--cream);
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px;
    text-align: center;
    border: 3px solid var(--copper);
}
.card-prize-text {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: var(--espresso);
    line-height: 1.2;
}

/* RESULT SCREEN */
.result-heading {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: 20px;
}
.prize-display {
    background: rgba(255,255,255,0.5);
    padding: 25px;
    border-radius: 16px;
    margin-bottom: 30px;
    border: 2px dashed var(--copper);
}
.prize-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--copper);
    font-weight: 800;
}
.lose-desc { font-size: 1.1rem; line-height: 1.6; margin-bottom: 20px; }
.qr-box { margin-top: 20px; }
.qr-instruction { font-size: 0.9rem; font-weight: 600; margin-bottom: 10px; color: var(--espresso); }
#qr-image { width: 150px; height: 150px; margin: 0 auto 10px; border-radius: 8px; border: 1px solid rgba(0,0,0,0.1); padding: 5px; background: #fff;}
.prize-code-text { font-family: monospace; font-size: 1.2rem; font-weight: bold; margin-bottom: 15px; letter-spacing: 1px;}

/* SHARE PANEL */
.share-panel {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid rgba(45, 27, 20, 0.1);
}
.share-panel h3 { font-family: var(--font-heading); font-size: 1.4rem; margin-bottom: 10px; }
.share-panel p { font-size: 0.95rem; margin-bottom: 15px; }
.share-input-group { display: flex; gap: 8px; margin-bottom: 20px; }
.share-input-group input {
    flex: 1;
    padding: 12px;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 8px;
    background: rgba(255,255,255,0.7);
    font-family: monospace;
    font-size: 0.9rem;
}
.share-buttons { display: flex; gap: 10px; justify-content: center; }
.social-btn {
    flex: 1;
    padding: 12px;
    text-align: center;
    border-radius: 8px;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: opacity 0.2s;
}
.social-btn:hover { opacity: 0.9; }
.social-btn.fb { background: #1877F2; }
.social-btn.x { background: #000000; }

/* FOOTER */
.site-footer {
    padding: 30px 20px;
    text-align: center;
    font-size: 0.8rem;
    color: rgba(245, 230, 211, 0.5);
    background: rgba(0,0,0,0.3);
}
.footer-content {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}
#wbx-powered-by-slot { margin-top: 20px; }

/* RESPONSIVE */
@media (max-width: 600px) {
    .main-headline { font-size: 2.5rem; }
    .glass-card { padding: 30px 20px; border-radius: 16px; }
    .tarot-grid { gap: 10px; }
    .share-input-group { flex-direction: column; }
    .share-buttons { flex-direction: column; }
}