/* ========================================
   SETTINGS PAGE V2 - STUNNING DESIGN
   ======================================== */

/* Page Background */
body {
    background: var(--bg-primary);
    background-image: 
        radial-gradient(circle 600px at 15% 20%, rgba(242, 207, 123, 0.06) 0%, transparent 100%),
        radial-gradient(circle 450px at 85% 80%, rgba(125, 63, 38, 0.06) 0%, transparent 100%),
        radial-gradient(circle 350px at 50% 50%, rgba(168, 107, 236, 0.03) 0%, transparent 100%);
    background-attachment: fixed;
}

/* Layout */
.settings-layout {
    display: flex;
    min-height: calc(100vh - 80px);
    max-width: 1600px;
    width: 100%;
    margin: 0 auto;
    padding: 3rem 3rem;
    position: relative;
    z-index: 1;
    gap: 2.5rem;
}

.settings-sidebar {
    width: 300px;
    flex-shrink: 0;
    padding: 2.5rem 1.5rem;
    background: rgba(15, 12, 10, 0.4);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    height: fit-content;
    position: sticky;
    top: 100px;
}

.settings-content {
    flex: 1;
    padding: 0;
    overflow-y: auto;
    min-width: 0;
}

/* Sidebar Header */
.sidebar-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-header h2 {
    font-family: 'Quicksand', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    background: var(--gradient-primary);
    color: var(--accent-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.sidebar-header p {
    color: var(--text-secondary);
    font-size: 15px;
}

/* Sidebar Navigation */
.sidebar-nav {
    margin-top: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-nav-item {
    font-family: 'Quicksand', sans-serif;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    border-radius: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    width: 100%;
}

.sidebar-nav-item span {
    color: inherit;
    transition: color 0.3s ease;
}

.sidebar-nav-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(242, 207, 123, 0.1) 0%, rgba(125, 63, 38, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none; /* Allow clicks to pass through */
}

.sidebar-nav-item:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
    transform: translateX(6px);
}

.sidebar-nav-item:hover svg {
    stroke: var(--text-primary);
}

.sidebar-nav-item.active {
    color: var(--accent-gold);
    background: linear-gradient(135deg, rgba(242, 207, 123, 0.12) 0%, rgba(125, 63, 38, 0.08) 100%);
    border: 1px solid rgba(242, 207, 123, 0.2);
    box-shadow: 0 4px 20px rgba(242, 207, 123, 0.15);
}

.sidebar-nav-item.active span {
    color: var(--accent-gold);
}

.sidebar-nav-item.active svg {
    stroke: var(--accent-gold);
}

.sidebar-nav-item.active::after {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 60%;
    background: var(--gradient-primary);
    border-radius: 0 4px 4px 0;
    box-shadow: 0 0 12px rgba(242, 207, 123, 0.6);
}

.sidebar-nav-item svg {
    stroke: currentColor;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    transition: stroke 0.3s ease;
}

/* Content Area & Tabs */
.settings-content {
    position: relative;
}

.settings-tab {
    display: none;
}

.settings-tab.active {
    display: block;
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Tab Header */
.tab-header {
    margin-bottom: 2.5rem;
}

.tab-title {
    
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--gradient-primary);
    color: var(--accent-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.tab-subtitle {
    color: var(--text-secondary);
    font-size: 16px;
    font-weight: 500;
}

/* Settings Cards */
.settings-card {
    background: var(--bg-card);
    backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: var(--shadow-card);
    margin-bottom: 2rem;
    transition: all 0.4s ease;
}

.settings-card:hover {
    transform: translateY(-4px);
    border-color: rgba(242, 207, 123, 0.2);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

/* Profile Picture Section */
.profile-picture-section {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.profile-picture-wrapper {
    position: relative;
}

.profile-picture {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(212, 165, 116, 0.2) 0%, rgba(168, 107, 62, 0.2) 100%);
    border: 3px solid rgba(212, 165, 116, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: 700;
    color: var(--accent-gold);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
}

.profile-picture:hover {
    border-color: var(--accent-gold);
    transform: scale(1.05);
}

.profile-picture-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.profile-picture:hover .profile-picture-overlay {
    opacity: 1;
}

.profile-picture-overlay svg {
    width: 24px;
    height: 24px;
    stroke: var(--accent-gold);
}

.profile-picture-overlay span {
    font-size: 12px;
    font-weight: 600;
    color: var(--accent-gold);
}

.profile-picture-info h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.profile-picture-info p {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Form Groups */
.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: 'Quicksand', sans-serif;
    transition: all 0.3s ease;
    outline: none;
}

.form-input:focus,
.form-textarea:focus {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(212, 165, 116, 0.4);
    box-shadow: 0 0 0 3px rgba(212, 165, 116, 0.1);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-secondary);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.preference-section {
    margin-top: 32px;
    padding: 24px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.preference-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 20px;
}

.preference-title {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    flex: 1 1 280px;
}

.preference-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: rgba(212, 165, 116, 0.12);
    border: 1px solid rgba(212, 165, 116, 0.24);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.preference-icon .material-symbols-rounded {
    font-size: 26px;
    color: var(--accent-gold);
}

.preference-text h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 6px;
}

.preference-text p {
    margin: 0;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.preference-section .toggle-group {
    flex: 0 1 360px;
    justify-content: center;
    flex-wrap: wrap;
}

.preference-section .toggle-option {
    flex: 1 1 110px;
    min-width: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 14px;
    text-transform: none;
}

.preference-preview {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 16px 18px;
    border-radius: 14px;
    border: 1px dashed rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.03);
}

.preview-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
}

.preview-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.preview-value span {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.preview-subtext {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Form Actions */
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.btn-save,
.btn-secondary,
.btn-danger {
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    font-family: 'Quicksand', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid transparent;
}

.btn-save {
    background: var(--gradient-primary);
    border: none;
    color: #0a0a0a;
    box-shadow: 0 4px 16px rgba(242, 207, 123, 0.3);
}

.btn-save:hover {
    box-shadow: 0 8px 24px rgba(242, 207, 123, 0.5);
    transform: translateY(-2px);
}

.btn-save svg {
    width: 18px;
    height: 18px;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(212, 165, 116, 0.3);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.btn-secondary svg {
    width: 16px;
    height: 16px;
}

.btn-danger {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: #f87171;
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
    transform: translateY(-2px);
}

.btn-danger svg {
    width: 16px;
    height: 16px;
}

/* Settings Items */
.settings-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 0;
}

.settings-item-content {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.settings-item-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(212, 165, 116, 0.1);
    border: 1px solid rgba(212, 165, 116, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.settings-item-icon svg {
    width: 22px;
    height: 22px;
    stroke: rgba(212, 165, 116, 0.8);
}

.settings-item-icon.danger {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
}

.settings-item-icon.danger svg {
    stroke: rgba(239, 68, 68, 0.8);
}

.settings-item-info h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.settings-item-info p {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Divider */
.divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 20px 0;
}

/* Toggle Group */
.toggle-group {
    display: flex;
    gap: 12px;
}

.toggle-option {
    flex: 1;
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    font-family: 'Quicksand', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.toggle-option:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(212, 165, 116, 0.3);
}

.toggle-option.active {
    background: rgba(212, 165, 116, 0.15);
    border-color: var(--accent-gold);
    color: var(--accent-gold);
}

/* Modals */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal-overlay.active {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal {
    background: var(--bg-card);
    backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 32px;
    max-width: 500px;
    width: 90%;
    animation: scaleIn 0.3s ease;
}

/* Danger Modal Styling */
.modal-danger {
    border-color: rgba(239, 68, 68, 0.3);
    box-shadow: 0 0 30px rgba(239, 68, 68, 0.1);
}

.modal-icon-danger {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.modal-icon-danger svg {
    width: 32px;
    height: 32px;
    stroke: #f87171;
}

.modal-danger h2 {
    color: #f87171;
    text-align: center;
}

.modal-warning-text {
    text-align: center;
    color: var(--text-primary);
    font-size: 16px;
    margin-bottom: 24px;
    line-height: 1.5;
}

.modal-warning-list {
    background: rgba(239, 68, 68, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.1);
    border-radius: 12px;
    padding: 20px 24px 20px 40px;
    margin-bottom: 24px;
}

.modal-warning-list li {
    color: var(--text-secondary);
    margin-bottom: 12px;
    font-size: 14px;
    position: relative;
}

.modal-warning-list li:last-child {
    margin-bottom: 0;
}

.modal-warning-list li::marker {
    color: #f87171;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-header {
    margin-bottom: 24px;
}

.modal-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.modal-header p {
    font-size: 14px;
    color: var(--text-secondary);
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

.btn-cancel {
    padding: 12px 24px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    font-family: 'Quicksand', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-cancel:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(212, 165, 116, 0.3);
}

/* ==========================================
   RESPONSIVE - Tablet & Mobile Optimizations
   ========================================== */

@media (max-width: 1024px) {
    .settings-layout {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .settings-sidebar {
        width: 100%;
        position: static;
    }
}

/* ==========================================
   MOBILE OPTIMIZATIONS (<768px)
   ========================================== */
@media (max-width: 768px) {
    /* Layout - Compact padding */
    .settings-layout {
        padding: 1rem;
        gap: 1rem;
        min-height: auto;
    }
    
    /* Sidebar - Horizontal tabs on mobile */
    .settings-sidebar {
        padding: 6px;
        border-radius: 14px;
        background: rgba(15, 12, 10, 0.8);
        border: 1px solid rgba(255, 255, 255, 0.08);
    }
    
    .settings-sidebar .sidebar-header {
        display: none; /* Hide header on mobile */
    }
    
    .settings-sidebar .sidebar-nav {
        display: flex;
        flex-direction: row;
        gap: 4px;
        margin: 0;
    }
    
    .settings-sidebar .sidebar-nav-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 12px 6px;
        gap: 6px;
        border-radius: 10px;
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid transparent;
        cursor: pointer;
        touch-action: manipulation;
        -webkit-tap-highlight-color: rgba(242, 207, 123, 0.2);
    }
    
    .settings-sidebar .sidebar-nav-item::before {
        display: none; /* Remove overlay on mobile */
    }
    
    .settings-sidebar .sidebar-nav-item svg {
        width: 20px;
        height: 20px;
        flex-shrink: 0;
        pointer-events: none;
    }
    
    .settings-sidebar .sidebar-nav-item span {
        font-size: 11px;
        font-weight: 600;
        line-height: 1.2;
        pointer-events: none;
    }
    
    .settings-sidebar .sidebar-nav-item:hover {
        transform: none;
    }
    
    .settings-sidebar .sidebar-nav-item.active {
        background: linear-gradient(135deg, rgba(242, 207, 123, 0.18) 0%, rgba(125, 63, 38, 0.12) 100%);
        border: 1px solid rgba(242, 207, 123, 0.35);
        color: var(--accent-gold);
        box-shadow: 0 2px 12px rgba(242, 207, 123, 0.2);
    }
    
    .settings-sidebar .sidebar-nav-item.active::after {
        display: none; /* Hide left bar indicator on mobile */
    }
    
    .settings-sidebar .sidebar-nav-item:active {
        transform: scale(0.96);
        opacity: 0.9;
    }
    
    /* Tab Header */
    .tab-header {
        margin-bottom: 1.25rem;
    }
    
    .tab-title {
        font-size: 1.75rem;
        margin-bottom: 0.25rem;
    }
    
    .tab-subtitle {
        font-size: 14px;
    }
    
    /* Settings Cards */
    .settings-card {
        padding: 1.25rem;
        border-radius: 16px;
        margin-bottom: 1rem;
    }
    
    .settings-card:hover {
        transform: none; /* Disable hover lift on mobile */
    }
    
    /* Profile Picture Section */
    .profile-picture-section {
        flex-direction: column;
        text-align: center;
        gap: 16px;
        margin-bottom: 24px;
        padding-bottom: 20px;
    }
    
    .profile-picture {
        width: 80px;
        height: 80px;
        font-size: 28px;
    }
    
    .profile-picture-info h3 {
        font-size: 15px;
    }
    
    .profile-picture-info p {
        font-size: 12px;
    }
    
    /* Form Groups */
    .form-group {
        margin-bottom: 18px;
    }
    
    .form-label {
        font-size: 13px;
        margin-bottom: 0.5rem;
    }
    
    .form-input,
    .form-textarea {
        padding: 12px 14px;
        font-size: 14px;
        border-radius: 10px;
    }
    
    .form-textarea {
        min-height: 80px;
    }
    
    /* Preference Section */
    .preference-section {
        margin-top: 24px;
        padding: 16px;
        border-radius: 14px;
        gap: 16px;
    }
    
    .preference-header {
        flex-direction: column;
        gap: 16px;
    }
    
    .preference-title {
        flex: 1 1 100%;
    }
    
    .preference-icon {
        width: 44px;
        height: 44px;
        border-radius: 12px;
    }
    
    .preference-icon .material-symbols-rounded {
        font-size: 22px;
    }
    
    .preference-text h3 {
        font-size: 16px;
        margin-bottom: 4px;
    }
    
    .preference-text p {
        font-size: 13px;
    }
    
    .preference-section .toggle-group {
        flex: 1 1 100%;
        width: 100%;
    }
    
    .preference-section .toggle-option {
        flex: 1;
        min-width: 0;
        font-size: 13px;
        padding: 10px 8px;
    }
    
    .preference-preview {
        padding: 12px 14px;
        border-radius: 10px;
        gap: 10px;
    }
    
    .preview-label {
        font-size: 11px;
    }
    
    .preview-value {
        font-size: 18px;
    }
    
    .preview-subtext {
        font-size: 12px;
        flex-basis: 100%;
    }
    
    /* Form Actions */
    .form-actions {
        flex-direction: column;
        gap: 10px;
        margin-top: 1.5rem;
        padding-top: 1rem;
    }
    
    .btn-save,
    .btn-secondary,
    .btn-danger {
        width: 100%;
        justify-content: center;
        padding: 12px 20px;
        font-size: 14px;
        border-radius: 10px;
    }
    
    .btn-save svg,
    .btn-secondary svg,
    .btn-danger svg {
        width: 16px;
        height: 16px;
    }
    
    /* Settings Items */
    .settings-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
        padding: 16px 0;
    }
    
    .settings-item-content {
        width: 100%;
    }
    
    .settings-item-icon {
        width: 40px;
        height: 40px;
        border-radius: 10px;
    }
    
    .settings-item-icon svg {
        width: 18px;
        height: 18px;
    }
    
    .settings-item-info h3 {
        font-size: 15px;
    }
    
    .settings-item-info p {
        font-size: 12px;
    }
    
    .settings-item .btn-secondary,
    .settings-item .btn-danger {
        width: 100%;
    }
    
    /* Toggle Group */
    .toggle-group {
        width: 100%;
        gap: 8px;
    }
    
    .toggle-option {
        padding: 10px 12px;
        font-size: 13px;
        border-radius: 10px;
    }
    
    /* Divider */
    .divider {
        margin: 14px 0;
    }
    
    /* Modals */
    .modal-overlay {
        padding: 0;
    }
    
    .modal {
        max-width: 100%;
        width: 100%;
        height: 100%;
        max-height: 100vh;
        border-radius: 0;
        padding: 20px;
        display: flex;
        flex-direction: column;
    }
    
    .modal-header {
        margin-bottom: 20px;
    }
    
    .modal-header h2 {
        font-size: 20px;
    }
    
    .modal-header p {
        font-size: 13px;
    }
    
    .modal-body {
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .modal-footer {
        display: flex;
        flex-direction: column;
        gap: 10px;
        padding-top: 16px;
        margin-top: 20px;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
    }
    
    .modal-footer .btn-secondary,
    .modal-footer .btn-save,
    .modal-footer .btn-danger {
        width: 100%;
        order: 0;
    }
    
    .modal-footer .btn-secondary {
        order: 1; /* Move cancel button to bottom on mobile */
    }
    
    .modal-close {
        position: absolute;
        top: 16px;
        right: 16px;
        width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 10px;
        cursor: pointer;
        transition: all 0.3s ease;
    }
    
    .modal-close:hover {
        background: rgba(255, 255, 255, 0.1);
    }
    
    .modal-close svg {
        width: 20px;
        height: 20px;
        stroke: var(--text-secondary);
    }
    
    /* Danger Modal Specific */
    .modal-danger .modal-icon-danger {
        width: 56px;
        height: 56px;
        margin: 0 auto 16px;
    }
    
    .modal-danger .modal-icon-danger svg {
        width: 28px;
        height: 28px;
    }
    
    .modal-warning-text {
        font-size: 14px;
        margin-bottom: 16px;
    }
    
    .modal-warning-list {
        font-size: 13px;
        padding-left: 20px;
        margin-bottom: 20px;
    }
    
    .modal-warning-list li {
        margin-bottom: 8px;
    }
}

/* ==========================================
   EXTRA SMALL SCREENS (<380px)
   ========================================== */
@media (max-width: 380px) {
    .settings-layout {
        padding: 0.5rem;
    }
    
    .settings-sidebar {
        padding: 4px;
    }
    
    .settings-sidebar .sidebar-nav-item {
        padding: 10px 4px;
    }
    
    .settings-sidebar .sidebar-nav-item span {
        font-size: 10px;
    }
    
    .settings-sidebar .sidebar-nav-item svg {
        width: 18px;
        height: 18px;
    }
    
    .tab-title {
        font-size: 1.5rem;
    }
    
    .settings-card {
        padding: 1rem;
    }
    
    .profile-picture {
        width: 70px;
        height: 70px;
        font-size: 24px;
    }
    
    .preference-section {
        padding: 12px;
    }
    
    .preference-icon {
        width: 38px;
        height: 38px;
    }
    
    .preference-icon .material-symbols-rounded {
        font-size: 20px;
    }
    
    .preference-text h3 {
        font-size: 14px;
    }
    
    .preference-text p {
        font-size: 12px;
    }
    
    .preference-section .toggle-option {
        font-size: 12px;
        padding: 8px 6px;
    }
    
    .modal {
        padding: 16px;
    }
    
    .modal-header h2 {
        font-size: 18px;
    }
}
