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

:root {
    --primary: #e30613;          /* iCarsoft Red */
    --primary-dark: #b8050f;
    --primary-light: #ff2d3a;
    --bg: #f4f5f7;
    --card: #ffffff;
    --text: #1a1a1a;
    --text-secondary: #6a6a6a;
    --border: #e5e7eb;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.08);
    --radius: 10px;
}

html, body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                 "Helvetica Neue", Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

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

.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ===== Header ===== */
.site-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    padding: 22px 0;
    box-shadow: 0 2px 8px rgba(227, 6, 19, 0.25);
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.logo-text {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: #fff;
}

/* ===== Page Title ===== */
.page-title { padding: 28px 0 16px; }

.page-title h1 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
}

.page-title .subtitle {
    margin-top: 6px;
    color: var(--text-secondary);
    font-size: 14px;
}

/* ===== Breadcrumb ===== */
.breadcrumb {
    padding: 18px 0 4px;
    font-size: 13px;
    color: var(--text-secondary);
}

.breadcrumb a { color: var(--primary); }

.breadcrumb .sep {
    margin: 0 6px;
    color: #c1c1c1;
}

/* ===== Category list ===== */
.category-list {
    list-style: none;
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.category-list li { border-bottom: 1px solid var(--border); }
.category-list li:last-child { border-bottom: none; }

.category-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    transition: background 0.15s;
}

.category-list a:hover,
.category-list a:active { background: #fff5f5; }

.cat-name {
    font-size: 16px;
    font-weight: 500;
    color: var(--text);
}

.cat-arrow {
    color: #bbb;
    font-size: 22px;
    font-weight: 300;
}

/* ===== Title list ===== */
.title-list {
    list-style: none;
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.title-list li {
    border-bottom: 1px solid var(--border);
    position: relative;
}
.title-list li:last-child { border-bottom: none; }

.title-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
    transition: background 0.15s;
}

.title-item.has-file:hover { background: #fff5f5; }

.title-item.no-file {
    opacity: 0.6;
    cursor: not-allowed;
}

.title-main {
    flex: 1;
    min-width: 0;
}

.title-name {
    display: block;
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
    word-break: break-word;
}

.title-desc {
    display: block;
    margin-top: 4px;
    font-size: 13px;
    color: var(--text-secondary);
    word-break: break-word;
}

.title-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.title-meta .size {
    font-size: 12px;
    color: var(--text-secondary);
    background: #f0f1f3;
    padding: 3px 8px;
    border-radius: 12px;
}

.download-icon {
    color: var(--primary);
    font-size: 18px;
    font-weight: bold;
}

/* Extra download button (for inline-viewable files) */
.extra-dl {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(0,0,0,0.04);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.15s;
    text-decoration: none;
}

.extra-dl:hover {
    background: var(--primary);
    color: #fff;
}

/* ===== Empty ===== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
    background: var(--card);
    border-radius: var(--radius);
}

/* ===== Footer ===== */
.site-footer {
    margin-top: 60px;
    padding: 24px 0;
    text-align: center;
    color: var(--text-secondary);
    font-size: 12px;
}

/* ===== Responsive ===== */
@media (max-width: 480px) {
    .container { padding: 0 12px; }
    .logo-text { font-size: 22px; }
    .page-title h1 { font-size: 19px; }
    .category-list a, .title-item { padding: 14px 16px; }
}
