/* ===== SIDEBAR ===== */
.sidebar {
    position: fixed;
    top: 0;
    right: -100%;
    bottom: 0;
    width: 85%;
    max-width: 280px;

    background: #ffffff;
    color: #333;
    padding: 15px;
    overflow-y: auto;

    transition: right 0.45s cubic-bezier(0.68, -0.55, 0.27, 1.55); /* плавная анимация */
    z-index: 1000;
    box-shadow: -6px 0 25px rgba(0,0,0,0.15);
}

.sidebar.open {
    right: 0;
}

/* ===== OVERLAY ===== */
#sidebarOverlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    opacity: 0;
    pointer-events: none;
    transition: 0.3s;
    z-index: 900;
}

#sidebarOverlay.show {
    opacity: 1;
    pointer-events: auto;
}

/* ===== HEADER ===== */
.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
}


/* ===== NAV ===== */
.sidebar-nav a {
    display: block;
    padding: 8px 0;
    font-size: 17px;
    text-decoration: none;
    color: #333;
    transition: color 0.2s;
}

.sidebar-nav a:hover {
    color: #007bff;
}

.nav-section {
    margin-top: 25px;
}

.nav-title {
    display: block;
    font-size: 17px;
    font-weight: 600;
    color: #555;
    margin-bottom: 10px;
}

/* ===== DIVIDERS ===== */
.divider {
    height: 1px;
    margin: 6px 0 12px 0;
    background: linear-gradient(to right, transparent, rgba(0,0,0,0.2), transparent);
    display: flex;
    align-items: center;
    justify-content: center;
}

.divider .material-icons {
    font-size: 18px;
    color: #999;
    background: #fff;
    border-radius: 50%;
    padding: 0 4px;
}

/* ===== DARK THEME ===== */
body.dark-theme .sidebar {
    background: #1e1e1e;
    color: #c6c6c6;
}

body.dark-theme .sidebar-nav a {
    color: #c6c6c6;
}

body.dark-theme .sidebar-nav a:hover {
    color: #66c0f4;
}

body.dark-theme .nav-title {
    color: #8a8a8a;
}

body.dark-theme .divider .material-icons {
    background: #1e1e1e;
    color: #aaa;
}

/* ===== THEME BUTTON ===== */
.theme-btn {
    position: relative;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;           /* мягкие углы */
    background: #f0f0f0;         /* приятный голубой фон */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;

}

.theme-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

/* Иконки */
.theme-btn .material-icons {
    position: absolute;
    font-size: 20px;
    transition: transform 0.5s ease, opacity 0.5s ease, color 0.5s ease;
}

.theme-btn .sun {
    color: #f14a20;
    transform: translateY(0);
    opacity: 1;
}

.theme-btn .moon {
    color: #cfcfcf;
    transform: translateY(-100%);
    opacity: 0;
}

body.dark-theme .theme-btn .sun {
    transform: translateY(100%);
    opacity: 0;
}

body.dark-theme .theme-btn .moon {
    transform: translateY(0);
    opacity: 1;
}
