:root {
    --primary: #F97316;
    --primary-hover: #EA580C;
    --bg-dark: #111827;
    --bg-panel: rgba(17, 24, 39, 0.85);
    --text-main: #F3F4F6;
    --text-muted: #9CA3AF;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    background-image: 
        linear-gradient(to bottom, rgba(17, 24, 39, 0.6), rgba(17, 24, 39, 0.95)),
        url('https://offertabs.s3.amazonaws.com/offer/8c49eb/site/media/69f9f209860946.11868738.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.hero {
    text-align: center;
    padding: 80px 20px 40px;
}

.badge {
    display: inline-block;
    padding: 6px 20px;
    border-radius: 999px;
    background: rgba(249, 115, 22, 0.2);
    border: 1px solid rgba(249, 115, 22, 0.5);
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.hero h1 {
    font-family: 'Oswald', sans-serif;
    font-size: 3.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.1;
    margin: 0 0 15px;
    background: linear-gradient(135deg, #FFF, #FBBF24);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.5));
}

.hero p {
    font-size: 1.15rem;
    max-width: 700px;
    margin: 0 auto;
    color: #E5E7EB;
    line-height: 1.6;
}

.btn-text {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
    padding: 10px 20px;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}

.btn-text:hover {
    background: rgba(249, 115, 22, 0.1);
    box-shadow: 0 4px 10px rgba(249, 115, 22, 0.2);
}

.main-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px 60px;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.split-layout {
    display: flex;
    gap: 40px;
    background: var(--bg-panel);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    padding: 40px;
    backdrop-filter: blur(12px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
}

.left-panel {
    flex: 1 1 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.right-panel {
    flex: 1 1 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

#form-section h2 {
    font-family: 'Oswald', sans-serif;
    font-size: 2rem;
    margin: 0 0 10px;
    text-transform: uppercase;
}

.section-desc {
    color: var(--text-muted);
    margin-bottom: 25px;
    font-size: 1rem;
    line-height: 1.5;
}

/* Form Styles */
.input-row {
    display: flex;
    gap: 15px;
}
.input-row .input-group {
    flex: 1;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    color: #D1D5DB;
}

.input-group input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(0, 0, 0, 0.6);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.2);
}

.btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary), #D946EF);
    color: white;
    border: none;
    border-radius: 8px;
    font-family: 'Oswald', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.2s;
    clip-path: polygon(15px 0, 100% 0, calc(100% - 15px) 100%, 0 100%);
}

.btn:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 20px rgba(249, 115, 22, 0.4);
}

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

.legal-text {
    font-size: 0.75rem;
    color: #9CA3AF;
    margin-bottom: 20px;
    line-height: 1.4;
}

.legal-link {
    color: var(--primary);
    text-decoration: underline;
    cursor: pointer;
    transition: color 0.2s;
}

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

.error-message {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #FCA5A5;
    padding: 12px;
    border-radius: 8px;
    margin-top: 15px;
    font-size: 0.9rem;
    text-align: center;
}

.status-box {
    background: rgba(249, 115, 22, 0.15);
    border: 1px solid rgba(249, 115, 22, 0.4);
    color: #FDBA74;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 30px;
}

/* Scratch Container */
.scratch-container {
    position: relative;
    width: 320px;
    height: 320px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 0 0 8px rgba(255,255,255,0.05), 0 20px 40px rgba(0,0,0,0.5);
    background: #111827;
}

.scratch-result {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 20px;
    box-sizing: border-box;
    text-align: center;
    background: #1F2937;
}

#scratch-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    cursor: pointer;
    touch-action: none;
}

/* Results */
.result-box {
    text-align: center;
}

.result-title {
    font-family: 'Oswald', sans-serif;
    font-size: 2.5rem;
    margin: 0 0 10px;
    text-transform: uppercase;
}

.win-title { color: #4ADE80; }
.lose-title { color: #F87171; }

.prize-code-box {
    background: rgba(0,0,0,0.4);
    border: 1px dashed rgba(255,255,255,0.2);
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
}

.prize-code-box p {
    margin: 0 0 5px;
    color: #D1D5DB;
    font-size: 0.9rem;
}

.prize-code-box code {
    font-size: 1.75rem;
    font-family: monospace;
    color: #FBBF24;
    display: block;
    font-weight: bold;
}

.copy-code-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 16px;
    border-radius: 6px;
    margin-top: 15px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s;
    display: inline-block;
}

.copy-code-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Share Panel */
.share-panel {
    background: rgba(249, 115, 22, 0.1);
    border: 1px solid rgba(249, 115, 22, 0.3);
    border-radius: 12px;
    padding: 25px;
    margin-top: 30px;
    text-align: center;
}

.share-panel h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: var(--primary);
    font-family: 'Oswald', sans-serif;
    font-size: 1.5rem;
    text-transform: uppercase;
}

.share-panel p {
    font-size: 0.95rem;
    color: #E5E7EB;
    margin-bottom: 15px;
}

.copy-group {
    display: flex;
    gap: 10px;
}

.copy-group input {
    flex: 1;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(0,0,0,0.5);
    color: white;
    font-size: 0.9rem;
}

.copy-group button {
    padding: 12px 20px;
    background: white;
    color: black;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}

.copy-group button:hover {
    background: #E5E7EB;
}

.social-panel {
    margin-top: 25px;
    text-align: center;
    background: rgba(255,255,255,0.05);
    padding: 25px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.1);
}

.social-panel h3 {
    margin-top: 0;
    color: #fff;
    font-family: 'Oswald', sans-serif;
    font-size: 1.3rem;
    text-transform: uppercase;
}

.social-btn {
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    flex: 1;
    min-width: 180px;
    transition: transform 0.2s;
}

.social-btn:hover {
    transform: translateY(-2px);
}

/* Modal */
.modal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: var(--bg-panel);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
}

.modal-close {
    position: absolute;
    top: 15px; right: 15px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s;
    z-index: 2;
}

.modal-close:hover {
    color: white;
}

.modal-content h2 {
    font-family: 'Oswald', sans-serif;
    margin-top: 0;
    color: var(--primary);
    text-transform: uppercase;
    font-size: 1.8rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 15px;
    margin-bottom: 15px;
    flex-shrink: 0;
}

.race-list {
    list-style: none;
    padding: 0;
    margin: 0;
    overflow-y: auto;
    padding-right: 10px;
}

.race-list li {
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.race-list li:last-child {
    border-bottom: none;
}

.race-list strong {
    color: white;
    font-size: 1.1rem;
    display: block;
    margin-bottom: 4px;
}

.race-list span {
    color: var(--text-muted);
    font-size: 0.95rem;
    display: block;
}

.race-list small {
    color: #FBBF24;
    font-size: 0.85rem;
    text-transform: uppercase;
    display: block;
    margin-bottom: 2px;
    letter-spacing: 0.5px;
}

/* Rules Styles */
.rules-text {
    text-align: left;
    color: #D1D5DB;
    font-size: 0.9rem;
    line-height: 1.6;
    padding-right: 10px;
    overflow-y: auto;
}

.rules-text p {
    margin-top: 0;
    margin-bottom: 15px;
}

.rules-text strong {
    color: #F3F4F6;
}

#wbx-powered-by-slot {
    margin-top: auto;
    padding-top: 40px;
    display: flex;
    justify-content: center;
    width: 100%;
}

.hidden { display: none !important; }

/* Responsive */
@media (max-width: 850px) {
    .split-layout {
        flex-direction: column;
        padding: 30px 20px;
    }
    
    .input-row {
        flex-direction: column;
        gap: 0;
    }
    
    .scratch-container {
        width: 280px;
        height: 280px;
    }
    
    .hero h1 { font-size: 2.5rem; }
    .hero { padding: 50px 15px 30px; }
    
    .copy-group { flex-direction: column; }
}