:root {
    --pine-green: #14532d;
    --pine-green-dark: #0f3d20;
    --cranberry-red: #b91c1c;
    --cranberry-red-dark: #8b1515;
    --snow-ivory: #fef3c7;
    --gold-leaf: #d4af37;
    --gold-leaf-light: #f3d566;
    
    --font-heading: 'Playfair Display', serif;
    --font-accent: 'Great Vibes', cursive;
    --font-mono: 'Space Mono', monospace;
    --font-body: system-ui, -apple-system, sans-serif;
}

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

body {
    font-family: var(--font-body);
    color: var(--snow-ivory);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    background-color: var(--pine-green-dark);
}

.hidden {
    display: none !important;
}

/* Backgrounds & Overlays */
#background-image {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: url('https://offertabs.s3.amazonaws.com/offer/pj3hzd/site/media/69f129af0f60f0.57331796.jpg');
    background-size: cover;
    background-position: center;
    z-index: -3;
}

.overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at center, rgba(20, 83, 45, 0.7) 0%, rgba(15, 61, 32, 0.95) 100%);
    z-index: -2;
}

/* Snow */
#snow-container {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.snowflake {
    position: absolute;
    top: -10px;
    background: white;
    border-radius: 50%;
    opacity: 0.8;
    animation: fall linear infinite;
    box-shadow: 0 0 4px rgba(255,255,255,0.8);
}

@keyframes fall {
    0% { transform: translateY(-10px) translateX(0); opacity: 0; }
    10% { opacity: 0.8; }
    90% { opacity: 0.8; }
    100% { transform: translateY(105vh) translateX(20px); opacity: 0; }
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    z-index: 10;
}

.brand {
    font-size: 0.9rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gold-leaf);
    margin-bottom: 15px;
    font-weight: 600;
}

.title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 5vw, 4rem);
    line-height: 1.1;
    color: var(--snow-ivory);
    margin-bottom: 15px;
    text-shadow: 0 4px 12px rgba(0,0,0,0.5);
    position: relative;
}

.accent {
    font-family: var(--font-accent);
    color: var(--cranberry-red);
    font-size: 1.4em;
    font-weight: 400;
    display: inline-block;
    transform: rotate(-5deg) translateY(10px) translateX(-20px);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.subtitle {
    font-size: 1.1rem;
    color: rgba(254, 243, 199, 0.8);
    max-width: 500px;
    margin: 0 auto;
}

/* Content Layout */
.content-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    flex: 1;
}

@media (min-width: 860px) {
    .content-wrapper {
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 60px;
    }
}

/* Wheel Section */
.wheel-section {
    flex: 1;
    display: flex;
    justify-content: center;
    width: 100%;
    max-width: 500px;
}

.wheel-container {
    position: relative;
    width: 100%;
    aspect-ratio: 1/1;
    max-width: 450px;
}

.wheel-border {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    padding: 8px;
    background: linear-gradient(135deg, var(--gold-leaf-light), var(--gold-leaf), #8a6d1c);
    box-shadow: 0 10px 30px rgba(0,0,0,0.6), inset 0 2px 10px rgba(255,255,255,0.4);
    position: relative;
}

.wheel-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    position: relative;
    overflow: hidden;
    /* initial fallback gradient */
    background: conic-gradient(var(--cranberry-red) 0 30deg, var(--pine-green) 30deg 60deg);
    box-shadow: inset 0 0 20px rgba(0,0,0,0.5);
    /* Transform managed by JS */
    transform: rotate(0deg);
}

.slice-text {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50%;
    height: 30px;
    transform-origin: 0% 50%;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding-right: 25px;
    pointer-events: none;
}

.slice-text span {
    color: var(--snow-ivory);
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: clamp(10px, 2.5vw, 13px);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
    text-align: right;
    line-height: 1.1;
    max-width: 70%;
}

.wheel-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold-leaf-light), var(--gold-leaf));
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
}

.wheel-center-inner {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--pine-green-dark);
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.6);
}

.wheel-pointer {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 45px;
    background-color: var(--snow-ivory);
    clip-path: polygon(50% 100%, 0 0, 100% 0);
    z-index: 10;
    filter: drop-shadow(0 4px 4px rgba(0,0,0,0.5));
}

.wheel-pointer::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to bottom, var(--gold-leaf-light), var(--gold-leaf));
}


/* Interaction Section (Form & Result) */
.interaction-section {
    flex: 1;
    width: 100%;
    max-width: 450px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.glass-panel {
    background: rgba(20, 83, 45, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 16px;
    padding: 35px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.4);
    text-align: center;
}

.glass-panel h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--gold-leaf);
    margin-bottom: 10px;
}

.glass-panel p {
    color: rgba(254, 243, 199, 0.8);
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 25px;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--gold-leaf-light);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 8px;
    color: var(--snow-ivory);
    font-size: 1rem;
    font-family: var(--font-body);
    transition: all 0.3s ease;
}

.form-group input::placeholder {
    color: rgba(254, 243, 199, 0.3);
}

.form-group input:focus {
    outline: none;
    border-color: var(--gold-leaf);
    background: rgba(0, 0, 0, 0.3);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}

.btn-primary {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--cranberry-red), var(--cranberry-red-dark));
    color: var(--snow-ivory);
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(185, 28, 28, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(185, 28, 28, 0.6);
    background: linear-gradient(135deg, #cc2020, var(--cranberry-red-dark));
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Result Styles */
.prize-display {
    background: rgba(0,0,0,0.2);
    border-radius: 12px;
    padding: 20px;
    margin: 25px 0;
    border: 1px dashed rgba(212, 175, 55, 0.5);
}

.prize-code {
    font-family: var(--font-mono);
    font-size: 2rem;
    font-weight: 700;
    color: var(--gold-leaf-light);
    margin-bottom: 15px;
    letter-spacing: 0.1em;
}

.btn-secondary {
    background: rgba(212, 175, 55, 0.1);
    color: var(--gold-leaf);
    border: 1px solid var(--gold-leaf);
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: rgba(212, 175, 55, 0.2);
}

.prize-instruction {
    font-size: 0.85rem !important;
    margin-top: 15px !important;
    margin-bottom: 0 !important;
    opacity: 0.8;
}

/* Share Panel */
.share-panel {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid rgba(212, 175, 55, 0.2);
}

.share-panel h3 {
    color: var(--gold-leaf-light);
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.share-input-group {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.share-input-group input {
    flex: 1;
    padding: 10px;
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(254, 243, 199, 0.2);
    border-radius: 6px;
    color: var(--snow-ivory);
    font-size: 0.9rem;
}

.error-message {
    background: rgba(185, 28, 28, 0.1);
    border: 1px solid rgba(185, 28, 28, 0.5);
    color: #ffb3b3;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

/* Footer */
.footer {
    text-align: center;
    padding: 20px;
    font-size: 0.75rem;
    color: rgba(254, 243, 199, 0.5);
    margin-top: auto;
}

#wbx-powered-by-slot {
    margin-top: 30px;
    text-align: center;
    width: 100%;
}
