/* PixelBox — image-hosting cover site
 * Single-file stylesheet, mobile-first, no framework. */

:root {
    --bg:           #0e0f13;
    --bg-elev:      #181a21;
    --bg-elev-2:    #20232c;
    --border:       #2a2e39;
    --text:         #e5e7eb;
    --text-muted:   #9ca3af;
    --text-dim:     #6b7280;
    --accent:       #6366f1;
    --accent-hover: #818cf8;
    --accent-dim:   #4f46e5;
    --success:      #10b981;
    --danger:       #ef4444;
    --radius:       10px;
    --radius-sm:    6px;
    --shadow:       0 1px 2px rgba(0,0,0,0.3), 0 4px 12px rgba(0,0,0,0.2);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main { flex: 1; }

.container {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 24px;
}

a { color: var(--accent-hover); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- Header ---- */
.site-header {
    border-bottom: 1px solid var(--border);
    background: rgba(14, 15, 19, 0.85);
    backdrop-filter: blur(8px);
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    height: 64px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-weight: 600;
    font-size: 18px;
}
.brand:hover { text-decoration: none; }

.brand-mark {
    width: 32px; height: 32px;
    background: linear-gradient(135deg, var(--accent) 0%, #ec4899 100%);
    color: white;
    display: grid;
    place-items: center;
    border-radius: 8px;
    font-weight: 700;
    font-size: 13px;
}

.primary-nav { display: flex; gap: 4px; flex: 1; margin-left: 32px; }

.nav-link {
    padding: 8px 14px;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
}
.nav-link:hover { background: var(--bg-elev); color: var(--text); text-decoration: none; }
.nav-link.active { color: var(--text); background: var(--bg-elev); }

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid var(--border);
    background: var(--bg-elev);
    color: var(--text);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
}
.btn:hover { background: var(--bg-elev-2); text-decoration: none; }

.btn-primary {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

.link-btn {
    background: none;
    border: none;
    color: var(--accent-hover);
    cursor: pointer;
    font-size: inherit;
    padding: 0;
    text-decoration: underline;
}

/* ---- Hero ---- */
.hero { padding: 64px 0 48px; }
.hero-inner { text-align: center; }

.hero-title {
    font-size: clamp(36px, 6vw, 56px);
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(180deg, #fff 0%, #9ca3af 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
}

.hero-sub {
    font-size: 18px;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 540px;
    margin-left: auto;
    margin-right: auto;
}

/* ---- Dropzone ---- */
.dropzone {
    background: var(--bg-elev);
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 48px 24px;
    text-align: center;
    transition: all 0.2s;
    cursor: pointer;
    max-width: 720px;
    margin: 0 auto 40px;
}
.dropzone.large { padding: 96px 24px; }
.dropzone:hover { border-color: var(--accent); background: var(--bg-elev-2); }
.dropzone.is-dragging { border-color: var(--accent); background: var(--bg-elev-2); transform: scale(1.01); }

.dropzone-content { color: var(--text-muted); }
.dropzone-content svg { color: var(--text-dim); margin-bottom: 16px; }
.dropzone-primary { color: var(--text); font-size: 18px; font-weight: 500; margin-bottom: 4px; }
.dropzone-secondary { font-size: 14px; margin-bottom: 8px; }
.dropzone-meta { font-size: 12px; color: var(--text-dim); }

.dropzone-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    margin-top: 24px;
}
.dropzone-preview .thumb {
    position: relative;
    aspect-ratio: 1;
    background: var(--bg);
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border);
}
.dropzone-preview .thumb img { width: 100%; height: 100%; object-fit: cover; }
.dropzone-preview .thumb .progress {
    position: absolute; left: 0; bottom: 0; right: 0;
    height: 3px; background: var(--accent);
    width: 0;
    transition: width 0.3s;
}

/* ---- Stats ---- */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    margin-top: 16px;
    flex-wrap: wrap;
}
.stat { text-align: center; }
.stat-num {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}
.stat-label { font-size: 13px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.05em; }

/* ---- Gallery ---- */
.gallery-section { padding: 48px 0; border-top: 1px solid var(--border); }

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 24px;
}
.section-head h2 { font-size: 24px; font-weight: 600; }
.muted-link { color: var(--text-muted); font-size: 14px; }

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}
.gallery-item {
    aspect-ratio: 4 / 3;
    background: var(--bg-elev);
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: transform 0.2s;
}
.gallery-item:hover { transform: translateY(-2px); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---- Features ---- */
.features { padding: 64px 0; border-top: 1px solid var(--border); }
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 32px;
}
.feature {
    background: var(--bg-elev);
    padding: 24px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}
.feature-icon { font-size: 32px; margin-bottom: 12px; }
.feature h3 { font-size: 18px; margin-bottom: 8px; }
.feature p { color: var(--text-muted); font-size: 14px; }

/* ---- API section ---- */
.api-section { padding: 64px 0; border-top: 1px solid var(--border); }
.api-section h2 { font-size: 24px; margin-bottom: 12px; }
.api-section p { color: var(--text-muted); margin-bottom: 16px; }

pre {
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 20px;
    overflow-x: auto;
    font-family: "SF Mono", "Monaco", "Consolas", monospace;
    font-size: 13px;
    line-height: 1.6;
    color: var(--text);
}

/* ---- Page hero (subpages) ---- */
.page-hero { padding: 48px 0 24px; border-bottom: 1px solid var(--border); }
.page-hero h1 { font-size: 36px; font-weight: 700; margin-bottom: 8px; }
.lede { color: var(--text-muted); font-size: 18px; }

/* ---- Prose (about page) ---- */
.prose { padding: 48px 0; }
.prose .container { max-width: 760px; }
.prose h2 { font-size: 22px; font-weight: 600; margin-top: 32px; margin-bottom: 12px; }
.prose p { color: var(--text-muted); margin-bottom: 16px; }
.prose ul { color: var(--text-muted); margin-left: 24px; margin-bottom: 16px; }
.prose ul li { margin-bottom: 6px; }

.limits-table {
    width: 100%;
    margin-top: 16px;
    border-collapse: collapse;
    font-size: 14px;
}
.limits-table th, .limits-table td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
.limits-table th { color: var(--text); font-weight: 600; background: var(--bg-elev); }
.limits-table td { color: var(--text-muted); }

/* ---- Upload page ---- */
.upload-section { padding: 32px 0 64px; }
.upload-options {
    display: flex;
    gap: 24px;
    margin: 24px 0 32px;
    justify-content: center;
    flex-wrap: wrap;
}
.checkbox { display: flex; align-items: center; gap: 8px; color: var(--text-muted); font-size: 14px; cursor: pointer; }
.checkbox input { accent-color: var(--accent); }

.upload-history { padding: 24px; background: var(--bg-elev); border-radius: var(--radius); border: 1px solid var(--border); }
.upload-history h2 { font-size: 16px; margin-bottom: 8px; }
.muted { color: var(--text-muted); font-size: 14px; }

/* ---- Footer ---- */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 32px 0;
    margin-top: 64px;
    background: var(--bg-elev);
}
.footer-inner {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
}
.footer-brand { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.footer-nav { display: flex; gap: 24px; }
.footer-nav a { color: var(--text-muted); font-size: 14px; }
.footer-copy { color: var(--text-dim); font-size: 13px; }

@media (min-width: 720px) {
    .footer-inner { flex-direction: row; justify-content: space-between; }
}

@media (max-width: 640px) {
    .primary-nav { display: none; }
    .hero { padding: 32px 0 24px; }
    .features { padding: 32px 0; }
}
