:root {
    --paper: #f4f0e8;
    --ink: #101010;
    --red: #d82f2f;
    --blue: #174db7;
    --yellow: #f1c430;
    --white: #ffffff;
    --line: #1b1b1b;
}

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

body {
    min-height: 100vh;
    font-family: 'League Spartan', sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at 88% 15%, rgba(216, 47, 47, 0.22), transparent 18%),
        radial-gradient(circle at 7% 85%, rgba(23, 77, 183, 0.24), transparent 19%),
        var(--paper);
    line-height: 1.25;
    overflow-x: hidden;
}

.scene {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.orb {
    position: absolute;
    border: 3px solid var(--line);
}

.orb-red {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: var(--red);
    top: 3.2rem;
    left: 4.2rem;
}

.orb-blue {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: var(--blue);
    right: 5rem;
    bottom: 9rem;
}

.bar {
    position: absolute;
    width: 290px;
    height: 22px;
    background: var(--yellow);
    border: 3px solid var(--line);
    transform: rotate(-11deg);
    right: -35px;
    top: 85px;
}

.layout {
    position: relative;
    z-index: 1;
    max-width: 1120px;
    margin: 0 auto;
    padding: 2.3rem 1.25rem 2rem;
}

.hero {
    margin-bottom: 1.25rem;
}

.kicker {
    display: inline-block;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.82rem;
    letter-spacing: 0.09em;
    border: 2px solid var(--line);
    padding: 0.3rem 0.5rem;
    background: var(--white);
}

.hero h1 {
    margin-top: 0.7rem;
    font-size: clamp(3.4rem, 7vw, 7rem);
    letter-spacing: 0.025em;
    font-weight: 800;
    line-height: 0.95;
    text-transform: uppercase;
}

.lead {
    margin-top: 0.6rem;
    max-width: 620px;
    font-size: clamp(1rem, 2vw, 1.45rem);
}

.main-grid {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 1rem;
    align-items: start;
}

.upload-panel,
.preview-panel {
    border: 3px solid var(--line);
    background: var(--white);
    box-shadow: 8px 8px 0 var(--line);
}

.upload-panel {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.panel-mark {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.mark-square {
    width: 15px;
    height: 15px;
    background: var(--yellow);
    border: 2px solid var(--line);
}

.mark-circle {
    width: 15px;
    height: 15px;
    background: var(--blue);
    border-radius: 50%;
    border: 2px solid var(--line);
}

.mark-line {
    width: 48px;
    height: 7px;
    background: var(--red);
    border: 2px solid var(--line);
}

.upload-zone {
    border: 3px dashed var(--line);
    min-height: 250px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    cursor: pointer;
    background: linear-gradient(145deg, #fff, #f3eee2);
    transition: transform 140ms ease, background-color 180ms ease;
    outline: none;
}

.upload-zone:hover,
.upload-zone:focus-visible {
    background: #fff8d5;
    transform: translate(-2px, -2px);
}

.upload-zone.drag-over {
    background: #ffe6e6;
    transform: translate(-3px, -3px);
}

.upload-content {
    padding: 1rem;
}

.upload-title {
    font-size: 1.85rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 0.35rem;
}

.upload-subtitle {
    font-size: 1rem;
    margin-bottom: 0.8rem;
}

.upload-types {
    font-family: 'IBM Plex Mono', monospace;
    letter-spacing: 0.08em;
    font-size: 0.76rem;
}

.error-text {
    background: #ffe3e3;
    border: 2px solid var(--red);
    color: #750505;
    padding: 0.55rem 0.7rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.8rem;
}

.preview-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    padding: 1rem;
}

.preview-card {
    border: 3px solid var(--line);
}

.preview-head {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 0.7rem;
    border-bottom: 3px solid var(--line);
    background: #f6f2e8;
    font-family: 'IBM Plex Mono', monospace;
    text-transform: uppercase;
    font-size: 0.8rem;
}

.dot {
    width: 11px;
    height: 11px;
    border: 2px solid var(--line);
    border-radius: 50%;
}

.dot.red {
    background: var(--red);
}

.dot.blue {
    background: var(--blue);
}

.preview-body {
    aspect-ratio: 4 / 3;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #efeae0;
    overflow: hidden;
    padding: 0.5rem;
}

.checkerboard {
    background-image:
        linear-gradient(45deg, #dad3c7 25%, transparent 25%),
        linear-gradient(-45deg, #dad3c7 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #dad3c7 75%),
        linear-gradient(-45deg, transparent 75%, #dad3c7 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0;
}

.preview-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.progress-container {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.progress-track {
    height: 14px;
    border: 2px solid var(--line);
    background: #e8e1d3;
}

.progress-fill {
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--red), var(--yellow));
    transition: width 150ms ease;
}

.progress-text {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.78rem;
}

.actions {
    display: flex;
    gap: 0.7rem;
}

.btn {
    flex: 1;
    padding: 0.75rem 0.8rem;
    border: 3px solid var(--line);
    font-family: 'League Spartan', sans-serif;
    text-transform: uppercase;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    cursor: pointer;
    transition: transform 130ms ease;
}

.btn:hover {
    transform: translate(-2px, -2px);
}

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

.btn-primary {
    background: var(--ink);
    color: var(--white);
}

.btn-secondary {
    background: var(--white);
    color: var(--ink);
}

.footer {
    margin-top: 1.2rem;
    border-top: 3px solid var(--line);
    padding-top: 0.6rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.82rem;
}

.hidden {
    display: none !important;
}

@media (max-width: 1024px) {
    .main-grid {
        grid-template-columns: 1fr;
    }

    .preview-panel {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .layout {
        padding: 1.2rem 0.8rem 1rem;
    }

    .orb-red {
        width: 95px;
        height: 95px;
        left: -18px;
        top: 10px;
    }

    .orb-blue {
        width: 86px;
        height: 86px;
        right: -20px;
        bottom: 18%;
    }

    .bar {
        width: 130px;
        top: 75px;
        right: -38px;
    }

    .upload-title {
        font-size: 1.45rem;
    }

    .actions {
        flex-direction: column;
    }
}
