/* Reset и базовые стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 250px 0 0 0; /* Увеличиваем отступ сверху */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: 
        linear-gradient(
            rgba(255, 255, 255, 0.5),
            rgba(255, 255, 255, 0.5)
        ),
        url('../resource/1.jpg') center/cover fixed;
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
}

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(0, 0, 0, 0.85);
    height: 120px; /* Фиксированная высота */
}

/* Типография */
h1, h2, h3 {
    font-family: 'Georgia', serif;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.5em;
}
        
h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    padding: 1.5rem 0;
    text-align: center;
    background-color: rgba(0, 0, 0, 0.85);
    color: white;
    margin: 0;
}
        
h2 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    padding: 1.2rem 0;
    text-align: center;
    color: #2c3e50;
    margin-top: 2rem;
    background: linear-gradient(to right, transparent, rgba(44, 62, 80, 0.1), transparent);
}
        
h3 {
    font-size: 1.5rem;
    color: #f8f9fa;
    margin-bottom: 1.5rem;
    text-align: center;
}
        
p {
    padding: 1rem;
    font-size: 1.1rem;
    line-height: 1.8;
    text-align: justify;
    text-indent: 2rem;
    margin-bottom: 1rem;
    max-width: 90ch;
    margin-left: auto;
    margin-right: auto;
}
        
/* Компоненты */
.container {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}
        
main {
    flex: 1;
    padding: 2rem 0;
}
        
article {
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}
        
aside {
    flex: 0 0 300px;
    background-color: rgba(0, 0, 0, 0.85);
    padding: 1.5rem;
    border-radius: 12px;
    color: white;
    height: fit-content;
    position: sticky;
    top: 280px; /* header height + отступ */
}
        
footer {
    margin-top: auto;
    padding: 1.5rem;
    text-align: center;
    background-color: rgba(0, 0, 0, 0.9);
    color: white;
    font-size: 0.9rem;
}
        
/* Навигация */
nav {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}
        
.button {
    display: block;
    padding: 0.8rem 1.5rem;
    background: #0056b3;
    color: #ffffff !important;
    text-decoration: none;
    border-radius: 6px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}
       
.button:hover {
    background: #0056b3 !important;
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35);
}
        
/* Изображения */
img {
    display: block;
    margin: 1.5rem auto;
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    border: 2px solid #334155;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}
        
img:hover {
    transform: scale(1.02);
}

img.enlarged {
    transform: scale(1.5);
    z-index: 1000;
    position: relative;
    transition: transform 0.3s ease;
}
        
/* Списки */
ul {
    padding: 1.5rem 2.5rem;
    font-size: 1.1rem;
    line-height: 1.8;
    text-align: justify;
    margin: 1.5rem 0;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 10px;
    border-left: 6px solid #6366f1;
}
        
li {
    padding: 0.5rem 0;
    margin: 0.5rem 0;
    list-style-type: disc;
}
        
/* Ссылки в тексте */
a[href*="index"] {
    color: #1a73e8;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}
        
a[href*="index"]:hover {
    color: #0d47a1;
    text-decoration: underline;
}

/* Утилиты */
.highlight {
    color: #1a73e8;
    font-weight: 600;
}
        
.section-divider {
    height: 2px;
    background: linear-gradient(to right,
        transparent,
        #6366f1,
        transparent
    );
    margin: 2rem auto;
    width: 80%;
    border: none;
}

/* Стили для формы регистрации */
.form-group {
    margin-bottom: 1.5rem;
    width: 100%;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #2c3e50;
    font-size: 1rem;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #fff;
    box-sizing: border-box; 
}

.form-group input:focus {
    outline: none;
    border-color: #0056b3;
    box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.1);
}

.form-group input:hover {
    border-color: #b0b7c3;
}

/* Контейнер формы */
.container {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Строка формы */
.row {
    width: 100%;
    display: flex;
    flex-direction: column;
}

/* Колонка формы */
.col-md-12 {
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    margin: 0 auto;
    max-width: 500px;
}

/* Стиль для placeholder текста */
.form-group input::placeholder {
    color: #888;
    opacity: 1;
    transition: color 0.3s ease;
}

/* Стиль когда поле в фокусе */
.form-group input:focus::placeholder {
    color: #ccc;
}

/* Дополнительные стили для улучшения UX */
.form-group input.placeholder-active {
    color: #888;
    font-style: italic;
}

.form-group input:focus {
    color: #333;
    font-style: normal;
}

/* Стили для форм авторизации и регистрации */
.error-field {
    border: 2px solid red !important;
    box-shadow: 0 0 5px rgba(255, 0, 0, 0.5);
}

.error-message {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
}

.link-button {
    background: none;
    border: none;
    color: #007bff;
    text-decoration: underline;
    cursor: pointer;
    font-size: 14px;
}

.switch-form {
    text-align: center;
    margin-top: 15px;
}

/* Центрирование кнопок */
#login-form .button,
#register-form .button {
    display: block;
    margin: 0 auto;
    max-width: 400px;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 15px 0;
}

.checkbox-group input[type="checkbox"] {
    margin-top: 3px;
}

.checkbox-group label {
    font-size: 14px;
    line-height: 1.4;
    text-align: left;
}

.checkbox-group a {
    color: #007bff;
    text-decoration: none;
}

.checkbox-group a:hover {
    text-decoration: underline;
}

/* Стили для ошибок валидации */
.checkbox-group input:invalid {
    outline: 2px solid #ff3860;
}

.checkbox-group .error-message {
    color: #ff3860;
    font-size: 12px;
    margin-top: 5px;
}