﻿:root {
    color-scheme: dark;
    --bg-primary: #0f1117;
    --bg-secondary: rgba(28, 33, 46, 0.85);
    --bg-panel: rgba(24, 29, 42, 0.9);
    --bg-card: rgba(34, 40, 57, 0.95);
    --accent: #f1b24a;
    --accent-strong: #ffcc68;
    --accent-soft: rgba(241, 178, 74, 0.25);
    --text-main: #f6f7fb;
    --text-muted: #8f95a3;
    --shadow-soft: 0 12px 32px rgba(0, 0, 0, 0.35);
    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-sm: 10px;
    --transition: 180ms ease;
    --success: #4ade80;
    --error: #ff6b6b;
    --empty: rgba(143, 149, 163, 0.35);
    font-family: 'Cinzel', 'Trajan Pro', 'Times New Roman', serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient(circle at top, rgba(70, 50, 90, 0.35), transparent 45%),
        radial-gradient(circle at 20% 20%, rgba(241, 178, 74, 0.2), transparent 40%),
        var(--bg-primary);
    color: var(--text-main);
    font-family: 'Poppins', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    position: relative;
}

.background-orb {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 80% 10%, rgba(255, 204, 104, 0.35), transparent 60%),
        radial-gradient(circle at 10% 90%, rgba(109, 82, 167, 0.45), transparent 55%);
    filter: blur(80px);
    opacity: 0.6;
    z-index: -2;
}

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 32px 8vw 16px;
    position: sticky;
    top: 0;
    z-index: 10;
    background: linear-gradient(0deg, rgba(15, 17, 23, 0.8), rgba(15, 17, 23, 0.95));
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(241, 178, 74, 0.15);
}

.logo-block {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo-mark {
    width: 60px;
    height: 60px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(241, 178, 74, 0.9), rgba(255, 204, 104, 0.85));
    display: grid;
    place-items: center;
    font-size: 24px;
    font-weight: 700;
    color: #1c1f2e;
    box-shadow: 0 16px 24px rgba(241, 178, 74, 0.35);
}

.app-title {
    margin: 0;
    font-size: 32px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.app-subtitle {
    margin: 6px 0 0 0;
    color: var(--text-muted);
    font-size: 14px;
}
.refresh-button,
.clear-button {
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(241, 178, 74, 0.4);
    background: rgba(241, 178, 74, 0.12);
    color: var(--accent-strong);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition);
}

.refresh-button:hover,
.clear-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(241, 178, 74, 0.28);
}

.refresh-button:active,
.clear-button:active {
    transform: scale(0.96);
    box-shadow: 0 4px 16px rgba(241, 178, 74, 0.3);
}

.clear-button:disabled,
.refresh-button:disabled {
    opacity: 0.45;
    pointer-events: none;
    box-shadow: none;
    transform: none;
    background: rgba(241, 178, 74, 0.08);
}

.icon {
    font-size: 18px;
}

.layout {
    padding: 24px 8vw 80px;
    display: grid;
    gap: 32px;
}

.status-panel {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.status-card {
    background: var(--bg-panel);
    border-radius: var(--radius-md);
    padding: 18px 22px;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(241, 178, 74, 0.1);
}

.status-card h2 {
    margin: 0;
    font-size: 14px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.status-card p {
    margin: 12px 0 0 0;
    font-size: 20px;
    font-weight: 600;
}

.controls {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    justify-content: space-between;
}

.search-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 260px;
}

.search-label {
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
}

#search-input {
    border: 1px solid rgba(241, 178, 74, 0.25);
    background: rgba(12, 14, 20, 0.9);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    color: var(--text-main);
    font-size: 15px;
}

#search-input:focus {
    outline: 2px solid rgba(241, 178, 74, 0.45);
    outline-offset: 2px;
}
.info-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    background: rgba(241, 178, 74, 0.12);
    border: 1px solid rgba(241, 178, 74, 0.2);
    border-radius: 999px;
    color: var(--accent-strong);
    font-weight: 600;
    transition: transform var(--transition), box-shadow var(--transition), background var(--transition), border-color var(--transition), color var(--transition);
}

.info-chip .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent-strong);
    box-shadow: 0 0 12px rgba(255, 204, 104, 0.8);
    transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}

.info-chip.is-loading {
    background: rgba(241, 178, 74, 0.18);
    border-color: rgba(241, 178, 74, 0.35);
    box-shadow: 0 0 18px rgba(241, 178, 74, 0.25);
    animation: chipPulse 1.8s ease-in-out infinite;
}

.info-chip.is-loading .dot {
    animation: chipPing 1.8s ease-in-out infinite;
}

.info-chip.is-success {
    background: rgba(74, 222, 128, 0.12);
    border-color: rgba(74, 222, 128, 0.35);
    color: #d8ffe6;
}

.info-chip.is-success .dot {
    background: var(--success);
    box-shadow: 0 0 12px rgba(74, 222, 128, 0.65);
}

.info-chip.is-empty {
    background: rgba(143, 149, 163, 0.12);
    border-color: rgba(143, 149, 163, 0.25);
    color: var(--text-muted);
}

.info-chip.is-empty .dot {
    background: var(--empty);
    box-shadow: none;
}

.info-chip.is-error {
    background: rgba(255, 107, 107, 0.12);
    border-color: rgba(255, 107, 107, 0.35);
    color: #ffd7d7;
}

.info-chip.is-error .dot {
    background: var(--error);
    box-shadow: 0 0 12px rgba(255, 107, 107, 0.65);
}


.file-list {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.file-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    border: 1px solid rgba(241, 178, 74, 0.1);
    box-shadow: var(--shadow-soft);
    transition: transform var(--transition), border-color var(--transition);
}

.file-card:hover {
    transform: translateY(-4px);
    border-color: rgba(241, 178, 74, 0.35);
}

.file-info {
    display: flex;
    gap: 18px;
}

.file-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    background: rgba(241, 178, 74, 0.14);
    display: grid;
    place-items: center;
    font-size: 28px;
}

.file-name {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.file-meta {
    margin: 8px 0 0 0;
    color: var(--text-muted);
    font-size: 13px;
}

.file-actions {
    display: flex;
    gap: 12px;
}

.file-actions button {
    flex: 1;
    border-radius: var(--radius-sm);
    padding: 12px 0;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition), background var(--transition), filter var(--transition);
}

.file-actions .primary {
    background: linear-gradient(135deg, rgba(241, 178, 74, 0.9), rgba(255, 204, 104, 0.85));
    color: #1c1f2e;
    border: none;
}

.file-actions .primary:hover {
    filter: brightness(1.05);
}

.file-actions .secondary {
    background: transparent;
    border: 1px solid rgba(241, 178, 74, 0.35);
    color: var(--accent-strong);
}

.file-actions button:active,
.action-row button:active {
    transform: translateY(1px) scale(0.98);
}

.file-actions .primary:active {
    filter: brightness(0.92);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.25);
}

.file-actions .secondary:active,
.action-row button:active {
    background: rgba(241, 178, 74, 0.18);
    box-shadow: inset 0 0 0 1px rgba(241, 178, 74, 0.25);
}

.placeholder,
.queue-placeholder {
    background: rgba(15, 17, 23, 0.85);
    border-radius: var(--radius-lg);
    border: 1px dashed rgba(241, 178, 74, 0.25);
    padding: 40px;
    text-align: center;
    color: var(--text-muted);
    font-size: 15px;
}

.spinner {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 4px solid rgba(241, 178, 74, 0.25);
    border-top-color: var(--accent-strong);
    margin: 0 auto 16px;
    animation: spin 1.2s linear infinite;
}



.download-queue {
    background: var(--bg-panel);
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 1px solid rgba(241, 178, 74, 0.15);
    box-shadow: var(--shadow-soft);
    display: grid;
    gap: 18px;
}

#download-items {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.queue-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.queue-header h2 {
    margin: 0;
}

.download-item {
    display: grid;
    gap: 12px;
    background: rgba(13, 15, 22, 0.9);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    border: 1px solid rgba(241, 178, 74, 0.12);
}

.download-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: rgba(241, 178, 74, 0.15);
    overflow: hidden;
}

.progress-bar span {
    display: block;
    height: 100%;
    background: linear-gradient(135deg, rgba(241, 178, 74, 0.85), rgba(255, 204, 104, 0.95));
    width: 0%;
    transition: width 160ms linear;
}

.download-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
}

.action-row {
    display: flex;
    gap: 12px;
}

.action-row button {
    flex: 1;
    padding: 10px 0;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(241, 178, 74, 0.35);
    background: transparent;
    color: var(--accent-strong);
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}

.action-row button:hover {
    background: rgba(241, 178, 74, 0.12);
}

.status-tag {
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: 1px solid rgba(241, 178, 74, 0.25);
    color: var(--accent-strong);
}

.app-footer {
    text-align: center;
    padding: 40px 8vw 60px;
    color: var(--text-muted);
    font-size: 13px;
}

@keyframes chipPulse {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(2px);
    }
}

@keyframes chipPing {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.25);
        opacity: 0.6;
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 720px) {
    .app-header {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }

    .logo-block {
        justify-content: center;
    }

    .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}


.placeholder.loading-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.refresh-button.is-loading {
    opacity: 0.6;
    pointer-events: none;
}

.refresh-button.is-loading .icon {
    animation: spin 1s linear infinite;
}

























