/* static/css/style.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    /* background: #f5f7fa; */
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

button{
    padding: 4px 12px;
    border-radius: 6px;
    background: #f0f3f6;
    color: #34495e;
    text-decoration: none;
    border: 1px solid #e1e4e8;
    cursor: pointer;
}

header {
    /* text-align: center; */
    margin-bottom: 30px;
}

.nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    align-items: center;
    margin-top: 10px;
}
.nav a, .nav button.linklike {
    padding: 8px 12px;
    border-radius: 6px;
    background: #f0f3f6;
    color: #34495e;
    text-decoration: none;
    border: 1px solid #e1e4e8;
    cursor: pointer;
}
.nav a:hover, .nav button.linklike:hover { background: #e6ebf1; }

header h1 {
    font-size: 2.2em;
    color: #2c3e50;
}

header p {
    color: #7f8c8d;
    margin: 10px 0 20px;
}

#refreshBtn {
    padding: 4px 18px;
    font-size: 1em;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s;
}

#refreshBtn:hover {
    background: #2980b9;
}

.task-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    /* border-left: 5px solid #bdc3c7; */
    animation: fadeIn 0.3s ease;
}

.task-card.pending   { border-left-color: #f39c12; }
.task-card.downloading { border-left-color: #3498db; }
.task-card.success   { border-left-color: #2ecc71; }
.task-card.failed    { border-left-color: #e74c3c; }

.task-card h3 {
    margin-bottom: 8px;
    color: #2c3e50;
}

.task-card .meta {
    font-size: 0.9em;
    color: #7f8c8d;
    margin: 4px 0;
}

.task-card .status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: bold;
}

.status.pending     { background: #f39c12; color: white; }
.status.downloading { background: #3498db; color: white; }
.status.success     { background: #2ecc71; color: white; }
.status.failed      { background: #e74c3c; color: white; }

.loading {
    text-align: center;
    color: #7f8c8d;
    font-size: 1.1em;
    padding: 40px;
}

.task-card .ops{ margin-top:8px; }
.progress{ height:6px; background:#f1f1f1; border-radius:4px; overflow:hidden; margin:6px 0; }
.progress .bar{ height:6px; background:#1890ff; }

.pager{ display:flex; align-items:center; gap:8px; justify-content:center; margin:12px 0; }
.pager button[disabled]{ opacity:.5; cursor:not-allowed; }

table.file-table{ width:100%; border-collapse:collapse; background:#fff; border-radius:8px; overflow:hidden; }
table.file-table th, table.file-table td{ padding:10px 12px; border-bottom:1px solid #f0f0f0; text-align:left; }
table.file-table th{ background:#fafafa; color:#555; font-weight:600; }
table.file-table tr:hover{ background:#f9fbff; }

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    header h1 {
        font-size: 1.8em;
    }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}