/* ── Design Tokens ──────────────────────────────────────── */
:root {
    --bg:        #F7F5FF;
    --surface:   #FFFFFF;
    --text:      #1A1A1A;
    --muted:     #7B7495;
    --border:    #1A1A1A;
    --accent:    #7C5CBF;
    --accent2:   #A98FD4;
    --highlight: #EDE8FF;
    --danger:    #CC3333;
    --success:   #3A8A5C;
    --shadow:    4px 4px 0 #1A1A1A;
    --shadow-sm: 2px 2px 0 #1A1A1A;
    --bw:        2px;
}

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

/* ── Base ───────────────────────────────────────────────── */
body {
    font-family: 'DM Mono', 'Courier New', monospace;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    font-size: 14px;
}

h1, h2, h3, h4 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
}

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

.hidden { display: none !important; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border: var(--bw) solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.1s;
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    line-height: 1;
}
.btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow);
    text-decoration: none;
}
.btn:active { transform: translate(0, 0); box-shadow: none; }

.btn-primary {
    background: var(--accent);
    color: #fff;
}
.btn-primary:hover { background: #6A4FA6; }

.btn-success {
    background: var(--accent2);
    color: #fff;
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.btn-ghost {
    background: transparent;
    box-shadow: none;
    border-color: transparent;
}
.btn-ghost:hover { background: var(--bg); box-shadow: none; transform: none; }

.btn-full { width: 100%; }
.btn-sm { padding: 6px 12px; font-size: 12px; box-shadow: none; }
.btn-sm:hover { box-shadow: var(--shadow-sm); }

/* ── Form Elements ───────────────────────────────────────── */
.form-group { margin-bottom: 18px; }

.form-group label {
    display: block;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 6px;
    color: var(--muted);
}

.form-group input,
.form-group select,
.form-input {
    width: 100%;
    padding: 10px 12px;
    border: var(--bw) solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-family: 'DM Mono', monospace;
    font-size: 14px;
    outline: none;
    transition: box-shadow 0.15s;
    appearance: none;
}
.form-group input:focus,
.form-group select:focus,
.form-input:focus { box-shadow: var(--shadow-sm); }

/* ── Auth Page ───────────────────────────────────────────── */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1rem;
    background: var(--bg);
}

.auth-container { width: 100%; max-width: 420px; }

.auth-logo {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.auth-tagline {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 28px;
    letter-spacing: 0.04em;
}

.auth-card {
    background: var(--surface);
    border: var(--bw) solid var(--border);
    box-shadow: var(--shadow);
    padding: 36px 32px 32px;
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    display: block;
    height: 4px;
    background: var(--accent);
    position: absolute;
    top: 0; left: 0; right: 0;
}

.auth-card h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 20px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: var(--bw) solid var(--bg);
}

.error-msg {
    margin-top: 12px;
    padding: 10px 12px;
    background: #fff0f0;
    border: var(--bw) solid var(--danger);
    color: var(--danger);
    font-size: 13px;
}

/* ── Share Page ──────────────────────────────────────────── */
.share-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1rem;
    background: var(--bg);
}

.share-wrap {
    width: 100%;
    max-width: 520px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.share-brand {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
}

.share-card {
    background: var(--surface);
    border: var(--bw) solid var(--border);
    box-shadow: var(--shadow);
    padding: 36px 32px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.share-card::before {
    content: '';
    display: block;
    height: 4px;
    background: var(--accent);
    position: absolute;
    top: 0; left: 0; right: 0;
}

.share-icon {
    font-size: 48px;
    margin-bottom: 16px;
    line-height: 1;
}

.share-filename {
    font-size: 18px;
    word-break: break-word;
    margin-bottom: 6px;
}

.share-meta {
    font-size: 12px;
    color: var(--muted);
    font-family: 'DM Mono', monospace;
    margin-bottom: 8px;
}

.share-spinner {
    color: var(--muted);
    font-family: 'DM Mono', monospace;
    font-size: 13px;
    padding: 20px 0;
}

.share-preview-img {
    max-width: 100%;
    max-height: 320px;
    object-fit: contain;
    display: block;
    margin: 20px auto 0;
    border: var(--bw) solid var(--border);
}
.share-preview-video {
    max-width: 100%;
    max-height: 280px;
    display: block;
    margin: 20px auto 0;
}
.share-preview-audio {
    width: 100%;
    margin-top: 20px;
}

.share-file-list {
    margin-top: 20px;
    border-top: var(--bw) solid var(--border);
    text-align: left;
}

.share-list-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--bg);
    font-size: 13px;
}
.share-list-icon { font-size: 18px; flex-shrink: 0; }
.share-list-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: 'Space Grotesk', sans-serif; font-weight: 500; }
.share-list-type { font-size: 10px; font-weight: 600; letter-spacing: 0.06em; color: var(--muted); background: var(--bg); border: 1px solid var(--border); padding: 2px 5px; flex-shrink: 0; }
.share-list-size { font-size: 11px; color: var(--muted); flex-shrink: 0; }
.share-list-row[style*="pointer"] .share-list-name { text-decoration: underline; }

.share-list-dl {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--accent);
    opacity: 0.7;
}
.share-list-row:hover .share-list-dl { opacity: 1; }

.share-list-thumb-wrap {
    width: 60px;
    height: 44px;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
}
.share-list-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.share-list-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
.share-breadcrumb { font-size: 12px; color: var(--muted); margin-bottom: 12px; font-family: 'DM Mono', monospace; min-height: 18px; }
.share-crumb { cursor: pointer; }
.share-crumb:hover { color: var(--accent); }
.share-crumb-sep { color: var(--border); }

/* ── Auth Mobile ─────────────────────────────────────────── */
@media (max-width: 480px) {
    .auth-card {
        padding: 28px 20px 24px;
        box-shadow: 3px 3px 0 #1A1A1A;
    }
    .auth-logo { font-size: 22px; }
}
