@import url('https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600&display=swap');

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

:root {
    --bg: #0d1117;
    --surface: #161b22;
    --surface2: #1c2230;
    --border: #30363d;
    --border-hover: #484f58;
    --text: #e6edf3;
    --muted: #7d8590;
    --accent: #2f81f7;
    --accent-hover: #388bfd;
    --green: #3fb950;
    --green-hover: #56d364;
    --radius: 10px;
    --radius-sm: 6px;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Geist', 'Segoe UI', system-ui, sans-serif;
    font-size: 14px;
    min-height: 100vh;
}

a { color: inherit; text-decoration: none; }

.topbar {
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
    height: 56px;
    display: flex;
    align-items: center;
    background: var(--surface);
    position: sticky;
    top: 0;
    z-index: 10;
}

.topbar-logo {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
}

.container {
    max-width: 760px;
    margin: 0 auto;
    padding: 32px 20px 64px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.breadcrumb a { color: var(--accent); transition: color 0.15s; }
.breadcrumb a:hover { color: var(--accent-hover); }

.folder-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.folder-icon {
    width: 48px;
    height: 48px;
    background: rgba(47,129,247,0.12);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--accent);
}

.folder-title { font-size: 18px; font-weight: 600; margin-bottom: 6px; }

.folder-meta { display: flex; gap: 16px; flex-wrap: wrap; }

.meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--muted);
}

.file-table {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.file-table-head {
    display: grid;
    grid-template-columns: 1fr 80px 120px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 11px;
    color: var(--muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.file-row {
    display: grid;
    grid-template-columns: 1fr 80px 120px;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    transition: background 0.12s;
}

.file-row:last-child { border-bottom: none; }
.file-row:hover { background: var(--surface2); }

.file-name {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    min-width: 0;
}

.file-name-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.file-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 700;
}

.icon-apk    { background: rgba(63,185,80,0.12);   color: var(--green); }
.icon-zip    { background: rgba(47,129,247,0.12);   color: var(--accent); }
.icon-folder { background: rgba(210,153,34,0.12);   color: #d29922; }

.file-size { font-size: 12px; color: var(--muted); }

.file-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: flex-end;
}

.btn-download {
    background: var(--green);
    color: #0d1117;
    border: none;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: background 0.15s, transform 0.1s;
    font-family: inherit;
}

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

.btn-copy {
    background: transparent;
    color: var(--muted);
    border: 1px solid var(--border);
    width: 30px;
    height: 30px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s, border-color 0.15s;
    font-family: inherit;
    position: relative;
}

.btn-copy:hover { color: var(--text); border-color: var(--border-hover); }

.btn-copy .tip {
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--text);
    color: var(--bg);
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 4px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s;
}

.btn-copy.copied .tip  { opacity: 1; }
.btn-copy.copied { color: var(--green); border-color: var(--green); }

.folder-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    color: var(--text);
    transition: background 0.12s;
}

.folder-row:last-child { border-bottom: none; }
.folder-row:hover { background: var(--surface2); }
.folder-row-name { font-size: 13px; font-weight: 500; flex: 1; }
.folder-row-arrow { color: var(--muted); }

@media (max-width: 520px) {
    .file-table-head { display: none; }
    .file-row { grid-template-columns: 1fr auto; }
    .file-size { display: none; }
    .folder-header { padding: 16px; }
    .container { padding: 20px 12px 48px; }
}
