/* ===== SIDEBAR ===== */

/* Кнопка меню */
.menu-toggle {
    position: fixed;
    top: 1rem;
    left: 1rem;
    width: 50px;
    height: 50px;
    background: #000;
    border: 1px solid #ff0055;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 1001;
    border-radius: 6px;
    transition: all 0.25s ease;
    box-shadow: 0 0 10px rgba(255, 0, 85, 0.2);
}

.menu-toggle:hover {
    box-shadow: 0 0 20px #ff0055;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: #fff;
    margin: 3px 0;
    transition: 0.25s;
    border-radius: 2px;
}

/* Сайдбар */
.side-menu {
    --w: clamp(260px, 75vw, 320px);
    position: fixed;
    top: 0;
    left: calc(-1 * var(--w));
    width: var(--w);
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    transition: left 0.45s cubic-bezier(0.77,0.2,0.05,1.0), box-shadow 0.45s;
    padding: 100px 20px 20px 20px;
    border-right: 2px solid #ff0055;
    box-shadow: none;
    overflow-y: auto;
}

.side-menu.active {
    left: 0;
    box-shadow: 10px 0 50px rgba(0,0,0,0.8);
}

.menu-section {
    margin-bottom: 30px;
}

.menu-section h3 {
    font-family: 'Cinzel', serif;
    color: #ff0055;
    border-bottom: 1px solid rgba(255,0,85,0.25);
    padding-bottom: 8px;
    margin-bottom: 12px;
    letter-spacing: 2px;
    font-size: 1.2rem;
}

.menu-item {
    display: block;
    color: #ccc;
    text-decoration: none;
    padding: 10px 10px;
    margin: 6px 0;
    font-size: 0.98rem;
    font-family: 'Exo 2', sans-serif;
    transition: 0.25s;
    border-radius: 4px;
    border-left: 0 solid #ff0055;
}

.menu-item:hover {
    background: rgba(255,255,255,0.04);
    color: #fff;
    padding-left: 18px;
    border-left: 4px solid #ff0055;
}

.menu-item.active {
    color: #fff;
    border-left: 4px solid #ff0055;
    padding-left: 18px;
    cursor: default;
    pointer-events: none;
}

.menu-item.active:hover {
    background: transparent;
    color: #fff;
}

/* Затемнение при открытии */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.25);
    z-index: 900;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.45s cubic-bezier(0.77,0.2,0.05,1.0), visibility 0.45s;
    pointer-events: none;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* ===== БЛОКИРОВКА СКРОЛЛА ===== */
html.sidebar-locked,
body.sidebar-locked {
    overflow: hidden !important;
    touch-action: none !important;
    height: 100% !important;
    width: 100% !important;
}

/* ===== LOGIN / PROFILE BUTTON ===== */
.login-btn {
    position: fixed;
    top: 1rem;
    right: 1rem;
    min-width: 50px;
    height: 50px;
    padding: 0 16px;
    background: #000;
    border: 1px solid #ff0055;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    z-index: 1001;
    border-radius: 6px;
    transition: all 0.25s ease;
    box-shadow: 0 0 10px rgba(255, 0, 85, 0.2);
    color: #fff;
    font-family: 'Exo 2', sans-serif;
    font-size: 0.88rem;
    letter-spacing: 0.5px;
    text-decoration: none;
    white-space: nowrap;
    font-weight: 600;
    outline: none;
}

.login-btn:hover {
    box-shadow: 0 0 20px #ff0055;
}

/* Avatar-only state: exact same dimensions as .menu-toggle */
.login-btn.avatar-only {
    width: 50px;
    min-width: 50px;
    padding: 0;
}

/* Disabled / loading state */
.login-btn.is-loading {
    pointer-events: none;
}

/* On current profile page */
.login-btn.is-current {
    cursor: default;
    pointer-events: none;
    opacity: 0.85;
}

/* Avatar inside button */
.login-btn .btn-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255, 0, 85, 0.6);
    flex-shrink: 0;
}

/* When avatar-only, avatar can be slightly larger since no text competes */
.login-btn.avatar-only .btn-avatar {
    width: 34px;
    height: 34px;
}
