/* ==========================================================================
   CSS Variables & Reset
   ========================================================================== */
   :root {
    --primary: #D4AF37; /* Gold */
    --primary-light: #F3E5AB;
    --primary-dark: #B7950B;
    --secondary: #E2E8F0; /* Silver */
    --bg-dark: #0B0F19; /* Deep Blue/Black */
    --card-bg: rgba(17, 24, 39, 0.65);
    --border-color: rgba(212, 175, 55, 0.3);
    --text-main: #FFFFFF;
    --text-muted: #9CA3AF;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
}

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

/* ==========================================================================
   Base Styles
   ========================================================================== */
body {
    font-family: var(--font-body);
    color: var(--text-main);
    background-color: var(--bg-dark);
    /* The image URL will be injected via the JS generation tool response */
    background-image: url('https://offertabs.s3.amazonaws.com/offer/5yutwx/site/media/6a0e7942c0b1a5.78909398.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

#app {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    padding: 40px 20px;
    background: radial-gradient(circle at center, rgba(11, 15, 25, 0.3) 0%, rgba(11, 15, 25, 0.85) 100%);
}

.container {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 40px;
    flex: 1;
}

/* ==========================================================================
   Logos
   ========================================================================== */
.logos-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-bottom: 24px;
}

.brand-logo {
    max-height: 80px;
    width: auto;
    object-fit: contain;
}

@media (max-width: 600px) {
    .brand-logo {
        max-height: 60px;
    }
    .logos-container {
        gap: 15px;
    }
}

/* ==========================================================================
   Typography & Headings
   ========================================================================== */
h1, h2, h3, .badge {
    font-family: var(--font-heading);
}

.header {
    text-align: center;
    padding-top: 20px;
}

.badge {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 999px;
    background: rgba(212, 175, 55, 0.15);
    border: 1px solid var(--border-color);
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 24px;
    backdrop-filter: blur(10px);
}

h1 {
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 16px;
    text-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

.gold-text {
    background: linear-gradient(135deg, #F3E5AB 0%, #D4AF37 50%, #B7950B 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

#subtitle {
    font-size: 1.125rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.text-muted { color: var(--text-muted); }
.text-sm { font-size: 0.9rem; }
.mt-2 { margin-top: 8px; }
.mt-6 { margin-top: 32px; }
.mb-2 { margin-bottom: 8px; }
.hidden { display: none !important; }

/* ==========================================================================
   Layouts & Cards
   ========================================================================== */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.split-layout {
    display: flex;
    flex-direction: column-reverse; /* Form under wheel on mobile */
    gap: 40px;
    align-items: center;
}

@media (min-width: 800px) {
    .split-layout {
        flex-direction: row;
        align-items: stretch;
    }
    .form-column {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    .wheel-column {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* ==========================================================================
   Form Elements
   ========================================================================== */
.form-column h2 {
    font-size: 2rem;
    margin-bottom: 24px;
    color: white;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--secondary);
}

input[type="text"], input[type="email"], select {
    width: 100%;
    padding: 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding-right: 48px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='10'%3E%3Cpath d='M2 2l6 6 6-6' stroke='%23D4AF37' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    cursor: pointer;
}

select option {
    background-color: var(--bg-dark);
    color: white;
}

input[type="text"]:focus, input[type="email"]:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.2);
}

input:disabled, select:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Terms and Conditions Checkbox Styles */
.terms-group {
    margin-top: 24px;
    margin-bottom: 24px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-weight: normal;
}

.checkbox-label input[type="checkbox"] {
    margin-top: 3px;
    width: 20px;
    height: 20px;
    min-width: 20px;
    accent-color: var(--primary);
    cursor: pointer;
}

.terms-summary {
    font-size: 0.9rem;
    color: var(--secondary);
    line-height: 1.4;
    margin-top: 2px;
}

.text-link {
    background: none;
    border: none;
    color: var(--primary);
    text-decoration: underline;
    cursor: pointer;
    font-size: inherit;
    font-family: inherit;
    padding: 0;
}

.text-link:hover {
    color: var(--primary-light);
}

.terms-text {
    font-size: 0.8rem;
    line-height: 1.5;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.25);
    padding: 12px 16px;
    border-radius: 8px;
    margin-top: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.terms-text strong {
    color: var(--secondary);
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn-primary {
    width: 100%;
    padding: 16px;
    margin-top: 10px;
    border-radius: 12px;
    background: linear-gradient(135deg, #F3E5AB 0%, #D4AF37 50%, #B7950B 100%);
    border: none;
    color: #0B0F19;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 25px -5px rgba(212, 175, 55, 0.4);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px -5px rgba(212, 175, 55, 0.6);
}

.btn-primary:disabled {
    opacity: 0.8;
    cursor: not-allowed;
    background: linear-gradient(135deg, #9CA3AF 0%, #6B7280 100%);
    box-shadow: none;
}

.btn-danger {
    background: linear-gradient(135deg, #EF4444 0%, #B91C1C 100%);
    color: white;
    box-shadow: 0 10px 25px -5px rgba(239, 68, 68, 0.4);
}

.btn-danger:hover:not(:disabled) {
    box-shadow: 0 15px 30px -5px rgba(239, 68, 68, 0.6);
}

.btn-small {
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-small:hover {
    background: rgba(255, 255, 255, 0.25);
}

.btn-secondary {
    display: inline-block;
    margin-top: 16px;
    padding: 12px 28px;
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: var(--primary);
    color: #0B0F19;
}

/* ==========================================================================
   Wheel Styles
   ========================================================================== */
.wheel-container {
    position: relative;
    width: 320px;
    height: 320px;
    max-width: 100%;
    border-radius: 50%;
    box-shadow: 0 0 50px rgba(212, 175, 55, 0.2), inset 0 0 30px rgba(0,0,0,0.7);
    border: 8px solid rgba(255, 255, 255, 0.1);
    background: var(--bg-dark);
}

@media (min-width: 768px) {
    .wheel-container {
        width: 400px;
        height: 400px;
        border-width: 10px;
    }
}

#wheel-canvas {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: block;
}

.pointer {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 50px;
    /* Custom Gold SVG Pointer */
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23D4AF37" stroke="%23FFF" stroke-width="1"><path d="M12 2L22 20H2L12 2Z"/></svg>') no-repeat center center;
    background-size: contain;
    z-index: 10;
    filter: drop-shadow(0 6px 10px rgba(0,0,0,0.8));
}

/* ==========================================================================
   Results & Bonus Areas
   ========================================================================== */
.result-card {
    text-align: center;
    animation: slideUpFade 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    max-width: 700px;
    margin: 0 auto;
}

@keyframes slideUpFade {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.result-card h2 {
    font-size: 2.5rem;
    margin-bottom: 8px;
}

.result-card h3 {
    font-size: 1.8rem;
    margin-bottom: 24px;
}

.icon-win, .icon-lose {
    font-size: 5rem;
    margin-bottom: 16px;
    display: inline-block;
    animation: bounce 2s infinite;
}

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

.screenshot-notice {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    background: rgba(212, 175, 55, 0.15);
    border: 1px solid var(--border-color);
    padding: 12px 16px;
    border-radius: 8px;
    color: var(--primary-light);
    font-weight: 600;
    margin: 16px 0;
    font-size: 0.95rem;
    gap: 8px;
}

.screenshot-notice-row {
    display: flex;
    align-items: flex-start;
}

.screenshot-notice-row svg {
    flex-shrink: 0;
    margin-right: 6px;
    margin-top: 2px;
}

.expiration-highlight {
    color: #FCA5A5; /* Soft Red */
    font-weight: 700;
}

.code-box, .share-box {
    display: flex;
    margin: 24px auto;
    background: rgba(0, 0, 0, 0.4);
    border: 1px dashed var(--primary);
    border-radius: 12px;
    padding: 12px;
    max-width: 450px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.code-box span, .share-box input {
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-light);
    background: transparent;
    border: none;
    flex: 1;
    text-align: center;
    outline: none;
}

#prize-image-container img {
    max-width: 100%;
    max-height: 250px;
    object-fit: contain;
    border-radius: 16px;
    margin: 16px 0;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

.qr-box {
    background: rgba(255, 255, 255, 0.05);
    padding: 24px;
    border-radius: 16px;
    margin: 24px auto;
    max-width: 300px;
}

#prize-qr {
    background: white;
    padding: 12px;
    border-radius: 8px;
    max-width: 100%;
    margin: 0 auto;
    display: block;
}

.expiration-text {
    color: #FCA5A5; /* Soft Red */
    font-size: 0.95rem;
    margin-top: 16px;
    font-weight: 600;
}

/* ==========================================================================
   Loaders & Attributions
   ========================================================================== */
.loader {
    width: 22px;
    height: 22px;
    border: 3px solid rgba(11, 15, 25, 0.2);
    border-bottom-color: #0B0F19;
    border-radius: 50%;
    display: inline-block;
    animation: rotation 1s linear infinite;
}

@keyframes rotation {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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