:root {
    --primary: #FACC15;
    --primary-dark: #EAB308;
    --bg-dark: #0A0A0A;
    --bg-card: #171717;
    --bg-card-hover: #262626;
    --text-main: #FFFFFF;
    --text-muted: #A3A3A3;
    --border: #333333;
    --success: #22c55e;
    --error: #ef4444;
    --font-heading: 'Oswald', sans-serif;
    --font-body: 'Inter', sans-serif;
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Utilities */
.hidden { display: none !important; }
.w-full { width: 100%; }
.mt-8 { margin-top: 2rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-4 { margin-bottom: 1rem; }

/* Hero Section */
.hero {
    position: relative;
    padding: 80px 20px;
    background-image: url('https://offertabs.s3.amazonaws.com/offer/shiz2m/site/media/69e7c88de04e25.40525933.jpg');
    background-size: cover;
    background-position: center;
    text-align: center;
    border-bottom: 2px solid var(--primary);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(10,10,10,0.6), rgba(10,10,10,0.95));
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.badge {
    display: inline-block;
    background: rgba(250, 204, 21, 0.2);
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 6px 16px;
    border-radius: 99px;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1.1;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #fff, #cbd5e1);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero p {
    color: var(--text-muted);
    font-size: 1.2rem;
}

/* Countdown */
#countdown-container {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.countdown-label {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
    color: var(--primary);
}

.countdown-timer {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.cd-box {
    background: rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 10px 15px;
    min-width: 70px;
}

.cd-box span {
    display: block;
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}

.cd-box small {
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
}

/* Main Container */
.main-container {
    flex: 1;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
}

/* Messages */
.message-banner {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    text-align: center;
    font-weight: 500;
}
.message-banner.error { background: rgba(239, 68, 68, 0.1); border: 1px solid var(--error); color: #fca5a5; }
.message-banner.info { background: rgba(59, 130, 246, 0.1); border: 1px solid #3b82f6; color: #93c5fd; }

/* Sections */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}
.section-header h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}
.section-header p { color: var(--text-muted); }

/* Bracket Layout */
.bracket-wrapper {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 20px;
    -webkit-overflow-scrolling: touch;
}

.bracket-board {
    display: flex;
    justify-content: space-between;
    min-width: 1000px; /* Force scroll on small screens */
    gap: 10px;
}

.bracket-col {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    flex: 1;
    gap: 15px;
}

.col-center {
    flex: 1.2;
    align-items: center;
}

.col-header {
    text-align: center;
    font-family: var(--font-heading);
    color: var(--text-muted);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.match-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    width: 100%;
}

.seed-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 1px solid var(--border);
    position: relative;
    min-height: 48px;
}
.seed-item:last-child { border-bottom: none; }
.seed-item:hover { background: var(--bg-card-hover); }

.seed-item.active {
    background: rgba(250, 204, 21, 0.15);
    border-left: 3px solid var(--primary);
}

.seed-item.empty {
    color: var(--text-muted);
    font-style: italic;
    cursor: default;
}
.seed-item.empty:hover { background: transparent; }

/* Seed Rankings badge */
.seed-rank {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--bg-dark);
    background: var(--text-muted);
    border-radius: 4px;
    padding: 2px 6px;
    margin-right: 8px;
    min-width: 22px;
    text-align: center;
    transition: all 0.2s;
}

.seed-item.active .seed-rank {
    background: var(--primary);
    color: #000;
}

.seed-image {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    margin-right: 8px;
    object-fit: cover;
    background: #333;
}

.seed-name {
    font-weight: 500;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

/* Locked / Readonly State */
.locked-board .seed-item { cursor: default; }
.locked-board .seed-item:hover { background: transparent; }
.locked-board .seed-item.active { background: rgba(250, 204, 21, 0.1); }

.result-icon {
    margin-left: 8px;
}
.result-icon.correct { color: var(--success); }
.result-icon.incorrect { color: var(--error); }

/* Bracket Actions */
.bracket-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 3rem;
    gap: 1rem;
}

.progress-indicator {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: var(--primary);
    letter-spacing: 1px;
}

/* Forms & Buttons */
.form-card {
    max-width: 500px;
    margin: 0 auto;
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1);
}

.form-card h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.form-card p {
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #e5e5e5;
}

input[type="text"],
input[type="email"] {
    width: 100%;
    padding: 0.875rem 1rem;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s;
}

input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.2);
}

.btn-primary {
    background: var(--primary);
    color: #000;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    font-family: var(--font-body);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(250, 204, 21, 0.3);
}

.btn-primary:disabled {
    background: #333;
    color: #666;
    cursor: not-allowed;
}

.btn-secondary {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-secondary:hover {
    background: rgba(250, 204, 21, 0.1);
}

/* Result Phase & Share */
.result-header {
    text-align: center;
    margin-bottom: 3rem;
}
.success-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: rgba(34, 197, 94, 0.1);
    color: var(--success);
    border-radius: 50%;
    margin-bottom: 1.5rem;
}

#score-display {
    font-size: 1.25rem;
    color: var(--primary);
    font-weight: 600;
    margin-top: 1rem;
    background: rgba(250, 204, 21, 0.1);
    padding: 10px 20px;
    border-radius: 99px;
    display: inline-block;
}

/* Leaderboard Rankings */
.leaderboard-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    max-width: 600px;
    margin: 0 auto;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.leaderboard-card table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.leaderboard-card th {
    background: rgba(0,0,0,0.4);
    padding: 16px;
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.leaderboard-card td {
    padding: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    font-weight: 500;
}

.leaderboard-card tr:last-child td {
    border-bottom: none;
}

.highlight-row {
    background: rgba(250, 204, 21, 0.1);
}

.highlight-row td {
    color: var(--primary);
    font-weight: 700;
}

.rank-col {
    width: 80px;
    text-align: center;
}

.score-col {
    width: 100px;
    text-align: right;
}

/* Share Card */
.share-card {
    background: linear-gradient(145deg, #1f1f1f, #111111);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.share-card h3 {
    color: var(--primary);
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}
.share-card p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.share-controls {
    display: flex;
    gap: 10px;
}

/* Powered By */
#wbx-powered-by-slot {
    margin-top: auto;
    padding-top: 40px;
    width: 100%;
}

/* Responsive */
@media (max-width: 1024px) {
    .hero h1 { font-size: 2.5rem; }
    .bracket-wrapper {
        scroll-snap-type: x mandatory;
    }
    .bracket-board {
        min-width: 1200px;
    }
    .bracket-col {
        scroll-snap-align: center;
    }
}

@media (max-width: 768px) {
    .share-controls { flex-direction: column; }
    .hero { padding: 60px 20px 40px; }
}
