/* ===== ГЛОБАЛЬНЫЕ СТИЛИ (СВЕТЛЫЙ ФОН + ТЕМНЫЕ ЭЛЕМЕНТЫ) ===== */
:root {
    --bg-color: #f8f9fa;      /* Светлый фон страницы */
    --surface-light: #ffffff; /* Белые карточки */
    --surface-dark: #1e1e1e;  /* Тёмные блоки */
    --text-dark: #1a1a1a;     /* Тёмный текст на светлом */
    --text-light: #e0e0e0;    /* Светлый текст на тёмном */
    --text-muted: #999999;
    --border-color: #e5e5e5;
    --accent-color: #fc3f1d;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    background: var(--bg-color);
    color: var(--text-dark);
    line-height: 1.5;
    font-size: 15px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: var(--accent-color); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Контейнер */
.container {
    flex: 1; /* Занимает всё свободное место */
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Шапка (ТЁМНАЯ) */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: var(--surface-dark); /* Тёмный фон */
    border-radius: 12px;
    margin: 16px 0 24px 0;
    color: var(--text-light);
}

.logo {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.5px;
    cursor: pointer;
    color: #fff;
}

.logo span { color: var(--accent-color); }

.header-icons {
    display: flex;
    gap: 12px;
    align-items: center;
}

.icon-btn {
    background: #333;
    border: 1px solid #444;
    color: var(--text-light);
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s;
}

.icon-btn:hover { background: #444; }

/* Подвал */


.footer a { color: var(--text-muted); margin: 0 8px; }
.footer a:hover { color: var(--accent-color); }


/* На мобильных убираем фиксацию фона для лучшей производительности */
@media (max-width: 768px) {
    body {
        background-attachment: scroll;
    }
}

/* ===== ФОН СТРАНИЦЫ (ТОЧЕЧНЫЙ ПАТТЕРН) ===== */
body {
    background-color: #f8f9fa; /* Базовый светлый фон */
    /* Паттерн из точек: цвет #d1d5db, размер 1.5px, шаг 20px */
    background-image: radial-gradient(#d1d5db 1.5px, transparent 1.5px);
    background-size: 20px 20px;
    background-position: center;
    min-height: 100vh;
}

/* На мобильных делаем точки чуть реже и бледнее */
@media (max-width: 768px) {
    body {
        background-image: radial-gradient(#e5e7eb 1px, transparent 1px);
        background-size: 16px 16px;
    }
}

/* Тултип (подсказка) для иконок */
.has-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: #1a1a1a;
    color: #fff;
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
    z-index: 100;
}

.has-tooltip:hover::after {
    opacity: 1;
    visibility: visible;
    bottom: -35px;
}

/* Тултипы */
.has-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: #1a1a1a;
    color: #fff;
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
    z-index: 100;
}

.has-tooltip:hover::after {
    opacity: 1;
    visibility: visible;
    bottom: -35px;
}

/* ===== СТРАНИЦА 404 ===== */
.error-page {
    text-align: center;
    padding: 80px 20px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 16px;
    max-width: 800px;
    margin: 40px auto;
}
.error-code {
    font-size: 120px;
    font-weight: 800;
    color: #fc3f1d;
    line-height: 1;
    margin-bottom: 16px;
}
.error-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #1a1a1a;
}
.error-desc {
    font-size: 16px;
    color: #666;
    margin-bottom: 32px;
}
.error-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}
.error-btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}
.error-btn-primary {
    background: #fc3f1d;
    color: #fff;
}
.error-btn-primary:hover {
    background: #d93025;
}
.error-btn-secondary {
    background: #f5f5f5;
    color: #1a1a1a;
    border: 1px solid #e5e5e5;
}
.error-btn-secondary:hover {
    background: #e5e5e5;
}


/* Прижимаем подвал к низу */
#footer-container {
    margin-top: auto;
}
