/* Сброс и базовые настройки */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary-color: #1565c0;
    --primary-hover: #1e88e5;
    --secondary-color: rgba(21, 101, 192, 0.1);
    --secondary-hover: rgba(21, 101, 192, 0.2);
    --text-primary: #ffffff;
    --text-secondary: #b0c4de;
    --bg-primary: #0d1b2a;
    --bg-secondary: rgba(13, 27, 42, 0.85);
    --border-color: #2d3e50;
    --border-radius: 8px;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
    --max-width: 920px;
}

/* Базовое оформление */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    min-height: 100vh;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Фон-градиент + изображение */
.bg-overlay {
    position: fixed;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(1, 2, 17, 0.5) 0%, rgba(1, 4, 30, 0.5) 100%),
        url("../img/bg.jpg") center / cover no-repeat;
    z-index: -1;
}

/* Обёртка контента */
.wrapper {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0.5rem 1rem 1rem 2rem;
}

/* Шапка */
.site-header {
    text-align: center;
    padding: 1.5rem 0 0.5rem; 
}

.site-header .subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

h1 {
    font-size: clamp(2rem, 5vw, 2.8rem);
    color: var(--primary-color);
    margin-bottom: 0.5rem; /* Уменьшено с 1rem */
    font-weight: 700;
    line-height: 1.2;
}

/* Основной контент */
main {
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    padding: 2rem; /* Уменьшено с 2.5rem */
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    margin-top: 1rem;
}

/* Абзацы */
p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.7;
    color: #e3f2fd;
}

/* Кнопки CTA */
.cta {
    margin: 2.5rem 0 1.5rem; /* Уменьшено с 3rem 0 2rem */
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.9rem 2rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    font-size: 1rem;
    border: 2px solid transparent;
    min-width: 200px;
    cursor: pointer;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--text-primary);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(21, 101, 192, 0.3);
}

.btn-secondary {
    background: var(--secondary-color);
    color: var(--text-primary);
    border-color: var(--primary-color);
}

.btn-secondary:hover {
    background: var(--secondary-hover);
    transform: translateY(-2px);
}

/* Форма регистрации */
.form-box {
    max-width: 480px;
    margin: 0.5rem auto; 
    padding: 1rem; 
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.form-box h2 {
    text-align: center;
    color: var(--text-primary);
    margin-bottom: 1.5rem; /* Уменьшено с 2rem */
    font-size: 1.8rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-control {
    width: 100%;
    padding: 0.85rem 1rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    background: rgba(13, 27, 42, 0.7);
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.2);
}

.form-control::placeholder {
    color: #8a9bb2;
}

.form-submit {
    width: 100%;
    padding: 1rem;
    border: 0;
    border-radius: var(--border-radius);
    background: var(--primary-color);
    color: var(--text-primary);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
    margin-top: 0.5rem;
}

.form-submit:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(21, 101, 192, 0.3);
}

/* Сообщения */
.message {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: var(--border-radius);
    text-align: center;
    font-weight: 500;
}

.message-success {
    background: rgba(76, 175, 80, 0.15);
    color: #a5ffa5;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.message-error {
    background: rgba(244, 67, 54, 0.15);
    color: #ffeb3b;
    border: 1px solid rgba(244, 67, 54, 0.3);
}

/* Ссылки */
.link-back {
    display: inline-block;
    margin-top: 1.5rem;
    text-align: center;
    color: #8ab4f8;
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500;
}

.link-back:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* Футер */
.site-footer {
    text-align: center;
    padding: 2rem 0 3rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 2rem;
}

/* Адаптация */
@media (max-width: 768px) {
    .wrapper {
        padding: 0 1.25rem 3rem;
    }
    
    main {
        padding: 1.5rem; /* Уменьшено */
    }
    
    .form-box {
        padding: 1.5rem;
        margin: 1.5rem auto;
    }
    
    .btn {
        min-width: 100%;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.8rem;
    }
    
    p {
        font-size: 1rem;
    }
    
    main {
        padding: 1.25rem; /* Уменьшено */
    }
    
    .form-box {
        padding: 1.25rem;
        margin: 1rem auto;
    }
    
    .cta {
        margin: 2rem 0 1rem;
    }
}

.form-box {
    max-width: 480px;
    margin: 2rem auto;
    padding: 2rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
}

th, td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
}

th {
    background: var(--bg-secondary);
    font-weight: 600;
    color: var(--text-secondary);
}

tr:hover {
    background: rgba(255, 255, 255, 0.05);
}