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

/* fira-code-regular - cyrillic_latin */
@font-face {
    font-display: swap;
    /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Fira Code';
    font-style: normal;
    font-weight: 400;
    src: url('../fonts/fira-code-v27-cyrillic_latin-regular.woff2') format('woff2');
    /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* fira-code-500 - cyrillic_latin */
@font-face {
    font-display: swap;
    /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Fira Code';
    font-style: normal;
    font-weight: 500;
    src: url('../fonts/fira-code-v27-cyrillic_latin-500.woff2') format('woff2');
    /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* fira-code-600 - cyrillic_latin */
@font-face {
    font-display: swap;
    /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Fira Code';
    font-style: normal;
    font-weight: 600;
    src: url('../fonts/fira-code-v27-cyrillic_latin-600.woff2') format('woff2');
    /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* fira-code-700 - cyrillic_latin */
@font-face {
    font-display: swap;
    /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Fira Code';
    font-style: normal;
    font-weight: 700;
    src: url('../fonts/fira-code-v27-cyrillic_latin-700.woff2') format('woff2');
    /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

body {
    font-family: 'Fira Code';
    font-style: normal;
    font-weight: 500;
    font-optical-sizing: auto;
    background-color: #111;
    background-image: url('/images/grey.png.webp');
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
    color: #e0e0e0;
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
    /* Минимальная высота - 100% от высоты экрана */
    margin: 0;
}

.container {
    max-width: 700px;
    margin: 15px auto 15px auto;
    background-color: rgba(0, 0, 0, 0.9);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.9);
}

h2,
h3 {
    color: #ffffff;
    font-weight: 800;
    margin-bottom: 10px;
}

h1 {
    color: #ffffff;
    font-weight: 800;
    margin-top: 30px;
}

.gray-text {
    color: #808080;
    font-size: 0.8em;
}

.jail {
    color: #555;
}

.gray-text:not(:last-child) {
    margin-bottom: 20px;
    display: block;
}

a {
    color: #4da6ff;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
    background-color: #222;
}

ul {
    list-style-type: none;
    padding-left: 0;
}

header {
    border-bottom: 1px dashed #555;
    padding-bottom: 10px;
    margin-bottom: 30px;
}

/* Добавим стиль для подвала, чтобы он не слипался */
footer {
    border-top: 1px dashed #555;
    color: #555;
    font-size: 0.8em;
    text-align: center;
    margin-top: auto;
}

/* Стили для верхнего блока (Имя + Аватар) */
.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px dashed #555;
    margin-bottom: 30px;
    padding-bottom: 5px;
    padding-left: 20px;
}

.title-block {
    height: 88px;
    display: flex;
    align-items: center;
}

.my-name {
    margin-left: 13px;
}

.title-block h1 {
    margin: 0;
    color: #fff;
    font-size: 2em;
}

.title-block h2 {
    margin: 5px 0 0 0;
    color: #888;
    font-size: 1.2em;
}

.logo {
    height: 90%;
}

.avatar img {
    width: 300px;
    height: 170px;
    border-radius: 10px;
}

.admin-terminal-reply {
    color: #00ff00;
    /* Ядовито-зеленый терминальный цвет */
    font-size: 0.9em;
    opacity: 0.9;
}

.my-status {
    display: flex;
    justify-content: space-between;
}

.footer-main {
    margin-top: 20px;
}

.metadata-list {
    padding-left: 24px;
}

/* Стили для списков (как на скрине) */
.metadata-list li {
    margin-bottom: 5px;
}

.highlight {
    color: #fff;
}

/* Стилизация терминальной формы */
.terminal-form {
    margin-top: 20px;
    border-top: 1px dashed #555;
    padding-top: 20px;
}

.prompt-line {
    font-size: 15px;
    margin-bottom: 10px;
}

textarea {
    flex: 1 1 0%;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 5px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 13px;
    font-family: inherit;
    resize: none;
    outline: none;
    transition: border-color 0.2s;
    min-height: 36px;
    max-height: 80px;
    /* Позволяем растягивать только по вертикали */
}

textarea:focus {
    outline: none;
    border-color: #898b8d;
}

.hobbies {
    padding-left: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

button.cmd-btn {
    background: #ffffff08;
    color: #e0e0e0;
    border: 1px solid rgba(255, 255, 255, .08);
    font-size: 12px;
    font-family: inherit;
    cursor: pointer;
    border-radius: 5px;
    padding: 0px 5px 0px 5px;
}

button.cmd-btn:hover {
    background-color: #e0e0e0;
    color: #000;
}

footer {
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.guest-cartman {
    display: flex;
    position: relative;
    gap: 10px;
}

.span-warning {
    display: block;
    margin-bottom: 5px;
    color: #b5b5b5;
}

.cartman-bla {
    position: absolute;
    left: 158px;
    top: -49px;
    width: 50px;
    height: 50px;
}

/* Стили для вывода сообщений из БД */
.guestbook-list {
    margin-top: 20px;
}


/* Базовый стиль парящей плашки (Toast) */
.message-box {
    /* 1. ОТРЫВАЕМ ОТ СТРАНИЦЫ: Приклеиваем к окну браузера */
    position: fixed;
    bottom: 40px;
    right: 5px;
    /* Отступ от правого края экрана */
    z-index: 1000;
    /* Гарантирует, что плашка будет ПОВЕРХ всех других элементов сайта */

    /* 2. КРАСОТА И ТЕНИ */
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    /* Добавляем красивую парящую тень */
    font-weight: bold;

    /* 3. МАГИЯ АНИМАЦИИ (Вместо грубого display: none) */
    opacity: 0;
    /* Делаем полностью прозрачной */
    transform: translateY(20px);
    /* Сдвигаем чуть вниз для эффекта вылета */
    visibility: hidden;
    /* Прячем от кликов мышки, пока она невидима */

    /* Плавный переход при появлении (0.3 секунды) */
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}

/* Когда JavaScript добавляет класс visible */
.message-box.visible {
    opacity: 1;
    /* Делаем непрозрачной */
    transform: translateY(0);
    /* Возвращаем на исходную позицию (плавно выезжает наверх) */
    visibility: visible;
    /* Делаем кликабельной */
}

/* Цвета статусов оставляем как были */
.message-box.success {
    background-color: #d4edda;
    color: #155724;
    border-left: 5px solid #28a745;
    /* Добавим стильную зеленую полоску сбоку */
}

.message-box.error {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 5px solid #dc3545;
    /* Красная полоска для ошибки */
}


/* Базовый кружок с миганием */
.blinking-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 5px;
    margin-left: 5px;
    animation: blinker 1.5s linear infinite;
}

/* Цвета статусов (вот они, наши безопасные стили!) */
.status-online {
    background-color: #28a745;
    /* Зеленый */
    box-shadow: 0 0 5px #28a745;
    /* Легкое свечение для красоты */
}

.status-offline {
    background-color: #dc3545;
    /* Красный */
    box-shadow: 0 0 5px #dc3545;
}

@keyframes blinker {
    50% {
        opacity: 0.3;
    }
}

.my-status p {
    margin: 5px 0;
}

.guestbook-list li {
    border-left: 2px solid #d3d3d3;
    /* Синяя полоска слева от сообщения */
    padding-left: 10px;
}

/* Убираем точки от списка, если ты оставил тег <ul> */
.guestbook-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    /* Расстояние между сообщениями */
}

/* Сама карточка сообщения */
.terminal-card {
    background-color: #000000;
    /* Очень темный, почти черный хакерский фон */
    border-radius: 0px 10px 10px 0px;
    padding: 10px;
}

/* Шапка с ID и датой */
.card-header {
    font-size: 0.65em;
    color: #8b949e;
    /* Тускло-серый цвет для даты */
}

.msg-id {
    color: #8b949e;
    /* Фиолетовый цвет для ID, как на скрине */
    font-weight: bold;
}

/* Текст пользователя */
.card-body {
    color: #c9d1d9;
    /* Светло-серый, почти белый текст */
    line-height: 1.4;
}

/* Магия блока ответа */
.card-reply {
    margin-top: 15px;
    padding-left: 12px;
    /* ТА САМАЯ ВЕРТИКАЛЬНАЯ ПОЛОСА СЛЕВА */
    border-left: 2px solid #ffffff;
}

.reply-label {
    color: #8b949e;
    font-size: 0.85em;
}

.reply-text {
    color: #8b949e;
    font-size: 0.95em;
}

@media (min-width: 768px) and (max-width: 1024px) {
    .container {
        padding: 25px;
        border-radius: 15px;
    }

    .footer-main {
        margin-top: 10px;
    }

}

@media (max-width: 660px) {
    .top-header {
        display: flex;
        flex-direction: column;
        padding-left: 0;
    }

    .title-block {
        margin-bottom: 12px;
    }

    .container {
        padding: 10px;
        border-radius: 0px;
        margin: auto;
    }

    .footer-main {
        margin-top: 0px;
    }

    .hobbies {
        padding-left: 0;
    }
    .metadata-list {
        padding-left: 0;
    }

}