
/* Светлая тема */
body.light-theme {
    background: #f1f5f9 !important;
    color: #0f172a !important;
}
body.light-theme .glass-card {
    margin: 0 auto !important;
    background: #fff !important;
    border: 1px solid #e2e8f0 !important;
}
body.light-theme .glass-btn {
    background: #3b82f6 !important;
    color: #fff !important;
}
body.light-theme .glass-avatar {
    background: #e2e8f0 !important;
}
body.light-theme .glass-greeting,
body.light-theme .glass-sub {
    color: #0f172a !important;
}
body.light-theme .event-item {
    background: #fff !important;
    border: 1px solid #e2e8f0 !important;
}

/* Switch */

.switch input { opacity: 0; width: 0; height: 0; }


input:checked + 
input:checked + 

/* Красивые чекбоксы */
.custom-checkbox { display: flex; align-items: center; gap: 8px; padding: 6px 0; cursor: pointer; }
.custom-checkbox input { display: none; }
.custom-checkbox .checkmark { width: 20px; height: 20px; border: 2px solid #475569; border-radius: 6px; display: flex; align-items: center; justify-content: center; transition: 0.2s; flex-shrink: 0; }
.custom-checkbox input:checked + .checkmark { background: #3b82f6; border-color: #3b82f6; }
.custom-checkbox input:checked + .checkmark::after { content: "✓"; color: #fff; font-size: 14px; font-weight: bold; }
.custom-checkbox .check-text { font-size: 13px; }

/* Красивые чекбоксы в модальных окнах */
.custom-checkbox { 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    padding: 8px 10px; 
    cursor: pointer; 
    border-radius: 8px;
    transition: 0.2s;
}
.custom-checkbox:hover { background: rgba(255,255,255,0.03); }
.custom-checkbox input { display: none; }
.custom-checkbox .checkmark { 
    width: 22px; 
    height: 22px; 
    border: 2px solid #475569; 
    border-radius: 6px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    transition: 0.2s; 
    flex-shrink: 0; 
    background: #1e293b;
}
.custom-checkbox input:checked + .checkmark { 
    background: #3b82f6; 
    border-color: #3b82f6; 
}
.custom-checkbox input:checked + .checkmark::after { 
    content: "✓"; 
    color: #fff; 
    font-size: 15px; 
    font-weight: bold; 
}
.custom-checkbox .check-text { 
    font-size: 14px; 
    color: #e2e8f0; 
}

/* Календарь в несколько смен */
.cal-day:hover { background: #334155; }
.cal-day.selected { background: #3b82f6 !important; color: #fff !important; }

/* Оптимизация для PWA */
* { -webkit-tap-highlight-color: transparent; }
body { -webkit-font-smoothing: antialiased; overscroll-behavior: none; }

/* iOS-переключатель (ползунок) */
.toggle {
    position: relative;
    width: 51px;
    height: 31px;
    flex-shrink: 0;
    cursor: pointer;
}
.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}
.toggle .slider {
    position: absolute;
    inset: 0;
    background-color: #475569;
    border-radius: 31px;
    transition: background-color 0.3s ease;
}
.toggle .slider::before {
    content: "";
    position: absolute;
    height: 27px;
    width: 27px;
    left: 2px;
    bottom: 2px;
    background-color: #ffffff;
    border-radius: 50%;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}
.toggle input:checked + .slider {
    background-color: #34c759;
}
.toggle input:checked + .slider::before {
    transform: translateX(20px);
}

/* Анимации переходов между страницами */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

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

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

/* Классы анимаций */
.page-enter {
    animation: fadeIn 0.3s ease-out;
}

.page-enter-right {
    animation: slideInRight 0.3s ease-out;
}

.page-enter-left {
    animation: slideInLeft 0.3s ease-out;
}

.modal-enter {
    animation: scaleIn 0.25s ease-out;
}

/* Индикатор загрузки */
.page-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.page-loader::after {
    content: "";
    width: 40px;
    height: 40px;
    border: 3px solid #334155;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Переходы для ссылок */
a, .glass-btn {
    transition: all 0.2s ease;
}

.glass-btn:active {
    transform: scale(0.96);
    opacity: 0.9;
}

/* Анимация появления элементов списка */
.event-item {
    animation: fadeIn 0.3s ease-out;
}

.event-item:nth-child(1) { animation-delay: 0s; }
.event-item:nth-child(2) { animation-delay: 0.05s; }
.event-item:nth-child(3) { animation-delay: 0.1s; }
.event-item:nth-child(4) { animation-delay: 0.15s; }
.event-item:nth-child(5) { animation-delay: 0.2s; }

/* Пульсация кнопки чата при новых сообщениях */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

#chatFab.has-new {
    animation: pulse 0.5s ease-out 3;
}

/* Плавное появление элементов списка */
.event-item {
    opacity: 0;
    animation: fadeIn 0.4s ease-out forwards;
}

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

/* Анимация перехода между страницами */
#app {
    animation: pageIn 1s ease-out;
}

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

/* Затемнение при переходе */
.transition-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #0f172a;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.15s ease-out;
}

.transition-overlay .spinner {
    width: 44px;
    height: 44px;
    border: 3px solid #334155;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

.transition-overlay.fade-out {
    animation: fadeOut 0.25s ease-out forwards;
}
