/* 用户信息弹框样式 */
.user-profile-modal {
    max-width: 600px;
}

.user-profile-avatar {
    position: relative;
    overflow: hidden;
}

.user-profile-avatar:hover .avatar-overlay {
    opacity: 1;
}

.avatar-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease;
    cursor: pointer;
    border-radius: 50%;
}

.user-profile-section {
    background: rgba(249, 250, 251, 1);
    border-radius: 0.5rem;
    padding: 1.25rem;
}

[data-theme="dark"] .user-profile-section {
    background: rgba(55, 65, 81, 1);
}

.user-profile-section h4 {
    font-size: 1rem;
    font-weight: 500;
    color: rgba(55, 65, 81, 1);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(229, 231, 235, 1);
}

[data-theme="dark"] .user-profile-section h4 {
    color: rgba(209, 213, 219, 1);
    border-bottom-color: rgba(75, 85, 99, 1);
}

.user-profile-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.user-profile-info-item:last-child {
    margin-bottom: 0;
}

.user-profile-info-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(107, 114, 128, 1);
}

[data-theme="dark"] .user-profile-info-label {
    color: rgba(156, 163, 175, 1);
}

.user-profile-info-value {
    font-size: 1rem;
    color: rgba(31, 41, 55, 1);
    word-break: break-all;
    margin-right: 0.5rem;
    flex-grow: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}

[data-theme="dark"] .user-profile-info-value {
    color: rgba(229, 231, 235, 1);
}

.user-profile-edit-btn {
    font-size: 0.75rem;
    color: rgba(59, 130, 246, 1);
    cursor: pointer;
    flex-shrink: 0;
    transition: color 0.2s ease;
}

.user-profile-edit-btn:hover {
    color: rgba(37, 99, 235, 1);
}

/* 用户资料操作按钮容器 */
.user-profile-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    padding: 0.75rem;
    background: rgba(243, 244, 246, 0.5);
    border-radius: 1.25rem;
    margin-top: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

[data-theme="dark"] .user-profile-actions {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(51, 65, 85, 0.6);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* 用户资料操作按钮基础样式 */
.user-profile-action-btn {
    transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
    cursor: pointer;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04), inset 0 1px 1px rgba(255,255,255,0.7);
    color: #374151;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .user-profile-action-btn {
    background: rgba(55, 65, 81, 0.5);
    border: 1px solid rgba(75, 85, 99, 0.7);
    color: #e5e7eb;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15), inset 0 1px 1px rgba(255,255,255,0.05);
}

/* 按钮悬浮效果 */
.user-profile-action-btn:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08), inset 0 1px 1px rgba(255,255,255,0.8);
    background: rgba(255, 255, 255, 0.9);
}

[data-theme="dark"] .user-profile-action-btn:hover {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.25), inset 0 1px 1px rgba(255,255,255,0.07);
    background: rgba(75, 85, 99, 0.7);
}

/* 按钮图标容器 */
.user-profile-action-btn > div {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

[data-theme="dark"] .user-profile-action-btn > div {
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.user-profile-action-btn:hover > div {
    transform: scale(1.1) rotate(5deg);
}

/* 修改密码按钮 */
.user-profile-action-btn:has(.text-blue-500) > div {
    background: linear-gradient(135deg, #ebf8ff, #dbeafe);
}
[data-theme="dark"] .user-profile-action-btn:has(.text-blue-300) > div {
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.8), rgba(96, 165, 250, 0.6));
}

/* 退出登录按钮 */
.user-profile-action-btn:has(.text-red-500) > div {
    background: linear-gradient(135deg, #fff1f2, #ffedd5);
}
[data-theme="dark"] .user-profile-action-btn:has(.text-red-300) > div {
    background: linear-gradient(135deg, rgba(127, 29, 29, 0.8), rgba(249, 115, 22, 0.6));
}

/* 图标 */
.user-profile-action-btn i {
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.user-profile-action-btn:hover i {
    transform: scale(1.1);
}

/* 文字 */
.user-profile-action-btn span {
    font-weight: 500;
    font-size: 0.875rem;
}

[data-theme="dark"] .user-profile-action-btn:hover:has(.text-blue-300) {
    border-color: rgba(96, 165, 250, 0.6);
}

[data-theme="dark"] .user-profile-action-btn:hover:has(.text-red-300) {
    border-color: rgba(248, 113, 113, 0.6);
}

/* 响应式设计 */
@media (max-width: 1023px) {
    .user-profile-actions {
        /* grid-template-columns: 1fr; */
        gap: 0.75rem;
        padding: 0.75rem;
        margin-top: 1rem;
    }
    
    .user-profile-action-btn {
        padding: 0.75rem;
    }
    
    .user-profile-action-btn:hover {
        transform: translateY(-2px) scale(1.01);
    }
    
    .user-profile-action-btn > div {
        width: 44px;
        height: 44px;
        margin-bottom: 0.5rem;
    }
    
    .user-profile-action-btn i {
        font-size: 1.25rem;
    }
    
    .user-profile-action-btn span {
        font-size: 0.8rem;
    }
}

/* 中等屏幕优化 */
@media (max-width: 1023px) and (min-width: 641px) {
    .user-profile-actions {
        gap: 0.875rem;
        padding: 0.875rem;
    }
    
    .user-profile-action-btn {
        padding: 0.875rem;
    }
    
    .user-profile-action-btn > div {
        width: 44px;
        height: 44px;
    }
}

/* 会员状态样式 */
.membership-status {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 0.75rem;
}

@media (min-width: 640px) {
    .membership-status {
        flex-direction: row;
        align-items: center;
    }
}

.membership-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

@media (min-width: 640px) {
    .membership-badge {
        margin-bottom: 0;
        margin-right: 1rem;
    }
}

.membership-badge.member {
    color: rgba(180, 83, 9, 1);
    background: rgba(254, 243, 199, 1);
}

[data-theme="dark"] .membership-badge.member {
    color: rgba(251, 191, 36, 1);
    background: rgba(180, 83, 9, 0.3);
}

.membership-badge.normal {
    color: rgba(75, 85, 99, 1);
    background: rgba(243, 244, 246, 1);
}

[data-theme="dark"] .membership-badge.normal {
    color: rgba(209, 213, 219, 1);
    background: rgba(55, 65, 81, 1);
}

.membership-action-btn {
    padding: 0.25rem 0.75rem;
    background: linear-gradient(to right, rgba(251, 191, 36, 1), rgba(245, 158, 11, 1));
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.25rem;
    transition: opacity 0.2s ease;
    display: flex;
    align-items: center;
    cursor: pointer;
    border: none;
}

.membership-action-btn:hover {
    opacity: 0.9;
}

.membership-action-btn i {
    margin-right: 0.25rem;
}

/* 修改密码弹框样式 */
.password-input-container {
    display: flex;
    align-items: center;
    border: 1px solid #d1d5db; /* gray-300 */
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    background-color: #ffffff;
}

.password-input-container:focus-within {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.password-input-icon {
    flex-shrink: 0;
    padding: 0 0.75rem; /* 12px */
    color: #9ca3af; /* gray-400 */
    font-size: 1.125rem; /* 18px */
    line-height: 1;
    transition: color 0.2s ease;
}

.password-input-container:focus-within .password-input-icon {
    color: #3b82f6; /* blue-500 */
}

.password-input {
    flex-grow: 1;
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    padding: 0.75rem 1rem 0.75rem 0;
    color: #1f2937;
    font-size: 14px;
    height: 42px; /* Container is 44px with 1px border top/bottom */
    box-sizing: border-box;
}

.password-input:focus {
    border: none;
    box-shadow: none !important;
}

/* Dark theme adaptations */
[data-theme="dark"] .password-input-container {
    border-color: #4b5563; /* gray-600 */
    background: #374151; /* gray-700 */
}

[data-theme="dark"] .password-input-container:focus-within {
    border-color: #60a5fa; /* blue-400 */
    box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.1);
}

[data-theme="dark"] .password-input-icon {
    color: #9ca3af; /* gray-400 */
}

[data-theme="dark"] .password-input-container:focus-within .password-input-icon {
    color: #60a5fa; /* blue-400 */
}

[data-theme="dark"] .password-input {
    color: #f3f4f6; /* gray-100 */
}

[data-theme="dark"] .password-input::placeholder {
    color: #9ca3af; /* gray-400 */
}

/* 头像上传弹框样式 */
.avatar-upload-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}

.avatar-preview-container {
    position: relative;
    border-radius: 50%;
    overflow: hidden;
    background: rgba(229, 231, 235, 1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 200px;
    height: 200px;
}

[data-theme="dark"] .avatar-preview-container {
    background: rgba(55, 65, 81, 1);
}

.avatar-preview {
    object-fit: cover;
    width: 200px;
    height: 200px;
}

.avatar-upload-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease;
    border-radius: 50%;
}

.avatar-upload-container:hover .avatar-upload-overlay {
    opacity: 1;
}

.avatar-upload-overlay i {
    color: white;
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.avatar-upload-overlay span {
    color: white;
    font-size: 0.875rem;
}

.avatar-upload-tips {
    font-size: 0.875rem;
    text-align: center;
    color: rgba(107, 114, 128, 1);
}

[data-theme="dark"] .avatar-upload-tips {
    color: rgba(156, 163, 175, 1);
}

/* 弹框分隔线 */
.user-profile-divider {
    height: 1px;
    background-color: #e5e7eb;
    margin: 0.5rem 0;
}

[data-theme="dark"] .user-profile-divider {
    background-color: #6b7280;
}

/* 夜间模式下的图标背景优化 */
[data-theme="dark"] .user-profile-action-btn > div.bg-blue-100 {
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.3) 0%, rgba(59, 130, 246, 0.2) 100%) !important;
    border: 1px solid rgba(59, 130, 246, 0.25);
}

[data-theme="dark"] .user-profile-action-btn > div.bg-red-100 {
    background: linear-gradient(135deg, rgba(127, 29, 29, 0.3) 0%, rgba(220, 38, 38, 0.2) 100%) !important;
    border: 1px solid rgba(220, 38, 38, 0.25);
}

/* 夜间模式下的图标颜色增强 */
[data-theme="dark"] .user-profile-action-btn .text-blue-300 {
    color: #93c5fd !important;
}

[data-theme="dark"] .user-profile-action-btn .text-red-300 {
    color: #fca5a5 !important;
}

/* 按钮激活时的更好视觉反馈 */
.user-profile-action-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

[data-theme="dark"] .user-profile-action-btn:focus {
    box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.3);
}

/* 禁用状态样式 */
.user-profile-action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.user-profile-action-btn:disabled:hover {
    background-color: transparent !important;
    box-shadow: none !important;
}

.user-profile-action-btn:disabled > div {
    transform: none !important;
} 