/* Sidebar Toggle Button */
.sidebar-toggle-btn {
    position: fixed;
    right: 30px;
    bottom: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #27ae60;
    color: white;
    border: none;
    font-size: 28px;
    cursor: pointer;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.4);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-toggle-btn:hover {
    background-color: #229954;
    box-shadow: 0 6px 16px rgba(39, 174, 96, 0.6);
    transform: scale(1.1);
}

.sidebar-toggle-btn:active {
    transform: scale(0.95);
}

/* Settings Sidebar */
.settings-sidebar {
    position: fixed;
    right: -350px;
    top: 0;
    width: 320px;
    height: 100vh;
    background: white;
    box-shadow: -4px 0 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    transition: right 0.3s ease;
    overflow-y: auto;
    border-left: 1px solid #eee;
}

.settings-sidebar.active {
    right: 0;
}

/* Dark mode for sidebar */
body.dark-mode .settings-sidebar {
    background: #222;
    color: white;
    border-left-color: #444;
}

/* Sidebar Header/Close Button */
.sidebar-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #27ae60;
    transition: transform 0.2s ease;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.dark-mode .sidebar-close-btn {
    color: #58d68d;
}

.sidebar-close-btn:hover {
    transform: rotate(90deg);
    color: #229954;
}

/* Sidebar Content */
.sidebar-content {
    padding: 80px 20px 20px;
}

.sidebar-content h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 30px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 20px;
    margin-top: 0;
}

body.dark-mode .sidebar-content h3 {
    color: #fff;
}

/* Sidebar Section */
.sidebar-section {
    margin-bottom: 30px;
    padding: 0 20px;
}

.sidebar-section h4 {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    color: #999;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
    margin-top: 0;
}

body.dark-mode .sidebar-section h4 {
    color: #aaa;
}

/* Sidebar Buttons */
.sidebar-btn {
    display: block;
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 8px;
    border: 2px solid #f0f0f0;
    background: white;
    color: #333;
    text-align: left;
    cursor: pointer;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

body.dark-mode .sidebar-btn {
    background: #333;
    color: white;
    border-color: #444;
}

.sidebar-btn:hover {
    border-color: #27ae60;
    background-color: #f0fdf4;
    transform: translateX(4px);
}

body.dark-mode .sidebar-btn:hover {
    background-color: #444;
    border-color: #27ae60;
}

/* Active State for Language and Theme Buttons */
.sidebar-btn.active {
    background-color: #27ae60;
    color: white;
    border-color: #27ae60;
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.3);
}

.sidebar-btn.active:hover {
    background-color: #229954;
    border-color: #229954;
}

/* Language Options */
.language-option {
    /* Inherited from .sidebar-btn */
}

.language-option.active {
    /* Inherited from .sidebar-btn.active */
}

/* Theme Options */
.theme-option {
    /* Inherited from .sidebar-btn */
}

.theme-option.active {
    /* Inherited from .sidebar-btn.active */
}

/* Overlay when sidebar is open */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0);
    z-index: 999;
    transition: background 0.3s ease;
    opacity: 0;
    pointer-events: none;
}

.sidebar-overlay.active {
    background: rgba(0, 0, 0, 0.5);
    opacity: 1;
    pointer-events: auto;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .sidebar-toggle-btn {
        right: 20px;
        bottom: 20px;
        width: 50px;
        height: 50px;
        font-size: 24px;
    }

    .settings-sidebar {
        width: 280px;
        right: -280px;
    }

    .sidebar-content {
        padding: 70px 15px 15px;
    }

    .sidebar-btn {
        padding: 10px 14px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .sidebar-toggle-btn {
        right: 15px;
        bottom: 15px;
        width: 45px;
        height: 45px;
        font-size: 20px;
    }

    .settings-sidebar {
        width: 260px;
        right: -260px;
    }

    .sidebar-content {
        padding: 60px 12px 12px;
    }

    .sidebar-content h3 {
        font-size: 18px;
        margin-bottom: 20px;
    }

    .sidebar-section h4 {
        font-size: 12px;
        margin-bottom: 10px;
    }

    .sidebar-btn {
        padding: 10px 12px;
        margin-bottom: 6px;
        font-size: 13px;
    }
}

/* Smooth scrolling for sidebar */
.settings-sidebar {
    scroll-behavior: smooth;
}

/* Custom scrollbar for sidebar */
.settings-sidebar::-webkit-scrollbar {
    width: 6px;
}

.settings-sidebar::-webkit-scrollbar-track {
    background: #f1f1f1;
}

body.dark-mode .settings-sidebar::-webkit-scrollbar-track {
    background: #333;
}

.settings-sidebar::-webkit-scrollbar-thumb {
    background: #27ae60;
    border-radius: 3px;
}

.settings-sidebar::-webkit-scrollbar-thumb:hover {
    background: #229954;
}
