/* Общие стили */
body {
    font-family: 'Arial', sans-serif;
    background-color: #f4f7f6;
    margin: 0;
    padding: 0;
    color: #333;
    line-height: 1.6;
}

h1 {
    font-size: 2em;
    color: #333;
    text-align: center;
    margin-top: 20px;
}

/* Контейнер */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

/* Таблица */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 1em;
    background-color: #f9f9f9;
    border-radius: 8px;
    overflow: hidden;
}

table thead {
    background-color: #007BFF;
    color: white;
}

table th, table td {
    padding: 12px 15px;
    text-align: left;
}

table tbody tr {
    border-bottom: 1px solid #ddd;
}

table tbody tr:hover {
    background-color: #f1f1f1;
}

table th {
    background-color: #007BFF;
    color: white;
    font-weight: bold;
}

table td a {
    color: #007BFF;
    text-decoration: none;
}

table td a:hover {
    text-decoration: underline;
}

/* Кнопки */
button, .btn {
    background-color: #007BFF;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    margin-top: 10px;
}

button:hover, .btn:hover {
    background-color: #0056b3;
}

a.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #007BFF;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    margin-top: 20px;
}

a.btn:hover {
    background-color: #0056b3;
}

/* Форма */
form {
    margin-top: 20px;
}

label {
    font-size: 1em;
    color: #333;
    margin-bottom: 5px;
    display: block;
}

input[type="text"], textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1em;
    box-sizing: border-box;
}

input[type="text"]:focus, textarea:focus {
    border-color: #007BFF;
    outline: none;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
}

textarea {
    resize: vertical;
}

/* Ссылки */
a {
    color: #007BFF;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Сообщения об успехе и ошибках */
.success {
    color: #28a745;
    padding: 10px;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    margin-bottom: 20px;
}

.error {
    color: #dc3545;
    padding: 10px;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    margin-bottom: 20px;
}

/* Обновленные стили для блока кода */
pre {
    background-color: #f4f4f4;
    border: 1px solid #ddd;
    padding: 15px;
    border-radius: 8px;
    font-size: 14px;
    white-space: pre-wrap;
    word-wrap: break-word;
    margin-bottom: 20px;
    overflow: visible;
}

code {
    font-family: 'Courier New', Courier, monospace;
    color: #d6336c;
}

/* Стили для полоски авторизации */
.auth-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 10px;
    background-color: #007BFF;
    border-bottom: 2px solid #ddd;
    font-family: 'Arial', sans-serif;
}

.auth-loggedin {
    margin: 0;
    font-size: 14px;
    color: #333;
}

.auth-logout {
    text-decoration: none;
    color: #007bff;
    margin-left: 5px;
    font-weight: bold;
}

.auth-form {
    display: flex;
    align-items: center;
    gap: 10px;
}

.auth-label {
    display: none;
}

.auth-input {
    padding: 10px !important;

    padding-bottom: 0px !important;
    margin-bottom: 0px !important;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
    max-width: 150px;
}

.auth-input::placeholder {
    color: #888;
}

.auth-button {
    padding: 8px 16px;
    font-size: 14px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.auth-button:hover {
    background-color: #0056b3;
}

.auth-bar p, .auth-bar form {
    margin: 0;
}

/* Адаптивность */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .container {
        width: 100%;
    }

    table, thead, tbody, th, td, tr {
        display: block;
    }

    table thead {
        display: none;
    }

    table tr {
        margin-bottom: 20px;
        border: 1px solid #ddd;
        border-radius: 8px;
        padding: 10px;
    }

    table td {
        text-align: right;
        padding-left: 50%;
        position: relative;
    }

    table td::before {
        content: attr(data-label);
        position: absolute;
        left: 10px;
        top: 10px;
        font-weight: bold;
    }
}
