:root {
    /* Палитра из видео */
    --bg-dark: #050505;       /* Глубокий черный */
    --bg-card: #111111;       /* Цвет карточек */
    --accent-green: #00ff88;  /* Неоновый зеленый */
    --accent-purple: #7000ff; /* Неоновый фиолетовый */
    --text-main: #ffffff;
    --text-muted: #888888;
    
    /* Шрифты */
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
    
    /* Эффекты */
    --glass: rgba(255, 255, 255, 0.05);
    --border-glass: rgba(255, 255, 255, 0.1);
    --shadow-neon: 0 0 20px rgba(0, 255, 136, 0.2);
    --radius: 12px;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
    /* ИСПРАВЛЕНИЕ: Отступ сверху, чтобы контент не лез под навбар */
    padding-top: 80px; 
}

/* Скроллбар */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: #333; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-green); }

/* Типографика */
h1, h2, h3 { font-weight: 700; letter-spacing: -0.5px; }
a { text-decoration: none; color: inherit; transition: 0.3s; }

/* Кнопки */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    /* ИЗМЕНЕНИЕ: Менее округлые кнопки */
    border-radius: 8px; 
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: var(--accent-green);
    color: #000;
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.6);
}

.btn-glass {
    background: var(--glass);
    border: 1px solid var(--border-glass);
    color: var(--text-main);
    backdrop-filter: blur(10px);
}

.btn-glass:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--text-main);
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 15px 0; /* Чуть уменьшен padding */
    background: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-glass);
}

header .nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 2px;
}
.logo span { color: var(--accent-green); }

nav ul { display: flex; gap: 30px; list-style: none; }
nav a { font-size: 14px; color: var(--text-muted); font-weight: 500; }
nav a:hover, nav a.active { color: var(--text-main); text-shadow: 0 0 10px rgba(255,255,255,0.5); }

/* Анимации */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in { animation: fadeIn 0.8s ease forwards; }

/* Grid карточек */
.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius);
    overflow: hidden;
    transition: 0.3s;
    position: relative;
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-green);
}

.card-img {
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.card-content { padding: 20px; }
.card-title { font-size: 18px; margin-bottom: 10px; }
.card-desc { color: var(--text-muted); font-size: 14px; margin-bottom: 20px; }


/* --- СТИЛИ ДЛЯ АДМИНКИ И КОМПОНЕНТОВ --- */

/* Дропдаун профиля (п.7 Клиент) */
.profile-dropdown { position: relative; display: inline-block; }
.profile-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: #111;
    border: 1px solid #333;
    border-radius: 8px;
    min-width: 200px;
    z-index: 1000;
    padding: 5px 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.profile-dropdown:hover .profile-menu { display: block; }
.profile-menu a {
    display: flex; 
    align-items: center;
    gap: 10px;
    padding: 10px 15px; 
    color: #ccc; 
    transition: 0.3s;
    font-size: 14px;
}
.profile-menu a:hover { background: #222; color: var(--accent-green); }

/* Стили для админки */
.admin-wrapper { display: flex; min-height: 100vh; }
.sidebar { 
    width: 250px; 
    background: #0a0a0a; 
    border-right: 1px solid #222; 
    padding: 20px; 
    position: fixed; 
    height: 100%; 
    display: flex; 
    flex-direction: column;
    z-index: 900; 
}
.admin-content { 
    flex: 1; 
    margin-left: 250px; 
    padding: 40px; 
}
.sidebar-menu { list-style: none; margin-top: 40px; flex-grow: 1; }
.sidebar-menu li { margin-bottom: 10px; }
.sidebar-menu a { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 5px; color: #888; transition: 0.3s; }
.sidebar-menu a:hover, .sidebar-menu a.active { background: var(--accent-green); color: black; }
.stat-card { background: var(--bg-card); padding: 25px; border-radius: 12px; border: 1px solid #222; }
.sidebar-footer { padding-top: 15px; border-top: 1px solid #333; margin-top: 15px; }

/* Верхняя панель админки (п.5 Админ) */
.top-bar { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 30px; 
    border-bottom: 1px solid #333; 
    padding-bottom: 15px;
}

/* Стили таблиц в админке */
table { 
    width: 100%; 
    border-collapse: collapse; 
    text-align: left; 
}
table th {
    padding: 15px; 
    font-size: 12px; 
    color: #888;
    text-transform: uppercase;
}
table td {
    padding: 15px;
    border-bottom: 1px solid #1a1a1a;
}

/* Модальное окно (п.3 Клиент) */
.modal { 
    display: none; 
    position: fixed; 
    z-index: 2000; 
    left: 0; 
    top: 0; 
    width: 100%; 
    height: 100%; 
    background-color: rgba(0,0,0,0.8); 
    backdrop-filter: blur(5px); 
    overflow: auto;
}
.modal-content { 
    background-color: #111; 
    margin: 5% auto; 
    padding: 0; 
    border: 1px solid var(--accent-green); 
    width: 90%; 
    max-width: 700px; 
    border-radius: 12px; 
    position: relative; 
    animation: fadeIn 0.3s; 
}
.close-modal { 
    position: absolute; 
    right: 20px; 
    top: 15px; 
    color: #aaa; 
    font-size: 28px; 
    font-weight: bold; 
    cursor: pointer; 
    z-index: 10; 
}
.close-modal:hover { color: white; }

/* Стили для скролла времени (п.2 Клиент) */
.time-scroll-container { 
    display: flex; 
    justify-content: center; 
    height: 150px; 
    overflow: hidden; 
}
.time-column { 
    width: 100px; 
    height: 100%; 
    overflow-y: scroll; 
    scroll-snap-type: y mandatory; 
    text-align: center; 
    background: #111; 
    border-radius: 8px; 
    border: 1px solid #333; 
}
.time-column::-webkit-scrollbar { display: none; }
.time-item { 
    height: 50px; 
    line-height: 50px; 
    font-size: 24px; 
    font-weight: bold; 
    color: #555; 
    scroll-snap-align: center; 
    cursor: pointer; 
    transition: 0.3s; 
}
.time-item.active { 
    color: var(--accent-green); 
    font-size: 32px; 
    text-shadow: 0 0 10px var(--accent-green); 
}


/* АНИМАЦИЯ 404 (п.6 Клиент) */
.glitch { 
    font-size: 100px; 
    font-weight: bold; 
    text-transform: uppercase; 
    position: relative; 
    text-shadow: 0.05em 0 0 #00fffc, -0.03em -0.04em 0 #fc00ff, 0.025em 0.04em 0 #fffc00; 
    animation: glitch 725ms infinite; 
}
@keyframes glitch { 
    0% { text-shadow: 0.05em 0 0 #00fffc, -0.03em -0.04em 0 #fc00ff, 0.025em 0.04em 0 #fffc00; } 
    16% { text-shadow: -0.05em -0.025em 0 #00fffc, 0.025em 0.035em 0 #fc00ff, -0.05em -0.05em 0 #fffc00; } 
    50% { text-shadow: 0.05em 0.035em 0 #00fffc, 0.03em 0 0 #fc00ff, 0 -0.04em 0 #fffc00; } 
    100% { text-shadow: -0.05em 0 0 #00fffc, -0.025em -0.04em 0 #fc00ff, -0.04em -0.025em 0 #fffc00; } 
}


/* --- АДАПТИВНОСТЬ (п.1 Клиент, п.7 Админ) --- */
@media (max-width: 900px) {
    .container { max-width: 100%; }
    .grid-cards { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
}

@media (max-width: 768px) {
    body { padding-top: 60px; } /* Адаптивный отступ */
    header { padding: 10px 0; }
    .nav-wrapper { flex-direction: column; gap: 15px; }
    nav ul { flex-wrap: wrap; justify-content: center; gap: 10px; }
    nav a, .btn { padding: 8px 15px; font-size: 13px; }
    
    /* Админка на мобильном */
    .admin-wrapper { flex-direction: column; }
    .sidebar { 
        width: 100%; 
        height: auto; 
        position: relative; 
        border-right: none; 
        border-bottom: 1px solid #333; 
        flex-direction: row; 
        flex-wrap: wrap;
        justify-content: space-between;
        padding-bottom: 10px;
    }
    .admin-content { margin-left: 0; padding: 20px 15px; }
    
    /* Скрываем лого и группируем меню в мобильной версии */
    .sidebar .logo { display: none; }
    .sidebar-menu { 
        order: 3; 
        width: 100%; 
        margin-top: 15px; 
        display: flex; 
        flex-wrap: wrap; 
        gap: 5px; 
        padding: 0;
    }
    .sidebar-menu ul { 
        list-style: none; 
        display: flex; 
        flex-wrap: wrap; 
        width: 100%;
        gap: 5px;
    }
    .sidebar-menu li { 
        flex-basis: calc(50% - 5px); /* Две кнопки в ряд */
        margin-bottom: 0;
    }
    .top-bar { flex-direction: column; gap: 10px; text-align: center; }
    .sidebar-footer { padding-top: 10px; margin-top: 0; }
}