/* ============================================================
   GP20REG - Основные стили
   ============================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ============================================================
   КОНТЕЙНЕР ФОРМЫ
   ============================================================ */
form {
    max-width: 900px;
    width: 100%;
    margin: 20px auto;
    background: #ffffff;
    padding: 40px 50px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

form:hover {
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
}

/* ============================================================
   ЗАГОЛОВКИ
   ============================================================ */
h2 {
    text-align: center;
    color: #2c3e50;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 5px;
    letter-spacing: 1px;
}

h2::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    margin: 10px auto 0;
    border-radius: 2px;
}

/* ============================================================
   ПОЛЯ ВВОДА
   ============================================================ */
.control {
    margin-bottom: 20px;
}

.control label {
    display: block;
    font-weight: 600;
    color: #34495e;
    margin-bottom: 6px;
    font-size: 14px;
    letter-spacing: 0.3px;
}

.control label .required {
    color: #e74c3c;
}

/* Стили для input, select */
.control input[type="text"],
.control input[type="tel"],
.control input[type="email"],
.control select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s ease;
    background: #f8f9fa;
    color: #2c3e50;
}

.control input:focus,
.control select:focus {
    border-color: #667eea;
    outline: none;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
}

.control input:hover,
.control select:hover {
    border-color: #764ba2;
}

/* ============================================================
   РАДИО КНОПКИ
   ============================================================ */
.control div label {
    display: inline-block;
    margin-right: 20px;
    font-weight: 400;
    cursor: pointer;
}

.control div label input[type="radio"] {
    margin-right: 6px;
    accent-color: #667eea;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* ============================================================
   ЧЕКБОКСЫ
   ============================================================ */
.control input[type="checkbox"] {
    margin-right: 8px;
    accent-color: #667eea;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* ============================================================
   ДАТА-КОНТРОЛ
   ============================================================ */
.date-control {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.date-control select {
    flex: 1;
    min-width: 80px;
    padding: 10px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 14px;
    background: #f8f9fa;
    transition: all 0.3s ease;
}

.date-control select:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
}

/* ============================================================
   FIELDEST (ГРУППЫ)
   ============================================================ */
fieldset {
    border: 2px solid #e8ecf1;
    border-radius: 16px;
    padding: 25px 30px;
    margin-bottom: 25px;
    transition: all 0.3s ease;
}

fieldset:hover {
    border-color: #667eea;
}

legend {
    font-weight: 700;
    font-size: 16px;
    color: #2c3e50;
    padding: 0 15px;
    background: white;
    border-radius: 8px;
}

/* ============================================================
   КНОПКА ОТПРАВКИ
   ============================================================ */
#submit,
input[type="submit"] {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#submit:hover,
input[type="submit"]:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.4);
}

#submit:active,
input[type="submit"]:active {
    transform: translateY(0);
}

/* ============================================================
   ОШИБКИ И УСПЕХ
   ============================================================ */
.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 12px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    border-left: 4px solid #f44336;
    display: none;
}

.success-message {
    background: #d4edda;
    color: #155724;
    padding: 12px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    border-left: 4px solid #27ae60;
    display: none;
}

/* ============================================================
   ВСПОМОГАТЕЛЬНЫЕ КЛАССЫ
   ============================================================ */
.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.hidden {
    display: none !important;
}

/* ============================================================
   АДАПТИВНОСТЬ
   ============================================================ */
@media (max-width: 768px) {
    form {
        padding: 25px 20px;
    }

    h2 {
        font-size: 22px;
    }

    .date-control {
        flex-direction: column;
    }

    .date-control select {
        min-width: 100%;
    }

    fieldset {
        padding: 15px 15px;
    }

    .control div label {
        display: block;
        margin-bottom: 8px;
    }

    #submit,
    input[type="submit"] {
        font-size: 16px;
        padding: 14px;
    }
}

@media (max-width: 480px) {
    form {
        padding: 15px 12px;
        border-radius: 12px;
    }

    h2 {
        font-size: 18px;
    }

    .control input[type="text"],
    .control input[type="tel"],
    .control select {
        padding: 10px 12px;
        font-size: 13px;
    }
}
