/* ═══════════════════════════════════════════════════════════
   DATATHON 2026 — Dark / Gaming / Cyberpunk UI
   ═══════════════════════════════════════════════════════════ */

/* ── Reset ──────────────────────────────────────────────── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg:       #0a0a0a;
    --surface:  #111111;
    --surface2: #161616;
    --border:   #1f1f1f;
    --text:     #e0e0e0;
    --text-dim: #777;
    --accent:   #39ff14;
    --accent2:  #00f0ff;
    --pink:     #ff2079;
    --title-font: 'Audiowide', cursive;
    --mono:     'JetBrains Mono', 'Courier New', monospace;
    --sans:     'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--sans);
    line-height: 1.6;
    color: var(--text);
    background-color: var(--bg);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    --grid-size: 70px;
    --grid-strength: 1px;
    --grid-color: rgba(0, 240, 255, 0.1); /* CYAN grid */

    background-image:
        linear-gradient(to right, var(--grid-color) var(--grid-strength), transparent var(--grid-strength)),
        linear-gradient(to bottom, var(--grid-color) var(--grid-strength), transparent var(--grid-strength));
    background-size: var(--grid-size) var(--grid-size);
    animation: grid-move 25s linear infinite; /* Slower animation */
    opacity: 0.5;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    --grid-size: 50px;
    --grid-strength: 1px;
    --grid-color: rgba(255, 32, 121, 0.1); /* PINK grid */

    background-image:
        linear-gradient(to right, var(--grid-color) var(--grid-strength), transparent var(--grid-strength)),
        linear-gradient(to bottom, var(--grid-color) var(--grid-strength), transparent var(--grid-strength));
    background-size: var(--grid-size) var(--grid-size);
    animation: grid-move-2 15s linear infinite; /* Different speed/direction */
    opacity: 0.5;
}

@keyframes grid-move {
    from { background-position: 0 0; }
    to { background-position: var(--grid-size) var(--grid-size); }
}

@keyframes grid-move-2 {
    from { background-position: 0 var(--grid-size); }
    to { background-position: var(--grid-size) 0; }
}

a { 
    color: var(--accent); 
    text-decoration: none;
    transition: text-shadow 0.3s ease;
}
a:hover { 
    text-decoration: none;
    text-shadow: 0 0 8px rgba(57, 255, 20, 0.7);
}

.accent { color: var(--accent); }

/* ── NAV ────────────────────────────────────────────────── */
.nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    background: rgba(10,10,10,.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.nav-inner {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 40px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-family: var(--title-font);
    font-weight: 400;
    font-size: 1.5rem;
    color: var(--text);
    letter-spacing: 2px;
    text-decoration: none;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 36px;
}

.nav-links a {
    font-family: var(--mono);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color .2s, text-shadow 0.3s ease;
    text-decoration: none;
    position: relative;
    padding-bottom: 4px;
}

.nav-links a:hover { 
    color: var(--accent); 
    text-shadow: 0 0 8px rgba(57, 255, 20, 0.7);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-color: var(--accent);
    transition: width 0.3s ease;
    box-shadow: 0 0 8px rgba(57, 255, 20, 0.7);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-cta {
    padding: 6px 18px !important;
    border: 1px solid var(--accent) !important;
    color: var(--accent) !important;
    border-radius: 4px;
    transition: background .2s, color .2s, box-shadow 0.3s ease !important;
    box-shadow: 0 0 12px rgba(57, 255, 20, 0.3);
}

.nav-cta:hover {
    background: var(--accent) !important;
    color: var(--bg) !important;
    box-shadow: 0 0 24px rgba(57, 255, 20, 0.7);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 4px;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: .2s;
}

/* ── HERO ───────────────────────────────────────────────── */
.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    overflow: hidden;
    background: var(--bg);
}

.hero #heroGameCanvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    z-index: 0;
}

.hero-overlay {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 100%;
    padding: 100px 24px 60px;
    pointer-events: none;
}

.hero-tag {
    font-family: var(--mono);
    font-size: 0.8rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 16px;
}

.hero-overlay h1 {
    font-family: var(--title-font);
    font-weight: 400;
    font-size: clamp(2.8rem, 8vw, 6rem);
    color: #fff;
    letter-spacing: 6px;
    line-height: 1.1;
    text-shadow: 0 0 10px rgba(57, 255, 20, 0.3), 0 0 25px rgba(57, 255, 20, 0.2), 0 0 50px rgba(57, 255, 20, 0.1);
}

.hero-sub {
    font-size: 1.1rem;
    color: var(--text-dim);
    max-width: 520px;
    margin: 20px 0 36px;
    line-height: 1.7;
    min-height: 58px; /* Approx 2 lines of text to prevent jump */
}

.hero-sub .cursor {
    display: inline-block;
    background-color: var(--accent);
    margin-left: 4px;
    width: 10px;
    height: 1.2rem;
    animation: blink 0.7s infinite;
    vertical-align: middle;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.presented-by {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    pointer-events: auto;
}

.presented-logo {
    width: 46px;
    height: auto;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid rgba(255,255,255,.15);
}

.presented-by span {
    font-family: var(--mono);
    font-size: 0.75rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: rgba(255,255,255,.5);
}

.presented-by strong {
    color: rgba(255,255,255,.75);
    font-weight: 600;
}

.hero-btns {
    display: flex;
    gap: 16px;
    pointer-events: auto;
}

.game-hint {
    position: absolute;
    bottom: 20px;
    right: 20px;
    z-index: 2;
    font-family: var(--mono);
    font-size: 0.8rem;
    letter-spacing: 1px;
    color: rgba(255,255,255,.45);
    text-transform: uppercase;
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 8px; /* Adjusted gap */
    background: rgba(10, 10, 10, 0.5);
    border: 1px solid var(--border);
    padding: 8px 12px; /* Smaller padding */
    border-radius: 8px;
    backdrop-filter: blur(5px);
    flex-wrap: nowrap; /* Prevent wrapping */
    justify-content: flex-end; /* Align content to the right */
    width: auto; /* Allow width to adjust to content */
}

.game-hint--mobile { display: none; }

.game-hint kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px; /* Smaller keys */
    height: 30px; /* Smaller keys */
    padding: 0 4px; /* Adjusted padding */
    font-family: var(--mono);
    font-size: 0.7rem; /* Smaller font */
    font-weight: 600;
    line-height: 1;
    border-radius: 4px;
    animation: pulse-glow 4s infinite ease-in-out;
    border: 1px solid var(--accent);
    color: var(--accent);
    background: rgba(57, 255, 20, 0.08);
    box-shadow: 0 1px 0 rgba(57, 255, 20, 0.2); /* Adjusted shadow for smaller kbd */
}

.hint-sep {
    color: rgba(255,255,255,.3);
    font-size: 0.65rem; /* Smaller font */
    margin: 0; /* Removed extra margin */
}

/* ── BUTTONS ────────────────────────────────────────────── */
.btn {
    display: inline-block;
    padding: 12px 32px;
    font-family: var(--mono);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all .25s;
}

/* New Keyframes for pulsing glow */
@keyframes pulse-glow {
    0% {
        box-shadow: 0 0 5px rgba(57, 255, 20, 0.2), 0 1px 0 rgba(57, 255, 20, 0.2);
    }
    50% {
        box-shadow: 0 0 10px rgba(57, 255, 20, 0.5), 0 1px 0 rgba(57, 255, 20, 0.2);
    }
    100% {
        box-shadow: 0 0 5px rgba(57, 255, 20, 0.2), 0 1px 0 rgba(57, 255, 20, 0.2);
    }
}

.btn-primary {
    background: var(--accent);
    color: var(--bg);
    box-shadow: 0 0 15px rgba(57, 255, 20, 0.4);
}

.btn-primary:hover {
    background: #2ee00f;
    box-shadow: 0 0 30px rgba(57,255,20,.7);
    text-decoration: none;
}

.btn-ghost {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-ghost:hover {
    border-color: var(--text-dim);
    text-decoration: none;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

.btn-full { width: 100%; text-align: center; }

.btn-hero {
    min-width: 240px;
    text-align: center;
}

/* ── STATS BAR ──────────────────────────────────────────── */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    max-width: 1200px;
    margin: 60px auto;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 0 20px rgba(57, 255, 20, 0.1); /* Subtle overall glow */
    background: rgba(17, 17, 17, 0.5); /* Slightly darker background to make text pop */
    backdrop-filter: blur(5px);
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 32px 16px;
    border-right: 1px solid var(--border);
}

.stat:last-child { border-right: none; }

.stat-num {
    font-family: var(--mono);
    font-size: 1.6rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8), 0 0 20px rgba(255, 255, 255, 0.4);
}

.stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text); /* Brighter color */
    margin-top: 6px;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.3); /* Subtle glow */
}

/* ── SECTIONS ───────────────────────────────────────────── */
.section {
    padding: 40px 24px;
}

.section--alt {
    background: var(--surface);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 40px 24px;
}

.section-inner {
    max-width: 1000px;
    margin: 0 auto;
}

.section-title {
    font-family: var(--mono);
    font-size: 1.6rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 48px;
    text-align: center;
    text-shadow: 0 0 10px rgba(57, 255, 20, 0.5);
}

.section-title::after {
    content: '';
    display: block;
    width: 40px;
    height: 2px;
    background: var(--accent);
    margin: 12px auto 0;
    box-shadow: 0 0 8px rgba(57, 255, 20, 0.7);
}

/* ── TIMELINE ───────────────────────────────────────────── */
.timeline {
    position: relative;
    padding-left: 32px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 8px;
    bottom: 8px;
    width: 1px;
    background: var(--border);
}

.tl-item {
    position: relative;
    padding-bottom: 40px;
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.tl-item.visible {
    opacity: 1;
    transform: translateX(0);
}

.tl-item:last-child { padding-bottom: 0; }

.tl-marker {
    position: absolute;
    left: -32px;
    top: 6px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    background: var(--bg);
    z-index: 1;
    transition: box-shadow 0.3s ease;
}

.tl-item:hover .tl-marker {
    box-shadow: 0 0 12px rgba(57, 255, 20, 0.6);
}

.tl-item:last-child .tl-marker {
    background: var(--accent);
    box-shadow: 0 0 12px rgba(57,255,20,.4);
}

.tl-date {
    font-family: var(--mono);
    font-size: 0.75rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--accent);
}

.tl-content h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: #fff;
    margin: 6px 0 8px;
}

.tl-content p {
    font-size: 0.9rem;
    color: var(--text-dim);
    line-height: 1.7;
    max-width: 600px;
}

/* ── ROUNDS ─────────────────────────────────────────────── */
.rounds-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.round-card {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 28px 24px;
    transition: border-color .25s, box-shadow 0.3s ease;
}

.round-card:hover {
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(57, 255, 20, 0.2);
}

.round-card--final {
    border-color: var(--accent);
    background: rgba(57,255,20,.04);
    box-shadow: 0 0 20px rgba(57, 255, 20, 0.2);
}

.round-num {
    font-family: var(--mono);
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 12px;
    text-shadow: 0 0 8px rgba(57, 255, 20, 0.5);
}

.round-card h3 {
    font-size: 1.05rem;
    color: #fff;
    margin-bottom: 4px;
}

.round-meta {
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--accent2);
    letter-spacing: 1px;
    margin-bottom: 12px;
    text-shadow: 0 0 8px rgba(0, 240, 255, 0.5);
}

.round-card > p:last-child {
    font-size: 0.85rem;
    color: var(--text-dim);
    line-height: 1.6;
}

/* ── PRICING ────────────────────────────────────────────── */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    max-width: 640px;
    margin: 0 auto;
}

.price-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 36px 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: border-color .25s, box-shadow 0.3s ease;
}

.price-card:hover { 
    border-color: var(--accent); 
    box-shadow: 0 0 20px rgba(57, 255, 20, 0.2);
}

.price-badge {
    font-family: var(--mono);
    font-size: 0.7rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--bg);
    background: var(--accent);
    padding: 4px 14px;
    border-radius: 3px;
    margin-bottom: 20px;
}

.price-badge--regular {
    background: var(--text-dim);
    color: var(--bg);
}

.price-amount {
    font-family: var(--mono);
    font-size: 2.8rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 24px;
}

.price-amount span {
    font-size: 0.9rem;
    color: var(--text-dim);
    font-weight: 400;
}

.price-features {
    list-style: none;
    width: 100%;
    margin-bottom: 28px;
}

.price-features li {
    font-size: 0.85rem;
    color: var(--text-dim);
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.price-features li::before {
    content: '—';
    margin-right: 8px;
    color: var(--accent);
}

.price-features li:last-child { border-bottom: none; }

/* ── PROBLEM STATEMENTS ──────────────────────────────────── */
.section-inner--wide {
    max-width: 1300px; /* 3 cards * 420px + 2 gaps * 20px = 1300px exactly */
    margin: 0 auto;
}

.section-desc {
    text-align: center;
    color: var(--text-dim);
    font-size: 0.9rem;
    margin-top: -32px;
    margin-bottom: 40px;
}

/* ── PS CONTROLS (Search + Toggle) ──────────────────────── */
.ps-controls {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.ps-search-wrap {
    position: relative;
    flex: 1 1 200px;
    max-width: 460px;
    min-width: 0;
}

.ps-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim);
    pointer-events: none;
}

.ps-search {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 16px 12px 42px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: #fff;
    font-family: var(--sans);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.25s;
}

.ps-search:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(57, 255, 20, 0.1);
}

.ps-search::placeholder {
    color: var(--text-dim);
}

/* Toggle switch */
.ps-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    white-space: nowrap;
    user-select: none;
}

.ps-toggle input {
    display: none;
}

.ps-toggle-slider {
    width: 38px;
    height: 20px;
    background: var(--border);
    border-radius: 10px;
    position: relative;
    transition: background 0.3s;
    flex-shrink: 0;
}

.ps-toggle-slider::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.3s;
}

.ps-toggle input:checked + .ps-toggle-slider {
    background: var(--accent);
}

.ps-toggle input:checked + .ps-toggle-slider::after {
    transform: translateX(18px);
}

.ps-toggle-label {
    font-family: var(--mono);
    font-size: 0.78rem;
    color: var(--text-dim);
    letter-spacing: 0.3px;
}

/* ── PS GRID ────────────────────────────────────────────── */
.ps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.ps-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    user-select: none;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.35s ease, transform 0.35s ease, border-color 0.25s, box-shadow 0.3s;
}

.ps-card--visible {
    opacity: 1;
    transform: translateY(0);
}

.ps-card:hover {
    border-color: var(--accent);
    box-shadow: 0 0 15px rgba(57, 255, 20, 0.15);
}

/* Load More */
.ps-load-more-wrap {
    text-align: center;
    margin-top: 32px;
}

.ps-load-more {
    font-family: var(--mono);
    font-size: 0.88rem;
    letter-spacing: 0.5px;
    padding: 14px 40px;
}

.ps-load-more span {
    opacity: 0.6;
    margin-left: 6px;
    font-weight: 400;
}

.ps-id {
    font-family: var(--mono);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--accent);
    display: block;
}

.ps-count {
    font-family: var(--mono);
    font-size: 0.7rem;
    color: var(--text-dim);
    background: rgba(255,255,255,0.03);
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid var(--border);
}

.ps-card h4 {
    font-size: 1rem;
    color: #fff;
    line-height: 1.4;
    margin: 0;
}

.ps-card p {
    font-size: 0.85rem;
    color: var(--text-dim);
    line-height: 1.6;
    margin: 0;
}

.ps-label {
    font-family: var(--mono);
    font-size: 0.65rem;
    text-transform: uppercase;
    color: var(--accent2);
    letter-spacing: 1px;
    margin-top: 8px;
    display: block;
    border-bottom: 1px solid rgba(0, 240, 255, 0.2);
    padding-bottom: 2px;
    width: fit-content;
}

.ps-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ps-list li {
    font-size: 0.8rem;
    color: var(--text-dim);
    padding-left: 12px;
    position: relative;
    margin-bottom: 4px;
}

.ps-list li::before {
    content: '•';
    color: var(--accent);
    position: absolute;
    left: 0;
}

.ps-no-results {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-dim);
    font-family: var(--mono);
    font-size: 0.9rem;
}

/* ── STEPS ──────────────────────────────────────────────── */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 20px;
}

.step-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 28px 24px;
    transition: border-color .25s, box-shadow 0.3s ease;
}

.step-card:hover { 
    border-color: var(--accent); 
    box-shadow: 0 0 20px rgba(57, 255, 20, 0.2);
}

.step-num {
    font-family: var(--mono);
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 12px;
    text-shadow: 0 0 8px rgba(57, 255, 20, 0.5);
}

.step-card h4 {
    font-size: 1rem;
    color: #fff;
    margin-bottom: 8px;
}

.step-card p {
    font-size: 0.85rem;
    color: var(--text-dim);
    line-height: 1.6;
}

/* ── FOOTER ─────────────────────────────────────────────── */
.footer {
    border-top: 1px solid var(--border);
    padding: 32px 24px;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-col p {
    font-size: 0.8rem;
    color: var(--text-dim);
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-contact {
    align-items: flex-end;
    font-family: var(--mono);
    font-size: 0.85rem;
}

.footer-contact a {
    color: var(--text-dim);
    text-decoration: none;
    transition: color .2s, text-shadow .3s;
}

.footer-contact a:hover {
    color: var(--accent);
    text-shadow: 0 0 8px rgba(57, 255, 20, 0.7);
}

/* ── FORM (register page) ──────────────────────────────── */
.page-wrap {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-top: 56px;
}

.form-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
}

.form-container {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 48px 36px;
    max-width: 520px;
    width: 100%;
}

.form-container--wide {
    max-width: 820px;
}

.form-container h2 {
    font-family: var(--mono);
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.form-subtitle {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-bottom: 32px;
}

.registration-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-section-label {
    font-family: var(--mono);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent);
    padding-bottom: 4px;
    border-bottom: 1px solid var(--border);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-row--3 {
    grid-template-columns: 1fr 1fr 1fr;
}

.form-group { display: flex; flex-direction: column; }

.form-group select {
    padding: 11px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text);
    font-family: var(--sans);
    font-size: 0.95rem;
    transition: border-color .2s, box-shadow 0.3s ease;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23777' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}

.form-group select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 10px rgba(57, 255, 20, 0.4);
}

.form-group label {
    font-family: var(--mono);
    font-size: 0.75rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 6px;
}

.form-group input {
    padding: 11px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text);
    font-family: var(--sans);
    font-size: 0.95rem;
    transition: border-color .2s, box-shadow 0.3s ease;
}

.form-group input::placeholder { color: #444; }

.form-group input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 10px rgba(57, 255, 20, 0.4);
}

.form-footer {
    text-align: center;
    margin-top: 24px;
}

.form-footer p {
    font-size: 0.8rem;
    color: var(--text-dim);
}

/* ── AUTH FORMS ──────────────────────────────────────────── */
.auth-container {
    max-width: 440px;
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-header h2 {
    font-family: var(--mono);
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.auth-footer {
    text-align: center;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.auth-footer p {
    font-size: 0.85rem;
    color: var(--text-dim);
}

.password-hint {
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--pink);
    letter-spacing: 0.5px;
    margin-top: -12px;
}

/* ── USER NAV ───────────────────────────────────────────── */
.nav-name {
    font-family: var(--mono);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 0.8px;
    text-transform: uppercase;
    white-space: nowrap;
    text-shadow: 0 0 8px rgba(57, 255, 20, 0.5);
}

.nav-logout {
    font-family: var(--mono);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-dim) !important;
    transition: color .2s, text-shadow 0.3s ease;
    text-decoration: none !important;
}

.nav-logout:hover {
    color: var(--pink) !important;
    text-shadow: 0 0 8px rgba(255, 32, 121, 0.7);
}

/* ── DASHBOARD ──────────────────────────────────────────── */
.dash-container {
    max-width: 700px;
    margin: 0 auto;
}

.dash-header {
    text-align: center;
    margin-bottom: 40px;
}

.dash-header h2 {
    font-family: var(--mono);
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.dash-header p {
    font-size: 0.9rem;
    color: var(--text-dim);
}

.dash-email {
    color: var(--accent2);
    text-shadow: 0 0 8px rgba(0, 240, 255, 0.5);
}

.dash-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 32px;
}

.dash-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 28px 24px;
    text-align: center;
    transition: border-color .25s, box-shadow 0.3s ease;
    text-decoration: none !important;
}

.dash-card:hover {
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(57, 255, 20, 0.2);
}

.dash-card h3 {
    font-family: var(--mono);
    font-size: 1rem;
    color: #fff;
    margin-bottom: 8px;
}

.dash-card p {
    font-size: 0.8rem;
    color: var(--text-dim);
    line-height: 1.5;
}

/* ── ALERTS ─────────────────────────────────────────────── */
.alert {
    padding: 16px 20px;
    border-radius: 4px;
    margin: 0 auto 20px;
    max-width: 520px;
    font-size: 0.9rem;
    text-align: center;
    font-family: var(--mono);
}

.alert-success {
    background: rgba(57,255,20,.08);
    color: var(--accent);
    border: 1px solid rgba(57,255,20,.25);
    box-shadow: 0 0 15px rgba(57, 255, 20, 0.3);
}

.alert-error {
    background: rgba(255,32,121,.08);
    color: var(--pink);
    border: 1px solid rgba(255,32,121,.25);
    box-shadow: 0 0 15px rgba(255, 32, 121, 0.3);
}

/* ── BACK LINK ──────────────────────────────────────────── */
.back-link {
    font-family: var(--mono);
    font-size: 0.8rem;
    color: var(--text-dim);
    text-decoration: none;
    letter-spacing: 1px;
    transition: color .2s, text-shadow 0.3s ease;
}

.back-link:hover { color: var(--accent); text-decoration: none; }

.reg-header {
    max-width: 520px;
    margin: 0 auto;
    padding: 24px 0 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.reg-header h1 {
    font-family: var(--mono);
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 1px;
}

/* ── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 768px) {
    .nav-logo {
        font-size: 1.2rem;
        letter-spacing: 1px;
    }

    .nav-links {
        position: fixed;
        top: 56px; left: 0; right: 0;
        background: rgba(10,10,10,.97);
        backdrop-filter: blur(12px);
        flex-direction: column;
        padding: 24px;
        gap: 20px;
        transform: translateY(-120%);
        transition: transform .3s;
        border-bottom: 1px solid var(--border);
    }

    .nav-links.open {
        transform: translateY(0);
    }

    .nav-toggle { display: flex; }

    .hero-overlay h1 {
        font-size: clamp(2rem, 8vw, 2.8rem); /* More aggressive clamp */
        letter-spacing: 3px;
    }

    .hero {
        height: 100svh;
        min-height: 480px;
    }

    .hero-overlay {
        padding: 100px 20px 60px;
        justify-content: flex-start;
        padding-top: 210px;
    }

    .section {
        padding-top: 120px;
        padding-bottom: 80px;
    }

    .stats-bar {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat:nth-child(2) { border-right: none; }

    .hero-btns { flex-direction: column; gap: 12px; }

    .game-hint--desktop { display: none !important; }
    .game-hint--mobile { display: flex !important; }

    .form-container { padding: 36px 20px; }
    .form-container--wide { max-width: 100%; }
    .form-row--3 { grid-template-columns: 1fr 1fr; }

    .ps-grid { grid-template-columns: repeat(2, 1fr); }
    .ps-controls { flex-direction: column; align-items: stretch; }
    .ps-search-wrap { max-width: 100%; flex-basis: auto; }

    .footer-inner {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .reg-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 24px 24px 8px;
    }

    .dash-actions {
        grid-template-columns: 1fr;
    }

    /* Smaller Marquee for Mobile */
    .marquee-container {
        height: 60px;
    }
    .sponsor-logo {
        height: 30px;
        width: 30px;
    }
    .sponsor-name {
        font-size: 0.8rem;
    }
    .marquee-content > * {
        margin: 0 25px;
    }
}

@media (max-width: 480px) {
    .hero-overlay h1 {
        font-size: 2rem;
        letter-spacing: 2px;
    }
    .stats-bar { grid-template-columns: 1fr 1fr; }
    .rounds-grid { grid-template-columns: 1fr; }
    .steps-grid { grid-template-columns: 1fr; }
    .pricing-grid { grid-template-columns: 1fr; }
    .ps-grid { grid-template-columns: 1fr; }
    .form-row, .form-row--3 { grid-template-columns: 1fr; }
}

/* 1. The Outer Ring (The "Target" Box) */
#magicMouseCursor {
    border: 1px solid var(--accent) !important;
    background-color: transparent !important;
    box-shadow: 0 0 5px rgba(57, 255, 20, 0.2);
    border-radius: 0 !important; /* Forces it to be a sharp square */
    z-index: 999999 !important;
}

/* 2. The Inner Dot (The actual pointer) */
#magicPointer {
    background-color: #39ff14 !important; /* Neon Cyan Dot */
    box-shadow: 0 0 5px #39ff14 !important; /* Tiny glow on dot */
    border-radius: 0 !important; /* Square dot */
    width: 6px !important;
    height: 6px !important;
}

/* 3. OPTIONAL: Make it rotate continuously for a HUD effect */
@keyframes spin { 
    from { transform: translate(-50%, -50%) rotate(0deg); } 
    to { transform: translate(-50%, -50%) rotate(360deg); } 
}
/* Uncomment the line below to enable rotation */
/* #magicMouseCursor { animation: spin 4s linear infinite; } */

/* ── SPONSORS MARQUEE ───────────────────────────────────── */
.marquee-container {
    overflow: hidden;
    margin: 20px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    display: flex; /* Use flexbox for vertical centering */
    align-items: center; /* Vertically center content */
    height: 80px; /* Explicit height for the container, adjust as needed */
}

.marquee-content {
    display: flex; /* Make it a flex container to align items horizontally */
    animation: marquee-scroll 30s linear infinite; /* Adjust speed as needed */
    flex-shrink: 0; /* Prevent content from shrinking */
    will-change: transform; /* Optimize animation performance */
}

.marquee-content > * {
    display: flex; /* Ensure each sponsor item is a flex container */
    align-items: center; /* Vertically align logo and name */
    margin: 0 40px;
    flex-shrink: 0; /* Prevent items from shrinking within marquee */
}

.sponsor-logo {
    height: 40px;
    width: 40px; /* Set fixed width for round shape */
    border-radius: 50%;
    object-fit: cover;
    filter: grayscale(100%) brightness(50%);
    transition: filter 0.3s ease;
}

.sponsor-name {
    font-family: var(--mono);
    font-size: 0.9rem;
    color: var(--text-dim);
    margin-left: 16px;
    transition: color .3s, text-shadow .3s;
}

.marquee-content > *:hover .sponsor-logo {
    filter: grayscale(0%) brightness(100%);
}

.marquee-content > *:hover .sponsor-name {
    color: var(--text);
    text-shadow: 0 0 6px rgba(255, 255, 255, 0.5);
}

@keyframes marquee-scroll {
    0% { transform: translateX(0%); }
    100% { transform: translateX(calc(-100% / 2)); } /* Scrolls half the content length */
}

/* ── DETAILS & RULES ────────────────────────────────── */
.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 28px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 32px;
}

.detail-block {
    padding: 16px;
    border-left: 2px solid var(--accent);
}

.detail-title {
    font-family: var(--mono);
    font-size: 1.1rem;
    color: var(--accent);
    margin-bottom: 12px;
    letter-spacing: 1px;
}

.detail-block p {
    color: var(--text-dim);
    font-size: 0.9rem;
    line-height: 1.7;
}

.detail-list {
    list-style: none;
    padding-left: 0;
}

.detail-list li {
    font-size: 0.9rem;
    color: var(--text-dim);
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
    line-height: 1.6;
}

.detail-list li::before {
    content: '>';
    font-family: var(--mono);
    color: var(--accent);
    position: absolute;
    left: 0;
    top: 0;
}

/* ── WINNERS & PRIZES ─────────────────────────────────── */
.winner-group {
    margin-bottom: 56px;
}
.winner-group:last-of-type {
    margin-bottom: 32px;
}

.winner-group-title {
    font-family: var(--mono);
    font-size: 1.3rem; /* Slightly smaller than before, but still prominent */
    color: var(--accent2);
    text-transform: uppercase;
    letter-spacing: 3px;
    text-align: center;
    
    border: 1px solid var(--border);
    border-top: none; /* Remove top border for a "hanging" look */
    border-left: none;
    border-right: none;

    padding: 12px 0 16px; /* Adjust padding */
    margin: 0 auto 32px; /* Center it and give space */
    max-width: 90%; /* Use percentage for responsiveness */

    position: relative;
    text-shadow: 0 0 10px var(--accent2), 0 0 20px rgba(0, 240, 255, 0.5);
}

.winner-group-title::before,
.winner-group-title::after {
    content: '';
    position: absolute;
    bottom: -1px; /* Position on top of the bottom border */
    width: 30px;
    height: 1px;
    background: var(--accent2);
    box-shadow: 0 0 8px var(--accent2);
}

.winner-group-title::before {
    left: 50%;
    transform: translateX(-50%) skewX(45deg);
}

.winner-group-title::after {
    left: 50%;
    transform: translateX(-50%) skewX(-45deg);
}

.winners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.winner-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 28px;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.winner-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

.winner-place-badge {
    display: inline-block;
    font-family: var(--mono);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--bg);
    border-radius: 4px;
    padding: 6px 18px;
    margin-bottom: 20px;
}

/* Prize-specific colors */
.winner-card.prize-1 .winner-place-badge {
    background: var(--accent);
    box-shadow: 0 0 15px rgba(57, 255, 20, 0.6);
}
.winner-card.prize-2 .winner-place-badge {
    background: #c0c0c0; /* Silver */
    color: #222;
    box-shadow: 0 0 15px rgba(192, 192, 192, 0.5);
}
.winner-card.prize-3 .winner-place-badge {
    background: #cd7f32; /* Bronze */
    color: #fff;
    box-shadow: 0 0 15px rgba(205, 127, 50, 0.5);
}

.winner-perks {
    list-style: none;
    text-align: left;
    margin: 0;
    padding: 0;
}

.winner-perks li {
    font-size: 0.9rem;
    color: var(--text-dim);
    margin-bottom: 12px;
    padding-left: 22px;
    position: relative;
}

.winner-perks li::before {
    content: '★';
    font-family: var(--mono);
    position: absolute;
    left: 0;
    top: 1px;
    font-weight: 700;
}

.prize-1 .winner-perks li::before { color: var(--accent); }
.prize-2 .winner-perks li::before { color: #c0c0c0; }
.prize-3 .winner-perks li::before { color: #cd7f32; }


.perk-highlight {
    color: var(--accent2);
    font-weight: 600;
    text-shadow: 0 0 8px rgba(0, 240, 255, 0.5);
}

.participation-prize {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 24px 28px;
    text-align: center;
    margin-top: 32px;
}

.participation-prize h4 {
    font-family: var(--mono);
    font-size: 1rem;
    color: #fff;
    margin-bottom: 8px;
}

.participation-prize p {
    color: var(--text-dim);
    font-size: 0.9rem;
    max-width: 650px;
    margin: 0 auto;
}