/* PyList Default Theme */
:root {
    --bg: #ffffff;
    --fg: #1a1a1a;
    --border: #e5e7eb;
    --hover: #f3f4f6;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --muted: #6b7280;
    --radius: 8px;
    --navbar-height: 56px;
}

/* Navbar */
.site-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--navbar-height);
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    z-index: 900;
}

.navbar-inner {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--fg);
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}

.navbar-logo {
    height: 28px;
    width: auto;
    object-fit: contain;
}

.navbar-title {
    white-space: nowrap;
}

.navbar-links {
    display: flex;
    align-items: center;
    gap: 4px;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.navbar-user {
    display: flex;
    align-items: center;
    margin-left: 8px;
    padding-left: 12px;
    border-left: 1px solid var(--border);
}

.navbar-user-link {
    font-weight: 500;
    white-space: nowrap;
}

.navbar-user-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.navbar-user-avatar:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.navbar-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.navbar-link {
    text-decoration: none;
    color: var(--fg);
    font-size: 14px;
    padding: 6px 14px;
    border-radius: var(--radius);
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}

.navbar-link:hover {
    background: var(--hover);
    color: var(--accent);
}

.navbar-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}

.navbar-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--fg);
    border-radius: 1px;
}

.navbar-spacer {
    height: var(--navbar-height);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--fg);
    background: var(--bg);
    line-height: 1.6;
    font-size: 14px;
}

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 20px 24px;
}

/* Breadcrumb */
.breadcrumb {
    padding: 12px 0;
    font-size: 14px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

.crumb {
    text-decoration: none;
    color: var(--accent);
    padding: 2px 4px;
    border-radius: 4px;
}

.crumb:hover {
    background: var(--hover);
}

.crumb.active {
    color: var(--fg);
    font-weight: 600;
}

.separator {
    color: var(--muted);
    margin: 0 2px;
}

/* Toolbar */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 0;
}

.item-count {
    color: var(--muted);
    font-size: 13px;
}

/* File list */
.file-list {
    width: 100%;
    border-collapse: collapse;
}

.file-list th {
    text-align: left;
    padding: 10px 12px;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    border-bottom: 1px solid var(--border);
    user-select: none;
}

.file-list td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border);
}

.file-list tr:hover {
    background: var(--hover);
}

.file-list tr.parent:hover {
    background: var(--hover);
}

.col-name {
    min-width: 300px;
}

.col-size {
    width: 100px;
    text-align: right;
    color: var(--muted);
    font-size: 13px;
    white-space: nowrap;
}

.col-modified {
    width: 160px;
    text-align: right;
    color: var(--muted);
    font-size: 13px;
    white-space: nowrap;
}

.icon {
    margin-right: 8px;
    font-size: 16px;
    display: inline-block;
    width: 20px;
    text-align: center;
}

.file-list a {
    text-decoration: none;
    color: var(--fg);
}

.file-list .dir a {
    color: var(--accent);
    font-weight: 500;
}

.file-list a:hover {
    text-decoration: underline;
}

.empty {
    text-align: center;
    color: var(--muted);
    padding: 40px 0 !important;
    font-size: 15px;
}

/* Auth pages */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.auth-box {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px;
    max-width: 400px;
    width: 100%;
    text-align: center;
}

.auth-box h2 {
    margin-bottom: 12px;
    font-size: 1.4em;
}

.auth-box p {
    color: var(--muted);
    margin-bottom: 20px;
    font-size: 14px;
}

.auth-box code {
    background: var(--hover);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.form-group input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.btn {
    display: inline-block;
    padding: 10px 24px;
    background: var(--hover);
    color: var(--fg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
}

.btn:hover {
    background: var(--border);
}

.btn-primary {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.btn-primary:hover {
    background: var(--accent-hover);
}

.error-msg {
    background: #fef2f2;
    color: #dc2626;
    padding: 10px 14px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-size: 13px;
    border: 1px solid #fecaca;
}

.success-msg {
    background: #f0fdf4;
    color: #16a34a;
    padding: 10px 14px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-size: 13px;
    border: 1px solid #bbf7d0;
}

/* Footer */
.site-footer {
    text-align: center;
    padding: 24px 0;
    margin-top: 40px;
    color: var(--muted);
    font-size: 13px;
    border-top: 1px solid var(--border);
}

/* Responsive */
@media (max-width: 640px) {
    .container {
        padding: 12px 16px;
    }

    .col-modified {
        display: none;
    }

    .col-size {
        width: 80px;
    }

    .col-name {
        min-width: auto;
    }

    .auth-box {
        padding: 24px;
    }

    .navbar-toggle {
        display: flex;
    }

    .navbar-links {
        display: none;
        position: absolute;
        top: var(--navbar-height);
        left: 0;
        right: 0;
        background: var(--bg);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        padding: 8px 0;
        box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    }

    .navbar-links.open {
        display: flex;
    }

    .navbar-link {
        padding: 10px 24px;
        border-radius: 0;
    }

    .navbar-user {
        margin-left: 4px;
        padding-left: 8px;
    }
}
