/*============= THEME TOGGLE STYLES ===============*/

.theme-toggle-btn {
    background: var(--bg-card);
    border: 2px solid var(--border-primary);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    color: var(--text-primary);
    font-size: 18px;
    z-index: 1000;
}

.theme-toggle-btn:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-md);
    border-color: var(--accent-primary);
}

.theme-toggle-btn:active {
    transform: scale(0.95);
}

.theme-toggle-btn i {
    transition: all 0.3s ease;
    display: block;
}

.theme-toggle-btn:hover i {
    transform: rotate(180deg);
}

/* Анимация переключения */
.theme-toggle-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: var(--accent-primary);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
    z-index: -1;
}

.theme-toggle-btn:hover::before {
    width: 100%;
    height: 100%;
}

.theme-toggle-btn:hover {
    color: var(--text-inverse);
}

/* Позиционирование */
.theme-toggle-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

/* Адаптивность */
@media (max-width: 768px) {
    .theme-toggle-btn {
        width: 45px;
        height: 45px;
        font-size: 16px;
        top: 15px;
        right: 15px;
    }
}

/* Анимация появления */
@keyframes themeToggleFadeIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.theme-toggle-btn {
    animation: themeToggleFadeIn 0.5s ease-out;
}

/* Стили для разных состояний */
.theme-toggle-btn[data-theme="dark"] {
    background: var(--bg-card);
    border-color: var(--border-primary);
}

.theme-toggle-btn[data-theme="light"] {
    background: var(--bg-card);
    border-color: var(--border-primary);
}

/* Улучшенная доступность */
.theme-toggle-btn:focus {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

.theme-toggle-btn:focus:not(:focus-visible) {
    outline: none;
}

/* Стили для header если переключатель там */
.header .theme-toggle-btn {
    position: static;
    margin-left: auto;
}

/* Стили для navbar */
.navbar .theme-toggle-btn {
    position: static;
    margin-left: 10px;
}

/*============= THEME TOGGLE STYLES END ===============*/
