/* Reset some basic styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f9;
    color: #333;
    display: flex;
    flex-direction: column;
    align-items: center;
}

a {
    color: inherit;
    text-decoration: none;
}

nav {
    background-color: #007bff;
    color: white;
    width: 100%;
    padding: 1rem 2rem;
    display: flex;
    justify-content: center;
}

nav ul {
    list-style-type: none;
    display: flex;
    gap: 1.5rem;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: bold;
}

nav a:hover {
    text-decoration: underline;
}

.content {
    width: 100%;
    max-width: 600px;
    margin: 2rem;
    padding: 1.5rem;
    background-color: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    text-align: center;
}

h1, h2 {
    color: #333;
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1rem;
    color: #666;
}

/* Form styles */
form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

label {
    font-size: 0.9rem;
    color: #555;
}

input[type="text"],
input[type="password"] {
    padding: 0.8rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    width: 100%;
}

button {
    padding: 0.8rem;
    background-color: #007bff;
    color: white;
    font-size: 1rem;
    font-weight: bold;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

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

/* Responsive */
@media (max-width: 600px) {
    .content {
        margin: 1rem;
        padding: 1rem;
    }

    nav ul {
        flex-direction: column;
    }
}

form button {
    margin-bottom: 1rem; /* Adds space between the form and the Telegram button */
}

.alt-login {
    padding: 0.8rem;
    background-color: #34a853; /* Green for differentiation */
    color: white;
    font-size: 1rem;
    font-weight: bold;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    display: block; /* Full-width below form */
    width: 100%;
}

.alt-login:hover {
    background-color: #2a8541;
}

.error-message {
    background-color: #ffdddd;
    color: #d8000c;
    border: 1px solid #d8000c;
    padding: 0.8rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    font-weight: bold;
    text-align: center;
}

.notes-container {
    width: 100%;
    max-width: 600px;
    padding: 1.5rem;
    margin-top: 2rem;
    background-color: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

.notes-container h2 {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 1rem;
    text-align: center;
}

.notes-list {
    list-style: none;
    padding: 0;
    margin-top: 1rem;
}

.note-item {
    padding: 1rem;
    margin-bottom: 0.8rem;
    background-color: #f4f4f9;
    border: 1px solid #ddd;
    border-radius: 6px;
    transition: background-color 0.3s, transform 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.note-item:hover {
    background-color: #e9e9f0;
    transform: scale(1.02);
}

.note-link {
    text-decoration: none;
    color: #007bff;
    font-weight: bold;
    font-size: 1.1rem;
}

.note-link:hover {
    text-decoration: underline;
    color: #0056b3;
}

.no-notes-message {
    color: #666;
    font-size: 1rem;
    text-align: center;
    margin-bottom: 1rem;
}

.add-note-button {
    display: block;
    width: 100%;
    padding: 0.8rem;
    background-color: #007bff;
    color: white;
    font-size: 1rem;
    font-weight: bold;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 1.5rem;
    transition: background-color 0.3s;
}

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

.status {
    font-size: 1.2em;
    margin: 20px 0;
}

.status-connected {
    color: #28a745; /* Зеленый цвет для успешного подключения */
}

.status-disconnected {
    color: #dc3545; /* Красный цвет для отключения */
}

.connect-button {
    display: inline-block; /* Чтобы кнопка имела размеры */
    padding: 10px 20px;
    font-size: 1.2em;
    color: #fff;
    background-color: #007bff; /* Цвет кнопки */
    border: none;
    border-radius: 5px;
    text-decoration: none; /* Убирает подчеркивание у ссылки */
    transition: background-color 0.3s; /* Плавный переход для цвета фона */
}

.connect-button:hover {
    background-color: #0056b3; /* Темнее при наведении */
}

/* Success message */
.success-message {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    padding: 0.8rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    font-weight: bold;
    text-align: center;
}


textarea {
    padding: 0.8rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    width: 100%;
    resize: vertical;
}
.note-content {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
    color: #333;
    font-size: 1.1rem;
    line-height: 1.5;
}

.back-button {
    display: inline-block;
    padding: 0.8rem 1.2rem;
    background-color: #007bff;
    color: white;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.3s;
}

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

/* Стили для таблицы пользователей */
.user-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.user-table th,
.user-table td {
    padding: 0.8rem;
    border: 1px solid #ddd;
    text-align: left;
    font-size: 1rem;
}

.user-table th {
    background-color: #fdfd96; /* Пастельно-жёлтый */
    color: #333;
}

.user-table tr:nth-child(even) {
    background-color: #f9f9f9; /* Цвет для чередования строк */
}

.note-link {
    color: #007bff;
    font-weight: bold;
    text-decoration: none;
}

.note-link:hover {
    text-decoration: underline;
}

.pagination {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 1.5rem;
}

.page-info {
    font-size: 1rem;
    font-weight: bold;
    color: #666;
    margin-bottom: 0.5rem; /* Отступ снизу для разделения с кнопками */
}

.pagination-buttons {
    display: flex;
    gap: 1rem;
}

.pagination-button {
    padding: 0.8rem 1.2rem;
    background-color: #fdfd96; /* Пастельно-жёлтый */
    color: #333;
    font-size: 1rem;
    font-weight: bold;
    border: 1px solid #e6e6e6;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.3s;
}

.pagination-button:hover {
    background-color: #f3f3bd;
}

