/* Основные стили для PWA приложения "Переключатель модов" */

/* CSS переменные для цветов режимов перенесены в design-system.css */

/* CSS переменные для UI */
:root {
    --primary-bg: #2C3E50;       /* Темно-синий фон */
    --secondary-bg: #34495E;     /* Светло-синий фон */
    --accent-color: #3498DB;     /* Яркий синий акцент */
    --success-color: #27AE60;    /* Зеленый успех */
    --warning-color: #F39C12;    /* Оранжевый предупреждение */
    --error-color: #E74C3C;      /* Красный ошибка */
    --text-primary: #2C3E50;     /* Основной текст */
    --text-secondary: #7F8C8D;   /* Вторичный текст */
    --text-light: #ECF0F1;       /* Светлый текст */
    --border-color: #BDC3C7;     /* Цвет границ */
    --shadow-color: rgba(44, 62, 80, 0.1); /* Цвет теней */
}

/* Сброс стилей и базовые настройки */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, var(--primary-bg) 0%, var(--secondary-bg) 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Главная страница */
.main-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 2rem;
    text-align: center;
    position: relative; /* Для z-index контекста */
    z-index: 1;
}

.welcome-content {
    background: rgba(255, 255, 255, 0.95);
    padding: 3rem;
    border-radius: 0; /* Убираем закругления */
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    max-width: 500px;
    width: 100%;
    position: relative; /* Для z-index контекста */
    z-index: 2;
}

.app-title {
    font-size: 2.5rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-weight: 700;
}

.app-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.login-btn {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--primary-bg) 100%);
    color: var(--text-light);
    border: none;
    padding: 1rem 3rem;
    font-size: 1.44rem; /* Увеличил на 20% с 1.2rem */
    border-radius: 0; /* Убираем закругления */
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 700; /* Делаем bold */
    position: relative; /* Для позиционирования canvas */
    overflow: hidden; /* Для обрезки canvas */
    z-index: 3; /* Выше welcome-content */
    
    /* Улучшения для touch устройств */
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
    
    /* Минимальный размер для touch */
    min-height: 44px;
    min-width: 44px;
}

/* Текст кнопки логина - точно так же как mode-title */
.login-btn-text {
    position: relative;
    z-index: 5; /* Выше всего */
    font-weight: 700; /* Делаем текст жирным (bold) */
    color: transparent; /* Прозрачный для маски шейдера */
    -webkit-text-fill-color: transparent; /* Для Safari */
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px var(--shadow-color);
}

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

/* Google кнопка входа */
.google-login {
    background: white;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: 'Roboto', sans-serif;
}

.google-login:hover {
    background: var(--text-light);
    box-shadow: 0 2px 8px var(--shadow-color);
}

.google-icon {
    width: 18px;
    height: 18px;
}

/* Личная страница - АДАПТИВНАЯ СЕТКА 2x2 */
.personal-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--text-light) 0%, #BDC3C7 100%);
}

/* Верхний хедер - всегда компактный */
.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    min-height: 50px;
    flex-shrink: 0;
    z-index: 9999; /* Добавляю z-index, чтобы header был выше режимов */
}

.left-controls {
    display: flex;
    align-items: center;
}

.menu-dropdown {
    position: relative;
    z-index: 9999; /* Добавляю z-index, чтобы меню было выше всего */
}

.menu-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.menu-btn:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 150px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    z-index: 9999; /* Увеличил с 1000 до 9999, чтобы быть выше всего */
    overflow: hidden;
}

.dropdown-content.show {
    display: block;
}

.dropdown-item {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.dropdown-item:hover {
    background-color: var(--text-light);
}

.right-controls {
    display: flex;
    align-items: center;
}

.close-btn {
    background: var(--error-color);
    color: var(--text-light);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: #C0392B;
    transform: translateY(-1px);
}

/* Стили для .main-content перенесены в design-system.css */

/* Сетка режимов и карточки теперь управляются через textLayout.css */
/* Удаляем дублирующиеся стили для .modes-grid и .mode-card */

/* Удаляем дублирующиеся стили для .mode-title, .mode-motto, .mode-duration */
/* Они теперь управляются через textLayout.css и TextLayoutManager.js */

/* Базовые стили для personal страницы */
.personal-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--text-light, #ECF0F1) 0%, #BDC3C7 100%);
}

.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    min-height: 50px;
    flex-shrink: 0;
}

.left-controls, .right-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 9999; /* Добавляю z-index, чтобы controls были выше режимов */
}

.menu-btn, .close-btn {
    background: #E74C3C;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.menu-btn:hover, .close-btn:hover {
    background: #C0392B;
    transform: translateY(-1px);
}

.bottom-footer {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding: 0.5rem 1rem;
    min-height: 40px;
    flex-shrink: 0;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-text {
    font-size: 0.8rem;
    color: #666;
}

/* Индикатор активного таймера */
.timer-indicator {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    background: var(--success-color);
    color: var(--text-light);
    padding: 0.2rem 0.4rem;
    border-radius: 10px;
    font-size: clamp(0.5rem, 1.8vw, 0.7rem);
    font-weight: bold;
    animation: pulse 2s infinite;
    z-index: 10;
    max-width: 90%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Нижний футер - всегда компактный */
.bottom-footer {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding: 0.5rem 1rem;
    text-align: center;
    min-height: 40px;
    flex-shrink: 0;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-text {
    font-size: 0.8rem;
    color: #666;
}

/* Модальное окно PWA */
.pwa-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.pwa-modal.show {
    display: flex;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    max-width: 90%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.modal-content h3 {
    margin-bottom: 1rem;
    color: #333;
}

.modal-content p {
    margin-bottom: 1.5rem;
    color: #666;
}

.modal-close {
    background: var(--accent-color);
    color: var(--text-light);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: var(--primary-bg);
    transform: translateY(-1px);
}

/* Стили для .mode-container перенесены в design-system.css */

/* Стили для .back-button и .back-btn перенесены в design-system.css */

/* Стили для .mode-content, .mode-symbol, .symbol-placeholder, .rune-image и .fallback-letter перенесены в design-system.css */

/* Анимация дыхания - двойной круг с CSS */
.breath-animation {
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 15;
    /* Выделяем отдельное пространство для анимации */
    min-height: clamp(140px, 30vw, 240px);
    width: clamp(140px, 30vw, 240px);
}

.breath-circle {
    position: relative;
    width: clamp(120px, 25vw, 200px);
    height: clamp(120px, 25vw, 200px);
    /* Центрируем круг в выделенном пространстве */
    margin: 0 auto;
}

/* Внешний круг */
.breath-circle-outer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 3px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    /* Анимация будет установлена динамически */
    /* Ограничиваем область анимации */
    transform-origin: center center;
    will-change: transform, opacity, border-color;
    /* Белая обводка для видимости */
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 1);
}

/* Внутренний круг */
.breath-circle-inner {
    position: absolute;
    top: 10px;
    left: 10px;
    width: calc(100% - 20px);
    height: calc(100% - 20px);
    border: 4px solid rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    /* Анимация будет установлена динамически */
    /* Ограничиваем область анимации */
    transform-origin: center center;
    will-change: transform, opacity, border-color;
    /* Белая обводка для видимости */
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 1);
}

/* Анимации для разных режимов - обновленные цвета для контраста */
@keyframes breathe-calm-outer {
    0%, 100% { 
        transform: scale(1); 
        opacity: 0.4; 
        border-color: rgba(127, 176, 105, 0.4);
    }
    50% { 
        transform: scale(1.05); 
        opacity: 0.7; 
        border-color: rgba(95, 155, 75, 0.6);
    }
}

@keyframes breathe-calm-inner {
    0%, 100% { 
        transform: scale(1); 
        opacity: 0.6; 
        border-color: rgba(127, 176, 105, 0.6);
    }
    50% { 
        transform: scale(1.1); 
        opacity: 0.9; 
        border-color: rgba(95, 155, 75, 0.8);
    }
}

@keyframes breathe-energy-outer {
    0% { 
        transform: scale(1) rotate(0deg); 
        opacity: 0.4; 
        border-color: rgba(230, 126, 34, 0.4);
    }
    25% { 
        transform: scale(1.15) rotate(90deg); 
        opacity: 0.8; 
        border-color: rgba(211, 84, 0, 0.7);
    }
    50% { 
        transform: scale(1.15) rotate(180deg); 
        opacity: 0.8; 
        border-color: rgba(211, 84, 0, 0.7);
    }
    75% { 
        transform: scale(0.9) rotate(270deg); 
        opacity: 0.5; 
        border-color: rgba(230, 126, 34, 0.5);
    }
    100% { 
        transform: scale(1) rotate(360deg); 
        opacity: 0.4; 
        border-color: rgba(230, 126, 34, 0.4);
    }
}

@keyframes breathe-energy-inner {
    0% { 
        transform: scale(1); 
        opacity: 0.6; 
        border-color: rgba(243, 156, 18, 0.6);
    }
    25% { 
        transform: scale(1.2); 
        opacity: 1; 
        border-color: rgba(230, 126, 34, 0.9);
    }
    50% { 
        transform: scale(1.2); 
        opacity: 1; 
        border-color: rgba(230, 126, 34, 0.9);
    }
    75% { 
        transform: scale(0.85); 
        opacity: 0.4; 
        border-color: rgba(243, 156, 18, 0.4);
    }
    100% { 
        transform: scale(1); 
        opacity: 0.6; 
        border-color: rgba(243, 156, 18, 0.6);
    }
}

@keyframes breathe-focus-outer {
    0%, 100% { 
        transform: scale(1); 
        opacity: 0.4; 
        border-color: rgba(212, 175, 55, 0.4);
    }
    50% { 
        transform: scale(1.08); 
        opacity: 0.7; 
        border-color: rgba(189, 155, 47, 0.6);
    }
}

@keyframes breathe-focus-inner {
    0%, 100% { 
        transform: scale(1); 
        opacity: 0.6; 
        border-color: rgba(212, 175, 55, 0.6);
    }
    50% { 
        transform: scale(1.12); 
        opacity: 0.9; 
        border-color: rgba(189, 155, 47, 0.8);
    }
}

@keyframes breathe-silence-outer {
    0%, 100% { 
        transform: scale(1); 
        opacity: 0.3; 
        border-color: rgba(139, 157, 195, 0.3);
    }
    50% { 
        transform: scale(1.03); 
        opacity: 0.5; 
        border-color: rgba(139, 157, 195, 0.5);
    }
}

@keyframes breathe-silence-inner {
    0%, 100% { 
        transform: scale(1); 
        opacity: 0.5; 
        border-color: rgba(139, 157, 195, 0.5);
    }
    50% { 
        transform: scale(1.08); 
        opacity: 0.7; 
        border-color: rgba(139, 157, 195, 0.7);
    }
}

/* Аффирмация - ВСЕГДА ЧИТАБЕЛЬНА */
.affirmation {
    margin-bottom: 2rem;
    max-width: 90%;
    z-index: 20;
    position: relative;
}

.affirmation-text {
    font-size: clamp(1rem, 3vw, 1.5rem);
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.4;
    font-weight: 500;
    word-wrap: break-word;
    hyphens: auto;
}

/* Таймер - ВСЕГДА ВИДИМ */
.timer {
    margin-bottom: 2rem;
    z-index: 20;
    position: relative;
}

.time-left {
    font-size: clamp(2rem, 6vw, 4rem);
    font-weight: bold;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Сообщение о результате */
.result-message {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 200;
    flex-direction: column;
    padding: 2rem;
}

.result-message h3 {
    color: #28a745;
    font-size: clamp(2rem, 6vw, 3.5rem);
    margin-bottom: 1.5rem;
    text-align: center;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.result-message p {
    color: rgba(255, 255, 255, 0.95);
    font-size: clamp(1.2rem, 4vw, 1.8rem);
    margin-bottom: 2.5rem;
    text-align: center;
    line-height: 1.4;
    max-width: 90%;
    font-weight: 500;
}

.result-btn {
    background: var(--accent-color);
    color: var(--text-light);
    border: none;
    padding: 1rem 2rem;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.result-btn:hover {
    background: var(--primary-bg);
    transform: translateY(-1px);
}

/* Страница ошибки */
.error-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
}

.error-content {
    background: rgba(255, 255, 255, 0.95);
    padding: 3rem;
    border-radius: 20px;
    text-align: center;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.error-title {
    font-size: 2rem;
    color: #ff6b6b;
    margin-bottom: 1rem;
}

.error-text {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 2rem;
}

.error-btn {
    background: var(--accent-color);
    color: var(--text-light);
    border: none;
    padding: 1rem 2rem;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.error-btn:hover {
    background: var(--primary-bg);
    transform: translateY(-1px);
}

/* Анимации */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

@keyframes scaleIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.7; }
    50% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1); opacity: 0.7; }
}

/* Дополнительные стили для предотвращения наложения */
.breath-animation::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background: transparent;
    z-index: -1;
    pointer-events: none;
}

/* Адаптивность для очень маленьких экранов */
@media (max-width: 480px) {
    /* Стили для сетки режимов перенесены в design-system.css */
    
    /* Стили для карточек режимов перенесены в design-system.css */

    /* Стили для .mode-content перенесены в design-system.css */
}

/* Адаптивность для средних экранов */
@media (min-width: 481px) and (max-width: 768px) {
    /* Стили для сетки режимов перенесены в design-system.css */
    
    /* Стили для карточек режимов перенесены в design-system.css */

    /* Стили для анимации дыхания перенесены в design-system.css */
}

/* Стили для сетки и карточек режимов перенесены в design-system.css */

/* Стили для сетки и карточек режимов перенесены в design-system.css */

    /* Стили для анимации дыхания перенесены в design-system.css */
}

/* Стили для сетки и карточек режимов перенесены в design-system.css */

/* Стили для prefers-reduced-motion перенесены в design-system.css */

/* Стили для сетки и карточек режимов перенесены в design-system.css */

/* Донатная кнопка */
.donate-button-container {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    z-index: 1000;
}

.donate-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    text-decoration: none;
    font-size: 1.2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.donate-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 1);
}

.donate-button:active {
    transform: translateY(0);
}

/* Футер в базовом шаблоне */
.base-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding: 0.5rem 1rem;
    text-align: center;
    min-height: 40px;
    z-index: 100;
}

.base-footer .footer-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.base-footer .footer-buttons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.base-footer .telegram-button {
    width: 24px;
    height: 24px;
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 3px;
    margin: 0 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.base-footer .telegram-button:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

.base-footer .footer-text {
    font-size: 0.8rem;
    color: #666;
}

.base-footer .donate-button {
    width: 24px;
    height: 24px;
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 3px;
    margin: 0 3px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.base-footer .donate-button:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

/* Адаптивность для маленьких экранов */
@media (max-width: 480px) {
    .donate-button-container {
        bottom: 0.5rem;
        right: 0.5rem;
    }
    
    .donate-button {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
    
    .base-footer {
        padding: 0.4rem 0.8rem;
    }
    
    .base-footer .donate-button {
        width: 20px;
        height: 20px;
        font-size: 0.7rem;
        padding: 3px;
        margin: 0 3px;
    }
    
    .base-footer .telegram-button {
        width: 20px;
        height: 20px;
        font-size: 0.7rem;
        padding: 3px;
        margin: 0 3px;
    }
}

/* Fallback стили для кнопки если шейдер не работает */
/* Убрано - кнопка всегда имеет цвет */

/* Поддержка для старых браузеров без :has() */
@supports not (selector(:has(*))) {
    /* Убрано - кнопка всегда имеет цвет */
}

/* Адаптивность для мобильных устройств */
@media (max-width: 480px) {
    .main-container {
        padding: 1rem;
    }
    
    .welcome-content {
        padding: 2rem 1.5rem;
        max-width: 100%;
    }
    
    .app-title {
        font-size: clamp(1.8rem, 6vw, 2.5rem);
        margin-bottom: 1rem;
    }
    
    .app-subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .login-btn {
        padding: 0.8rem 2rem;
        font-size: 1.8rem; /* Увеличил на 50% с 1.2rem до 1.8rem */
        width: 100%;
        max-width: 280px;
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    .main-container {
        padding: 1.5rem;
    }
    
    .welcome-content {
        padding: 2.5rem;
        max-width: 450px;
    }
    
    .app-title {
        font-size: clamp(2rem, 5vw, 3rem);
    }
    
    .app-subtitle {
        font-size: 1.1rem;
    }
    
    .login-btn {
        padding: 0.9rem 2.5rem;
        font-size: 1.3rem;
    }
}

/* Поддержка для высокого DPI экранов */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .login-btn {
        /* Улучшенное качество для ретина дисплеев */
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    }
    
    .welcome-content {
        /* Более четкие границы */
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
}

/* ========================================
   ДИНАМИЧЕСКИЙ ФОН ДЛЯ СТРАНИЦЫ ТАЙМЕРА
   ======================================== */

/* Контейнер для динамического фона */
.dynamic-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

/* Плавающие частицы */
.floating-particle {
    position: absolute;
    border-radius: 50%;
    background: var(--particle-color, rgba(255, 255, 255, 0.3));
    animation: float-particle var(--particle-duration, 20s) infinite linear;
    opacity: var(--particle-opacity, 0.4);
    box-shadow: 0 0 10px var(--particle-color, rgba(255, 255, 255, 0.3));
}

/* Анимация плавания частиц */
@keyframes float-particle {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        transform: translate(var(--particle-distance-x, 120px), var(--particle-distance-y, -80px)) rotate(90deg);
    }
    50% {
        transform: translate(var(--particle-distance-x2, -60px), var(--particle-distance-y2, -160px)) rotate(180deg);
    }
    75% {
        transform: translate(var(--particle-distance-x3, -120px), var(--particle-distance-y3, 80px)) rotate(270deg);
    }
    100% {
        transform: translate(0, 0) rotate(360deg);
    }
}

/* Световые лучи */
.light-ray {
    position: absolute;
    width: var(--ray-thickness, 4px);
    height: var(--ray-length, 400px);
    background: linear-gradient(
        to bottom,
        var(--ray-color, rgba(255, 255, 255, 0.15)) 0%,
        transparent 100%
    );
    transform-origin: center bottom;
    animation: rotate-ray var(--ray-duration, 120s) infinite linear;
    opacity: var(--ray-opacity, 0.15);
    box-shadow: 0 0 20px var(--ray-color, rgba(255, 255, 255, 0.15));
}

/* Анимация вращения лучей */
@keyframes rotate-ray {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Настройки для разных режимов */
.mode-silence .floating-particle {
    --particle-color: var(--silence-color);
}

.mode-focus .floating-particle {
    --particle-color: var(--focus-color);
}

.mode-calm .floating-particle {
    --particle-color: var(--calm-color);
}

.mode-energy .floating-particle {
    --particle-color: var(--energy-color);
}

.mode-silence .light-ray {
    --ray-color: var(--silence-color);
}

.mode-focus .light-ray {
    --ray-color: var(--focus-color);
}

.mode-calm .light-ray {
    --ray-color: var(--calm-color);
}

.mode-energy .light-ray {
    --ray-color: var(--energy-color);
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .floating-particle {
        --particle-distance-x: 80px;
        --particle-distance-y: -50px;
        --particle-distance-x2: -40px;
        --particle-distance-y2: -100px;
        --particle-distance-x3: -80px;
        --particle-distance-y3: 50px;
    }
    
    .light-ray {
        --ray-length: 300px;
    }
}

/* Поддержка prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    .floating-particle,
    .light-ray {
        animation: none;
    }
}

/* ========================================
   ДИНАМИЧЕСКИЙ ФОН ДЛЯ ГЛАВНОЙ СТРАНИЦЫ
   ======================================== */

/* Контейнер для динамического фона на главной странице */
.main-dynamic-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

/* Медленные плавающие частицы для главной страницы */
.main-floating-particle {
    position: absolute;
    border-radius: 50%;
    background: var(--main-particle-color, rgba(255, 255, 255, 0.3));
    animation: main-float-particle var(--main-particle-duration, 40s) infinite linear;
    opacity: var(--main-particle-opacity, 0.4);
    box-shadow: 0 0 10px var(--main-particle-color, rgba(255, 255, 255, 0.3));
}

/* Медленная анимация плавания частиц для главной страницы */
@keyframes main-float-particle {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        transform: translate(var(--main-particle-distance-x, 120px), var(--main-particle-distance-y, -80px)) rotate(90deg);
    }
    50% {
        transform: translate(var(--main-particle-distance-x2, -60px), var(--main-particle-distance-y2, -160px)) rotate(180deg);
    }
    75% {
        transform: translate(var(--main-particle-distance-x3, -120px), var(--main-particle-distance-y3, 80px)) rotate(270deg);
    }
    100% {
        transform: translate(0, 0) rotate(360deg);
    }
}

/* Медленные световые лучи для главной страницы */
.main-light-ray {
    position: absolute;
    width: var(--main-ray-thickness, 4px);
    height: var(--main-ray-length, 400px);
    background: linear-gradient(
        to bottom,
        var(--main-ray-color, rgba(255, 255, 255, 0.15)) 0%,
        transparent 100%
    );
    transform-origin: center bottom;
    animation: main-rotate-ray var(--main-ray-duration, 240s) infinite linear;
    opacity: var(--main-ray-opacity, 0.15);
    box-shadow: 0 0 20px var(--main-ray-color, rgba(255, 255, 255, 0.15));
}

/* Медленная анимация вращения лучей для главной страницы */
@keyframes main-rotate-ray {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Адаптивность для мобильных устройств на главной странице */
@media (max-width: 768px) {
    .main-floating-particle {
        --main-particle-distance-x: 80px;
        --main-particle-distance-y: -50px;
        --main-particle-distance-x2: -40px;
        --main-particle-distance-y2: -100px;
        --main-particle-distance-x3: -80px;
        --main-particle-distance-y3: 50px;
    }
    
    .main-light-ray {
        --main-ray-length: 300px;
    }
}

/* Поддержка prefers-reduced-motion для главной страницы */
@media (prefers-reduced-motion: reduce) {
    .main-floating-particle,
    .main-light-ray {
        animation: none;
    }
}
