/* Общие стили страницы с фоном */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;           /* для корректного расчёта */
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100dvh;     /* исправление для мобильных браузеров */

    background-image: url('background.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    display: flex;
    justify-content: center;
    align-items: center;
}

/* Контейнер */
.page-container {
    width: 100%;
    max-width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Карточка */
.calculator-card {
    width: 400px;
    max-width: 95%;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    padding: 30px 40px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    background-clip: padding-box;
    transition: border 0.3s, box-shadow 0.3s;
}

.calculator-card:hover {
    border: 2px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 12px 30px rgba(0,0,0,0.25);
}

/* Заголовок */
.calculator-card h1 {
    text-align: center;
    margin-bottom: 25px;
    color: rgba(0, 0, 0, 0.86);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

/* Поля и метки */
.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 12px;
}

label {
    margin-bottom: 3px;
    font-weight: 600;
    color: #fff;
    font-size: 16px;
}

input, select {
    width: 100%;
    height: 40px;
    padding: 6px 10px;
    font-size: 16px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.05);
    color: rgba(0, 0, 0, 0.73);
    box-sizing: border-box;
    transition: all 0.3s;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

input:focus, select:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 5px rgba(0,123,255,0.5);
}

/* Кнопка */
button {
    width: 100%;
    padding: 12px;
    margin-top: 15px;
    background-color: #007bff;
    color: white;
    font-size: 18px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
}

button:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}

/* Результат */
.result {
    margin-top: 15px;
    padding: 12px;
    background: rgba(233, 247, 239, 0.9);
    border-left: 5px solid #151515;
    border-radius: 8px;
    font-weight: 600;
    color: #333333;
    text-align: center;
    line-height: 1.4;
}

/* 🔽 Адаптация для телефонов */
@media (max-width: 480px) {
    .calculator-card {
        width: 95%;
        padding: 15px 20px;
    }

    .calculator-card h1 {
        font-size: 20px;
        margin-bottom: 10px;
    }

    label {
        font-size: 14px;
    }

    input, select {
        font-size: 14px;
        padding: 6px 8px;
        height: 36px;
    }

    button {
        font-size: 16px;
        padding: 10px 12px;
        margin-top: 10px;
    }

    .result {
        font-size: 14px;
        padding: 8px;
        line-height: 1.3;
        margin-top: 10px;
    }
}
