/* ========================= */
/* БАЗОВЫЕ СТИЛИ */
/* ========================= */
body {
    font-family: 'Segoe UI', Roboto, sans-serif;
    background: #121212;
    margin: 0;
    padding: 0;
    color: #e0e0e0;
}

.container {
    max-width: 960px;
    margin: auto;
    padding: 24px;
    text-align: center;
}

.screen {
    display: none;
}

.screen.active {
    display: block;
}

h1 {
    color: #ffffff;
    font-size: 2rem;
    margin-bottom: 16px;
}

h2 {
    color: #ffffff;
    font-size: 1.5rem;
    margin-bottom: 16px;
}

p {
    line-height: 1.5;
}

/* ========================= */
/* КНОПКИ */
/* ========================= */
button {
    min-width: 140px;        /* задаем минимальную ширину кнопок */
    padding: 12px 24px;
    margin: 8px 0;           /* вертикальные отступы */
    border: none;
    border-radius: 10px;
    background: #1e88e5;
    color: white;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
}

button:hover:not(:disabled) {
    background: #1565c0;
    transform: translateY(-2px);
}

button:disabled {
    background: #444;
    cursor: not-allowed;
    color: #888;
}

.button-row {
    display: flex;
    justify-content: center; /* центрируем ряд кнопок */
    gap: 16px;
    flex-wrap: wrap;
}

/* ========================= */
/* СТИЛЬ КАРТОЧЕК ВЫБОРА */
/* ========================= */
#style-options {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
}

#style-options .style-card {
    flex: 1 1 180px;
    border: 2px solid #333;
    border-radius: 10px;
    padding: 14px;
    background: #1e1e1e;
    color: #e0e0e0;
    cursor: pointer;
    transition: 0.3s ease;
    text-align: center;
}

#style-options .style-card:hover {
    background: #2c2c2c;
}

#style-options .style-card.selected {
    border-color: #42a5f5;
    background: #0d47a1;
    color: #fff;
}

/* ========================= */
/* КАЛЕНДАРЬ */
/* ========================= */
#calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 12px;
    margin: 20px 0;
}

.day-card {
    border: 1px solid #333;
    border-radius: 10px;
    padding: 12px;
    background: #1e1e1e;
    cursor: pointer;
    color: #e0e0e0;
    transition: all 0.2s ease;
    text-align: center;
}

.day-card:hover {
    background: #2c2c2c;
}

.day-card.selected {
    border-color: #42a5f5;
    background: #1565c0;
    color: #fff;
}

.day-header {
    font-weight: bold;
    margin-bottom: 6px;
}

.day-status {
    font-size: 20px;
    min-height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loader {
    display: inline-block;
    border: 3px solid #333;
    border-top: 3px solid #42a5f5;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========================= */
/* ФОРМА АВТОРИЗАЦИИ */
/* ========================= */
.auth-form {
    max-width: 320px;
    margin: 0 auto;          /* центр формы */
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: center;     /* центрируем все элементы внутри формы */
    text-align: center;      /* текст по центру */
}

.auth-input {
    width: 100%;             /* поля занимают всю ширину формы */
    padding: 14px;
    border: 1px solid #333;
    border-radius: 8px;
    background: #1e1e1e;
    color: #e0e0e0;
    font-size: 16px;
}

.auth-input:focus {
    outline: none;
    border-color: #42a5f5;
}

.guest-btn {
    background: #666;
}

.guest-btn:hover {
    background: #555;
}

.error-message {
    color: #f44336;
    margin: 8px 0;
    min-height: 20px;
}

/* ========================= */
/* МЕДИА-ЗАПРОСЫ */
/* ========================= */

/* Планшеты */
@media (max-width: 1024px) {
    #calendar-grid {
        grid-template-columns: repeat(5, 1fr);
    }

    #style-options .style-card {
        flex: 1 1 140px;
    }
}

/* Планшеты/мобильные (768px и меньше) */
@media (max-width: 768px) {
    #calendar-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .button-row {
        flex-direction: column;
        gap: 12px;
    }

    button {
        width: 100%;
    }

    .container {
        padding: 16px;
    }

    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.3rem;
    }
}

/* Смартфоны (480px и меньше) */
@media (max-width: 480px) {
    #calendar-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    #style-options .style-card {
        flex: 1 1 100%;
        margin: 6px 0;
    }

    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.1rem;
    }

    .container {
        padding: 12px;
    }

    button {
        font-size: 14px;
        padding: 10px 16px;
    }
}
.post-content {
    font-family: "Inter", sans-serif;
    line-height: 1.6;
    color: #333;
}
.test-result {
    margin-top: 20px;
    padding: 16px;
    background: #1e1e1e;
    border-radius: 10px;
    border: 1px solid #333;
    text-align: left;
    color: #e0e0e0;
}

.test-result h3 {
    color: #42a5f5;
    margin-bottom: 10px;
}

.test-result .post-content {
    background: #ffffff;
    padding: 12px;
    border-radius: 8px;
}
.post-content h1,
.post-content h2,
.post-content h3 {
    margin-top: 1em;
    color: #222;
}

.post-content ul {
    margin-left: 20px;
    list-style: disc;
}

.post-content strong {
    font-weight: 600;
}

.drop-area {
    border: 2px dashed #42a5f5;
    border-radius: 10px;
    padding: 20px;
    margin: 16px 0;
    color: #e0e0e0;
    cursor: pointer;
    transition: background 0.3s;
    text-align: center;
}

.drop-area.dragover {
    background: #1565c0;
}