/* Базовые настройки */
body {
    font-family: sans-serif;
    line-height: 1.9;
    margin: 0;
    color: #333;
    background-color: #f9f9f9;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* Навигация */
.header {
    background: #fff;
    border-bottom: 1px solid #ddd;
    padding: 1rem 0;
    position: sticky;
    top: 0;
}

.nav {
    display: flex;
    justify-content: center;
    gap: 30px;
}

.nav a {
    text-decoration: none;
    color: #555;
    font-size: 0.9rem;
}

.nav a:hover {
    color: #000;
}

/* Секции */
.section, .page-section {
    padding: 40px 20px;
    border-bottom: 1px solid #eee;
    max-width: 900px;
    margin: 0 auto;
}

h1, h2 {
    border-left: 4px solid #333;
    padding-left: 20px;
    margin-bottom: 25px;
}

/* Формы и кнопки */
.form, .question-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

input, textarea {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

textarea {
    width: 100%;
    height: 100px;
}

button {
    padding: 10px 20px;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
}

button:hover { opacity: 0.9; }

/* Дополнительные состояния кнопок */
.btn-secondary { background: #888; }
.btn-danger { background: #d9534f; padding: 5px 10px; font-size: 0.8rem; }
.btn-sm { padding: 8px 15px; font-size: 0.9rem; }
.primary { background: #007bff; color: #fff; }

/* Таблицы и карточки */
table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    text-align: left;
    padding: 10px;
    border-bottom: 1px solid #ddd;
}

.card {
    background: #fff;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    height: 100%;
}

.admin-zone {
    background: #fff4f4;
    padding: 20px;
}

/* --- Новые стили для PHP-структуры --- */

/* Админ-панель: сетка */
.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    align-items: start;
}

/* Список вопросов в админке */
.admin-questions {
    list-style: none;
    padding: 0;
    margin-bottom: 20px;
}

.admin-questions li {
    background: #f1f1f1;
    padding: 10px;
    border-radius: 4px;
    margin-top: 10px;
}

.admin-questions a {
    display: inline-block;
    margin-right: 10px;
    font-size: 0.85rem;
    color: #007bff;
    text-decoration: none;
}

.admin-questions a:hover {
    text-decoration: underline;
}

/* Чат и ответы */
.chat-container {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 25px;
}

.answer-box {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}

.hints {
    margin-top: 20px;
}

.hints-list {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

/* Элементы подсказок (теги-кнопки) */
.hint-item {
    background: #eef2f7;
    color: #333;
    border: 1px solid #d1d9e6;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
}

.hint-item:hover {
    background: #d1d9e6;
}



/* Базовые настройки */
body {
    font-family: sans-serif;
    line-height: 1.9;
    margin: 0;
    color: #333;
    background-color: #f9f9f9;
}

.container {
    max-width: 1000px; /* Немного расширил для удобства навигации */
    margin: 0 auto;
    padding: 0 20px;
}

/* Навигация и Шапка */
.header {
    background: #fff;
    border-bottom: 1px solid #ddd;
    padding: 0.5rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav {
    display: flex;
    justify-content: space-between; /* Лого слева, меню справа */
    align-items: center;
}

.logo {
    font-weight: bold;
    font-size: 1.2rem;
    color: #333;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-list {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 20px;
    margin: 0;
    padding: 0;
}

.nav-list li {
    display: flex;
    align-items: center;
}

.nav-list a {
    text-decoration: none;
    color: #555;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.nav-list a:hover {
    color: #007bff;
}

/* Блок профиля и выхода */
.nav-list form[name="exit"] {
    margin: 0;
    display: inline;
}

input[name="exit"] {
    background: #f0f0f0;
    border: 1px solid #ccc;
    padding: 4px 10px;
    font-size: 0.8rem;
    cursor: pointer;
    border-radius: 4px;
    margin-left: 10px;
}

input[name="exit"]:hover {
    background: #e0e0e0;
    border-color: #bbb;
}

/* Секции */
.section, .page-section {
    padding: 40px 0;
    border-bottom: 1px solid #eee;
}

h1, h2 {
    border-left: 4px solid #333;
    padding-left: 20px;
    margin-bottom: 25px;
}

/* Формы и кнопки */
.form, .question-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

input, textarea {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

button {
    padding: 10px 20px;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

button:hover { opacity: 0.9; }

.btn-secondary { background: #888; }
.btn-danger { background: #d9534f; padding: 5px 10px; font-size: 0.8rem; }
.primary { background: #007bff; }
.btn-sm { padding: 5px 15px; font-size: 0.85rem; }

/* Карточки */
.card {
    background: #fff;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 20px;
}

/* Админ-зона и Сетка */
.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.admin-questions {
    list-style: none;
    padding: 0;
}

.admin-questions li {
    background: #f8f9fa;
    padding: 10px;
    margin-bottom: 5px;
    border-left: 3px solid #007bff;
}

/* Чат */
.chat-container {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.hints-list {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.hint-item {
    background: #eef2f7;
    border: 1px solid #d1d9e6;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    cursor: pointer;
}
