/* Accessibility Panel */
.accessibility-panel {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.access-main-btn {
    width: 60px;
    height: 60px;
    background: var(--gradient);
    border: none;
    border-radius: 50%;
    color: var(--dark);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: var(--neon-glow);
    transition: all 0.3s ease;
    z-index: 1002;
}

.access-main-btn:hover {
    transform: scale(1.1);
}

.access-buttons-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 25px;
    padding: 15px;
    border: 1px solid var(--secondary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transform: scale(0);
    transform-origin: top right;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: absolute;
    top: 70px;
    right: 0;
}

.access-buttons-container.expanded {
    transform: scale(1);
    opacity: 1;
}

.access-btn {
    width: 50px;
    height: 50px;
    background: rgba(0, 212, 255, 0.2);
    border: 1px solid var(--secondary);
    border-radius: 50%;
    color: var(--light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    position: relative;
}

.access-btn:hover {
    background: var(--secondary);
    color: var(--dark);
    box-shadow: var(--neon-glow);
    transform: translateY(-3px);
}

.access-btn.active {
    background: var(--secondary);
    color: var(--dark);
    box-shadow: var(--neon-glow);
}

.access-tooltip {
    position: absolute;
    right: 60px;
    background: rgba(26, 26, 46, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.3s ease;
    pointer-events: none;
    border: 1px solid var(--secondary);
}

.access-btn:hover .access-tooltip {
    opacity: 1;
    transform: translateX(0);
}

.access-reset-btn {
    width: 50px;
    height: 50px;
    background: rgba(255, 107, 107, 0.2);
    border: 1px solid var(--accent);
    border-radius: 50%;
    color: var(--light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    position: relative;
}

.access-reset-btn:hover {
    background: var(--accent);
    color: var(--dark);
    box-shadow: var(--accent-glow);
    transform: translateY(-3px);
}

/* Accessibility Features */
.high-contrast {
    filter: contrast(1.8) brightness(1.2);
}

.text-large {
    font-size: 1.2em;
}

.text-xlarge {
    font-size: 1.4em;
}

.dyslexia-font {
    font-family: 'Comic Sans MS', cursive;
}

/* Анимация для кнопок доступности */
@keyframes buttonPop {
    0% { transform: scale(0); opacity: 0; }
    70% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

.access-buttons-container.expanded .access-btn,
.access-buttons-container.expanded .access-reset-btn {
    animation: buttonPop 0.4s ease-out forwards;
}

.access-buttons-container.expanded .access-btn:nth-child(1) { animation-delay: 0.05s; }
.access-buttons-container.expanded .access-btn:nth-child(2) { animation-delay: 0.1s; }
.access-buttons-container.expanded .access-btn:nth-child(3) { animation-delay: 0.15s; }
.access-buttons-container.expanded .access-btn:nth-child(4) { animation-delay: 0.2s; }
.access-buttons-container.expanded .access-btn:nth-child(5) { animation-delay: 0.25s; }
.access-buttons-container.expanded .access-reset-btn { animation-delay: 0.3s; }

@media (max-width: 768px) {
    .accessibility-panel { top: 70px; right: 10px; }
    .access-main-btn { width: 50px; height: 50px; font-size: 1.2rem; }
    .access-buttons-container { padding: 10px; top: 60px; }
    .access-btn, .access-reset-btn { width: 45px; height: 45px; font-size: 1rem; }
}
/* Улучшенная панель доступности */
.accessibility-panel {
    position: fixed;
    top: 120px;
    right: 20px;
    z-index: 10000;
    font-family: 'Montserrat', sans-serif;
}

.access-btn {
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 50%;
    width: 65px;
    height: 65px;
    color: white;
    font-size: 1.6rem;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.access-btn:hover {
    transform: scale(1.15) rotate(5deg);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
}

.access-btn:active {
    transform: scale(1.05);
}

.access-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 0.7rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;
}

.access-menu {
    position: absolute;
    top: 80px;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 0;
    width: 380px;
    max-height: 75vh;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.4);
    display: none;
    overflow: hidden;
}

.access-menu.active {
    display: flex;
    flex-direction: column;
    animation: slideDown 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.access-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 1.5rem 1rem;
    border-bottom: 1px solid #f0f0f0;
}

.access-header h4 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.4rem;
    font-weight: 700;
}

.close-menu {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #7f8c8d;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.close-menu:hover {
    background: #f8f9fa;
    color: #e74c3c;
}

.access-tabs {
    display: flex;
    padding: 0 1.5rem;
    border-bottom: 1px solid #f0f0f0;
    gap: 0.5rem;
}

.tab-btn {
    flex: 1;
    padding: 0.8rem 1rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    color: #7f8c8d;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px 8px 0 0;
}

.tab-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.tab-btn:hover:not(.active) {
    color: #5a67d8;
    background: rgba(102, 126, 234, 0.05);
}

.tab-content {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.setting-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid #f8f9fa;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.setting-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.setting-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.setting-header i {
    font-size: 1.3rem;
    color: #667eea;
    width: 24px;
    text-align: center;
}

.setting-header h5 {
    margin: 0;
    flex: 1;
    color: #2c3e50;
    font-size: 1.1rem;
    font-weight: 600;
}

/* Переключатели */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #667eea;
}

input:checked + .slider:before {
    transform: translateX(24px);
}

.setting-description {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin: 0.5rem 0 1rem;
    line-height: 1.4;
}

/* Элементы управления */
.speech-controls {
    display: flex;
    gap: 0.8rem;
    margin-top: 1rem;
}

.speech-btn, .quick-btn {
    flex: 1;
    padding: 0.8rem 1rem;
    border: 2px solid #e9ecef;
    background: white;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.speech-btn:hover, .quick-btn:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
    transform: translateY(-1px);
}

.quick-actions {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

/* Контролы размера шрифта */
.font-controls {
    display: flex;
    gap: 0.8rem;
    margin-top: 1rem;
}

.size-btn {
    flex: 1;
    padding: 1rem;
    border: 2px solid #e9ecef;
    background: white;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    font-size: 1.1rem;
}

.size-btn.active {
    border-color: #667eea;
    background: #667eea;
    color: white;
    transform: scale(1.05);
}

.size-btn:hover:not(.active) {
    border-color: #667eea;
    transform: translateY(-1px);
}

/* Цветовые схемы */
.color-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.color-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 0.5rem;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.color-option.active {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
    transform: scale(1.05);
}

.color-option:hover:not(.active) {
    border-color: #667eea;
    transform: translateY(-2px);
}

.color-preview {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.color-option span {
    font-size: 0.8rem;
    font-weight: 600;
    color: #2c3e50;
    text-align: center;
}

/* Дополнительные настройки */
.additional-settings {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.setting-toggle {
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    padding: 0.8rem;
    border-radius: 12px;
    transition: background 0.3s ease;
}

.setting-toggle:hover {
    background: #f8f9fa;
}

.toggle-slider {
    position: relative;
    width: 44px;
    height: 22px;
    background: #e9ecef;
    border-radius: 11px;
    transition: all 0.3s ease;
}

.toggle-slider:before {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: white;
    top: 2px;
    left: 2px;
    transition: all 0.3s ease;
}

.setting-toggle input:checked + .toggle-slider {
    background: #667eea;
}

.setting-toggle input:checked + .toggle-slider:before {
    transform: translateX(22px);
}

.toggle-text {
    flex: 1;
    font-weight: 500;
    color: #2c3e50;
}

/* Футер */
.access-footer {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    border-top: 1px solid #f0f0f0;
    background: #f8f9fa;
}

.footer-btn {
    flex: 1;
    padding: 1rem;
    border: 2px solid #e9ecef;
    background: white;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.footer-btn.primary {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.footer-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.footer-btn.primary:hover {
    background: #5a67d8;
}

/* Индикатор активности */
.active-indicator {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(46, 204, 113, 0.9);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    display: none;
    align-items: center;
    gap: 0.5rem;
    animation: pulse 2s infinite;
}

.active-indicator.active {
    display: flex;
}

/* Анимации */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Стили доступности */
body.font-small { font-size: 85%; }
body.font-large { font-size: 115%; }
body.font-xlarge { font-size: 130%; }

body.scheme-dark {
    background: #1a1a1a !important;
    color: #ffffff !important;
}

body.scheme-blue {
    background: #e3f2fd !important;
    color: #1565c0 !important;
}

body.scheme-sepia {
    background: #f4ecd8 !important;
    color: #5d4037 !important;
}

body.scheme-high-contrast {
    background: #000000 !important;
    color: #ffff00 !important;
}

body.scheme-high-contrast * {
    background: #000000 !important;
    color: #ffff00 !important;
    border-color: #ffff00 !important;
}

body.dyslexia-font {
    font-family: 'Comic Sans MS', 'Open Dyslexic', sans-serif;
    letter-spacing: 0.05em;
}

body.highlight-links a {
    background: yellow !important;
    color: #000 !important;
    padding: 2px 4px;
    border-radius: 3px;
    text-decoration: underline !important;
}

/* Адаптивность */
@media (max-width: 768px) {
    .accessibility-panel {
        top: 80px;
        right: 10px;
    }
    
    .access-menu {
        width: 320px;
        right: -10px;
    }
    
    .color-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .access-footer {
        flex-direction: column;
    }
}

/* Скроллбар */
.tab-content::-webkit-scrollbar {
    width: 6px;
}

.tab-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.tab-content::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.tab-content::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}
/* Полное отключение всех анимаций и переходов */
* {
    animation: none !important;
    transition: none !important;
    transform: none !important;
}

/* Отключение конкретных анимированных элементов */
.particles-js,
#particles-js,
[class*="particle"],
[class*="animate"],
[class*="animation"],
[class*="floating"],
[class*="float"],
.star,
.twinkle,
[class*="bounce"],
[class*="pulse"] {
    display: none !important;
    visibility: hidden !important;
}

/* Отключение фоновых видео и гифок */
video,
[class*="video"],
[class*="gif"],
[data-animate] {
    display: none !important;
}