:root {
    --bg: #090c0a;
    --bg-panel: #0e1410;
    --fg: #c9f7d6;
    --fg-dim: #6f9280;
    --accent: #39ff88;
    --accent-dim: #1f7a4a;
    --glitch: #ff2e63;
    --border: #1f3326;
    --mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", "Fira Code", Menlo, Consolas, monospace;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    min-height: 100%;
}

body {
    position: relative;
    font-family: var(--mono);
    background: var(--bg);
    color: var(--fg);
    line-height: 1.55;
    padding: 0 20px 60px;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    background: repeating-linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0) 0px,
        rgba(0, 0, 0, 0) 1px,
        rgba(0, 0, 0, 0.18) 2px,
        rgba(0, 0, 0, 0.18) 3px
    );
    mix-blend-mode: multiply;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    background: radial-gradient(ellipse at center, rgba(57, 255, 136, 0) 55%, rgba(0, 0, 0, 0.55) 100%);
}

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

.topbar {
    max-width: 760px;
    margin: 0 auto;
    padding: 28px 0 12px;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
}

.logo {
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.12em;
    text-decoration: none;
    color: var(--accent);
}

.logo::before {
    content: "▓▓ ";
    color: var(--accent-dim);
}

main {
    max-width: 760px;
    margin: 0 auto;
    position: relative;
    z-index: 3;
}

section {
    margin: 48px 0;
}

.hero {
    text-align: center;
    padding: 40px 0 8px;
}

.hero h1 {
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    margin: 0 0 16px;
    letter-spacing: -0.01em;
}

.tagline {
    color: var(--fg-dim);
    max-width: 52ch;
    margin: 0 auto 28px;
}

.btn {
    display: inline-block;
    font-family: var(--mono);
    font-size: 0.95rem;
    padding: 12px 22px;
    border-radius: 4px;
    border: 1px solid var(--border);
    background: var(--bg-panel);
    color: var(--fg);
    text-decoration: none;
    cursor: pointer;
    transition: border-color 0.15s ease, transform 0.1s ease;
}

.btn:hover {
    border-color: var(--accent-dim);
}

.btn:active {
    transform: translateY(1px);
}

.btn-primary {
    background: var(--accent);
    color: #04140a;
    border-color: var(--accent);
    font-weight: 700;
}

.btn-primary:hover {
    background: #55ffa0;
}

.btn:disabled,
.btn[disabled] {
    opacity: 0.4;
    cursor: not-allowed;
}

h2 {
    font-size: 0.85rem;
    text-transform: lowercase;
    letter-spacing: 0.04em;
    color: var(--fg-dim);
    margin: 0 0 18px;
    padding-bottom: 8px;
    border-bottom: 1px dashed var(--border);
}

.file-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
    background: var(--bg-panel);
}

.file-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

.file-row:last-child {
    border-bottom: none;
}

.file-icon {
    opacity: 0.8;
}

.file-name {
    flex: 1;
    color: var(--fg);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.file-link:hover {
    text-decoration: underline;
}

.file-meta {
    color: var(--fg-dim);
    font-size: 0.8rem;
    white-space: nowrap;
}

.signup {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 28px;
}

.signup-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 340px;
    margin: 0 auto;
}

.signup-form label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--fg-dim);
}

.signup-form input {
    font-family: var(--mono);
    font-size: 0.95rem;
    padding: 10px 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--fg);
}

.signup-form input:focus {
    outline: none;
    border-color: var(--accent);
}

.signup-form .btn {
    margin-top: 4px;
}

.fine-print {
    text-align: center;
    color: var(--fg-dim);
    font-size: 0.75rem;
    margin-top: 16px;
}

footer {
    max-width: 760px;
    margin: 40px auto 0;
    text-align: center;
    color: var(--fg-dim);
    font-size: 0.75rem;
    position: relative;
    z-index: 3;
}

/* Glitch text effect */
.glitch {
    position: relative;
    display: inline-block;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    overflow: hidden;
    clip-path: inset(0 0 0 0);
}

.glitch::before {
    color: var(--glitch);
    animation: glitch-1 3.5s infinite linear;
    z-index: -1;
}

.glitch::after {
    color: var(--accent);
    animation: glitch-2 3.5s infinite linear;
    z-index: -1;
}

@keyframes glitch-1 {
    0%, 92%, 100% { transform: translate(0, 0); clip-path: inset(0 0 0 0); opacity: 0; }
    93% { transform: translate(-2px, 1px); clip-path: inset(10% 0 60% 0); opacity: 0.8; }
    95% { transform: translate(2px, -1px); clip-path: inset(60% 0 5% 0); opacity: 0.8; }
    97% { transform: translate(-1px, 0); clip-path: inset(30% 0 40% 0); opacity: 0.6; }
}

@keyframes glitch-2 {
    0%, 90%, 100% { transform: translate(0, 0); clip-path: inset(0 0 0 0); opacity: 0; }
    91% { transform: translate(2px, -1px); clip-path: inset(20% 0 50% 0); opacity: 0.7; }
    94% { transform: translate(-2px, 1px); clip-path: inset(50% 0 15% 0); opacity: 0.7; }
    98% { transform: translate(1px, 0); clip-path: inset(5% 0 70% 0); opacity: 0.5; }
}

/* Error-style pages (broken / expired) */
.error-card {
    max-width: 520px;
    margin: 12vh auto 0;
    text-align: center;
    padding: 40px 32px;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 10px;
}

.error-card .glitch.big {
    font-size: 4rem;
    font-weight: 800;
    color: var(--fg);
    margin-bottom: 8px;
}

.error-card h1 {
    margin: 0 0 14px;
    font-size: 1.3rem;
    text-transform: lowercase;
}

.error-card .message {
    color: var(--fg-dim);
    margin: 0 0 22px;
}

.fake-trace {
    text-align: left;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 14px 16px;
    font-size: 0.78rem;
    color: var(--glitch);
    overflow-x: auto;
    margin: 0 0 26px;
}

/* Shared-file viewer */
.file-view {
    padding-top: 8px;
}

.file-view-header h1 {
    font-size: 1.2rem;
    margin: 0 0 6px;
    word-break: break-word;
}

.file-view .file-meta {
    color: var(--fg-dim);
    font-size: 0.85rem;
}

.image-frame {
    margin: 24px 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 0 0 1px rgba(57, 255, 136, 0.08), 0 20px 60px rgba(0, 0, 0, 0.5);
}

.image-frame img {
    display: block;
    width: 100%;
    height: auto;
}

.file-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

@media (max-width: 520px) {
    .file-row {
        flex-wrap: wrap;
    }

    .file-actions {
        flex-direction: column;
    }
}
