/* 设置页面专用样式 */

/* 设置容器 */
.settings-container {
    display: flex;
    min-height: calc(100vh - 200px);
    background-color: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
}

/* 设置侧边栏 */
.settings-sidebar {
    width: 300px;
    background-color: #f8f9fa;
    border-right: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
}

.user-profile {
    padding: 30px 20px;
    text-align: center;
    background-color: #075e54;
    color: white;
}

.profile-avatar {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 20px;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255, 255, 255, 0.2);
}

.btn-change-avatar {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 36px;
    height: 36px;
    background-color: #25d366;
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-change-avatar:hover {
    background-color: #1da851;
}

.profile-info h3 {
    font-size: 22px;
    margin-bottom: 5px;
    font-weight: 700;
}

.profile-info p {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 10px;
}

.profile-status {
    display: inline-block;
    padding: 4px 12px;
    background-color: rgba(37, 211, 102, 0.2);
    color: #25d366;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.settings-nav {
    flex: 1;
    padding: 20px 0;
}

.settings-nav ul {
    list-style: none;
}

.settings-nav li {
    margin-bottom: 5px;
}

.settings-nav a {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 25px;
    color: #333;
    text-decoration: none;
    font-size: 16px;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.settings-nav a:hover {
    background-color: #f0f2f5;
    color: #075e54;
}

.settings-nav a.active {
    background-color: #e8f5e9;
    color: #075e54;
    border-left-color: #25d366;
    font-weight: 600;
}

.settings-nav i {
    width: 20px;
    text-align: center;
    font-size: 18px;
}

/* 设置内容区域 */
.settings-content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    max-height: calc(100vh - 250px);
}

.settings-section {
    display: none;
}

.settings-section.active {
    display: block;
}

.section-title {
    font-size: 28px;
    color: #075e54;
    margin-bottom: 30px;
    font-weight: 700;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f2f5;
}

.setting-group {
    margin-bottom: 40px;
    background-color: #f8f9fa;
    border-radius: 15px;
    padding: 25px;
}

.group-title {
    font-size: 20px;
    color: #333;
    margin-bottom: 20px;
    font-weight: 600;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    background-color: white;
    border-radius: 10px;
    margin-bottom: 10px;
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
}

.setting-item:hover {
    border-color: #25d366;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.setting-item.toggle {
    cursor: pointer;
}

.setting-info {
    flex: 1;
}

.setting-info h4 {
    font-size: 16px;
    color: #333;
    margin-bottom: 5px;
    font-weight: 600;
}

.setting-info p {
    font-size: 14px;
    color: #666;
}

.btn-edit, .btn-change, .btn-enable, .btn-manage, .btn-backup, .btn-export, .btn-clean {
    padding: 8px 16px;
    background-color: #f0f2f5;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.btn-edit:hover, .btn-change:hover, .btn-enable:hover, .btn-manage:hover, .btn-backup:hover, .btn-export:hover, .btn-clean:hover {
    background-color: #25d366;
    color: white;
    border-color: #25d366;
}

.btn-danger {
    padding: 8px 16px;
    background-color: #ffebee;
    border: 1px solid #f44336;
    border-radius: 20px;
    font-size: 14px;
    color: #f44336;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.btn-danger:hover {
    background-color: #f44336;
    color: white;
}

/* 切换开关 */
.toggle-switch {
    width: 44px;
    height: 24px;
    background-color: #ddd;
    border-radius: 12px;
    position: relative;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.toggle-switch:after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform 0.3s ease;
}

.toggle-switch.active {
    background-color: #25d366;
}

.toggle-switch.active:after {
    transform: translateX(20px);
}

/* 存储概览 */
.storage-overview {
    background-color: white;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    border: 1px solid #e0e0e0;
}

.storage-progress {
    margin-bottom: 25px;
}

.progress-bar {
    height: 12px;
    background-color: #f0f2f5;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background-color: #25d366;
    border-radius: 6px;
    transition: width 0.5s ease;
}

.storage-info {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #666;
}

.storage-breakdown {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.storage-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.storage-label {
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.storage-size {
    font-size: 14px;
    color: #075e54;
    font-weight: 600;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .settings-container {
        flex-direction: column;
    }
    
    .settings-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
    }
    
    .user-profile {
        display: flex;
        align-items: center;
        text-align: left;
        gap: 20px;
        padding: 20px;
    }
    
    .profile-avatar {
        margin: 0;
        width: 80px;
        height: 80px;
    }
    
    .settings-nav ul {
        display: flex;
        overflow-x: auto;
        padding: 10px;
    }
    
    .settings-nav li {
        margin-bottom: 0;
        margin-right: 10px;
    }
    
    .settings-nav a {
        white-space: nowrap;
        border-left: none;
        border-bottom: 3px solid transparent;
        padding: 10px 15px;
    }
    
    .settings-nav a.active {
        border-left: none;
        border-bottom-color: #25d366;
    }
    
    .settings-content {
        max-height: none;
    }
}

@media (max-width: 768px) {
    .settings-content {
        padding: 20px;
    }
    
    .setting-group {
        padding: 20px;
    }
    
    .setting-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .btn-edit, .btn-change, .btn-enable, .btn-manage, .btn-danger, .btn-backup, .btn-export, .btn-clean {
        align-self: flex-end;
    }
    
    .toggle-switch {
        align-self: flex-end;
    }
    
    .storage-breakdown {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .settings-container {
        margin: 10px 0;
    }
    
    .settings-content {
        padding: 15px;
    }
    
    .section-title {
        font-size: 24px;
    }
    
    .group-title {
        font-size: 18px;
    }
    
    .setting-group {
        padding: 15px;
    }
    
    .user-profile {
        flex-direction: column;
        text-align: center;
    }
    
    .settings-nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
}