:root {
    --bg-base: #0a0a0c;
    --bg-surface: rgba(255, 255, 255, 0.03);
    --bg-surface-hover: rgba(255, 255, 255, 0.08);
    --primary: #9d4edd;
    --primary-glow: rgba(157, 78, 221, 0.5);
    --secondary: #1db954; /* Spotify green hint */
    --accent: #ff0000; /* YT red hint */
    --text-main: #ffffff;
    --text-muted: #a1a1aa;
    --border: rgba(255, 255, 255, 0.1);
    --glass-blur: 12px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-base);
    color: var(--text-main);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
    /* Soft ambient background gradient */
    background: radial-gradient(circle at top left, rgba(29, 185, 84, 0.1), transparent 40%),
                radial-gradient(circle at bottom right, rgba(255, 0, 0, 0.1), transparent 40%),
                var(--bg-base);
}

.app-container {
    display: flex;
    width: 100%;
    max-width: 1400px;
    height: 90vh;
    border-radius: 24px;
    background: rgba(15, 15, 18, 0.6);
    backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--border);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: rgba(0, 0, 0, 0.2);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 32px 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 48px;
}

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

.brand h1 {
    font-size: 24px;
    font-weight: 800;
    background: linear-gradient(90deg, var(--secondary), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex-grow: 1;
}

.nav-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 16px;
    font-weight: 600;
    text-align: left;
    padding: 14px 20px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-btn:hover {
    background: var(--bg-surface-hover);
    color: var(--text-main);
    transform: translateX(4px);
}

.nav-btn.active {
    background: var(--bg-surface);
    color: var(--text-main);
    border-left: 4px solid var(--primary);
}

.sidebar-footer {
    color: var(--text-muted);
    font-size: 12px;
    text-align: center;
}

/* Main Content Area */
.content-area {
    flex-grow: 1;
    padding: 48px;
    overflow-y: auto;
    position: relative;
}

.view {
    display: none;
    animation: fadeIn 0.4s ease-out forwards;
}

.view.active {
    display: block;
}

.section-header {
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 8px;
}

.section-header p {
    color: var(--text-muted);
    font-size: 16px;
}

/* Components */
.glass {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    backdrop-filter: blur(var(--glass-blur));
    border-radius: 16px;
}

.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.card {
    padding: 32px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px -10px var(--primary-glow);
}

.card h3 {
    color: var(--text-muted);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.stat-number {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 8px;
}

.stat-status.online {
    color: var(--secondary);
    font-weight: 600;
}

/* Forms */
.form-container {
    padding: 32px;
    max-width: 600px;
    margin-bottom: 32px;
}

.form-group {
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
}

input[type="text"] {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 14px 16px;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    outline: none;
}

input[type="text"]:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-glow);
}

.checkbox-group {
    flex-direction: row;
    align-items: center;
    gap: 12px;
}

.primary-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 16px;
}

.primary-btn:hover {
    background: #b05bf0;
    box-shadow: 0 0 20px var(--primary-glow);
    transform: translateY(-2px);
}

/* Logs */
.progress-box {
    padding: 24px;
    max-width: 800px;
}

.progress-box h3 {
    font-size: 18px;
    margin-bottom: 16px;
}

.log-stream {
    background: rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    padding: 16px;
    height: 250px;
    overflow-y: auto;
    font-family: monospace;
    font-size: 13px;
    color: #4ade80;
    line-height: 1.6;
}

.hidden {
    display: none;
}

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

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.1);
}
::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.3);
}
