/* Подключение фирменного шрифта */
@font-face {
    font-family: 'TT Firs Neue';
    src: url('TTFirsNeue-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: 'TT Firs Neue';
    src: url('TTFirsNeue-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'TT Firs Neue';
    src: url('TTFirsNeue-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'TT Firs Neue';
    src: url('TTFirsNeue-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

:root {
    --brand: #4DB6A0;
    --brand-dark: #3A9A87;
    --brand-light: #6DC8B6;

    /* Liquid Glass tokens */
    --glass-bg: rgba(255, 255, 255, 0.55);
    --glass-bg-hover: rgba(255, 255, 255, 0.65);
    --glass-border: rgba(255, 255, 255, 0.6);
    --glass-border-inner: rgba(255, 255, 255, 0.35);
    --glass-shadow: 0 8px 40px rgba(0, 0, 0, 0.08), 0 2px 12px rgba(0, 0, 0, 0.04);
    --glass-shadow-elevated: 0 12px 48px rgba(0, 0, 0, 0.12), 0 4px 16px rgba(0, 0, 0, 0.06);
    --glass-blur: 24px;
    --glass-blur-heavy: 40px;
    --glass-specular: linear-gradient(135deg, rgba(255,255,255,0.5) 0%, rgba(255,255,255,0.0) 50%);

    --text-primary: rgba(0, 0, 0, 0.85);
    --text-secondary: rgba(0, 0, 0, 0.55);
    --text-tertiary: rgba(0, 0, 0, 0.35);
    --text-on-glass: rgba(0, 0, 0, 0.75);

    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
}

/* Общие стили */
body {
    font-family: 'TT Firs Neue', -apple-system, 'SF Pro Display', 'Helvetica Neue', sans-serif;
    margin: 0;
    padding: 0;
    background: url('bg.jpg') no-repeat center center;
    background-size: cover;
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.65;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Фон для авиа-страницы */
body.avia-page {
    background-image: url('avia-bg.jpg');
}

/* Мутный оверлей поверх фона */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    background: rgba(255, 255, 255, 0.2);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

/* ========== HERO — Liquid Glass Header ========== */
.hero {
    position: relative;
    text-align: center;
    padding: 52px 20px 44px;
    color: #fff;
    overflow: hidden;

    /* Светлое стекло поверх фона */
    background: rgba(255, 255, 255, 0.35);
    -webkit-backdrop-filter: blur(var(--glass-blur-heavy)) saturate(160%);
    backdrop-filter: blur(var(--glass-blur-heavy)) saturate(160%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.2) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

.hero::after {
    display: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 600px;
    margin: 0 auto;
}

.hero .logo {
    max-width: 280px;
    height: auto;
    margin-bottom: 14px;
}

.hero p {
    font-size: 1.1em;
    font-weight: 400;
    letter-spacing: 0.02em;
    margin: 0;
    color: var(--text-secondary);
}

/* ========== CONTAINER — Main Liquid Glass Card ========== */
.container {
    max-width: 760px;
    margin: -20px auto 40px;
    padding: 40px 44px;
    position: relative;
    z-index: 2;

    /* Liquid Glass */
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(160%);
    backdrop-filter: blur(var(--glass-blur)) saturate(160%);
    border-radius: var(--radius-xl);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow-elevated);
    overflow: hidden;
}

/* Спекулярный блик на стекле */
.container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: var(--glass-specular);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    pointer-events: none;
    z-index: 0;
}

.container > * {
    position: relative;
    z-index: 1;
}

/* ========== FORM HEADER ========== */
.feedback-form-section h2 {
    text-align: center;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-size: 1.6em;
    font-weight: 700;
    letter-spacing: -0.015em;
    position: relative;
    padding-bottom: 16px;
}

.feedback-form-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 4px;
    background: var(--brand);
    border-radius: 2px;
}

.agency-name {
    text-align: center;
    font-size: 1em;
    font-weight: 500;
    color: var(--brand-dark);
    margin-bottom: 12px;
    letter-spacing: 0.01em;
}

.feedback-form-section > p:last-of-type {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.92em;
    line-height: 1.65;
    max-width: 560px;
    margin: 0 auto 20px;
}

/* ========== FORM SECTIONS ========== */
form h3 {
    color: var(--text-primary);
    margin-top: 32px;
    margin-bottom: 16px;
    font-weight: 600;
    font-size: 1.05em;
    position: relative;
    padding-bottom: 10px;
    border-bottom: none;
}

form h3::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, var(--brand), rgba(77,182,160,0.15), transparent);
}

/* ========== FORM FIELDS — Glass Inputs ========== */
.form-group {
    margin-bottom: 18px;
    width: 100%;
    box-sizing: border-box;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.93em;
}

.form-group input[type="text"],
.form-group input[type="date"],
.form-group input[type="email"] {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--radius-sm);
    font-size: 1em;
    font-family: inherit;
    box-sizing: border-box;
    display: block;
    color: var(--text-primary);
    transition: all 0.25s ease;

    /* Glass input */
    background: rgba(255, 255, 255, 0.5);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.04), 0 1px 0 rgba(255,255,255,0.6);
}

.form-group input[type="text"]:focus,
.form-group input[type="date"]:focus,
.form-group input[type="email"]:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(77, 182, 160, 0.15), inset 0 1px 2px rgba(0,0,0,0.04);
    background: rgba(255, 255, 255, 0.7);
}

.form-group input[type="date"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    position: relative;
    height: 46px;
    min-height: 46px;
    line-height: 1.2;
}

.form-group input[type="date"]::-webkit-datetime-edit {
    padding: 0;
    margin: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    color: var(--text-primary);
}

.form-group input[type="date"]::-webkit-datetime-edit-fields-wrapper {
    padding: 0;
    margin: 0;
    height: 100%;
    display: flex;
    align-items: center;
}

.form-group input[type="date"]::-webkit-datetime-edit-text {
    padding: 0 2px;
    line-height: 1.2;
    color: var(--text-primary);
}

.form-group input[type="date"]::-webkit-datetime-edit-month-field,
.form-group input[type="date"]::-webkit-datetime-edit-day-field,
.form-group input[type="date"]::-webkit-datetime-edit-year-field {
    padding: 0 2px;
    line-height: 1.2;
    height: auto;
    color: var(--text-primary);
}

.form-group input[type="date"]::-webkit-inner-spin-button,
.form-group input[type="date"]::-webkit-calendar-picker-indicator {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    position: absolute !important;
    left: -9999px !important;
}

.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--radius-sm);
    font-size: 1em;
    font-family: inherit;
    box-sizing: border-box;
    display: block;
    color: var(--text-primary);
    transition: all 0.25s ease;

    background: rgba(255, 255, 255, 0.5);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.04), 0 1px 0 rgba(255,255,255,0.6);
}

.form-group textarea:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(77, 182, 160, 0.15), inset 0 1px 2px rgba(0,0,0,0.04);
    background: rgba(255, 255, 255, 0.7);
}

textarea {
    resize: vertical;
    min-height: 80px;
}

/* ========== RADIO BUTTONS — Glass Pills ========== */
.form-group input[type="radio"] {
    display: none;
    margin-right: 5px;
}

.form-group input[type="radio"] + label {
    display: inline-block;
    margin-right: 8px;
    margin-bottom: 8px;
    font-weight: 400;
    padding: 9px 20px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 0.92em;
    color: var(--text-on-glass);
    transition: all 0.25s ease;

    /* Glass pill */
    background: rgba(255, 255, 255, 0.4);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04), inset 0 1px 0 rgba(255,255,255,0.5);
}

.form-group input[type="radio"] + label:hover {
    background: rgba(255, 255, 255, 0.55);
    border-color: rgba(77, 182, 160, 0.3);
    box-shadow: 0 4px 12px rgba(0,0,0,0.06), inset 0 1px 0 rgba(255,255,255,0.6);
}

.form-group input[type="radio"]:checked + label {
    background: rgba(77, 182, 160, 0.65);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    backdrop-filter: blur(20px) saturate(150%);
    color: #fff;
    border-color: rgba(77, 182, 160, 0.4);
    box-shadow: 0 4px 16px rgba(77, 182, 160, 0.25), inset 0 1px 0 rgba(255,255,255,0.25);
}

.form-group input[type="radio"]:focus {
    outline: none;
}

/* ========== RATING TABLES — Glass Table ========== */
.rating-section table {
    width: 100%;
    max-width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 12px;
    table-layout: fixed;

    /* Glass table */
    background: rgba(255, 255, 255, 0.35);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: var(--glass-shadow);
    overflow: hidden;
}

.rating-section th,
.rating-section td {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 14px 16px;
    text-align: left;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.rating-section tr:last-child td {
    border-bottom: none;
}

.rating-section th {
    background: rgba(255, 255, 255, 0.3);
    color: var(--brand-dark);
    font-weight: 600;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.rating-section td:first-child {
    font-weight: 500;
    color: var(--text-primary);
    width: 70%;
    font-size: 0.93em;
}

.rating-section td:last-child {
    width: 30%;
    text-align: center;
}

.rating-section .rating-group {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px;
    max-width: fit-content;
    padding: 0 4px;
    margin: 0 auto;
}

.rating-section .rating-group label {
    margin: 0 1px;
    cursor: pointer;
    padding: 10px 10px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.8em;
    min-width: 40px;
    max-width: 48px;
    text-align: center;
    flex: 1;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    color: var(--text-secondary);
    transition: all 0.25s ease;

    /* Glass number pill */
    background: rgba(255, 255, 255, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 1px 4px rgba(0,0,0,0.04), inset 0 1px 0 rgba(255,255,255,0.5);
}

.rating-section .rating-group label:hover {
    background: rgba(255, 255, 255, 0.65);
    border-color: rgba(77, 182, 160, 0.3);
    transform: scale(1.05);
}

.rating-section .rating-group input[type="radio"]:checked + label {
    background: rgba(77, 182, 160, 0.6);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
    backdrop-filter: blur(16px) saturate(150%);
    color: #fff;
    border-color: rgba(77, 182, 160, 0.35);
    box-shadow: 0 4px 14px rgba(77, 182, 160, 0.25), inset 0 1px 0 rgba(255,255,255,0.2);
    transform: scale(1.05);
}

.rating-section .rating-group input[type="radio"] {
    display: none;
}

/* ========== SUBMIT BUTTON — Liquid Glass CTA ========== */
button[type="submit"] {
    display: block;
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1.1em;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    margin-top: 32px;
    letter-spacing: 0.01em;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;

    /* Glass CTA */
    background: rgba(77, 182, 160, 0.55);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    backdrop-filter: blur(20px) saturate(160%);
    color: #fff;
    border: 1px solid rgba(77, 182, 160, 0.35);
    box-shadow: 0 8px 28px rgba(77, 182, 160, 0.2), inset 0 1px 0 rgba(255,255,255,0.25);
}

/* Спекулярный блик на кнопке */
button[type="submit"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255,255,255,0.2) 0%, transparent 100%);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    pointer-events: none;
}

button[type="submit"]:hover {
    background: rgba(77, 182, 160, 0.7);
    transform: translateY(-1px);
    box-shadow: 0 12px 36px rgba(77, 182, 160, 0.3), inset 0 1px 0 rgba(255,255,255,0.3);
}

button[type="submit"]:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 4px 16px rgba(77, 182, 160, 0.2);
}

/* ========== FOOTER — Glass Footer ========== */
.footer {
    text-align: center;
    padding: 24px 20px;
    color: var(--text-secondary);
    font-size: 0.88em;
    font-weight: 400;

    background: rgba(255, 255, 255, 0.4);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(160%);
    backdrop-filter: blur(var(--glass-blur)) saturate(160%);
    border-top: 1px solid rgba(255, 255, 255, 0.5);
}

.footer p {
    margin: 0;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ========== LANGUAGE SWITCHER — Glass Tabs ========== */
.language-switcher {
    position: absolute;
    top: 14px;
    right: 14px;
    display: flex;
    gap: 4px;
    z-index: 10;

    /* Glass tab bar */
    background: rgba(255, 255, 255, 0.4);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-radius: 10px;
    padding: 3px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.lang-btn {
    background: transparent;
    color: var(--text-secondary);
    border: none;
    padding: 7px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    transition: all 0.25s ease;
    min-width: 44px;
    text-align: center;
}

.lang-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.5);
}

.lang-btn.active {
    background: rgba(77, 182, 160, 0.5);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    color: #fff;
    box-shadow: 0 2px 8px rgba(77, 182, 160, 0.2);
}

/* ========== MODAL — Liquid Glass Sheet ========== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.25);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    animation: fadeIn 0.35s ease;
}

.modal-content {
    margin: 15% auto;
    padding: 2.5rem;
    width: 90%;
    max-width: 400px;
    text-align: center;
    animation: slideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);

    /* Liquid Glass Sheet */
    background: rgba(255, 255, 255, 0.55);
    -webkit-backdrop-filter: blur(var(--glass-blur-heavy)) saturate(180%);
    backdrop-filter: blur(var(--glass-blur-heavy)) saturate(180%);
    border-radius: var(--radius-xl);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.12), 0 8px 24px rgba(0, 0, 0, 0.06);
    color: var(--text-primary);
    position: relative;
    overflow: hidden;
}

/* Спекулярный блик на модалке */
.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 45%;
    background: linear-gradient(180deg, rgba(255,255,255,0.35) 0%, transparent 100%);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    pointer-events: none;
}

.modal-content h2 {
    margin: 0 0 0.75rem 0;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    position: relative;
}

.modal-content p {
    margin: 0 0 1.5rem 0;
    font-size: 1rem;
    color: var(--text-secondary);
    position: relative;
}

.modal-close {
    position: relative;
    padding: 10px 32px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    font-family: inherit;
    transition: all 0.25s ease;

    background: rgba(77, 182, 160, 0.5);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    color: #fff;
    border: 1px solid rgba(77, 182, 160, 0.3);
    box-shadow: 0 4px 16px rgba(77, 182, 160, 0.2), inset 0 1px 0 rgba(255,255,255,0.2);
}

.modal-close:hover {
    background: rgba(77, 182, 160, 0.65);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(77, 182, 160, 0.3), inset 0 1px 0 rgba(255,255,255,0.25);
}

/* ========== PROGRESS BAR ========== */
.progress-bar-wrapper {
    margin-bottom: 28px;
    text-align: center;
}

.progress-bar-track {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(0, 0, 0, 0.06);
    overflow: hidden;
    position: relative;
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--brand-light), var(--brand));
    transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-bar-text {
    display: inline-block;
    margin-top: 8px;
    font-size: 0.8em;
    font-weight: 500;
    color: var(--text-tertiary);
    letter-spacing: 0.01em;
}

/* ========== DATE INPUT WRAPPER ========== */
.date-input-wrapper {
    position: relative;
    width: 100%;
}

.date-input-wrapper input {
    padding-right: 44px !important;
    cursor: pointer;
}

.date-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--text-tertiary);
    pointer-events: none;
    transition: color 0.2s ease;
}

.date-input-wrapper input:focus ~ .date-icon {
    color: var(--brand);
}

/* ========== SCROLL FADE-IN ANIMATION ========== */
.fade-in-section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in-section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========== TEXTAREA SMOOTH REVEAL ========== */
.textarea-reveal {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease, margin 0.3s ease;
    margin-top: 0;
}

.textarea-reveal.open {
    max-height: 200px;
    opacity: 1;
    margin-top: 12px;
}

/* ========== SUBMIT BUTTON GLOW ========== */
@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 8px 28px rgba(77, 182, 160, 0.2), inset 0 1px 0 rgba(255,255,255,0.25); }
    50% { box-shadow: 0 8px 40px rgba(77, 182, 160, 0.4), 0 0 20px rgba(77, 182, 160, 0.15), inset 0 1px 0 rgba(255,255,255,0.25); }
}

button[type="submit"].ready {
    animation: pulseGlow 2s ease-in-out infinite;
}

/* ========== DATEPICKER — Liquid Glass Calendar ========== */
.datepicker {
    display: none;
    position: absolute;
    z-index: 9999;
    padding: 16px;
    width: 300px;

    background: #ffffff;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 16px 64px rgba(0,0,0,0.16), 0 4px 16px rgba(0,0,0,0.08);
}

.datepicker.open {
    display: block;
    animation: dpSlideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dpSlideIn {
    from { opacity: 0; transform: translateY(-8px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.datepicker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding: 0 2px;
}

.datepicker-header span {
    font-weight: 600;
    font-size: 1em;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.datepicker-header button {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: var(--text-secondary);

    background: rgba(255, 255, 255, 0.5);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.datepicker-header button:hover {
    background: rgba(77, 182, 160, 0.15);
    color: var(--brand-dark);
}

.datepicker-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
    text-align: center;
}

.datepicker-grid .dp-weekday {
    font-size: 0.72em;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 4px 0 8px;
}

.datepicker-grid .dp-day {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.88em;
    font-weight: 400;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    transition: all 0.15s ease;
    color: var(--text-primary);
    background: transparent;
}

.datepicker-grid .dp-day:hover {
    background: rgba(77, 182, 160, 0.12);
}

.datepicker-grid .dp-day.today {
    border: 1.5px solid var(--brand);
    color: var(--brand-dark);
    font-weight: 600;
}

.datepicker-grid .dp-day.selected {
    background: rgba(77, 182, 160, 0.6);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(77, 182, 160, 0.25);
}

.datepicker-grid .dp-day.other-month {
    color: var(--text-tertiary);
    opacity: 0.5;
}

.datepicker-grid .dp-day.other-month:hover {
    background: rgba(0, 0, 0, 0.03);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ========== iOS Safari fix ========== */
@supports (-webkit-touch-callout: none) {
    body {
        background-attachment: scroll !important;
    }
}

/* ========== MOBILE — 768px ========== */
@media (max-width: 768px) {
    body {
        background-attachment: scroll !important;
    }

    .hero {
        padding: 40px 16px 32px;
    }

    .hero .logo {
        max-width: 200px;
        margin-bottom: 10px;
    }

    .hero p {
        font-size: 0.95em;
    }

    .container {
        margin: -14px 10px 30px;
        padding: 24px 18px;
        border-radius: var(--radius-lg);
    }

    .feedback-form-section h2 {
        font-size: 1.25em;
    }

    .agency-name {
        font-size: 0.93em;
    }

    .feedback-form-section > p:last-of-type {
        font-size: 0.88em;
    }

    form h3 {
        font-size: 1em;
        margin-top: 28px;
    }

    .language-switcher {
        top: 10px;
        right: 10px;
    }

    .lang-btn {
        padding: 6px 13px;
        font-size: 12px;
        min-width: 40px;
    }

    /* Таблицы — вертикальная раскладка */
    .rating-section table,
    .rating-section thead,
    .rating-section tbody,
    .rating-section th,
    .rating-section td,
    .rating-section tr {
        display: block;
        width: 100%;
    }

    .rating-section thead {
        display: none;
    }

    .rating-section tr {
        margin-bottom: 8px;
        border-radius: var(--radius-sm);
        overflow: hidden;
        border: 1px solid rgba(0, 0, 0, 0.04);
    }

    .rating-section td:first-child {
        width: 100%;
        padding: 12px 14px 6px;
        text-align: center;
        font-size: 0.9em;
        border-bottom: none;
    }

    .rating-section td:last-child {
        width: 100%;
        padding: 4px 14px 12px;
        border-bottom: none;
    }

    .rating-section .rating-group {
        justify-content: center;
        gap: 6px;
        padding: 0;
    }

    .rating-section .rating-group label {
        font-size: 1.4em !important;
        min-width: 36px !important;
        max-width: 44px !important;
        padding: 4px !important;
    }

    /* Радио-кнопки в строку с переносом */
    .form-group input[type="radio"] + label {
        margin-right: 6px;
        margin-bottom: 6px;
        padding: 8px 14px;
        font-size: 0.88em;
    }

    /* Кнопка отправки */
    button[type="submit"] {
        padding: 14px;
        font-size: 1em;
        margin-top: 24px;
    }

    /* Прогресс-бар */
    .progress-bar-text {
        font-size: 0.75em;
    }

    /* Toast */
    .toast {
        font-size: 0.88em;
        padding: 12px 18px;
    }

    /* Theme toggle */
    .theme-toggle {
        width: 40px;
        height: 40px;
        font-size: 18px;
        bottom: 16px;
        right: 16px;
    }

    /* Datepicker */
    .datepicker {
        width: calc(100vw - 32px);
        max-width: 320px;
    }

    /* Footer */
    .footer {
        font-size: 0.82em;
        padding: 20px 16px;
    }
}

/* ========== MOBILE — 480px ========== */
@media (max-width: 480px) {
    body {
        background-attachment: scroll !important;
    }

    .hero {
        padding: 32px 12px 24px;
    }

    .hero .logo {
        max-width: 160px;
    }

    .hero p {
        font-size: 0.88em;
    }

    .container {
        margin: -10px 6px 24px;
        padding: 20px 14px;
        border-radius: var(--radius-md);
    }

    .feedback-form-section h2 {
        font-size: 1.15em;
    }

    form h3 {
        font-size: 0.95em;
        margin-top: 24px;
    }

    .language-switcher {
        top: 8px;
        right: 8px;
    }

    .lang-btn {
        padding: 5px 10px;
        font-size: 11px;
        min-width: 36px;
    }

    .form-group input[type="text"],
    .form-group input[type="email"],
    .form-group textarea {
        padding: 10px 12px;
        font-size: 0.95em;
    }

    .form-group label {
        font-size: 0.88em;
    }

    .rating-section td:first-child {
        font-size: 0.85em;
        padding: 10px 10px 4px;
    }

    .rating-section td:last-child {
        padding: 2px 10px 10px;
    }

    .rating-section .rating-group label {
        font-size: 1.25em !important;
        min-width: 32px !important;
        max-width: 40px !important;
    }

    .form-group input[type="radio"] + label {
        padding: 7px 12px;
        font-size: 0.84em;
        margin-right: 4px;
    }

    button[type="submit"] {
        padding: 13px;
        font-size: 0.95em;
    }

    .datepicker {
        width: calc(100vw - 24px);
        padding: 12px;
    }

    .datepicker-grid .dp-day {
        width: 32px;
        height: 32px;
        font-size: 0.82em;
    }

    .theme-toggle {
        width: 36px;
        height: 36px;
        font-size: 16px;
        bottom: 12px;
        right: 12px;
    }

    .modal-content {
        margin: 25% auto;
        padding: 2rem 1.5rem;
        width: 92%;
        border-radius: var(--radius-lg);
    }

    .modal-content h2 {
        font-size: 1.2rem;
    }

    .footer {
        font-size: 0.78em;
        padding: 18px 12px;
    }
}

/* ========== MOBILE — 360px (маленькие экраны) ========== */
@media (max-width: 360px) {
    .hero {
        padding: 28px 10px 20px;
    }

    .hero .logo {
        max-width: 140px;
    }

    .container {
        margin: -8px 4px 20px;
        padding: 16px 10px;
    }

    .feedback-form-section h2 {
        font-size: 1.05em;
    }

    .rating-section .rating-group {
        gap: 4px;
    }

    .rating-section .rating-group label {
        font-size: 1.1em !important;
        min-width: 28px !important;
        max-width: 36px !important;
    }

    .form-group input[type="radio"] + label {
        padding: 6px 10px;
        font-size: 0.8em;
    }
}

/* ========== VALIDATION ERRORS ========== */
.form-group.error-highlight {
    border: 1.5px solid rgba(231, 76, 60, 0.6);
    border-radius: var(--radius-sm);
    padding: 10px;
    background-color: rgba(231, 76, 60, 0.06);
    box-sizing: border-box;
    margin: 0;
}

.rating-section table.error-highlight {
    border: 1.5px solid rgba(231, 76, 60, 0.6);
    border-radius: var(--radius-md);
    background-color: rgba(231, 76, 60, 0.06);
    box-sizing: border-box;
    margin: 0;
}

/* ========== STAR RATINGS ========== */
.rating-section .rating-group {
    gap: 2px;
}

.rating-section .rating-group label {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    font-size: 1.5em !important;
    min-width: 36px !important;
    max-width: 42px !important;
    padding: 4px !important;
    color: #d0d0d0;
    transition: color 0.15s ease, transform 0.15s ease;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}

.rating-section .rating-group label::before {
    content: '\2605';
}

.rating-section .rating-group label span {
    display: none;
}

.rating-section .rating-group label:hover,
.rating-section .rating-group label.star-hover {
    color: #f0c040;
    transform: scale(1.15);
}

.rating-section .rating-group input[type="radio"]:checked + label {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: #f0c040 !important;
    transform: scale(1.1);
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}

.rating-section .rating-group label.star-active {
    color: #f0c040 !important;
}

/* ========== NPS SCALE LABELS ========== */
.nps-scale-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.8em;
    color: var(--text-secondary);
    margin-bottom: 8px;
    padding: 0 4px;
}

.nps-group {
    justify-content: center;
}

/* ========== CHARACTER COUNTER ========== */
.char-counter-wrapper {
    position: relative;
}

.char-counter {
    position: absolute;
    bottom: 8px;
    right: 12px;
    font-size: 0.75em;
    font-weight: 400;
    color: var(--text-tertiary);
    pointer-events: none;
    transition: color 0.2s ease;
}

.char-counter.has-text {
    color: var(--brand);
}

/* ========== SUBMIT SPINNER ========== */
button[type="submit"] .btn-text {
    transition: opacity 0.2s ease;
}

button[type="submit"].loading .btn-text {
    opacity: 0;
}

button[type="submit"] .btn-spinner {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

button[type="submit"].loading .btn-spinner {
    display: block;
}

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========== TOAST NOTIFICATIONS ========== */
.toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    pointer-events: none;
}

.toast {
    padding: 14px 24px;
    border-radius: var(--radius-md);
    font-size: 0.93em;
    font-weight: 500;
    font-family: inherit;
    color: #fff;
    pointer-events: auto;
    animation: toastIn 0.4s cubic-bezier(0.16, 1, 0.3, 1), toastOut 0.3s ease 3.2s forwards;
    max-width: 90vw;
    text-align: center;
    line-height: 1.5;

    background: rgba(255, 255, 255, 0.75);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    color: var(--text-primary);
}

.toast.toast-error {
    border-color: rgba(231, 76, 60, 0.3);
    background: rgba(255, 240, 238, 0.85);
}

.toast.toast-success {
    border-color: rgba(77, 182, 160, 0.3);
    background: rgba(238, 255, 250, 0.85);
}

@keyframes toastIn {
    from { opacity: 0; transform: translateY(-20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toastOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-10px); }
}

/* ========== CONFETTI CANVAS ========== */
#confettiCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9998;
    pointer-events: none;
}

/* ========== DARK THEME ========== */
.theme-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 100;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;

    background: rgba(255, 255, 255, 0.6);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

/* Dark mode */
body.dark {
    --text-primary: rgba(255, 255, 255, 0.9);
    --text-secondary: rgba(255, 255, 255, 0.6);
    --text-tertiary: rgba(255, 255, 255, 0.35);
    --text-on-glass: rgba(255, 255, 255, 0.8);
    --glass-bg: rgba(30, 30, 50, 0.6);
    --glass-border: rgba(255, 255, 255, 0.12);
    --glass-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
    --glass-shadow-elevated: 0 12px 48px rgba(0, 0, 0, 0.4);
    --glass-specular: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.0) 50%);
}

body.dark::before {
    background: rgba(0, 0, 0, 0.4);
}

body.dark .hero {
    background: rgba(20, 20, 40, 0.5);
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

body.dark .hero::before {
    background: linear-gradient(180deg, rgba(255,255,255,0.04) 0%, transparent 60%);
}

body.dark .hero p {
    color: rgba(255, 255, 255, 0.6);
}

body.dark .container {
    background: rgba(30, 30, 50, 0.55);
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark .form-group input[type="text"],
body.dark .form-group input[type="date"],
body.dark .form-group input[type="email"],
body.dark .form-group textarea {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.2);
}

body.dark .form-group input:focus,
body.dark .form-group textarea:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(77, 182, 160, 0.2);
}

body.dark .form-group input[type="radio"] + label {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.75);
}

body.dark .form-group input[type="radio"] + label:hover {
    background: rgba(255, 255, 255, 0.12);
}

body.dark .form-group input[type="radio"]:checked + label {
    background: rgba(77, 182, 160, 0.5);
    color: #fff;
}

body.dark .rating-section table {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark .rating-section th {
    background: rgba(255, 255, 255, 0.05);
}

body.dark .rating-section th,
body.dark .rating-section td {
    border-bottom-color: rgba(255, 255, 255, 0.06);
}

body.dark .rating-section .rating-group label {
    color: rgba(255, 255, 255, 0.3) !important;
}

body.dark .rating-section .rating-group label:hover,
body.dark .rating-section .rating-group label.star-hover,
body.dark .rating-section .rating-group label.star-active,
body.dark .rating-section .rating-group input[type="radio"]:checked + label {
    color: #f0c040 !important;
}

body.dark .footer {
    background: rgba(20, 20, 40, 0.5);
    border-top-color: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.5);
}

body.dark .language-switcher {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark .lang-btn {
    color: rgba(255, 255, 255, 0.5);
}

body.dark .lang-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

body.dark .lang-btn.active {
    background: rgba(77, 182, 160, 0.4);
    color: #fff;
}

body.dark button[type="submit"] {
    background: rgba(77, 182, 160, 0.45);
    border-color: rgba(77, 182, 160, 0.3);
}

body.dark button[type="submit"]:hover {
    background: rgba(77, 182, 160, 0.6);
}

body.dark .progress-bar-track {
    background: rgba(255, 255, 255, 0.08);
}

body.dark .modal-content {
    background: rgba(30, 30, 50, 0.75);
    border-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
}

body.dark .modal-content p {
    color: rgba(255, 255, 255, 0.6);
}

body.dark .theme-toggle {
    background: rgba(40, 40, 60, 0.6);
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark .datepicker {
    background: #1e1e32;
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 16px 64px rgba(0,0,0,0.4);
}

body.dark .datepicker-header span {
    color: rgba(255, 255, 255, 0.9);
}

body.dark .datepicker-header button {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

body.dark .datepicker-grid .dp-day {
    color: rgba(255, 255, 255, 0.8);
}

body.dark .datepicker-grid .dp-day.other-month {
    color: rgba(255, 255, 255, 0.2);
}

body.dark .datepicker-grid .dp-day.today {
    border-color: var(--brand);
    color: var(--brand-light);
}

body.dark .datepicker-grid .dp-day.selected {
    background: rgba(77, 182, 160, 0.5);
    color: #fff;
}

body.dark .datepicker-grid .dp-day:hover {
    background: rgba(77, 182, 160, 0.15);
}

body.dark .form-group.error-highlight {
    border-color: rgba(231, 76, 60, 0.5);
    background-color: rgba(231, 76, 60, 0.08);
}

body.dark .rating-section table.error-highlight {
    border-color: rgba(231, 76, 60, 0.5);
    background-color: rgba(231, 76, 60, 0.08);
}

body.dark .toast {
    background: rgba(30, 30, 50, 0.85);
    border-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
}

body.dark .toast.toast-error {
    background: rgba(60, 20, 20, 0.85);
    border-color: rgba(231, 76, 60, 0.3);
}

body.dark .toast.toast-success {
    background: rgba(20, 50, 40, 0.85);
    border-color: rgba(77, 182, 160, 0.3);
}
