/* ============================================================
   profile-modal.css - 统一的个人中心样式
   版本: 2.0
   说明: 此文件被 index.html、城市体验页面.html、城市预算界面.html 共用
   ============================================================ */

/* ---------- 个人中心模态框 ---------- */
#user-profile-modal.login-modal {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    backdrop-filter: blur(5px);
}
#user-profile-modal.login-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}
#user-profile-modal .login-content {
    background: white;
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    transform: scale(0.95);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
#user-profile-modal.active .login-content {
    transform: scale(1);
    opacity: 1;
}

/* ---------- 关闭按钮 ---------- */
#user-profile-modal .close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #f1f5f9;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 20;
}
#user-profile-modal .close-modal:hover {
    background: #e2e8f0;
    color: #ef4444;
    transform: rotate(90deg);
}

/* ---------- 侧边栏 ---------- */
#user-profile-modal .profile-menu-btn {
    transition: all 0.2s;
}
#user-profile-modal .profile-menu-active {
    background-color: #EFF6FF;
    color: #1E88E5;
    border-right: 3px solid #1E88E5;
}
#user-profile-modal .profile-menu-btn:hover {
    background-color: #EFF6FF;
    color: #1E88E5;
}

/* ---------- 用户头像 ---------- */
#user-profile-modal .user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1E88E5, #42A5F5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    border: 2px solid rgba(255, 255, 255, 0.5);
}
#user-profile-modal .admin-badge {
    background: linear-gradient(135deg, #FF9800, #F57C00);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(245, 124, 0, 0.3);
}

/* ---------- 优惠券卡片 ---------- */
#user-profile-modal .coupon-card {
    background-image: radial-gradient(circle at left center, transparent 10px, white 10px),
                      radial-gradient(circle at right center, transparent 10px, white 10px);
    background-position: 0 0, 0 0;
    background-size: 50% 100%;
    background-repeat: no-repeat;
    filter: drop-shadow(0 4px 3px rgba(0, 0, 0, 0.07));
}
#user-profile-modal .coupon-dashed-line {
    border-left: 2px dashed #e5e7eb;
}

/* ---------- 自定义滚动条 ---------- */
#user-profile-modal .custom-scrollbar::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
#user-profile-modal .custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}
#user-profile-modal .custom-scrollbar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}
#user-profile-modal .custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ---------- 动画 ---------- */
#user-profile-modal .animate-fade-in {
    animation: profileFadeIn 0.5s ease-in-out;
}
@keyframes profileFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---------- 弹窗状态（锁定背景滚动） ---------- */
.profile-modal-active {
    overflow: hidden;
}

/* ---------- 响应式调整 ---------- */
@media (max-width: 768px) {
    #user-profile-modal .login-content {
        width: 95vw !important;
        height: 90vh !important;
        max-width: 95vw !important;
        border-radius: 16px;
    }
    #user-profile-modal .login-content .w-full.md\:w-64 {
        width: 100% !important;
    }
}