/* Секция калькулятора */
.calc-section {
    min-height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 20px 60px;
    position: relative;
    background: transparent;
    overflow: visible;
}

/* Контейнер */
.calc-container {
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
    background: linear-gradient(145deg, rgba(26, 13, 40, 0.95), rgba(16, 16, 48, 0.9));
    border-radius: 24px;
    padding: 32px 40px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(139, 92, 246, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: visible;
}

.calc-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.5), transparent);
}

/* Планшеты (769px-1024px) */
@media (max-width: 1024px) and (min-width: 769px) {
    .calc-container {
        max-width: 95%;
        width: 100%;
        padding: 48px 40px;
    }
    .calc-section {
        padding: 100px 20px 20px;
    }
}

/* Маленькие мобильные (≤480px) */
@media (max-width: 480px) {
    .calc-container {
        padding: 20px max(16px, env(safe-area-inset-left)) 20px max(16px, env(safe-area-inset-right));
        border-radius: 16px;
    }
}

/* Форма */
.calc-form {
    display: flex;
    flex-direction: column;
    gap: 19px;
    overflow: visible;
    position: relative;
}

/* Уменьшаем отступ для второго поля в relationship */
.calc-form #birthdate2-container {
    margin-top: 8px !important;
}

/* Поле формы */
.form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 0;
    position: relative;
    overflow: visible;
}

/* Поле с выбором пола */
.field-with-gender {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

/* Обертка поля ввода */
.field-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1;
    min-height: 87px;
    background: linear-gradient(135deg, rgba(18, 10, 28, 0.98), rgba(12, 8, 20, 0.95));
    border: 2px solid rgba(139, 92, 246, 0.25);
    border-radius: clamp(16px, 2.2vw, 20px);
    overflow: visible;
    cursor: text;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.5),
        0 4px 16px rgba(139, 92, 246, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: box-shadow 0.15s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.2s ease-out, background 0.25s ease-out, transform 0.2s ease-out;
    contain: layout;
    will-change: transform, box-shadow;
}


.field-input-wrapper:focus-within {
    background: linear-gradient(135deg, rgba(20, 12, 32, 1), rgba(14, 10, 24, 0.98));
    border-color: rgba(139, 92, 246, 0.8);
    box-shadow: 
        0 0 0 6px rgba(139, 92, 246, 0.2),
        0 12px 40px rgba(139, 92, 246, 0.5),
        0 8px 24px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: translateY(-2px) scale(1.002);
}

.field-input-wrapper:hover:not(:focus-within) {
    border-color: rgba(139, 92, 246, 0.45);
    background: linear-gradient(135deg, rgba(20, 12, 32, 0.98), rgba(14, 10, 24, 0.95));
    box-shadow: 
        0 8px 36px rgba(0, 0, 0, 0.5),
        0 6px 20px rgba(139, 92, 246, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    transform: translateY(-1px);
}

@media (prefers-reduced-motion: reduce) {
    .field-input-wrapper {
        transition: none;
    }
}

/* Плейсхолдер */
.field-label-inside {
    position: absolute;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0;
    line-height: 0;
    color: transparent;
    pointer-events: none;
    user-select: none;
    max-width: calc(100% - 120px);
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1;
}

.field-label-inside::before {
    content: "дд.мм.гггг";
    display: block;
    font-size: 17px;
    font-weight: 500;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: rgba(255, 255, 255, 0.30);
    line-height: 1.5;
    letter-spacing: 0.01em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    white-space: nowrap;
    transition: color 0.3s ease, opacity 0.3s ease;
    opacity: 1;
    visibility: visible;
}

.field-input-wrapper:focus-within .field-label-inside::before,
.field-input-wrapper.focused .field-label-inside::before {
    content: "дд.мм.гггг";
    color: rgba(255, 255, 255, 0.15);
}

.field-input-wrapper:focus-within .field-label-inside,
.field-input-wrapper.focused .field-label-inside,
.field-input-wrapper.has-value .field-label-inside,
.field-input-wrapper.has-value .field-label-inside::before {
    opacity: 0;
    visibility: hidden;
}

/* Формат даты */
.field-format-inside {
    position: absolute;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 17px;
    font-weight: 400;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: rgba(255, 255, 255, 0.25);
    white-space: nowrap;
    pointer-events: none;
    user-select: none;
    line-height: 1.5;
    letter-spacing: 0.02em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1;
    opacity: 0;
    visibility: hidden;
}

.field-input-wrapper:focus-within:not(.has-value) .field-format-inside,
.field-input-wrapper.focused:not(.has-value) .field-format-inside {
    opacity: 1;
    visibility: visible;
}

.field-input-wrapper.has-value .field-format-inside {
    opacity: 0;
    visibility: hidden;
}


/* Иконка календаря */
.field-icon-inside {
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 22px;
    width: 22px;
    height: 22px;
    min-width: 22px;
    min-height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    background: transparent;
    border: none;
    user-select: none;
    opacity: 0.3;
    visibility: visible;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    z-index: 3;
}

.field-icon-inside:hover {
    transform: translateY(-50%) scale(1.2) rotate(5deg);
    filter: drop-shadow(0 4px 12px rgba(139, 92, 246, 0.7));
    opacity: 0.5;
}

.field-icon-inside:active {
    transform: translateY(-50%) scale(1.08) rotate(2deg);
}

/* Поле ввода даты */
.field-input {
    padding: 26px 24px;
    font-size: 23.5px;
    font-weight: 500;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #FFFFFF;
    background: transparent;
    border: none;
    outline: none;
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
    margin: 0;
    flex: 1;
    min-width: 0;
    height: 100%;
    text-align: left;
    direction: ltr;
    letter-spacing: 0.01em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    z-index: 2;
    width: 100%;
    line-height: 1.5;
    position: relative;
    box-shadow: none;
    -moz-appearance: textfield;
    appearance: textfield;
}


.field-input:focus,
.field-input:focus-visible {
    box-shadow: none;
    transform: none;
    outline: none;
}

.field-input-wrapper:focus-visible,
.field-input-wrapper:focus-within:focus-visible {
    outline: none;
}

.field-input::placeholder {
    opacity: 0;
    visibility: hidden;
    color: transparent;
}

.field-input::-webkit-calendar-picker-indicator,
.field-input::-webkit-list-button,
.field-input[list]::-webkit-calendar-picker-indicator,
.field-input[list]::-webkit-list-button {
    display: none;
    opacity: 0;
    visibility: hidden;
    width: 0;
    height: 0;
    position: absolute;
    pointer-events: none;
    -webkit-appearance: none;
    background: none;
    background-image: none;
}

.field-input::-webkit-inner-spin-button,
.field-input::-webkit-outer-spin-button {
    display: none;
    opacity: 0;
    visibility: hidden;
    -webkit-appearance: none;
    margin: 0;
    width: 0;
    height: 0;
}

.field-input[list] {
    -moz-appearance: textfield;
    appearance: textfield;
    background-image: none;
}

.field-input[list]::-ms-expand {
    display: none;
    opacity: 0;
    visibility: hidden;
    width: 0;
    height: 0;
}

/* Планшеты (769px-1024px) */
@media (max-width: 1024px) and (min-width: 769px) {
    .field-label-inside::before {
        content: "дд.мм.гггг";
    }
    
    .field-input {
        padding: 24px;
        font-size: 18px;
    }
}

/* Мобильные (≤768px) */
@media (max-width: 768px) {
    .calc-section {
        padding: 100px max(12px, env(safe-area-inset-left)) 20px max(12px, env(safe-area-inset-right));
    }
    
    .calc-container {
        padding: 24px max(20px, env(safe-area-inset-left)) 24px max(20px, env(safe-area-inset-right));
        border-radius: 20px;
    }
    
    .field-with-gender {
        gap: 10px;
    }
    
    .field-input-wrapper {
        min-height: 80px;
        border-radius: clamp(16px, 2.2vw, 18px);
        box-shadow: 
            0 6px 24px rgba(0, 0, 0, 0.5),
            0 3px 12px rgba(139, 92, 246, 0.2),
            inset 0 1px 0 rgba(255, 255, 255, 0.05);
    }
    
    .field-input-wrapper:focus-within {
        transform: translateY(-2px);
        box-shadow: 
            0 0 0 5px rgba(139, 92, 246, 0.2),
            0 10px 32px rgba(139, 92, 246, 0.5),
            0 6px 20px rgba(0, 0, 0, 0.6),
            inset 0 1px 0 rgba(255, 255, 255, 0.1);
    }
    
    .field-label-inside {
        max-width: calc(100% - 95px);
    }
    
    .field-label-inside::before {
        content: "дд.мм.гггг";
        font-size: 17px;
    }
    
    .field-input {
        padding: 26px 24px;
        font-size: 16px;
    }
    
    .field-icon-inside {
        pointer-events: none;
    }
    
    .birthdate-error {
        bottom: calc(100% + 10px);
        left: 0;
        transform: translateY(6px) scale(0.95);
        padding: 10px 14px;
        font-size: 12.5px;
        gap: 12px;
        width: fit-content;
        min-width: 0;
        max-width: min(calc(100vw - 32px), calc(100% - 20px));
        white-space: normal;
        display: inline-flex;
    }
    
    .birthdate-error.show {
        transform: translateY(0) scale(1);
    }
    
    .birthdate-error::before {
        width: 18px;
        height: 18px;
        font-size: 13px;
    }
    
    .birthdate-error::after {
        left: 20px;
        border-left-width: 7px;
        border-right-width: 7px;
        border-top-width: 7px;
    }
    
    .calc-button {
        padding: 14px 24px;
        font-size: 16px;
        min-height: 56px;
        line-height: 1;
    }
}

/* Маленькие мобильные (≤480px) */
@media (max-width: 480px) {
    .field-with-gender {
        gap: 8px;
    }
    
    .field-input-wrapper {
        min-height: 74px;
        border-radius: clamp(14px, 4vw, 16px);
    }
    
    .field-label-inside {
        max-width: calc(100% - 85px);
    }
    
    .field-input {
        padding: 24px;
    }
    
    .birthdate-error {
        bottom: calc(100% + 7px);
        left: 0;
        transform: translateY(4px) scale(0.96);
        padding: 6px 11px;
        font-size: 11px;
        gap: 8px;
        border-radius: 8px;
        width: max-content;
        max-width: calc(100vw - 24px);
        white-space: normal;
    }
    
    .birthdate-error.show {
        transform: translateY(0) scale(1);
    }
    
    .birthdate-error::before {
        width: 15px;
        height: 15px;
        font-size: 11px;
    }
    
    .birthdate-error::after {
        left: 16px;
        border-left-width: 5px;
        border-right-width: 5px;
        border-top-width: 5px;
    }
    
    .calc-button {
        padding: 12px 20px;
        font-size: 14px;
        min-height: 52px;
        white-space: normal;
        max-width: 100%;
        line-height: 1.1;
    }
    
    .calc-button-text {
        line-height: 1.1;
    }
}

/* Очень маленькие (≤360px) */
@media (max-width: 360px) {
    .field-format-inside {
        display: none;
    }
    
    .field-input-wrapper {
        min-height: 66px;
    }
    
    .birthdate-error {
        bottom: calc(100% + 6px);
        left: 0;
        right: auto;
        transform: translateY(3px) scale(0.96);
        padding: 6px 10px;
        font-size: 10px;
        gap: 7px;
        border-radius: 8px;
        width: fit-content;
        min-width: 0;
        max-width: min(calc(100vw - 20px), calc(100% - 16px));
        white-space: normal;
    }
    
    .birthdate-error.show {
        transform: translateY(0) scale(1);
    }
    
    .birthdate-error::before {
        width: 14px;
        height: 14px;
        font-size: 10px;
    }
    
    .birthdate-error::after {
        left: 14px;
        border-left-width: 5px;
        border-right-width: 5px;
        border-top-width: 5px;
    }
    
    .field-label-inside {
        max-width: calc(100% - 60px);
    }
    
    .field-label-inside::before {
        content: "дд.мм.гггг";
    }
    
    .field-input {
        padding: 20px 24px;
    }
    
    .field-input-wrapper.invalid .field-input {
        padding-bottom: 40px;
    }
    
    .field-icon-inside {
        pointer-events: none;
    }
    
    .calc-button {
        padding: 12px 16px;
        font-size: 13px;
        min-height: 50px;
        white-space: normal;
        max-width: 100%;
        line-height: 1.1;
    }
    
    .calc-button-text {
        line-height: 1.1;
    }
}

/* Календарь (скрыт на мобильных и планшетах) */
@media (max-width: 1024px) {
    .iphone-datepicker {
        display: none;
        visibility: hidden;
        opacity: 0;
        pointer-events: none;
        position: absolute;
        left: -9999px;
        width: 0;
        height: 0;
        overflow: hidden;
    }
}

/* Десктоп (>1024px) */
@media (min-width: 1025px) {
    .iphone-datepicker {
        position: absolute;
        top: calc(100% + 8px);
        background: linear-gradient(135deg, rgba(26, 13, 40, 1), rgba(16, 16, 48, 1));
        border: 2px solid rgba(139, 92, 246, 0.3);
        border-radius: 16px;
        padding: 20px;
        box-shadow: 
            0 20px 60px rgba(0, 0, 0, 0.6),
            0 0 0 1px rgba(139, 92, 246, 0.2),
            inset 0 1px 0 rgba(255, 255, 255, 0.05);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        z-index: 9999999;
        display: none;
        opacity: 0;
        transform: translateY(-10px);
        transition: opacity 0.3s ease, transform 0.3s ease;
        max-height: 90vh;
        overflow-y: auto;
        isolation: isolate;
        box-sizing: border-box;
    }

    .iphone-datepicker.show {
        display: block;
        opacity: 1;
        transform: translateY(0);
    }

    .datepicker-header {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 32px 56px;
        background: linear-gradient(135deg, 
            rgba(10, 13, 26, 1) 0%,
            rgba(15, 23, 42, 1) 25%,
            rgba(10, 13, 26, 1) 50%,
            rgba(15, 23, 42, 1) 75%,
            rgba(10, 13, 26, 1) 100%);
        backdrop-filter: blur(8px) saturate(150%);
        -webkit-backdrop-filter: blur(8px) saturate(150%);
        border: 1.5px solid rgba(139, 92, 246, 0.15);
        border-radius: 20px;
        width: 95%;
        max-width: 95%;
        margin: 0 auto 16px;
        box-sizing: border-box;
        box-shadow: 
            0 20px 60px rgba(0, 0, 0, 0.5),
            0 8px 24px rgba(139, 92, 246, 0.15);
    }

    .datepicker-month-year-container {
        display: flex;
        align-items: flex-start;
        gap: 16px;
        flex: 1;
        justify-content: center;
        min-width: 0;
        overflow: visible;
        padding: 0;
        width: 100%;
        max-width: 100%;
    }

    .datepicker-month-select {
        flex: 1 1 auto;
        min-width: 160px;
        max-width: 180px;
        width: 100%;
        height: 48px;
        min-height: 48px;
        max-height: 48px;
        padding-left: 18px;
        padding-right: 18px;
        padding-top: 0;
        padding-bottom: 0;
        background: linear-gradient(135deg, 
            rgba(15, 23, 42, 1) 0%,
            rgba(10, 13, 26, 1) 50%,
            rgba(15, 23, 42, 1) 100%);
        backdrop-filter: blur(20px) saturate(200%);
        -webkit-backdrop-filter: blur(20px) saturate(200%);
        border: 1.5px solid rgba(139, 92, 246, 0.2);
        border-radius: 12px;
        color: rgba(232, 238, 243, 0.98);
        font-size: 15px;
        font-weight: 600;
        font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
        text-align: left;
        text-align-last: left;
        line-height: 48px;
        letter-spacing: 0.5px;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 0 8px rgba(139, 92, 246, 0.15);
        appearance: none;
        -webkit-appearance: none;
        -moz-appearance: none;
        outline: none;
        cursor: pointer;
        transition: transform 0.12s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.12s ease, border-color 0.12s ease;
        background-image: none;
        transform-style: preserve-3d;
        transform: translateZ(0);
        box-shadow: 
            0 6px 20px rgba(0, 0, 0, 0.3),
            0 3px 10px rgba(139, 92, 246, 0.12),
            inset 0 1px 0 rgba(255, 255, 255, 0.08),
            inset 0 -1px 0 rgba(0, 0, 0, 0.2);
        position: relative;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        direction: ltr;
        box-sizing: border-box;
    }

    .datepicker-year-select,
    .datepicker-day-select {
        flex: 1 1 auto;
        min-width: 140px;
        max-width: 160px;
        width: 100%;
        height: 48px;
        min-height: 48px;
        max-height: 48px;
        padding-left: 18px;
        padding-right: 18px;
        padding-top: 0;
        padding-bottom: 0;
        background: linear-gradient(135deg, 
            rgba(15, 23, 42, 1) 0%,
            rgba(10, 13, 26, 1) 50%,
            rgba(15, 23, 42, 1) 100%);
        backdrop-filter: blur(20px) saturate(200%);
        -webkit-backdrop-filter: blur(20px) saturate(200%);
        border: 1.5px solid rgba(139, 92, 246, 0.2);
        border-radius: 12px;
        color: rgba(232, 238, 243, 0.98);
        font-size: 15px;
        font-weight: 600;
        font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
        text-align: left;
        text-align-last: left;
        line-height: 48px;
        letter-spacing: 0.5px;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 0 8px rgba(139, 92, 246, 0.15);
        appearance: none;
        -webkit-appearance: none;
        -moz-appearance: none;
        outline: none;
        cursor: pointer;
        transition: transform 0.12s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.12s ease, border-color 0.12s ease;
        background-image: none;
        box-shadow: 
            0 4px 16px rgba(0, 0, 0, 0.25),
            0 2px 8px rgba(139, 92, 246, 0.1),
            inset 0 1px 0 rgba(255, 255, 255, 0.08),
            inset 0 -1px 0 rgba(0, 0, 0, 0.15);
        position: relative;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        direction: ltr;
        box-sizing: border-box;
        transform-style: preserve-3d;
        transform: translateZ(0);
    }

    .datepicker-day-select,
    .datepicker-month-select,
    .datepicker-year-select {
        max-height: calc(42px * 7 + 24px);
        overflow-y: auto;
        color-scheme: dark;
    }

    .datepicker-month-select::-ms-expand,
    .datepicker-year-select::-ms-expand,
    .datepicker-day-select::-ms-expand {
        display: none;
    }

    .datepicker-month-select::selection,
    .datepicker-year-select::selection,
    .datepicker-day-select::selection,
    .datepicker-month-select::-moz-selection,
    .datepicker-year-select::-moz-selection,
    .datepicker-day-select::-moz-selection {
        background: transparent;
        color: inherit;
    }

    .datepicker-month-select:hover,
    .datepicker-year-select:hover,
    .datepicker-day-select:hover {
        background: linear-gradient(135deg, 
            rgba(15, 23, 42, 1) 0%,
            rgba(10, 13, 26, 1) 50%,
            rgba(15, 23, 42, 1) 100%);
        backdrop-filter: blur(22px) saturate(220%);
        -webkit-backdrop-filter: blur(22px) saturate(220%);
        border-color: rgba(139, 92, 246, 0.35);
        transform: translateZ(4px) translateY(-1px);
        box-shadow: 
            0 8px 28px rgba(0, 0, 0, 0.4),
            0 4px 14px rgba(139, 92, 246, 0.18),
            inset 0 1px 0 rgba(255, 255, 255, 0.1),
            inset 0 -1px 0 rgba(0, 0, 0, 0.25);
        color: rgba(255, 255, 255, 1);
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4), 0 0 12px rgba(139, 92, 246, 0.25);
        font-weight: 700;
    }

    .datepicker-month-select:focus,
    .datepicker-year-select:focus,
    .datepicker-day-select:focus {
        background: linear-gradient(135deg, 
            rgba(15, 23, 42, 1) 0%,
            rgba(10, 13, 26, 1) 50%,
            rgba(15, 23, 42, 1) 100%);
        backdrop-filter: blur(24px) saturate(240%);
        -webkit-backdrop-filter: blur(24px) saturate(240%);
        border-color: rgba(139, 92, 246, 0.45);
        transform: translateZ(6px) translateY(-1px);
        box-shadow: 
            0 12px 40px rgba(0, 0, 0, 0.5),
            0 6px 20px rgba(139, 92, 246, 0.25),
            inset 0 1px 0 rgba(255, 255, 255, 0.12),
            inset 0 -1px 0 rgba(0, 0, 0, 0.3),
            0 0 0 2px rgba(139, 92, 246, 0.3);
        outline: none;
        color: rgba(255, 255, 255, 1);
        text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5), 0 0 16px rgba(139, 92, 246, 0.3);
        font-weight: 700;
    }

    .datepicker-day-select option[value=""],
    .datepicker-month-select option[value=""],
    .datepicker-year-select option[value=""] {
        display: none;
    }

    .datepicker-day-select option {
        background: rgba(15, 23, 42, 0.95);
        color: rgba(232, 238, 243, 0.9);
        padding: 12px 4px 12px 6px;
        font-size: 14px;
        font-weight: 500;
        font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
        text-align: center;
        text-align-last: center;
        letter-spacing: 0.2px;
        border: none;
        outline: none;
        height: 42px;
        min-height: 42px;
        max-height: 42px;
        line-height: 1.5;
        display: flex;
        align-items: center;
        margin: 2px 6px;
        border-radius: 10px;
        cursor: pointer;
        transition: transform 0.1s cubic-bezier(0.4, 0, 0.2, 1), background 0.1s ease, box-shadow 0.1s ease;
        transform-style: preserve-3d;
        transform: translateZ(0);
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }

    .datepicker-month-select option {
        background: rgba(15, 23, 42, 0.95);
        color: rgba(232, 238, 243, 0.9);
        padding: 12px 4px 12px 12px;
        font-size: 14px;
        font-weight: 500;
        font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
        text-align: center;
        text-align-last: center;
        letter-spacing: 0.2px;
        border: none;
        outline: none;
        height: 42px;
        min-height: 42px;
        max-height: 42px;
        line-height: 1.5;
        display: flex;
        align-items: center;
        margin: 2px 6px;
        border-radius: 10px;
        width: 100%;
        box-sizing: border-box;
        white-space: nowrap;
        cursor: pointer;
        transition: transform 0.1s cubic-bezier(0.4, 0, 0.2, 1), background 0.1s ease, box-shadow 0.1s ease;
        transform-style: preserve-3d;
        transform: translateZ(0);
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }

    .datepicker-year-select option {
        background: rgba(15, 23, 42, 0.95);
        color: rgba(232, 238, 243, 0.9);
        padding: 12px 16px 12px 12px;
        font-size: 14px;
        font-weight: 500;
        font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
        text-align: center;
        text-align-last: center;
        letter-spacing: 0.2px;
        border: none;
        outline: none;
        height: 42px;
        min-height: 42px;
        max-height: 42px;
        line-height: 1.5;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 2px 2px 2px 6px;
        border-radius: 10px;
        cursor: pointer;
        transition: transform 0.1s cubic-bezier(0.4, 0, 0.2, 1), background 0.1s ease, box-shadow 0.1s ease;
        transform-style: preserve-3d;
        transform: translateZ(0);
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }

    .datepicker-month-select option:hover,
    .datepicker-year-select option:hover,
    .datepicker-day-select option:hover {
        background: rgba(30, 41, 59, 0.98);
        color: rgba(255, 255, 255, 1);
        font-weight: 600;
        transform: translateZ(2px) translateX(2px);
        box-shadow: 
            inset 0 0 0 1.5px rgba(139, 92, 246, 0.4),
            0 4px 12px rgba(139, 92, 246, 0.2);
    }

    .datepicker-month-select option:checked,
    .datepicker-year-select option:checked,
    .datepicker-day-select option:checked,
    .datepicker-month-select option:focus,
    .datepicker-year-select option:focus,
    .datepicker-day-select option:focus,
    .datepicker-month-select option[selected],
    .datepicker-year-select option[selected],
    .datepicker-day-select option[selected] {
        background: rgba(30, 41, 59, 1);
        color: rgba(255, 255, 255, 1);
        font-weight: 600;
        transform: translateZ(3px);
        box-shadow: 
            inset 0 0 0 2px rgba(139, 92, 246, 0.5),
            0 6px 16px rgba(139, 92, 246, 0.3);
        border-radius: 10px;
    }

    .datepicker-day-select::-webkit-scrollbar,
    .datepicker-month-select::-webkit-scrollbar,
    .datepicker-year-select::-webkit-scrollbar {
        width: 8px;
    }

    .datepicker-day-select::-webkit-scrollbar-track,
    .datepicker-month-select::-webkit-scrollbar-track,
    .datepicker-year-select::-webkit-scrollbar-track {
        background: rgba(10, 13, 26, 0.4);
        border-radius: 4px;
        margin: 4px 0;
    }

    .datepicker-day-select::-webkit-scrollbar-thumb,
    .datepicker-month-select::-webkit-scrollbar-thumb,
    .datepicker-year-select::-webkit-scrollbar-thumb {
        background: rgba(139, 92, 246, 0.4);
        border-radius: 4px;
        border: 1px solid rgba(139, 92, 246, 0.2);
        transition: background 0.12s ease, border-color 0.12s ease;
    }

    .datepicker-day-select::-webkit-scrollbar-thumb:hover,
    .datepicker-month-select::-webkit-scrollbar-thumb:hover,
    .datepicker-year-select::-webkit-scrollbar-thumb:hover {
        background: rgba(139, 92, 246, 0.6);
        border-color: rgba(139, 92, 246, 0.4);
    }
}

/* Кнопка расчета */
.calc-button {
    width: 100%;
    padding: 18px 36px;
    background: linear-gradient(135deg, 
        #047857 0%, 
        #059669 20%,
        #10b981 40%,
        #34d399 60%,
        #10b981 80%,
        #047857 100%);
    background-size: 400% 400%;
    border: none;
    border-radius: 18px;
    color: white;
    font-family: var(--font-family-heading);
    font-size: 19px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    white-space: nowrap;
    box-shadow: 
        0 8px 30px rgba(4, 120, 87, 0.4),
        0 4px 15px rgba(5, 150, 105, 0.3),
        inset 0 2px 4px rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    min-height: 64px;
    height: auto;
    box-sizing: border-box;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    margin: 0;
    flex-shrink: 0;
    animation: calcButtonPulse 3s ease-in-out infinite;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-align: center;
    vertical-align: middle;
    line-height: 1;
}

.calc-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.3), 
        transparent);
    transition: left 0.5s ease;
    z-index: 1;
}

.calc-button:hover::before {
    left: 100%;
}

@keyframes calcButtonPulse {
    0%, 100% {
        box-shadow: 
            0 8px 30px rgba(4, 120, 87, 0.4),
            0 4px 15px rgba(5, 150, 105, 0.3),
            inset 0 2px 4px rgba(255, 255, 255, 0.2);
    }
    50% {
        box-shadow: 
            0 8px 30px rgba(4, 120, 87, 0.6),
            0 4px 15px rgba(5, 150, 105, 0.5),
            inset 0 2px 4px rgba(255, 255, 255, 0.3),
            0 0 30px rgba(4, 120, 87, 0.4);
    }
}

.calc-button:hover {
    transform: translateY(-2px) scale(1.02);
    background-position: 100% 50%;
    box-shadow: 
        0 12px 40px rgba(4, 120, 87, 0.5),
        0 6px 20px rgba(5, 150, 105, 0.4),
        inset 0 2px 6px rgba(255, 255, 255, 0.3);
    animation: none;
}

.calc-button:active {
    transform: translateY(0) scale(1);
}

.calc-button-text {
    position: relative;
    z-index: 2;
    white-space: nowrap;
    font-family: var(--font-family-heading);
    flex-shrink: 0;
    min-width: 0;
    line-height: 1;
    text-align: center;
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
}

/* Десктоп (>1024px) */
@media (min-width: 1025px) {
    .calc-button {
        padding: 20px 40px;
        font-size: 20px;
        min-height: 64px;
        line-height: 1;
    }
}

/* Планшеты (769px-1024px) */
@media (max-width: 1024px) and (min-width: 769px) {
    .calc-button {
        padding: 18px 32px;
        font-size: 18px;
        min-height: 62px;
        line-height: 1;
    }
}

/* Всплывающее окно с ошибкой - премиальный компактный дизайн */
.birthdate-error {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 0;
    right: auto;
    transform: translateY(6px) scale(0.96);
    padding: 8px 14px;
    margin: 0;
    background: linear-gradient(135deg, 
        rgba(55, 15, 85, 0.78) 0%, 
        rgba(75, 35, 140, 0.75) 25%,
        rgba(88, 28, 135, 0.78) 50%,
        rgba(75, 35, 140, 0.75) 75%,
        rgba(55, 15, 85, 0.78) 100%);
    background-size: 200% 200%;
    backdrop-filter: blur(32px);
    -webkit-backdrop-filter: blur(32px);
    border: 1px solid rgba(88, 28, 135, 0.25);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.95);
    font-size: 13px;
    font-weight: 500;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.5;
    letter-spacing: 0.015em;
    text-align: left;
    z-index: 1000;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
    white-space: normal;
    overflow: visible;
    width: fit-content;
    min-width: 0;
    max-width: min(calc(100vw - 40px), calc(100% - 20px));
    word-wrap: break-word;
    word-break: break-word;
    will-change: opacity, transform;
    box-shadow: 
        0 6px 24px rgba(55, 15, 85, 0.35),
        0 3px 12px rgba(75, 35, 140, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.08) inset,
        inset 0 1px 2px rgba(255, 255, 255, 0.15);
    contain: layout style;
}

/* Стрелка, указывающая на поле */
.birthdate-error::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 20px;
    transform: translateX(0);
    width: 0;
    height: 0;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-top: 7px solid rgba(55, 15, 85, 0.78);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.birthdate-error::before {
    content: '⚠';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    font-size: 13px;
    line-height: 1;
    color: rgba(255, 255, 255, 1);
    background: rgba(139, 92, 246, 0.4);
    border-radius: 50%;
    box-shadow: 
        0 0 0 1px rgba(124, 58, 237, 0.45),
        inset 0 1px 2px rgba(255, 255, 255, 0.25);
}

.birthdate-error-text {
    flex-shrink: 1;
    flex-grow: 0;
    min-width: 0;
    max-width: 100%;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.birthdate-error.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
    contain: none;
}

/* Невалидное поле - премиальный темный стиль */
.field-input-wrapper.invalid {
    border-color: rgba(139, 92, 246, 0.4);
    background: linear-gradient(135deg, rgba(12, 6, 20, 0.98), rgba(10, 5, 18, 0.95));
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.5),
        0 4px 16px rgba(88, 28, 135, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    animation: errorPulse 0.4s ease-out;
}

.field-input-wrapper.invalid:focus-within {
    border-color: rgba(139, 92, 246, 0.55);
    background: linear-gradient(135deg, rgba(14, 8, 24, 1), rgba(12, 6, 20, 0.98));
    box-shadow: 
        0 0 0 6px rgba(88, 28, 135, 0.2),
        0 12px 40px rgba(88, 28, 135, 0.35),
        0 8px 24px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: translateY(-2px) scale(1.002);
}

.field-input-wrapper.invalid:hover:not(:focus-within) {
    border-color: rgba(139, 92, 246, 0.5);
    box-shadow: 
        0 8px 36px rgba(0, 0, 0, 0.5),
        0 6px 20px rgba(88, 28, 135, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* Анимация пульсации при ошибке - премиальная темная */
@keyframes errorPulse {
    0% {
        box-shadow: 
            0 8px 32px rgba(0, 0, 0, 0.5),
            0 4px 16px rgba(88, 28, 135, 0.25),
            inset 0 1px 0 rgba(255, 255, 255, 0.05);
    }
    50% {
        box-shadow: 
            0 8px 32px rgba(0, 0, 0, 0.5),
            0 4px 16px rgba(88, 28, 135, 0.4),
            0 0 0 4px rgba(88, 28, 135, 0.2),
            inset 0 1px 0 rgba(255, 255, 255, 0.05);
    }
    100% {
        box-shadow: 
            0 8px 32px rgba(0, 0, 0, 0.5),
            0 4px 16px rgba(88, 28, 135, 0.25),
            inset 0 1px 0 rgba(255, 255, 255, 0.05);
    }
}

/* Десктоп - компактный премиальный дизайн */
@media (min-width: 1025px) {
    .birthdate-error {
        font-size: 13.5px;
        padding: 9px 16px;
        width: fit-content;
        min-width: 0;
        gap: 12px;
        bottom: calc(100% + 11px);
    }
    
    .birthdate-error::before {
        width: 19px;
        height: 19px;
        font-size: 14px;
    }
    
    .birthdate-error::after {
        left: 22px;
    }
}

/* Адаптация всплывающего окна для маленьких экранов */
@media (max-width: 480px) {
    .birthdate-error {
        white-space: normal;
        text-align: left;
        width: fit-content;
        min-width: 0;
        max-width: min(calc(100vw - 24px), calc(100% - 16px));
        padding: 7px 12px;
        font-size: 11px;
        gap: 8px;
        background: linear-gradient(135deg, 
            rgba(55, 15, 85, 0.75) 0%, 
            rgba(75, 35, 140, 0.72) 25%,
            rgba(88, 28, 135, 0.75) 50%,
            rgba(75, 35, 140, 0.72) 75%,
            rgba(55, 15, 85, 0.75) 100%);
        background-size: 200% 200%;
        border-color: rgba(88, 28, 135, 0.25);
        box-shadow: 
            0 5px 18px rgba(55, 15, 85, 0.3),
            0 2px 8px rgba(75, 35, 140, 0.25),
            inset 0 1px 0 rgba(255, 255, 255, 0.12);
    }
    
    .birthdate-error::after {
        border-top-color: rgba(55, 15, 85, 0.75);
    }
}

/* Улучшение видимости на очень маленьких экранах */
@media (max-width: 360px) {
    .birthdate-error {
        width: fit-content;
        min-width: 0;
        max-width: min(calc(100vw - 20px), calc(100% - 12px));
        padding: 6px 10px;
        font-size: 10px;
        gap: 7px;
        background: linear-gradient(135deg, 
            rgba(55, 15, 85, 0.73) 0%, 
            rgba(75, 35, 140, 0.7) 25%,
            rgba(88, 28, 135, 0.73) 50%,
            rgba(75, 35, 140, 0.7) 75%,
            rgba(55, 15, 85, 0.73) 100%);
        background-size: 200% 200%;
    }
    
    .birthdate-error::after {
        border-top-color: rgba(55, 15, 85, 0.73);
    }
}

/* Отключение анимаций для пользователей с prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    .birthdate-error {
        transition: opacity 0.15s ease, visibility 0.15s ease;
    }
    
    .birthdate-error.show {
        transform: translateX(-50%) translateY(0) scale(1);
    }
    
    .field-input-wrapper.invalid {
        animation: none;
    }
    
    .field-input-wrapper {
        transition: border-color 0.15s ease, background 0.15s ease;
    }
}

/* Валидное поле - улучшенный стиль */
.field-input-wrapper.valid {
    border-color: rgba(34, 197, 94, 0.4);
    background: linear-gradient(135deg, rgba(18, 10, 28, 0.98), rgba(8, 20, 12, 0.95));
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.5),
        0 4px 16px rgba(34, 197, 94, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.field-input-wrapper.valid:focus-within {
    border-color: rgba(34, 197, 94, 0.6);
    background: linear-gradient(135deg, rgba(20, 12, 32, 1), rgba(10, 22, 14, 0.98));
    box-shadow: 
        0 0 0 6px rgba(34, 197, 94, 0.12),
        0 12px 40px rgba(34, 197, 94, 0.25),
        0 8px 24px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: translateY(-2px) scale(1.002);
}

.field-input-wrapper.valid:hover:not(:focus-within) {
    border-color: rgba(34, 197, 94, 0.5);
    box-shadow: 
        0 8px 36px rgba(0, 0, 0, 0.5),
        0 6px 20px rgba(34, 197, 94, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
