:root {
    --bg-color: #0f172a;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --danger: #ef4444;
    --success: #10b981;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-color);
    background-image: radial-gradient(circle at 15% 50%, rgba(99, 102, 241, 0.15), transparent 25%),
                      radial-gradient(circle at 85% 30%, rgba(16, 185, 129, 0.1), transparent 25%);
    color: var(--text-main);
    height: 100vh;
    overflow: hidden;
}

.app-container {
    display: flex;
    height: 100vh;
}

.sidebar {
    width: 280px;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
}

.logo {
    padding: 30px 20px;
    text-align: center;
    border-bottom: 1px solid var(--glass-border);
}

.logo h2 {
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.5px;
}

.logo p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 5px;
}

.brand-list {
    list-style: none;
    overflow-y: auto;
    flex: 1;
    padding: 10px;
}

.brand-list li {
    padding: 12px 15px;
    margin-bottom: 5px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    color: var(--text-muted);
}

.brand-list li:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

.brand-list li.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.topbar {
    padding: 30px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.topbar h1 {
    font-size: 2rem;
    font-weight: 800;
}

.btn {
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.btn-icon {
    background: var(--glass-bg);
    color: var(--text-main);
    border: 1px solid var(--glass-border);
}

.btn-icon:hover {
    background: rgba(255,255,255,0.1);
}

.content-area {
    padding: 0 40px 40px;
}

.state-view { display: none; }
.state-view.active { display: block; animation: fadeIn 0.5s ease; }

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

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 25px;
}

.welcome-card {
    text-align: center;
    padding: 80px 30px;
}

.welcome-card .big-icon {
    font-size: 4rem;
    color: var(--primary);
    margin-top: 20px;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.stat-title { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 10px; }
.stat-value { font-size: 2.5rem; font-weight: 800; }

.task-form {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.task-form input {
    flex: 1;
    padding: 12px 15px;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: white;
    font-family: 'Inter', sans-serif;
}

.task-form input:focus {
    outline: none;
    border-color: var(--primary);
}

.task-list {
    margin-top: 30px;
    list-style: none;
}

.task-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: rgba(0,0,0,0.1);
    border-radius: 8px;
    margin-bottom: 10px;
    border: 1px solid var(--glass-border);
}

.task-info h4 { margin-bottom: 5px; }
.task-info p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 8px;
    white-space: pre-wrap;
    max-height: 250px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.2);
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    font-family: monospace;
}

.task-actions button {
    margin-left: 10px;
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: 6px;
}

.modal {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active { display: flex; }

.modal-content {
    width: 500px;
    position: relative;
}

.close {
    position: absolute;
    top: 20px; right: 20px;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
}

.form-group { margin: 20px 0; }
.form-group label { display: block; margin-bottom: 8px; color: var(--text-muted); }
.form-group input {
    width: 100%;
    padding: 12px;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: white;
}

.loader {
    margin-top: 20px;
    color: var(--primary);
    font-weight: 600;
}

.seo-report-view {
    margin-top: 20px;
    max-height: 250px;
    overflow-y: auto;
    font-size: 0.85rem;
    line-height: 1.5;
    white-space: pre-wrap;
    background: rgba(0,0,0,0.3);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
}
