:root {
    /* Modern Dark Theme - Slate Palette */
    --bg-body: #0f172a;
    --bg-card: #1e293b;
    --bg-input: #020617;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --border-color: #334155;
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --success-color: #10b981;
    --error-color: #ef4444;
    --neutral-color: #64748b;
    --glass-border: rgba(255, 255, 255, 0.05);
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-primary);
    margin: 0;
    padding: 40px 20px 100px 20px;
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}

header {
    margin-bottom: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Navigation */
.nav-links {
    display: flex;
    gap: 20px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
    padding: 4px 0;
    position: relative;
    font-size: 0.95rem;
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-links a.active {
    color: var(--primary-color);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -13px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
}

h1 {
    font-weight: 700;
    font-size: 1.875rem;
    margin: 0;
    letter-spacing: -0.025em;
    background: linear-gradient(to right, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* Card Styles */
.card,
.config-card {
    background-color: var(--bg-card);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.card:hover,
.config-card:hover {
    border-color: #475569;
    box-shadow: var(--shadow-md);
}

/* Button Styles */
button.primary-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s;
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
}

button.primary-btn:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 8px -1px rgba(59, 130, 246, 0.4);
}

button.primary-btn:active {
    transform: translateY(0);
}

button.primary-btn:disabled {
    opacity: 0.7;
    cursor: wait;
    transform: none;
}

/* Floating Action Bar */
.actions-bar {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 860px;
    background: rgba(30, 41, 59, 0.85);
    backdrop-filter: blur(12px);
    padding: 12px 24px;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    display: flex;
    justify-content: flex-end;
    /* Default align */
    align-items: center;
    box-shadow: var(--shadow-lg);
    z-index: 100;
}

/* Loader */
#loader {
    position: fixed;
    inset: 0;
    background: var(--bg-body);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 200;
    transition: opacity 0.5s;
}

#loader.hidden {
    opacity: 0;
    pointer-events: none;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
    margin-bottom: 16px;
}

.loader-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-body);
}

::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 5px;
    border: 2px solid var(--bg-body);
}

::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

/* Status Messages */
.status-msg {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 6px;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
}

.status-msg.visible {
    opacity: 1;
    transform: translateX(0);
}

.success-msg {
    color: var(--success-color);
    background: rgba(16, 185, 129, 0.1);
}

.error-msg {
    color: var(--error-color);
    background: rgba(239, 68, 68, 0.1);
}