/* File Shelf - Dark Mobile-First Styles */
:root {
    --bg: #1a1a2e;
    --bg-card: #16213e;
    --bg-hover: #1f2b47;
    --text: #e0e0e0;
    --text-dim: #8890a0;
    --accent: #4fc3f7;
    --accent-hover: #29b6f6;
    --danger: #ef5350;
    --radius: 12px;
    --radius-sm: 8px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro", "Helvetica Neue", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

/* Lock Screen */
.lock-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.lock-box {
    text-align: center;
    width: 100%;
    max-width: 300px;
}

.lock-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.lock-box h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 24px;
}

.lock-box input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #333;
    border-radius: var(--radius);
    background: var(--bg);
    color: var(--text);
    font-size: 16px;
    margin-bottom: 12px;
    outline: none;
    transition: border-color 0.2s;
}

.lock-box input:focus {
    border-color: var(--accent);
}

.lock-box button {
    width: 100%;
    padding: 14px;
    background: var(--accent);
    color: #111;
    border: none;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.lock-box button:hover {
    background: var(--accent-hover);
}

.lock-hint {
    color: var(--danger);
    margin-top: 12px;
    font-size: 14px;
    min-height: 20px;
}

/* Main App */
.hidden { display: none !important; }

.top-bar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg);
    border-bottom: 1px solid #2a2a3e;
    padding: 14px 16px;
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

.logo {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.content {
    padding: 8px 12px 80px;
}

/* Sections */
.section {
    margin-bottom: 8px;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-card);
}

.section-header {
    padding: 14px 16px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
    -webkit-user-select: none;
}

.section-header::after {
    content: "▾";
    font-size: 14px;
    color: var(--text-dim);
    transition: transform 0.2s;
}

.section[open] .section-header::after {
    transform: rotate(180deg);
}

.section-header::-webkit-details-marker { display: none; }

.section-files {
    padding: 0 8px 8px;
}

/* File Items */
.file-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: var(--radius-sm);
    transition: background 0.15s;
}

.file-item:active {
    background: var(--bg-hover);
}

.file-icon {
    font-size: 28px;
    flex-shrink: 0;
    width: 36px;
    text-align: center;
}

.file-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.file-title {
    font-size: 15px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-desc {
    font-size: 13px;
    color: var(--text-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-meta {
    font-size: 12px;
    color: var(--text-dim);
}

.file-dl {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    color: #111;
    border-radius: 50%;
    font-size: 18px;
    text-decoration: none;
    transition: background 0.2s, transform 0.15s;
}

.file-dl:active {
    transform: scale(0.9);
    background: var(--accent-hover);
}

.empty {
    text-align: center;
    color: var(--text-dim);
    padding: 40px 20px;
    font-size: 15px;
}

/* Share Page */
.share-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.share-container {
    text-align: center;
    max-width: 400px;
    width: 100%;
}

.share-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.share-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.share-desc {
    color: var(--text-dim);
    font-size: 15px;
    margin-bottom: 12px;
}

.share-meta {
    color: var(--text-dim);
    font-size: 13px;
    margin-bottom: 24px;
}

.download-btn {
    display: inline-block;
    padding: 14px 48px;
    background: var(--accent);
    color: #111;
    border-radius: var(--radius);
    font-size: 17px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s, transform 0.15s;
}

.download-btn:active {
    transform: scale(0.96);
    background: var(--accent-hover);
}

/* Responsive */
@media (min-width: 600px) {
    .content {
        max-width: 560px;
        margin: 0 auto;
    }
}