:root {
    /* Основные цвета */
    --bg-color: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --accent: #38bdf8;
    --accent-hover: #0ea5e9;
    --border-color: rgba(148, 163, 184, 0.1);
    
    /* Фиолетовый акцент */
    --purple-accent: #a855f7;
    --purple-accent-hover: #9333ea;
    --purple-glow: rgba(168, 85, 247, 0.25);
    
    /* Статусные цвета */
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --error-color-light: #dc2626;
    --error-color-lighter: #f87171;
    --info-color: #38bdf8;
    
    /* Зелёный для онлайн статуса */
    --online-color: #22c55e;
    --online-color-light: #4ade80;
    
    /* Специальные цвета */
    --white: #ffffff;
    --light-purple: #7e22ce;
    --light-pink: #c084fc;
    
    /* Фоны */
    --dark-bg: #0f172a;
    --card-bg-dark: #1e293b;
    
    /* Шрифты и отступы */
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;
    --radius-md: 12px;
    --radius-sm: 8px;
}

/* Базовые сбросы */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-main);
    height: 100vh;
    display: flex;
    overflow: hidden;
    position: relative;
    margin: 0;
}

/* Фоновые декоративные свечения */
body::before, body::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.4;
    pointer-events: none;
}

body::before {
    width: 300px;
    height: 300px;
    background: var(--accent);
    top: -100px;
    right: -50px;
}

body::after {
    width: 400px;
    height: 400px;
    background: #7e22ce;
    bottom: -150px;
    left: -100px;
}

/* Основная структура */
.layout {
    display: flex;
    width: 100%;
    height: 100vh;
}

@media (max-width: 768px) {
    .layout {
        flex-direction: column;
        overflow-y: auto;
    }
}

/* Контент */
.content {
    flex: 1;
    padding: 20px 24px;
    overflow-y: auto;
}

.page-header {
    margin-bottom: 20px;
}

.page-header h1 {
    font-size: 1.75rem;
    margin-top: 0;
    margin-bottom: 6px;
    line-height: 1.2;
}

.page-header p {
    color: var(--text-muted);
    margin: 0;
    font-size: 0.9rem;
}

/* ==========================================
   ГЛОБАЛЬНЫЕ КНОПКИ
   ========================================== */

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--accent, #38bdf8) 0%, #0ea5e9 100%);
    color: #0f172a;
    border: none;
    font-weight: 600;
    font-size: 0.9rem;
    font-family: var(--font-family);
    border-radius: var(--radius-sm);
    padding: 10px 24px;
    cursor: pointer;
    user-select: none;
    box-shadow: 0 4px 16px rgba(56, 189, 248, 0.3);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 22px rgba(56, 189, 248, 0.45);
    filter: brightness(1.08);
}

.btn-primary:active {
    transform: translateY(0) scale(1);
    box-shadow: 0 2px 8px rgba(56, 189, 248, 0.25);
}

.btn-primary:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    padding: 9px 18px;
    font-size: 0.9rem;
    font-weight: 500;
    font-family: var(--font-family);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 9px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: var(--font-family);
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
    transition: all 0.2s ease;
}

.btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(239, 68, 68, 0.5);
    filter: brightness(1.05);
}

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

.btn-primary:disabled,
.btn-secondary:disabled,
.btn-danger:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
    filter: none !important;
}

/* ==========================================
   ГЛОБАЛЬНЫЙ СКРОЛЛБАР
   ========================================== */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #0f172a;
}

::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.2);
    border-radius: 4px;
    transition: background 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(56, 189, 248, 0.5);
}

* {
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.2) #0f172a;
}

/* ==========================================
   УТИЛИТЫ
   ========================================== */

.hidden {
    display: none !important;
}

.settings-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 650px;
}

/* Карточки настроек */
.settings-card {
    background: rgba(30, 41, 59, 0.55);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.36);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.settings-card:hover {
    border-color: rgba(56, 189, 248, 0.2);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.45), 0 0 15px rgba(56, 189, 248, 0.05);
}

.settings-card-header {
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding-bottom: 8px;
}

.settings-card-header h2 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-main);
    margin: 0 0 2px 0;
}

.settings-card-header p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
}

.settings-card-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.settings-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.settings-field label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
}

.settings-field input {
    width: 100%;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    color: var(--text-main);
    font-family: var(--font-family);
    font-size: 0.9rem;
    outline: none;
    transition: all 0.2s ease;
}

.settings-field input:focus {
    border-color: var(--accent);
    background: rgba(15, 23, 42, 0.85);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

.settings-card-footer {
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    justify-content: flex-end;
}

.btn-save {
    background: rgba(56, 189, 248, 0.1);
    color: var(--accent);
    border: 1px solid rgba(56, 189, 248, 0.3);
    font-weight: 500;
    font-size: 0.875rem;
    font-family: var(--font-family);
    border-radius: var(--radius-sm);
    padding: 8px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-save:hover {
    background: rgba(56, 189, 248, 0.2);
    border-color: var(--accent);
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.25);
    color: #fff;
}

.btn-save:active {
    transform: translateY(1px);
}