/* 设置页面样式 */

/* ===== 设置主容器 ===== */
.settings-container {
    max-width: 600px;
    margin: 40px auto;
    padding: 20px;
}

.settings-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 24px;
}

/* ===== 用户信息卡片 ===== */
.settings-card {
    background: #f5f5f5;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar-large img{
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.user-info-large {
    flex: 1;
}

.user-name-large {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    margin-bottom: 4px;
	    float: left;
	    width: 100%;
}

.user-phone {
    font-size: 12px;
    color: #999;
}

/* ===== 设置项 ===== */
.settings-section {
    margin-bottom: 24px;
}

.section-title {
    font-size: 13px;
    color: #999;
    margin-bottom: 12px;
    font-weight: 500;
}

.settings-item {
    background: #f5f5f5;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.settings-item.clickable {
    cursor: pointer;
}

.settings-item.clickable:hover {
    background: #ebebeb;
}

.item-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.item-icon {
    width: 20px;
    height: 20px;
    color: #666;
    flex-shrink: 0;
}

.item-label {
    font-size: 14px;
    color: #333;
}

.item-select {
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    color: #666;
    background: white;
    cursor: pointer;
    outline: none;
}

.item-select:focus {
    border-color: #667eea;
}

.arrow-icon {
    width: 20px;
    height: 20px;
    color: #999;
    flex-shrink: 0;
}

/* ===== 开关样式 ===== */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #2196F3;
}

input:checked + .slider:before {
    transform: translateX(20px);
}

/* ===== 退出按钮 ===== */
.logout-btn {
    width: 100%;
    padding: 14px;
    background: #f5f5f5;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.logout-btn:hover {
    background: #ebebeb;
}

.logout-btn svg {
    width: 18px;
    height: 18px;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .settings-container {
        margin: 20px auto;
        padding: 16px;
    }
    
    .settings-title {
        font-size: 20px;
    }
}

/* ===== 账号设置弹窗样式 ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal-content {
    background: #ffffff;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-close-btn {
    position: absolute;
    right: 0;
    color: #000000;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    width: 32px;
    height: 32px;
}


.modal-body {
    padding: 24px 20px;
}

.account-avatar {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
    cursor: pointer;
    position: relative;
}

.account-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    padding: 4px;
    transition: all 0.3s ease;
}

.account-avatar:hover img {
    transform: scale(1.05);
}

.account-avatar svg {
    color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    padding: 16px;
    width: 80px;
    height: 80px;
}

.account-field {
    margin-bottom: 20px;
}

.field-label {
    display: block;
    font-size: 14px;
    color: #999;
    margin-bottom: 8px;
}

.field-input {
    width: 100%;
    padding: 12px 16px;
    background: #00000008;
    border: 1px solid #00000008;
    border-radius: 8px;
    color: #000000;
    font-size: 14px;
    outline: none;
}

.field-input:focus {
    border-color: #667eea;
}

/* 昵称输入框包装器 */
.nickname-input-wrapper {
    position: relative;
    width: 100%;
}

.nickname-input {
    padding-right: 70px !important;
}

/* 保存按钮 - 默认隐藏 */
.save-nickname-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    padding: 6px 12px;
    background: #667eea;
    border: none;
    border-radius: 6px;
    color: #fff;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
}

/* 输入框获得焦点时显示保存按钮 */
.nickname-input-wrapper:focus-within .save-nickname-btn {
    opacity: 1;
    visibility: visible;
}

.save-nickname-btn:hover {
    opacity: 0.9;
    transform: translateY(-50%) scale(1.05);
}

.save-nickname-btn:active {
    transform: translateY(-50%) scale(0.98);
}

.save-nickname-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.change-btn, .bind-btn {
    background: none;
    border: none;
    color: #667eea;
    cursor: pointer;
    font-size: 14px;
}

.unbind-btn {
    background: none;
    border: none;
    color: #ff4d4f;
    cursor: pointer;
    font-size: 14px;
    margin-right: 8px;
}

.change-btn:hover, .bind-btn:hover {
    opacity: 0.8;
}

.unbind-btn:hover {
    opacity: 0.8;
}

.third-party-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #00000008;
    border-radius: 8px;
    color: #767676;
}

.third-party-item span {
    flex: 1;
}

.delete-account-btn {
    width: 100%;
    padding: 14px;
    background: #00000008;
    border: none;
    border-radius: 8px;
    color: #5c5c5c;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

/* ==================== 深色模式适配 ==================== */
[data-theme="dark"] .settings-title {
    color: var(--text-primary);
}

[data-theme="dark"] .settings-card {
    background: var(--bg-secondary);
}

[data-theme="dark"] .user-name-large {
    color: var(--text-primary);
}

[data-theme="dark"] .user-phone {
    color: var(--text-secondary);
}

[data-theme="dark"] .section-title {
    color: var(--text-primary);
}

[data-theme="dark"] .settings-item {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

[data-theme="dark"] .item-label {
    color: var(--text-primary);
}

[data-theme="dark"] .item-select {
    background: var(--input-bg);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .arrow-icon {
    color: var(--text-muted);
}

/* 更多深色模式适配 */
[data-theme="dark"] .switch-slider {
    background-color: #555;
}

[data-theme="dark"] .switch-input:checked + .switch-slider {
    background-color: #667eea;
}

[data-theme="dark"] .settings-title {
    color: var(--text-primary);
}

[data-theme="dark"] .section-title {
    color: var(--text-primary);
}

[data-theme="dark"] .item-label {
    color: var(--text-primary);
}

[data-theme="dark"] .user-name-large {
    color: var(--text-primary);
}

[data-theme="dark"] .user-phone {
    color: var(--text-secondary);
}

[data-theme="dark"] .oauth-tip {
    color: var(--text-muted);
}

[data-theme="dark"] .modal-content {
    background: var(--bg-secondary);
}

[data-theme="dark"] .account-avatar img {
    border: 2px solid var(--border-color);
}

[data-theme="dark"] .field-label {
    color: var(--text-secondary);
}

[data-theme="dark"] .field-input {
    background: var(--input-bg);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .change-btn {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .third-party-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .third-party-item span {
    color: var(--text-primary);
}

[data-theme="dark"] .bind-btn {
    color: var(--text-primary);
}

[data-theme="dark"] .unbind-btn {
    color: #ff4d4f;
}

[data-theme="dark"] .modal-content {
    background: var(--bg-secondary);
}

[data-theme="dark"] .modal-close-btn {
    color: var(--text-secondary);
}

[data-theme="dark"] .delete-account-btn {
    background: #ff4d4f;
    color: #fff;
}

[data-theme="dark"] .logout-btn {
    background: var(--hover-bg);
    color: var(--text-primary);
}

/* Hover 状态适配 */
[data-theme="dark"] .settings-item:hover {
    background: var(--hover-bg);
}

[data-theme="dark"] .third-party-item:hover {
    background: var(--hover-bg);
}

[data-theme="dark"] .change-btn:hover {
    background: var(--hover-bg);
}

/* SVG 图标适配 */
[data-theme="dark"] .item-icon {
    color: var(--text-secondary);
}

[data-theme="dark"] .arrow-icon {
    color: var(--text-muted);
}