/* 我的页面样式 */
body {
    padding-bottom: 70px;
    background: #f5f6f8;
}

/* ==================== 未登录状态 ==================== */
.not-logged-section {
    min-height: calc(100vh - 70px);
}

.login-header {
    text-align: center;
    padding: 50px 20px 40px;
    background: linear-gradient(135deg, #ff6b35 0%, #ff8f6b 100%);
    border-radius: 0 0 30px 30px;
    position: relative;
    overflow: hidden;
}

.login-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 200px;
    height: 200px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
}

.login-header::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -20%;
    width: 150px;
    height: 150px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
}

.avatar-placeholder {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    /* background: rgba(255,255,255,0.25); */
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    /* box-shadow: 0 8px 32px rgba(0,0,0,0.15); */
    /* border: 3px solid rgba(255,255,255,0.5); */
    position: relative;
    z-index: 1;
}

.avatar-icon {
    color: white;
}

.login-tip {
    color: rgba(255,255,255,0.95);
    font-size: 1rem;
    margin-bottom: 25px;
    position: relative;
    z-index: 1;
}

.login-btn {
    width: 220px;
    height: 48px;
    background: white;
    border: none;
    border-radius: 24px;
    color: #ff6b35;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.login-btn:active {
    transform: scale(0.96);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* 快捷操作 */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 20px 15px;
    /* margin-top: -20px; */
}

.action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 18px 8px;
    background: white;
    border-radius: 16px;
    cursor: pointer;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
}

.action-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.action-item:active {
    transform: scale(0.96);
}

.action-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #fff5f2 0%, #ffe8e0 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-item span {
    font-size: 0.8rem;
    color: #555;
    font-weight: 500;
}

/* ==================== 已登录状态 ==================== */
.logged-section {
    padding-bottom: 90px;
}

.user-header {
    height: auto;
    min-height: 200px;
    background: linear-gradient(135deg, #ff6b35 0%, #ff8f6b 100%);
    padding: 40px 20px 50px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
    border-radius: 0 0 30px 30px;
    overflow: hidden;
}

.user-header::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -20%;
    width: 180px;
    height: 180px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
}

.user-header::after {
    content: '';
    position: absolute;
    bottom: -40%;
    left: -25%;
    width: 200px;
    height: 200px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    z-index: 1;
}

.user-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    border: 3px solid rgba(255,255,255,0.5);
}

.avatar-text {
    font-size: 1.8rem;
    font-weight: 700;
    color: #ff6b35;
}

.avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.user-details {
    color: white;
}

.user-name {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 0 6px 0;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.user-phone {
    font-size: 0.9rem;
    margin: 0;
    opacity: 0.9;
}

.vip-badge {
    background: linear-gradient(135deg, #ffd700 0%, #ffb347 100%);
    padding: 8px 16px;
    border-radius: 20px;
    color: #8B4513;
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(255,215,0,0.3);
    position: relative;
    z-index: 1;
}

/* 额度卡片 */
.quota-card {
    margin: -40px 15px 15px;
    background: white;
    border-radius: 20px;
    padding: 24px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    position: relative;
    z-index: 2;
}

.quota-info {
    flex: 1;
}

.quota-label {
    font-size: 0.85rem;
    color: #888;
    margin: 0 0 8px 0;
    font-weight: 500;
}

.quota-amount {
    font-size: 2rem;
    font-weight: 800;
    color: #ff6b35;
    margin: 0;
    background: linear-gradient(135deg, #ff6b35 0%, #ff8f6b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.apply-quota-btn {
    height: 42px;
    padding: 0 24px;
    background: linear-gradient(135deg, #ff6b35 0%, #ff8f6b 100%);
    border: none;
    border-radius: 21px;
    color: white;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255,107,53,0.3);
    transition: all 0.3s ease;
}

.apply-quota-btn:active {
    transform: scale(0.96);
    box-shadow: 0 2px 8px rgba(255,107,53,0.3);
}

/* 菜单区域 */
.menu-section {
    background: white;
    border-radius: 16px;
    margin: 0 15px 15px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.menu-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.menu-item:last-child {
    border-bottom: none;
}

.menu-item:hover {
    background: #fafafa;
}

.menu-item:active {
    background: #f5f5f5;
}

.menu-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.menu-icon {
    font-size: 1.4rem;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #fff5f2 0%, #ffe8e0 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-text {
    font-size: 0.95rem;
    color: #333;
    font-weight: 500;
}

.menu-arrow {
    font-size: 1.5rem;
    color: #ccc;
    font-weight: 300;
}

/* 退出登录 */
.logout-section {
    padding: 25px 15px;
}

.logout-btn {
    width: 100%;
    height: 50px;
    background: white;
    border: none;
    border-radius: 25px;
    color: #ff6b35;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
}

.logout-btn:active {
    background: #fff5f2;
    transform: scale(0.98);
}

/* ==================== 登录弹窗 ==================== */
.login-modal {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-radius: 24px 24px 0 0;
    padding: 0;
    z-index: 2001;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 -4px 30px rgba(0,0,0,0.15);
}

.login-modal.show {
    display: block;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 20px;
    border-bottom: 1px solid #f0f0f0;
}

.modal-header h3 {
    font-size: 1.2rem;
    color: #333;
    margin: 0;
    font-weight: 700;
}

.close-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: #f5f5f5;
    border-radius: 50%;
    font-size: 1.3rem;
    color: #888;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background: #eee;
    color: #666;
}

.login-form {
    padding: 24px 20px 30px;
}

.form-item {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 0.9rem;
    color: #444;
    margin-bottom: 10px;
    font-weight: 600;
}

.form-input {
    width: 100%;
    height: 52px;
    border: 2px solid #f0f0f0;
    border-radius: 12px;
    padding: 0 16px;
    font-size: 1rem;
    color: #333;
    background: #fafafa;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: #ff6b35;
    background: white;
    box-shadow: 0 0 0 3px rgba(255,107,53,0.1);
}

.form-input::placeholder {
    color: #bbb;
}

.code-input-group {
    display: flex;
    gap: 12px;
}

.code-input-group .form-input {
    flex: 1;
}

.send-code-btn {
    width: 110px;
    height: 52px;
    background: linear-gradient(135deg, #ff6b35 0%, #ff8f6b 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.send-code-btn:active {
    transform: scale(0.96);
}

.send-code-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.checkbox-item {
    margin-top: 18px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.form-checkbox {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    cursor: pointer;
    flex-shrink: 0;
    accent-color: #ff6b35;
}

.checkbox-text {
    font-size: 0.85rem;
    color: #888;
    line-height: 1.5;
}

.link {
    color: #ff6b35;
    text-decoration: none;
    font-weight: 500;
}

.submit-btn {
    width: 100%;
    height: 52px;
    background: linear-gradient(135deg, #ff6b35 0%, #ff8f6b 100%);
    border: none;
    border-radius: 26px;
    color: white;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    margin-top: 24px;
    box-shadow: 0 4px 15px rgba(255,107,53,0.3);
    transition: all 0.3s ease;
}

.submit-btn:active {
    transform: scale(0.98);
    box-shadow: 0 2px 8px rgba(255,107,53,0.3);
}

.modal-footer {
    margin-top: 20px;
    text-align: center;
    font-size: 0.9rem;
    color: #888;
}

.modal-footer .link {
    color: #ff6b35;
    font-weight: 600;
}

/* ==================== 提示弹窗 ==================== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    animation: fadeIn 0.2s ease;
}

.modal-overlay.show {
    display: block;
}

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

.modal-box {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 20px;
    padding: 28px 24px;
    min-width: 280px;
    max-width: 85%;
    z-index: 2001;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.modal-box.show {
    display: block;
    animation: popIn 0.3s ease;
}

@keyframes popIn {
    from {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0;
    }
    to {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

.modal-content {
    font-size: 1rem;
    color: #333;
    margin-bottom: 24px;
    line-height: 1.6;
}

.modal-buttons {
    display: flex;
    gap: 12px;
}

.modal-btn {
    flex: 1;
    height: 46px;
    background: linear-gradient(135deg, #ff6b35 0%, #ff8f6b 100%);
    border: none;
    border-radius: 23px;
    color: white;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(255,107,53,0.3);
    transition: all 0.3s ease;
}

.modal-btn:active {
    transform: scale(0.96);
}

.modal-btn.cancel {
    background: #f0f0f0;
    color: #666;
    box-shadow: none;
}

.modal-btn.confirm {
    background: linear-gradient(135deg, #ff6b35 0%, #ff8f6b 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(255,107,53,0.3);
}

/* 客服弹窗样式 */
.service-modal {
    max-width: 320px;
    padding: 30px 24px;
}

.service-qrcode img {
    border: 1px solid #eee;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.copy-btn {
    margin-top: 12px;
    padding: 10px 24px;
    background: linear-gradient(135deg, #ff6b35 0%, #ff8f6b 100%);
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(255,107,53,0.3);
    transition: all 0.3s ease;
}

.copy-btn:active {
    transform: scale(0.96);
}

/* 评估记录弹窗 */
.records-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 92%;
    max-width: 400px;
    max-height: 80vh;
    background: #fff;
    border-radius: 20px;
    z-index: 2001;
    display: none;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.records-modal.show {
    display: flex;
    transform: translate(-50%, -50%) scale(1);
    transition: transform 0.3s ease;
}

.records-modal .modal-header {
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.records-modal .modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #333;
}

.records-content {
    padding: 16px;
    overflow-y: auto;
    max-height: 60vh;
}

.loading-text {
    text-align: center;
    color: #999;
    padding: 30px;
    font-size: 0.9rem;
}

.records-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.record-item {
    background: #fafafa;
    border-radius: 12px;
    padding: 16px;
    border: 1px solid #f0f0f0;
}

.record-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.record-name {
    font-weight: 700;
    color: #333;
    font-size: 0.95rem;
}

.record-date {
    font-size: 0.8rem;
    color: #999;
}

.record-info {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.record-tag {
    background: #f0f0f0;
    color: #666;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
}

.record-tag.highlight {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    font-weight: 600;
}

.no-records {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.no-records p {
    margin-bottom: 20px;
    font-size: 0.95rem;
}

/* ==================== 响应式设计 ==================== */
@media (min-width: 768px) {
    body {
        background: #f5f6f8;
    }

    .not-logged-section,
    .logged-section {
        max-width: 420px;
        margin: 0 auto;
        background: white;
        min-height: 100vh;
        box-shadow: 0 0 30px rgba(0,0,0,0.1);
    }

    .login-modal {
        max-width: 420px;
        left: 50%;
        transform: translateX(-50%);
        border-radius: 24px 24px 0 0;
    }

    .modal-box {
        max-width: 360px;
    }
}

/* 通用动画 */
@media (prefers-reduced-motion: no-preference) {
    .action-item,
    .login-btn,
    .apply-quota-btn,
    .submit-btn,
    .logout-btn,
    .close-btn,
    .copy-btn,
    .modal-btn {
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }
}
