/* Современный дизайн калькулятора для аквариума - Светлая тема */
:root {
    /* Основные цвета - светлая морская тема */
    --primary-gradient: linear-gradient(135deg, #1e90ff 0%, #00bfff 100%);
    --secondary-gradient: linear-gradient(135deg, #00bfff 0%, #87ceeb 100%);
    --accent-color: #1e90ff;
    --accent-light: #87ceeb;
    --success-color: #32cd32;
    --warning-color: #ffd700;
    --danger-color: #ff6347;
    
    /* Текст */
    --text-primary: #2c3e50;
    --text-secondary: #34495e;
    --text-light: #7f8c8d;
    
    /* Фоны */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-card: #ffffff;
    --bg-overlay: rgba(30, 144, 255, 0.05);
    
    /* Эффекты */
    --shadow-sm: 0 2px 4px rgba(30, 144, 255, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(30, 144, 255, 0.1), 0 2px 4px -1px rgba(30, 144, 255, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(30, 144, 255, 0.1), 0 4px 6px -2px rgba(30, 144, 255, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(30, 144, 255, 0.1), 0 10px 10px -5px rgba(30, 144, 255, 0.04);
    
    /* Скругления */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 50%;
    
    /* Отступы */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
}

/* Сброс и базовые стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    width: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: linear-gradient(135deg, #f0f8ff 0%, #e6f7ff 50%, #f0f8ff 100%);
    min-height: 100vh;
    padding: var(--spacing-sm);
    position: relative;
}

/* Анимации */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

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

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

@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

/* Фоновые элементы */
.wave-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    opacity: 0.3;
}

.wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 200%;
    height: 100px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120" preserveAspectRatio="none"><path d="M0,0V46.29c47.79,22.2,103.59,32.17,158,28,70.36-5.37,136.33-33.31,206.8-37.5C438.64,32.43,512.34,53.67,583,72.05c69.27,18,138.3,24.88,209.4,13.08,36.15-6,69.85-17.84,104.45-29.34C989.49,25,1113-14.29,1200,52.47V0Z" opacity=".15" fill="%231e90ff"/><path d="M0,0V15.81C13,36.92,27.64,56.86,47.69,72.05,99.41,111.27,165,111,224.58,91.58c31.15-10.15,60.09-26.07,89.67-39.8,40.92-19,84.73-46,130.83-49.67,36.26-2.85,70.9,9.42,98.6,31.56,31.77,25.39,62.32,62,103.63,73,40.44,10.79,81.35-6.69,119.13-24.28s75.16-39,116.92-43.05c59.73-5.85,113.28,22.88,168.9,38.84,30.2,8.66,59,6.17,87.09-7.5,22.43-10.89,48-26.93,60.65-49.24V0Z" opacity=".25" fill="%231e90ff"/><path d="M0,0V5.63C149.93,59,314.09,71.32,475.83,42.57c43-7.64,84.23-20.12,127.61-26.46,59-8.63,112.48,12.24,165.56,35.4C827.93,77.22,886,95.24,951.2,90c86.53-7,172.46-45.71,248.8-84.81V0Z" fill="%231e90ff"/></svg>');
    background-size: 50% 100px;
    animation: wave 25s linear infinite;
}

.bubble {
    position: fixed;
    border-radius: 50%;
    background: rgba(30, 144, 255, 0.08);
    border: 1px solid rgba(30, 144, 255, 0.15);
    z-index: -1;
    pointer-events: none;
    animation: float 6s ease-in-out infinite;
}

.bubble:nth-child(2) { width: 60px; height: 60px; top: 10%; left: 5%; animation-delay: 0s; }
.bubble:nth-child(3) { width: 80px; height: 80px; bottom: 15%; right: 7%; animation-delay: 1s; }
.bubble:nth-child(4) { width: 40px; height: 40px; top: 50%; left: 10%; animation-delay: 2s; }
.bubble:nth-child(5) { width: 50px; height: 50px; bottom: 30%; right: 15%; animation-delay: 3s; }

/* Основной контейнер */
.container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Шапка */
.header {
    background: var(--primary-gradient);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md) var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    box-shadow: var(--shadow-xl);
    color: white;
    position: relative;
    overflow: hidden;
    animation: fadeIn 0.6s ease-out;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #1e90ff, #87ceeb, #1e90ff);
    background-size: 200% 100%;
    animation: shimmer 2s infinite linear;
}

.header-content {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    position: relative;
    z-index: 1;
    flex-wrap: wrap;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
}

.logo i {
    font-size: 1.5rem;
    color: white;
}

.header-text {
    flex: 1;
    min-width: 200px;
}

.header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header .tagline {
    font-size: 0.9rem;
    opacity: 0.9;
    font-weight: 400;
}

.protection-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.875rem;
    font-weight: 500;
    flex-shrink: 0;
}

/* Основной контент */
.main-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
    width: 100%;
}

@media (min-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr 1fr;
    }
}

/* Карточки */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(30, 144, 255, 0.1);
    transition: all 0.3s ease;
    animation: fadeIn 0.6s ease-out;
    width: 100%;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
    border-color: rgba(30, 144, 255, 0.2);
}

/* Заголовки секций */
.section-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 2px solid rgba(30, 144, 255, 0.1);
}

.section-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--secondary-gradient);
    border-radius: var(--radius-md);
    color: white;
    font-size: 1rem;
    flex-shrink: 0;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
}

.section-description {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: var(--spacing-md);
    line-height: 1.5;
}
/* Стили для рекомендаций */
.recommendations {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    border: 1px solid rgba(30, 144, 255, 0.1);
}

.recommendation-item {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
    padding: var(--spacing-xs) 0;
    border-bottom: 1px solid rgba(30, 144, 255, 0.1);
}

.recommendation-item:last-child {
    border-bottom: none;
}

.recommendation-item i {
    color: var(--success-color);
    font-size: 1rem;
    margin-top: 0.125rem;
    flex-shrink: 0;
}

.recommendation-item span {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Адаптация идеальных параметров для большего количества карточек */
@media (min-width: 768px) {
    .ideal-params-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .ideal-params-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .ideal-param-card {
        min-height: 75px;
    }
}

@media (min-width: 1200px) {
    .ideal-params-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Для очень маленьких экранов */
@media (max-width: 480px) {
    .ideal-param-card {
        flex-direction: column;
        text-align: center;
        padding: 0.75rem;
    }
    
    .ideal-param-icon {
        margin-bottom: 0.5rem;
    }
    
    .recommendation-item {
        font-size: 0.85rem;
    }
}

/* Параметры - идеальные значения */
.ideal-params-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
    margin-bottom: var(--spacing-lg);
}

.ideal-param-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border: 1px solid rgba(30, 144, 255, 0.1);
    transition: all 0.2s ease;
    min-height: 70px;
}

.ideal-param-card:hover {
    background: var(--bg-overlay);
    transform: translateX(2px);
    border-color: rgba(30, 144, 255, 0.2);
}

.ideal-param-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--primary-gradient);
    border-radius: var(--radius-sm);
    color: white;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.ideal-param-info h3 {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 0.25rem;
    line-height: 1.2;
}

.ideal-param-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent-color);
    line-height: 1.2;
}

/* Текущие параметры */
.current-params {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    border: 1px solid rgba(30, 144, 255, 0.1);
}

.current-param {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(30, 144, 255, 0.1);
}

.current-param:last-child {
    border-bottom: none;
}

.param-name {
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.param-value {
    font-weight: 700;
    font-size: 1rem;
    color: var(--accent-color);
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-indicator.good {
    background: var(--success-color);
    box-shadow: 0 0 0 2px rgba(50, 205, 50, 0.2);
}

.status-indicator.warning {
    background: var(--warning-color);
    box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.2);
}

.status-indicator.danger {
    background: var(--danger-color);
    box-shadow: 0 0 0 2px rgba(255, 99, 71, 0.2);
}

/* Форма калькулятора */
.calculator-form {
    margin-bottom: var(--spacing-lg);
}

.form-group {
    margin-bottom: var(--spacing-md);
}

.form-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.form-label i {
    color: var(--accent-color);
    width: 16px;
    text-align: center;
}

/* Исправление для полей ввода с стрелками */
.input-with-unit {
    position: relative;
    width: 100%;
}

.input-with-unit input {
    width: 100%;
    padding: 12px 40px 12px 16px; /* Увеличиваем правый отступ */
    background: var(--bg-secondary);
    border: 2px solid rgba(30, 144, 255, 0.2);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s ease;
    font-family: inherit;
    -moz-appearance: textfield; /* Скрываем стрелки в Firefox */
}

/* Скрываем стандартные стрелки в Chrome, Safari, Edge */
.input-with-unit input::-webkit-outer-spin-button,
.input-with-unit input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Показываем наши кастомные стрелки */
.input-with-unit::after {
    content: '';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231e90ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 15l-6-6-6 6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    pointer-events: none;
    opacity: 0.5;
}

.input-with-unit input:focus {
    outline: none;
    border-color: var(--accent-color);
    background: white;
    box-shadow: 0 0 0 3px rgba(30, 144, 255, 0.1);
    padding-right: 40px; /* Сохраняем большой отступ при фокусе */
}

.input-unit {
    position: absolute;
    right: 40px; /* Сдвигаем единицы измерения левее */
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-weight: 500;
    pointer-events: none;
    background: transparent;
    padding: 0 4px;
    font-size: 0.9rem;
    z-index: 2;
}

/* Стили для select */
.form-select {
    width: 100%;
    padding: 12px 40px 12px 16px;
    background: var(--bg-secondary);
    border: 2px solid rgba(30, 144, 255, 0.2);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s ease;
    font-family: inherit;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%231e90ff'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
}

/* Адаптивность для мобильных */
@media (max-width: 640px) {
    .input-with-unit input {
        padding: 14px 44px 14px 16px; /* Еще больше отступ на мобильных */
    }
    
    .input-unit {
        right: 44px;
        font-size: 0.85rem;
    }
    
    .input-with-unit::after {
        right: 12px;
        width: 18px;
        height: 18px;
    }
    
    .form-select {
        padding: 14px 44px 14px 16px;
        background-position: right 16px center;
    }
}

/* Для очень маленьких экранов */
@media (max-width: 380px) {
    .input-with-unit input {
        padding: 12px 36px 12px 12px;
        font-size: 16px; /* Увеличиваем размер шрифта для iOS */
    }
    
    .input-unit {
        right: 36px;
        font-size: 0.8rem;
    }
    
    .input-with-unit::after {
        right: 10px;
        width: 16px;
        height: 16px;
    }
    
    .form-select {
        padding: 12px 36px 12px 12px;
        font-size: 16px;
        background-position: right 12px center;
    }
}

/* Кнопка расчета */
.calculate-btn {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 14px 24px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    width: 100%;
    margin-top: var(--spacing-md);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(255, 255, 255, 0.3);
}

.calculate-btn:active {
    transform: translateY(0);
}

/* Результаты */
/* Обновляем стили для результатов в столбик */
.results-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: var(--spacing-md);
}

.result-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border: 1px solid rgba(30, 144, 255, 0.1);
    transition: all 0.2s ease;
    width: 100%;
    overflow: hidden;
}

.result-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: rgba(30, 144, 255, 0.2);
}

.result-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--secondary-gradient);
    border-radius: var(--radius-sm);
    color: white;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.result-info {
    flex: 1;
    min-width: 0; /* Ключевое свойство для ограничения ширины */
    overflow: hidden;
}

.result-label {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 0.25rem;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.result-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent-color);
    line-height: 1.3;
    word-break: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

/* Специальные стили для поля "Требуемое изменение" */
#change-needed {
    font-size: 0.95rem;
    line-height: 1.4;
    max-width: 100%;
    word-break: break-word;
    overflow-wrap: anywhere;
    display: block;
}

/* Улучшенные стили для мобильных устройств */
@media (max-width: 640px) {
    .results-grid {
        gap: 0.5rem;
    }
    
    .result-card {
        padding: 0.875rem;
        gap: 0.625rem;
    }
    
    .result-icon {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
    
    .result-label {
        font-size: 0.75rem;
    }
    
    .result-value {
        font-size: 0.9rem;
    }
    
    #change-needed {
        font-size: 0.85rem;
        line-height: 1.3;
    }
}

/* Для очень маленьких экранов */
@media (max-width: 380px) {
    .result-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        padding: 0.75rem;
    }
    
    .result-icon {
        align-self: flex-start;
    }
    
    .result-info {
        width: 100%;
    }
    
    .result-value {
        font-size: 0.85rem;
    }
}

.dosage-instructions {
    background: white;
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    border-left: 4px solid var(--accent-color);
    border: 1px solid rgba(30, 144, 255, 0.1);
}

.dosage-instructions h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
    font-size: 1rem;
}

.dosage-instructions ul {
    padding-left: 1.25rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.dosage-instructions li {
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

/* Примечания */
.note {
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-lg);
    background: rgba(30, 144, 255, 0.05);
    border: 1px solid rgba(30, 144, 255, 0.1);
}

.note.warning {
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.2);
}

.note p {
    margin: 0;
    line-height: 1.5;
    font-size: 0.9rem;
}

.note-icon {
    font-size: 1rem;
    margin-top: 0.125rem;
    flex-shrink: 0;
}

.note .note-icon {
    color: var(--accent-color);
}

.note.warning .note-icon {
    color: var(--warning-color);
}

/* Футер */
.footer {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    margin-top: var(--spacing-lg);
    box-shadow: var(--shadow-md);
    text-align: center;
    animation: fadeIn 0.6s ease-out;
    animation-delay: 0.3s;
    border: 1px solid rgba(30, 144, 255, 0.1);
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    align-items: center;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent-color);
}

.footer-info p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.copyright-notice {
    color: var(--text-light);
    font-weight: 500;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* Защитные сообщения */
#protection-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
    z-index: 10000;
    box-shadow: var(--shadow-xl);
    border: 2px solid var(--accent-color);
    min-width: 280px;
    text-align: center;
}

#protection-message i {
    font-size: 2.5rem;
    color: var(--accent-color);
}

#protection-message span {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}

#protection-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 9999;
    backdrop-filter: blur(3px);
}

/* Toast уведомления */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10000;
    min-width: 280px;
    max-width: 400px;
    animation: fadeIn 0.3s ease;
    border-left: 4px solid var(--accent-color);
}

.toast-success { border-left-color: var(--success-color); }
.toast-warning { border-left-color: var(--warning-color); }
.toast-error { border-left-color: var(--danger-color); }
.toast-info { border-left-color: var(--accent-color); }

.toast-icon i {
    color: inherit;
    font-size: 1.1rem;
}

.toast-success .toast-icon i { color: var(--success-color); }
.toast-warning .toast-icon i { color: var(--warning-color); }
.toast-error .toast-icon i { color: var(--danger-color); }
.toast-info .toast-icon i { color: var(--accent-color); }

.toast-message {
    flex: 1;
    font-size: 0.9rem;
    line-height: 1.4;
    color: var(--text-primary);
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 4px;
    font-size: 0.9rem;
    transition: color 0.2s;
    flex-shrink: 0;
}

.toast-close:hover {
    color: var(--text-primary);
}

/* Мобильные стили */
@media (max-width: 640px) {
    body {
        padding: 0.5rem;
    }
    
    .header {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }
    
    .header-text {
        width: 100%;
    }
    
    .protection-badge {
        margin-top: 0;
    }
    
    .header h1 {
        font-size: 1.25rem;
    }
    
    .header .tagline {
        font-size: 0.85rem;
    }
    
    .card {
        padding: 1rem;
    }
    
    .ideal-params-grid {
        grid-template-columns: 1fr;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .footer {
        padding: 1rem;
    }
    
    .toast {
        left: 1rem;
        right: 1rem;
        max-width: none;
        min-width: auto;
    }
}

/* Планшетные стили */
@media (min-width: 641px) and (max-width: 1023px) {
    .header h1 {
        font-size: 1.375rem;
    }
    
    .ideal-params-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Отключение анимаций при предпочтении уменьшенного движения */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}