/* Back Button Styles for Mobile */
.mobile-back-btn {
    position: fixed;
    bottom: 80px;
    /* Move closer to nav bar */
    left: 15px;
    width: 40px;
    /* Smaller size */
    height: 40px;
    /* Smaller size */
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transition: all 0.3s ease;
}

.mobile-back-btn:active {
    transform: scale(0.95);
}

.mobile-back-btn.visible {
    display: flex;
}

/* إظهار الزر فقط على الجوالات */
@media (max-width: 768px) {
    .mobile-back-btn {
        display: flex;
    }
}

/* إخفاء الزر على الصفحة الرئيسية */
#homePage.active~.mobile-back-btn {
    display: none;
}

/* Page Header with Back Button */
.page-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    background: var(--glass-bg);
    border-radius: var(--border-radius);
    margin-bottom: 20px;
}

.page-header .back-btn {
    background: transparent;
    border: none;
    color: var(--primary-color);
    font-size: 1rem;
    cursor: pointer;
    padding: 8px 12px;
    display: none;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
    border-radius: 8px;
}

.page-header .back-btn:hover {
    background: rgba(255, 107, 53, 0.1);
}

.page-header .back-btn i {
    font-size: 1.2rem;
}

/* إظهار زر الرجوع في الهيدر على الجوالات */
@media (max-width: 768px) {
    .page-header .back-btn {
        display: flex;
    }
}

.page-header h2 {
    margin: 0;
    flex: 1;
}

/* Gesture Settings in Account Settings */
.gesture-settings {
    margin-top: 20px;
}

.switch-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
}

.switch-label input[type="checkbox"] {
    width: 50px;
    height: 26px;
    position: relative;
    appearance: none;
    background: #ccc;
    border-radius: 13px;
    outline: none;
    cursor: pointer;
    transition: background 0.3s;
}

.switch-label input[type="checkbox"]:checked {
    background: var(--primary-color);
}

.switch-label input[type="checkbox"]::before {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: white;
    top: 2px;
    left: 2px;
    transition: transform 0.3s;
}

.switch-label input[type="checkbox"]:checked::before {
    transform: translateX(24px);
}

.sensitivity-control {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.sensitivity-control input[type="range"] {
    flex: 1;
}

.sensitivity-value {
    min-width: 40px;
    text-align: center;
    font-weight: 700;
    color: var(--primary-color);
}