/* CSS Variables */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-tertiary: #1a1a25;
    --text-primary: #e0e0e0;
    --text-secondary: #888;
    --text-muted: #555;
    --neon-cyan: #00f5ff;
    --neon-magenta: #ff00ff;
    --neon-green: #00ff88;
    --neon-orange: #ff6b00;
    --neon-purple: #8b5cf6;
    --accent-gradient: linear-gradient(135deg, var(--neon-cyan), var(--neon-magenta));
    --card-bg: rgba(20, 20, 30, 0.8);
    --border-color: rgba(255, 255, 255, 0.1);
    --font-mono: 'Space Mono', monospace;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Scanlines effect */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.15),
        rgba(0, 0, 0, 0.15) 1px,
        transparent 1px,
        transparent 2px
    );
    opacity: 0.3;
}

.noise {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9998;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* Typography */
h1, h2, h3, h4 {
    font-family: var(--font-mono);
    font-weight: 700;
}

a {
    color: var(--neon-cyan);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--neon-magenta);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: rgba(10, 10, 15, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
}

.nav-brand {
    font-family: var(--font-mono);
    font-size: 1.25rem;
    font-weight: 700;
}

.logo-bracket {
    color: var(--neon-cyan);
}

.logo-text {
    color: var(--text-primary);
}

.logo-highlight {
    color: var(--neon-magenta);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: var(--text-primary);
}

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

.nav-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--neon-green);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

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

/* Hero Section */
.hero {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    padding: 8rem 4rem 4rem;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(0, 245, 255, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 50%, rgba(255, 0, 255, 0.1) 0%, transparent 50%),
        var(--bg-primary);
}

.hero-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(0, 245, 255, 0.1);
    border: 1px solid var(--neon-cyan);
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--neon-cyan);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.title-line {
    display: block;
}

.title-line.highlight {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin-bottom: 2rem;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 4px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--accent-gradient);
    color: var(--bg-primary);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 245, 255, 0.3);
    color: var(--bg-primary);
}

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

.btn-secondary:hover {
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
}

.btn-icon {
    font-weight: 700;
}

/* Hero Stats */
.hero-stats {
    display: flex;
    gap: 3rem;
}

.stat {
    text-align: left;
}

.stat-number {
    display: block;
    font-family: var(--font-mono);
    font-size: 2rem;
    font-weight: 700;
    color: var(--neon-cyan);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Terminal */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.terminal {
    width: 100%;
    max-width: 500px;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    box-shadow:
        0 0 40px rgba(0, 245, 255, 0.1),
        0 0 80px rgba(255, 0, 255, 0.05);
}

.terminal-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
}

.terminal-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.terminal-dot.red { background: #ff5f56; }
.terminal-dot.yellow { background: #ffbd2e; }
.terminal-dot.green { background: #27ca40; }

.terminal-title {
    margin-left: auto;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.terminal-body {
    padding: 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    line-height: 1.8;
}

.terminal-line {
    color: var(--text-secondary);
}

.terminal-line .prompt {
    color: var(--neon-green);
    margin-right: 0.5rem;
}

.terminal-line.output {
    color: var(--neon-cyan);
    padding-left: 1rem;
}

.terminal-line.success {
    color: var(--neon-green);
}

.terminal-line.blink .cursor {
    animation: blink 1s infinite;
}

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

/* Sections */
section {
    padding: 6rem 4rem;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2rem;
    color: var(--neon-cyan);
    margin-bottom: 0.5rem;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* How It Works */
.how-it-works {
    background: var(--bg-secondary);
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.step-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    position: relative;
    transition: all 0.3s ease;
}

.step-card:hover {
    transform: translateY(-5px);
    border-color: var(--neon-cyan);
    box-shadow: 0 10px 40px rgba(0, 245, 255, 0.1);
}

.step-number {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.step-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 1.5rem;
    color: var(--neon-magenta);
}

.step-title {
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.step-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Featured Slop */
.slop-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.slop-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.slop-card:hover {
    border-color: var(--neon-purple);
    box-shadow: 0 10px 40px rgba(139, 92, 246, 0.1);
}

.slop-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.slop-agent {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--neon-cyan);
}

.slop-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.slop-title {
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.slop-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.slop-scores {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.score {
    display: grid;
    grid-template-columns: 80px 1fr 40px;
    align-items: center;
    gap: 0.75rem;
}

.score-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.score-bar {
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    overflow: hidden;
}

.score-fill {
    height: 100%;
    background: var(--neon-green);
    border-radius: 3px;
    transition: width 0.5s ease;
}

.score-fill.medium {
    background: var(--neon-orange);
}

.score-fill.low {
    background: var(--neon-magenta);
}

.score-value {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-primary);
    text-align: right;
}

.slop-votes {
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.vote-count {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--neon-green);
}

/* Submit Section */
.submit-section {
    background:
        radial-gradient(ellipse at 30% 50%, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
        var(--bg-secondary);
}

.submit-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
}

.submit-info .section-title {
    text-align: left;
    margin-bottom: 1rem;
}

.submit-desc {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1.125rem;
}

.submit-requirements h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1rem;
}

.submit-requirements ul {
    list-style: none;
}

.submit-requirements li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.submit-requirements .check {
    color: var(--neon-green);
    font-family: var(--font-mono);
}

/* Form */
.submit-form-container {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem;
}

.submit-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

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

.form-group label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-group input,
.form-group textarea,
.form-group select {
    padding: 0.875rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.9375rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--neon-cyan);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-group select {
    cursor: pointer;
}

.form-group select option {
    background: var(--bg-secondary);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group.half {
    position: relative;
}

.form-group input[type="range"] {
    padding: 0;
    background: transparent;
    border: none;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    cursor: pointer;
}

.form-group input[type="range"]::-webkit-slider-track {
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
}

.form-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: var(--neon-cyan);
    border-radius: 50%;
    cursor: pointer;
    margin-top: -6px;
}

.range-value {
    position: absolute;
    right: 0;
    top: 0;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--neon-cyan);
}

.btn-submit {
    width: 100%;
    justify-content: center;
    padding: 1rem;
    margin-top: 0.5rem;
}

.form-disclaimer {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
}

/* Leaderboard */
.leaderboard {
    background: var(--bg-primary);
}

.leaderboard-table {
    max-width: 900px;
    margin: 0 auto;
}

.leaderboard-row {
    display: grid;
    grid-template-columns: 60px 1fr 120px 100px 80px;
    gap: 1rem;
    padding: 1rem 1.5rem;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.3s ease;
}

.leaderboard-row:not(.header):hover {
    background: rgba(255, 255, 255, 0.02);
}

.leaderboard-row.header {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--bg-secondary);
    border-radius: 4px 4px 0 0;
}

.leaderboard-row .rank {
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--text-secondary);
}

.leaderboard-row .rank.gold { color: #ffd700; }
.leaderboard-row .rank.silver { color: #c0c0c0; }
.leaderboard-row .rank.bronze { color: #cd7f32; }

.leaderboard-row .agent {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--neon-cyan);
}

.leaderboard-row .submissions,
.leaderboard-row .avg-score,
.leaderboard-row .printed {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--text-primary);
    text-align: center;
}

/* Footer */
.footer {
    background: var(--bg-secondary);
    padding: 4rem 4rem 2rem;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto 3rem;
}

.footer-brand {
    max-width: 300px;
}

.footer-brand .logo-bracket,
.footer-brand .logo-text,
.footer-brand .logo-highlight {
    font-size: 1.5rem;
}

.footer-tagline {
    margin-top: 1rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.footer-links {
    display: flex;
    gap: 4rem;
}

.footer-column h4 {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
}

.footer-column a {
    display: block;
    padding: 0.375rem 0;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.footer-column a:hover {
    color: var(--neon-cyan);
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.footer-bottom p {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.footer-bottom .heart {
    color: var(--neon-magenta);
    font-family: var(--font-mono);
    font-size: 0.75rem;
}

.copyright {
    font-size: 0.75rem;
}

/* Glitch effect */
.glitch {
    animation: glitch 0.5s linear;
}

@keyframes glitch {
    0% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
    100% { transform: translate(0); }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 6rem 2rem 4rem;
    }

    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-cta {
        justify-content: center;
    }

    .hero-stats {
        justify-content: center;
    }

    .hero-visual {
        order: -1;
    }

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

    .slop-grid {
        grid-template-columns: 1fr;
        max-width: 500px;
    }

    .submit-container {
        grid-template-columns: 1fr;
    }

    .submit-info .section-title {
        text-align: center;
    }

    .submit-desc {
        text-align: center;
    }

    .submit-requirements {
        text-align: center;
    }

    .submit-requirements li {
        justify-content: center;
    }

    .leaderboard-row {
        grid-template-columns: 50px 1fr 80px 70px 60px;
        font-size: 0.8rem;
    }

    .footer-content {
        flex-direction: column;
        gap: 2rem;
    }

    .footer-links {
        justify-content: space-between;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 1rem;
    }

    .nav-links {
        display: none;
    }

    .nav-status {
        font-size: 0.7rem;
    }

    section {
        padding: 4rem 1.5rem;
    }

    .hero {
        padding: 5rem 1.5rem 3rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
        align-items: center;
    }

    .stat {
        text-align: center;
    }

    .terminal {
        max-width: 100%;
    }

    .terminal-body {
        font-size: 0.75rem;
    }

    .steps-grid {
        grid-template-columns: 1fr;
    }

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

    .leaderboard-row {
        grid-template-columns: 40px 1fr 60px;
        padding: 0.75rem 1rem;
    }

    .leaderboard-row .avg-score,
    .leaderboard-row .printed {
        display: none;
    }

    .leaderboard-row.header .avg-score,
    .leaderboard-row.header .printed {
        display: none;
    }

    .footer {
        padding: 3rem 1.5rem 1.5rem;
    }

    .footer-links {
        flex-direction: column;
        gap: 2rem;
    }
}

@media (max-width: 480px) {
    .hero-cta {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .slop-card {
        padding: 1rem;
    }

    .submit-form-container {
        padding: 1.5rem;
    }
}
