:root {
    --color-graphite: #27272a;
    --color-lime: #a3e635;
    --color-lime-hover: #bef264;
    --color-white: #f8fafc;
    --color-cobalt: #1d4ed8;
    --color-cobalt-hover: #2563eb;
    --color-text: #334155;
    --color-border: #e2e8f0;
    --radius-lg: 16px;
    --radius-md: 10px;
    --radius-sm: 6px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--color-white);
    color: var(--color-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .logo {
    font-family: 'Space Grotesk', sans-serif;
    color: var(--color-graphite);
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

.hidden {
    display: none !important;
}

/* Header */
.site-header {
    background: #fff;
    border-bottom: 1px solid var(--color-border);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.5px;
}

.status-badge {
    background: rgba(163, 230, 53, 0.2);
    color: #4d7c0f;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.ended {
    background: rgba(239, 68, 68, 0.1);
    color: #b91c1c;
}

/* Hero Section */
.hero {
    position: relative;
    padding: 80px 0;
    background-color: var(--color-graphite);
    overflow: hidden;
    min-height: 400px;
    display: flex;
    align-items: center;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0.5;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, var(--color-graphite) 0%, rgba(39, 39, 42, 0.8) 50%, transparent 100%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 600px;
    margin: 0; /* Reset margin inside flex */
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: #fff;
    line-height: 1.1;
    margin-bottom: 16px;
    letter-spacing: -1px;
}

.hero .subtitle {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 400;
}

/* Main Grid Layout */
.main-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 32px;
    margin-top: -40px; /* Overlap hero slightly */
    position: relative;
    z-index: 10;
    padding-bottom: 64px;
}

@media (max-width: 860px) {
    .main-grid {
        grid-template-columns: 1fr;
        margin-top: 32px;
    }
    .hero-overlay {
        background: linear-gradient(0deg, var(--color-graphite) 0%, rgba(39, 39, 42, 0.5) 100%);
    }
}

/* Cards */
.card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--color-border);
    margin-bottom: 24px;
}

.mechanic-card {
    border-top: 4px solid var(--color-lime);
}

.step-header {
    margin-bottom: 16px;
}

.step-num {
    display: inline-block;
    background: var(--color-graphite);
    color: var(--color-lime);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
}

.mechanic-card h2 {
    font-size: 1.75rem;
    margin-bottom: 8px;
}

.mechanic-card p {
    color: #64748b;
    margin-bottom: 24px;
}

/* Forms */
.custom-form .form-group {
    margin-bottom: 20px;
}

.custom-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.875rem;
    color: var(--color-graphite);
}

.custom-form input[type="text"],
.custom-form input[type="email"] {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s;
    background: #f8fafc;
}

.custom-form input:focus {
    outline: none;
    border-color: var(--color-cobalt);
    box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.1);
    background: #fff;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    font-family: inherit;
}

.btn-block {
    width: 100%;
}

.btn-primary {
    background: var(--color-lime);
    color: var(--color-graphite);
}

.btn-primary:hover {
    background: var(--color-lime-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(163, 230, 53, 0.3);
}

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

.btn-secondary {
    background: var(--color-graphite);
    color: #fff;
}

.btn-secondary:hover {
    background: #18181b;
}

/* Share Step */
.success-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(163, 230, 53, 0.1);
    border: 1px solid rgba(163, 230, 53, 0.3);
    padding: 16px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 32px;
}

.success-banner svg {
    color: #65a30d;
    flex-shrink: 0;
}

.success-banner h3 {
    font-size: 1.125rem;
    margin-bottom: 2px;
    color: #3f6212;
}

.success-banner p {
    margin: 0;
    font-size: 0.875rem;
    color: #4d7c0f;
}

/* Chances Tile */
.chances-tile {
    background: linear-gradient(135deg, var(--color-graphite) 0%, #18181b 100%);
    border-radius: var(--radius-md);
    padding: 24px;
    color: #fff;
    margin-bottom: 32px;
    position: relative;
    overflow: hidden;
}

.chances-tile::after {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 150px;
    height: 150px;
    background: var(--color-lime);
    filter: blur(80px);
    opacity: 0.2;
}

.chances-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 16px;
    position: relative;
    z-index: 2;
}

.chances-label {
    font-family: 'Space Grotesk', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.875rem;
    color: rgba(255,255,255,0.7);
}

.chances-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-lime);
    line-height: 1;
}

.progress-bar {
    height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: var(--color-lime);
    border-radius: 3px;
}

.progress-text {
    font-size: 0.75rem !important;
    color: rgba(255,255,255,0.6) !important;
    margin: 0 !important;
}

/* Share URL Box */
.share-box {
    margin-bottom: 24px;
}

.share-box label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.875rem;
}

.input-group {
    display: flex;
    gap: 8px;
}

.input-group input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: #f1f5f9;
    color: #475569;
    font-family: monospace;
    font-size: 0.875rem;
}

.input-group input:focus {
    outline: none;
    border-color: var(--color-cobalt);
}

/* Social Buttons */
.social-share {
    border-top: 1px solid var(--color-border);
    padding-top: 24px;
}

.social-label {
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 12px !important;
    color: var(--color-graphite) !important;
}

.social-buttons {
    display: flex;
    gap: 12px;
}

.btn-social {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    color: #fff;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
}

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

.btn-social.fb { background: #1877F2; }
.btn-social.x { background: #000000; }
.btn-social.wa { background: #25D366; }
.btn-social.email { background: #64748b; }

/* Error message */
.error-msg {
    margin-top: 16px;
    padding: 12px;
    background: #fef2f2;
    color: #b91c1c;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    border: 1px solid #fecaca;
}

.mt-8 { margin-top: 32px; }

/* Sidebar */
.col-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Prize Card */
.prize-card {
    padding: 0;
    overflow: hidden;
}

.prize-tag {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--color-cobalt);
    color: #fff;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    z-index: 2;
}

.prize-image {
    width: 100%;
    height: 200px;
    background: #f8fafc;
    position: relative;
    border-bottom: 1px solid var(--color-border);
}

.prize-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.prize-details {
    padding: 24px;
}

.prize-details h3 {
    font-size: 1.25rem;
    margin-bottom: 4px;
}

.retail-value {
    color: #64748b;
    font-size: 0.875rem;
    margin-bottom: 16px;
}

.prize-specs {
    list-style: none;
    border-top: 1px solid var(--color-border);
    padding-top: 16px;
}

.prize-specs li {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    margin-bottom: 8px;
    color: var(--color-text);
}

.prize-specs li span {
    font-weight: 600;
    color: var(--color-graphite);
}

/* Leaderboard Card */
.leaderboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.leaderboard-header h3 {
    font-size: 1.125rem;
}

.live-dot {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #dc2626;
    text-transform: uppercase;
}

.live-dot::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #dc2626;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(220, 38, 38, 0); }
    100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
}

.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    background: #f8fafc;
    border: 1px solid transparent;
}

.leaderboard-item.rank-1 {
    background: rgba(163, 230, 53, 0.1);
    border-color: rgba(163, 230, 53, 0.3);
}

.leaderboard-item.rank-2, .leaderboard-item.rank-3 {
    background: #fff;
    border-color: var(--color-border);
}

.rank {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-graphite);
    color: #fff;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
    margin-right: 12px;
}

.rank-1 .rank { background: var(--color-lime); color: var(--color-graphite); }
.rank-2 .rank { background: #cbd5e1; color: var(--color-graphite); }
.rank-3 .rank { background: #e2e8f0; color: var(--color-graphite); }

.user-info {
    flex: 1;
    font-weight: 600;
    font-size: 0.875rem;
}

.score {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 500;
}

/* Rules */
.rules-section {
    padding: 0 24px 64px 24px;
}

.rules-accordion {
    background: #fff;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    overflow: hidden;
}

.rules-accordion summary {
    padding: 20px 24px;
    font-weight: 600;
    cursor: pointer;
    background: #f8fafc;
    list-style: none;
    position: relative;
}

.rules-accordion summary::-webkit-details-marker {
    display: none;
}

.rules-accordion summary::after {
    content: '+';
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.25rem;
    color: #64748b;
}

.rules-accordion[open] summary::after {
    content: '−';
}

.rules-content {
    padding: 24px;
    border-top: 1px solid var(--color-border);
    font-size: 0.875rem;
    color: #475569;
}

.rules-content p {
    margin-bottom: 12px;
}

.rules-content p:last-child {
    margin-bottom: 0;
}

/* Powered By */
#wbx-powered-by-slot {
    margin: 40px auto;
    display: flex;
    justify-content: center;
}
