:root {
    --primary-blue: #1e3a8a;
    --russian-white: #ffffff;
    --russian-blue: #1e3a8a;
    --russian-red: #d52b1e;
    --glass-bg: rgba(255, 255, 255, 0.15);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    --text-primary: #1f2937;
    --text-white: #ffffff;
    --sidebar-width: 280px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: system-ui, -apple-system, sans-serif;
    background: linear-gradient(var(--russian-blue), var(--russian-red));
    background-attachment: fixed;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Боковое меню - ФИКСИРОВАННОЕ СЛЕВА ДЛЯ ВСЕХ УСТРОЙСТВ */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    z-index: 998;
    display: none;
}

.sidebar {
    position: fixed;
    top: 0;
    left: calc(-1 * var(--sidebar-width));
    width: var(--sidebar-width);
    height: 100vh;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--glass-border);
    box-shadow: 5px 0 30px rgba(0, 0, 0, 0.1);
    z-index: 999;
    transition: left 0.3s ease;
    overflow-y: auto;
}

.sidebar.open {
    left: 0;
}

.sidebar-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-primary);
    z-index: 10;
    transition: transform 0.2s ease;
}

.sidebar-close:hover {
    transform: scale(1.1);
}

.sidebar-content {
    padding: 2rem;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Кнопка открытия бокового меню - ФИКСИРОВАННАЯ СЛЕВА ПО ЦЕНТРУ */
.sidebar-toggle {
    position: fixed;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-left: none;
    border-radius: 0 15px 15px 0;
    padding: 15px 10px;
    cursor: pointer;
    z-index: 997;
    transition: all 0.3s ease;
    color: var(--text-white);
}

.sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    padding-left: 15px;
}

.toggle-icon {
    display: block;
    font-size: 24px;
    line-height: 1;
    background: linear-gradient(to bottom, 
        #ffffff 0%, #ffffff 25%, 
        #1e90ff 25%, #1e90ff 50%, 
        #ff0000 50%, #ff0000 75%, 
        #ffffff 75%, #ffffff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 100% 400%;
    transition: background-position 0.3s ease;
}

/* Навигация в боковом меню */
.sidebar-nav {
    margin-bottom: 2rem;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    text-decoration: none;
    color: var(--text-primary);
    border-radius: 10px;
    transition: all 0.3s ease;
    margin-bottom: 5px;
}

.nav-item:hover {
    background: rgba(30, 58, 138, 0.1);
    transform: translateX(5px);
}

.nav-icon {
    font-size: 1.2rem;
    margin-right: 12px;
    width: 20px;
    text-align: center;
}

.nav-text {
    flex: 1;
    font-weight: 500;
}

.nav-badge {
    background: var(--russian-red);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
}

.nav-badge.current {
    background: #27ae60;
}

.nav-badge.next {
    background: #f39c12;
}

.nav-badge.future {
    background: #95a5a6;
}

/* Информация в боковом меню */
.sidebar-info {
    flex: 1;
}

.sidebar-info h4 {
    color: var(--text-primary);
    margin: 1.5rem 0 0.5rem 0;
    font-size: 1rem;
}

.sidebar-info p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 1rem;
}

.contacts-list {
    list-style: none;
    margin-bottom: 1rem;
}

.contacts-list li {
    margin-bottom: 0.5rem;
    color: #666;
    font-size: 0.9rem;
}

/* Футер бокового меню */
.sidebar-footer {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid var(--glass-border);
    color: #666;
    font-size: 0.8rem;
}

/* Адаптивность - УЛУЧШЕННАЯ ВЕРСИЯ */
@media (max-width: 768px) {
    body { 
        padding: 10px; 
    }
    
    /* БОКОВОЕ МЕНЮ ОСТАЕТСЯ ФИКСИРОВАННЫМ СЛЕВА */
    .sidebar {
        width: 280px;
        left: calc(-1 * 280px);
    }
    
    .sidebar.open {
        left: 0;
    }
    
    .sidebar-content {
        padding: 3rem 1.5rem 1.5rem;
    }
    
    /* КНОПКА ОСТАЕТСЯ ФИКСИРОВАННОЙ СЛЕВА ПО ЦЕНТРУ */
    .sidebar-toggle {
        position: fixed;
        top: 50%;
        left: 0;
        transform: translateY(-50%);
        border-radius: 0 15px 15px 0;
        border: 1px solid var(--glass-border);
        border-left: none;
        padding: 15px 10px;
        background: var(--glass-bg);
        backdrop-filter: blur(20px);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
        z-index: 997;
    }
    
    .sidebar-toggle:hover {
        padding-left: 15px;
        background: rgba(255, 255, 255, 0.2);
    }
    
    .toggle-icon {
        font-size: 22px;
    }
    
    /* Улучшаем отступы для мобильных */
    .nav-item {
        padding: 15px;
        margin-bottom: 8px;
    }
    
    .nav-icon {
        font-size: 1.3rem;
        margin-right: 15px;
    }
    
    .nav-text {
        font-size: 1.1rem;
    }
    
    .sidebar-info h4 {
        font-size: 1.1rem;
    }
    
    .sidebar-info p,
    .contacts-list li {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .sidebar {
        width: 260px;
        left: calc(-1 * 260px);
    }
    
    .sidebar-toggle {
        padding: 12px 8px;
    }
    
    .toggle-icon {
        font-size: 20px;
    }
    
    .sidebar-content {
        padding: 3rem 1rem 1rem;
    }
    
    .nav-item {
        padding: 12px;
    }
    
    .nav-icon {
        font-size: 1.2rem;
        margin-right: 12px;
    }
    
    .nav-text {
        font-size: 1rem;
    }
}

@media (max-width: 360px) {
    .sidebar {
        width: 240px;
        left: calc(-1 * 240px);
    }
    
    .sidebar-toggle {
        padding: 10px 6px;
    }
    
    .toggle-icon {
        font-size: 18px;
    }
    
    body {
        padding: 8px;
    }
    
    .sidebar-content {
        padding: 3rem 0.8rem 0.8rem;
    }
    
    .nav-item {
        padding: 10px;
    }
}

/* Запрещаем скроллинг основного контента когда меню открыто */
body.sidebar-open {
    overflow: hidden;
}

/* Улучшаем оверлей */
.sidebar-overlay {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
}

/* Стили для плавающей кнопки сообщения об ошибке - ЯРКАЯ ВЕРСИЯ */
.floating-error-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 65px;
    height: 65px;
    background: linear-gradient(135deg, #e6da04 0%, #fae207 50%, #ccc200 100%);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 
        0 6px 25px rgba(255, 0, 0, 0.6),
        0 0 0 3px rgba(255, 255, 255, 0.8),
        0 0 20px rgba(255, 0, 0, 0.8);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
    animation: brightPulse 1.5s infinite, glow 2s infinite alternate;
}

.floating-error-btn:hover {
    transform: scale(1.15) translateY(-3px);
    box-shadow: 
        0 8px 35px rgba(255, 0, 0, 0.8),
        0 0 0 4px rgba(255, 255, 255, 1),
        0 0 30px rgba(255, 0, 0, 1);
    background: linear-gradient(135deg, #ff2222 0%, #ff0000 50%, #aa0000 100%);
    animation: none;
}

.floating-error-btn:active {
    transform: scale(0.95) translateY(0);
    box-shadow: 
        0 4px 15px rgba(255, 0, 0, 0.8),
        0 0 0 3px rgba(255, 255, 255, 0.9),
        0 0 15px rgba(255, 0, 0, 0.6);
}

.floating-error-btn .tooltip {
    position: absolute;
    bottom: 75px;
    right: 0;
    background: linear-gradient(135deg, #ff4444 0%, #cc0000 100%);
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    pointer-events: none;
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.floating-error-btn:hover .tooltip {
    opacity: 1;
    transform: translateY(0);
}

/* Яркая анимация пульсации */
@keyframes brightPulse {
    0% {
        box-shadow: 
            0 6px 25px rgba(255, 0, 0, 0.6),
            0 0 0 3px rgba(255, 255, 255, 0.8),
            0 0 20px rgba(255, 0, 0, 0.8);
    }
    50% {
        box-shadow: 
            0 6px 35px rgba(255, 0, 0, 0.9),
            0 0 0 4px rgba(255, 255, 255, 1),
            0 0 30px rgba(255, 0, 0, 1);
        transform: scale(1.05);
    }
    100% {
        box-shadow: 
            0 6px 25px rgba(255, 0, 0, 0.6),
            0 0 0 3px rgba(255, 255, 255, 0.8),
            0 0 20px rgba(255, 0, 0, 0.8);
    }
}

/* Анимация свечения */
@keyframes glow {
    0% {
        filter: brightness(1);
    }
    100% {
        filter: brightness(1.3);
    }
}

/* Эффект "горящей" кнопки */
.floating-error-btn::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #ff0000, #ff4444, #ff0000, #ff6666);
    border-radius: 50%;
    z-index: -1;
    opacity: 0.7;
    animation: rotate 3s linear infinite;
}

.floating-error-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(255,255,255,0.3) 0%, transparent 70%);
    border-radius: 50%;
    opacity: 0.6;
    animation: shimmer 2s ease-in-out infinite alternate;
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes shimmer {
    0% {
        opacity: 0.3;
    }
    100% {
        opacity: 0.8;
    }
}

/* Адаптивность для яркой плавающей кнопки */
@media (max-width: 768px) {
    .floating-error-btn {
        width: 60px;
        height: 60px;
        bottom: 15px;
        right: 15px;
        font-size: 1.8rem;
    }
    
    .floating-error-btn .tooltip {
        bottom: 70px;
        font-size: 0.8rem;
        padding: 8px 12px;
    }
}

@media (max-width: 480px) {
    .floating-error-btn {
        width: 55px;
        height: 55px;
        bottom: 10px;
        right: 10px;
        font-size: 1.6rem;
    }
    
    .floating-error-btn .tooltip {
        font-size: 0.75rem;
        padding: 6px 10px;
        bottom: 65px;
    }
    
    .floating-error-btn:hover {
        transform: scale(1.1) translateY(-2px);
    }
}