/* Reset and Fonts */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', 'Noto Sans KR', sans-serif;
    background-color: #0b0f19;
    color: #e2e8f0;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Background Gradients */
.glass-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: 
        radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(139, 92, 246, 0.15) 0%, transparent 45%),
        radial-gradient(circle at 50% 50%, rgba(16, 185, 129, 0.08) 0%, transparent 50%);
    background-size: cover;
}

/* Layout Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

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

header .logo {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #a5b4fc 0%, #c084fc 50%, #818cf8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
}

.subtitle {
    margin-top: 8px;
    font-size: 1.05rem;
    color: #94a3b8;
    font-weight: 300;
}

/* Status Badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
}

.status-badge .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-badge .dot.green {
    background-color: #10b981;
    box-shadow: 0 0 8px #10b981;
}

/* Dashboard Grid Layout */
.grid-layout {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 30px;
}

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

/* Glassmorphism Card Style */
.glass-card {
    background: rgba(17, 24, 39, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    padding: 24px;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.glass-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

/* Controls Panel */
.controls-panel {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}

.card-header.border-bottom {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 16px;
    margin-bottom: 20px;
    justify-content: space-between;
}

.icon-circle {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background-size: 20px 20px;
    background-position: center;
    background-repeat: no-repeat;
}

.courses-icon {
    background-color: rgba(99, 102, 241, 0.2);
    border: 1px solid rgba(99, 102, 241, 0.4);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23818cf8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.747 0 3.332.477 4.5 1.253v13C19.832 18.477 18.247 18 16.5 18c-1.746 0-3.332.477-4.5 1.253'/%3E%3C/svg%3E");
}

.jobs-icon {
    background-color: rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.4);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2334d399'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M21 13.255A23.931 23.931 0 0112 15c-3.183 0-6.22-.62-9-1.745M16 6V4a2 2 0 00-2-2h-4a2 2 0 00-2 2v2m4 6h.01M5 20h14a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z'/%3E%3C/svg%3E");
}

.card h2 {
    font-size: 1.25rem;
    font-weight: 600;
}

.card-desc {
    font-size: 0.9rem;
    color: #94a3b8;
    margin-bottom: 20px;
    line-height: 1.4;
}

/* Form Groups & Inputs */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    margin-bottom: 8px;
    color: #cbd5e1;
}

.range-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.input-number {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    padding: 8px 12px;
    border-radius: 8px;
    width: 80px;
    outline: none;
    font-size: 0.95rem;
    transition: border-color 0.2s;
}

.input-number:focus {
    border-color: #818cf8;
}

.range-desc {
    font-size: 0.8rem;
    color: #64748b;
}

/* Job Filter Specifications */
.filter-spec {
    background: rgba(0, 0, 0, 0.25);
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 20px;
    font-size: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.spec-item strong {
    color: #34d399;
}

/* Buttons */
.btn {
    width: 100%;
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-secondary:hover {
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.5);
}

/* Spinner */
.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.spinner.hide {
    display: none;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Terminal / Log Panel */
.terminal-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 0 !important;
    overflow: hidden;
}

.terminal-header {
    background: rgba(0, 0, 0, 0.4);
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.terminal-dots {
    display: flex;
    gap: 6px;
}

.terminal-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.terminal-dots .dotred { background-color: #ef4444; }
.terminal-dots .dotyellow { background-color: #f59e0b; }
.terminal-dots .dotgreen { background-color: #10b981; }

.terminal-title {
    font-size: 0.85rem;
    color: #94a3b8;
    font-weight: 400;
}

.system-status {
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.system-status.idle {
    background-color: rgba(148, 163, 184, 0.1);
    color: #94a3b8;
}

.system-status.running {
    background-color: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    animation: blink 1.5s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.terminal-console {
    flex-grow: 1;
    background-color: rgba(5, 5, 10, 0.85);
    padding: 20px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.85rem;
    line-height: 1.6;
    color: #38bdf8;
    overflow-y: auto;
    height: 380px;
}

/* Log lines coloring */
.log-line {
    margin-bottom: 6px;
    word-break: break-all;
    white-space: pre-wrap;
}

.log-line.system {
    color: #94a3b8;
}

.log-line.error {
    color: #f87171;
}

.log-line.success {
    color: #4ade80;
}

/* Downloads Section */
.mt24 {
    margin-top: 24px;
}

.btn-refresh {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #cbd5e1;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.btn-refresh:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.3);
}

.table-container {
    overflow-x: auto;
    margin-top: 10px;
}

.downloads-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9rem;
}

.downloads-table th, .downloads-table td {
    padding: 14px 16px;
}

.downloads-table th {
    font-weight: 600;
    color: #94a3b8;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.downloads-table td {
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.downloads-table tr:last-child td {
    border-bottom: none;
}

.downloads-table .empty-row {
    text-align: center;
    color: #64748b;
    padding: 30px;
}

.btn-download {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(129, 140, 248, 0.15);
    border: 1px solid rgba(129, 140, 248, 0.3);
    color: #c7d2fe;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-download:hover {
    background: rgba(129, 140, 248, 0.3);
    border-color: rgba(129, 140, 248, 0.5);
    box-shadow: 0 0 10px rgba(129, 140, 248, 0.2);
}

/* Scrollbar Customization */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Footer */
footer {
    text-align: center;
    margin-top: 20px;
    font-size: 0.8rem;
    color: #475569;
}
