/* === Basic Reset & Base Styling === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', -apple-system, sans-serif;
}

body {
    background: radial-gradient(circle at top left, #0e1124, #05060d);
    color: #e2e8f0;
    min-height: 100vh;
    padding: 20px;
}

.app-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* === Premium Header & Telemetry === */
.app-header {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    font-size: 26px;
}

.app-header h1 {
    font-size: 20px;
    font-weight: 600;
}

.accent-text {
    background: linear-gradient(135deg, #00e5ff, #7c4dff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Telemetry Gauges */
.telemetry-panel {
    display: flex;
    gap: 24px;
}

.telemetry-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 6px 14px;
    border-radius: 12px;
}

.telemetry-item .lbl {
    font-size: 12px;
    color: #94a3b8;
    font-weight: 500;
}

.meter-wrapper {
    width: 80px;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    overflow: hidden;
}

.meter-bar {
    height: 100%;
    background: linear-gradient(90deg, #00e676, #00e5ff);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.meter-bar.ram {
    background: linear-gradient(90deg, #7c4dff, #b388ff);
}

.meter-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: #e2e8f0;
    font-weight: 600;
    min-width: 45px;
    text-align: right;
}

/* === Dashboard Body Split === */
.dashboard-body {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 20px;
}

@media (max-width: 900px) {
    .dashboard-body {
        grid-template-columns: 1fr;
    }
}

/* === Sidebar Controls Card === */
.controls-card {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    height: fit-content;
}

.controls-card h2 {
    font-size: 16px;
    font-weight: 550;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.control-group label {
    font-size: 13.5px;
    color: #94a3b8;
    font-weight: 500;
}

/* Select and inputs */
.custom-select, .custom-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    padding: 10px 14px;
    border-radius: 10px;
    outline: none;
    font-size: 15px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.custom-select:focus, .custom-input:focus {
    border-color: #00e5ff;
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.15);
}

.custom-input {
    font-family: 'JetBrains Mono', monospace;
}

.help-text {
    font-size: 11px;
    color: #64748b;
    line-height: 1.3;
}

/* Trigger Button */
.btn-primary {
    width: 100%;
    background: linear-gradient(135deg, #7c4dff, #00e5ff);
    color: #ffffff;
    border: none;
    padding: 12px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(124, 77, 255, 0.25);
    transition: opacity 0.2s, transform 0.1s, box-shadow 0.2s;
}

.btn-primary:hover {
    box-shadow: 0 4px 25px rgba(0, 229, 255, 0.4);
    opacity: 0.95;
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-primary:disabled {
    background: rgba(255, 255, 255, 0.05);
    color: #64748b;
    cursor: not-allowed;
    box-shadow: none;
}

.sidebar-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 16px;
}

.status-summary {
    font-size: 12px;
    color: #64748b;
    line-height: 1.4;
    text-align: center;
}

/* === Main Content & Queue Card === */
.main-content {
    display: flex;
    flex-direction: column;
}

.queue-card {
    background: rgba(255, 255, 255, 0.015);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
    min-height: 480px;
}

.queue-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding-bottom: 16px;
}

.queue-header h2 {
    font-size: 16px;
    font-weight: 550;
    color: #cbd5e1;
}

/* Status Badge */
.status-badge {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 8px;
    text-transform: uppercase;
}

.status-badge.idle {
    background: rgba(255, 255, 255, 0.05);
    color: #94a3b8;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.status-badge.running {
    background: rgba(0, 229, 255, 0.1);
    color: #00e5ff;
    border: 1px solid rgba(0, 229, 255, 0.2);
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.15);
}

.status-badge.completed {
    background: rgba(0, 230, 118, 0.1);
    color: #00e676;
    border: 1px solid rgba(0, 230, 118, 0.2);
}

.status-badge.failed {
    background: rgba(255, 23, 68, 0.1);
    color: #ff1744;
    border: 1px solid rgba(255, 23, 68, 0.2);
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: #64748b;
    padding: 100px 0;
    text-align: center;
}

.empty-state .icon {
    font-size: 48px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 14px;
    max-width: 320px;
    line-height: 1.5;
}

/* Queue Container & Year Cards */
.queue-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.year-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    transition: border-color 0.2s, background-color 0.2s;
}

.year-card.active {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(0, 229, 255, 0.3);
    box-shadow: 0 4px 15px rgba(0, 229, 255, 0.05);
}

.year-card.completed {
    border-color: rgba(0, 230, 118, 0.2);
}

/* Left part (Year and tag) */
.year-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 90px;
}

.year-num {
    font-size: 20px;
    font-weight: 700;
    color: #f8fafc;
    letter-spacing: -0.5px;
}

.year-tag {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 4px;
    width: fit-content;
}

.year-tag.pending { background: rgba(255, 255, 255, 0.05); color: #94a3b8; }
.year-tag.downloading { background: rgba(0, 229, 255, 0.15); color: #00e5ff; }
.year-tag.processing { background: rgba(124, 77, 255, 0.15); color: #b388ff; }
.year-tag.completed { background: rgba(0, 230, 118, 0.15); color: #00e676; }
.year-tag.failed { background: rgba(255, 23, 68, 0.15); color: #ff1744; }

/* Middle Part (Progress bar and details) */
.year-progress-area {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.progress-details {
    font-size: 13px;
    color: #cbd5e1;
}

.progress-bar-wrapper {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #7c4dff, #00e5ff);
    width: 0%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.year-card.completed .progress-bar {
    background: #00e676;
}

/* Right Part (Download Button) */
.btn-download {
    background: linear-gradient(135deg, #00e676, #00b0ff);
    color: #ffffff;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 12px rgba(0, 230, 118, 0.2);
    transition: transform 0.1s, box-shadow 0.2s;
}

.btn-download:hover {
    box-shadow: 0 4px 18px rgba(0, 230, 118, 0.45);
}

.btn-download:active {
    transform: scale(0.96);
}

.eta-badge {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #00e5ff;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 8px;
    letter-spacing: 0.2px;
}

