﻿/* ============================================
   BJ陪玩团 - 个人中心页面样式
   ============================================ */

/* --- 个人中心头部 --- */
.profile-header {
    margin-top: 70px;
    position: relative;
}

.profile-cover {
    height: 200px;
    background: linear-gradient(135deg, #1A237E 0%, #3949AB 50%, #5C6BC0 100%);
    border-radius: 0 0 40px 40px;
    position: relative;
}

.profile-cover::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 30% 50%, rgba(255, 213, 79, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 70% 30%, rgba(255, 255, 255, 0.1) 0%, transparent 40%);
}

.profile-main {
    max-width: 600px;
    margin: -60px auto 0;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    margin: 0 auto 16px;
    position: relative;
}

.avatar-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    color: white;
    border: 5px solid white;
    box-shadow: var(--shadow-lg);
}

.avatar-edit {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--secondary);
    border: 3px solid white;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    transition: var(--transition);
}

.avatar-edit:hover {
    transform: scale(1.1);
}

.profile-info {
    text-align: center;
}

.profile-info h2 {
    font-size: 1.6rem;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.user-id {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.user-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
}

.meta-item {
    font-size: 0.85rem;
    color: var(--text-secondary);
}


.meta-item i {
    margin-right: 4px;
    color: var(--primary);
}

/* --- 数据统计 --- */
.profile-stats {
    padding: 30px 0;
    background: var(--bg-white);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.stat-card {
    text-align: center;
    padding: 20px 12px;
    background: var(--bg-light);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.stat-value {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 6px;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* --- 功能菜单 --- */
.profile-menu {
    padding: 40px 0;
    background: var(--bg-light);
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: white;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid var(--border);
}

.menu-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    border-color: var(--primary);
}

.menu-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: white;
    flex-shrink: 0;
}

.menu-item:nth-child(1) .menu-icon { background: linear-gradient(135deg, #42A5F5, #1976D2); }
.menu-item:nth-child(2) .menu-icon { background: linear-gradient(135deg, #EF5350, #E53935); }
.menu-item:nth-child(3) .menu-icon { background: linear-gradient(135deg, #FFA726, #FB8C00); }
.menu-item:nth-child(4) .menu-icon { background: linear-gradient(135deg, #66BB6A, #43A047); }
.menu-item:nth-child(5) .menu-icon { background: linear-gradient(135deg, #AB47BC, #8E24AA); }
.menu-item:nth-child(6) .menu-icon { background: linear-gradient(135deg, #78909C, #546E7A); }
.menu-item:nth-child(7) .menu-icon { background: linear-gradient(135deg, #26C6DA, #00ACC1); }
.menu-item:nth-child(8) .menu-icon { background: linear-gradient(135deg, #8D6E63, #6D4C41); }

.menu-item span {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    flex: 1;
}

.arrow {
    color: var(--text-light);
    font-size: 0.85rem;
}

/* --- 最近订单 --- */
.recent-orders {
    padding: 40px 0 80px;
    background: var(--bg-white);
}

.section-title-sm {
    font-size: 1.3rem;
    color: var(--text-dark);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title-sm i {
    color: var(--primary);
}

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

.order-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--bg-light);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.order-item:hover {
    box-shadow: var(--shadow);
}

.order-wizard-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.order-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.order-wizard-info h4 {
    font-size: 1rem;
    color: var(--text-dark);
}

.order-wizard-info p {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.order-status {
    padding: 4px 14px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-completed {
    background: #E8F5E9;
    color: #2E7D32;
}

.status-pending {
    background: #E3F2FD;
    color: #1565C0;
}

.status-waiting {
    background: #FFF3E0;
    color: #E65100;
}

.order-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent);
}

/* --- 订单弹窗 --- */
.orders-modal .tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border);
    padding-bottom: 12px;
}

.orders-modal .tabs .tab {
    padding: 8px 16px;
    border: none;
    background: none;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 8px;
    transition: var(--transition);
}

.orders-modal .tabs .tab.active {
    background: var(--primary);
    color: white;
}

.orders-full-list {
    max-height: 400px;
    overflow-y: auto;
}

.full-order {
    padding: 16px;
    border-bottom: 1px solid var(--border);
}

.fo-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 0.85rem;
}

.fo-date {
    color: var(--text-light);
}

.fo-status {
    padding: 2px 10px;
    border-radius: 10px;
    font-weight: 600;
}

.fo-body {
    display: flex;
    align-items: center;
    gap: 12px;
}

.fo-wizard {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--text-dark);
}

.fo-wizard i {
    color: var(--primary);
}

.fo-service {
    flex: 1;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.fo-price {
    font-weight: 700;
    color: var(--accent);
}

/* --- 响应式 --- */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .menu-grid {
        grid-template-columns: 1fr;
    }

    .order-item {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .profile-cover {
        height: 150px;
    }

    .profile-avatar {
        width: 100px;
        height: 100px;
    }

    .avatar-inner {
        font-size: 2.8rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .stat-value {
        font-size: 1.3rem;
    }
}


/* ===== 设置弹窗 ===== */
.settings-modal {
    max-width: 500px;
    width: 90%;
}

.settings-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.settings-item {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: var(--transition);
}

.settings-item:hover {
    background: var(--bg-light);
}

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

.settings-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    margin-right: 14px;
    flex-shrink: 0;
}

.settings-item:nth-child(1) .settings-icon { background: linear-gradient(135deg, #4facfe, #00f2fe); color: white; }
.settings-item:nth-child(2) .settings-icon { background: linear-gradient(135deg, #43e97b, #38f9d7); color: white; }
.settings-item:nth-child(3) .settings-icon { background: linear-gradient(135deg, #fa709a, #fee140); color: white; }
.settings-item:nth-child(4) .settings-icon { background: linear-gradient(135deg, #a18cd1, #fbc2eb); color: white; }

.settings-info {
    flex: 1;
}

.settings-info h4 {
    font-size: 0.95rem;
    color: var(--text-primary);
    margin: 0 0 2px 0;
}

.settings-info p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin: 0;
}

/* 开关按钮 */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #ccc;
    border-radius: 26px;
    transition: 0.3s;
}

.slider:before {
    content: "";
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
}

input:checked + .slider {
    background: var(--primary);
}

input:checked + .slider:before {
    transform: translateX(22px);
}

/* ===== 优惠券弹窗 ===== */
.coupons-modal {
    max-width: 520px;
    width: 90%;
}

.coupons-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: 450px;
    overflow-y: auto;
    padding: 4px 0;
}

.coupon-item {
    display: flex;
    align-items: stretch;
    background: linear-gradient(135deg, #fff9f0, #fff3e0);
    border: 1px dashed #ffc107;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
}

.coupon-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 193, 7, 0.2);
}

.coupon-item.active {
    background: linear-gradient(135deg, #fff9f0, #fff3e0);
    border-color: #ffc107;
}

.coupon-item.used {
    background: #f5f5f5;
    border-color: #e0e0e0;
    opacity: 0.6;
}

.coupon-left {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 24px;
    border-right: 2px dashed #ffc107;
    flex-shrink: 0;
    min-width: 120px;
    position: relative;
}

.coupon-item.used .coupon-left {
    border-right-color: #e0e0e0;
}

.coupon-left::before,
.coupon-left::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    right: -8px;
}

.coupon-left::before { top: -8px; }
.coupon-left::after { bottom: -8px; }

.coupon-amount {
    font-size: 2rem;
    font-weight: 800;
    color: #ff6b00;
    line-height: 1;
}

.coupon-amount .currency {
    font-size: 1rem;
    margin-right: 2px;
}

.coupon-condition {
    font-size: 0.8rem;
    color: #888;
    margin-top: 6px;
    white-space: nowrap;
}

.coupon-right {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 16px 20px;
    flex: 1;
}

.coupon-status {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 3px 12px;
    border-radius: 20px;
    align-self: flex-start;
}

.coupon-status.active {
    background: linear-gradient(135deg, #43e97b, #38f9d7);
    color: white;
}

.coupon-status.used {
    background: #e0e0e0;
    color: #999;
}

.coupon-expire {
    font-size: 0.75rem;
    color: #aaa;
    margin-top: auto;
}

.btn-use-coupon {
    padding: 8px 20px;
    background: linear-gradient(135deg, #ff6b00, #ff8c00);
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    align-self: flex-start;
    margin-top: 8px;
}

.btn-use-coupon:hover {
    opacity: 0.85;
    transform: scale(1.05);
}

.btn-use-coupon:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.coupon-empty {
    text-align: center;
    padding: 50px 20px;
    color: var(--text-secondary);
}

.coupon-empty i {
    font-size: 3rem;
    margin-bottom: 12px;
    opacity: 0.3;
    display: block;
}

.coupon-empty p {
    margin: 0;
    font-size: 1rem;
    color: #999;
}


/* ===== 服务器选择弹窗 ===== */
.server-modal {
    max-width: 450px;
    width: 90%;
}

.server-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.server-option {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    background: var(--bg-light);
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.server-option:hover {
    border-color: var(--primary);
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 172, 254, 0.15);
}

.server-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-right: 15px;
    flex-shrink: 0;
    color: white;
}

.server-option:nth-child(1) .server-icon { background: linear-gradient(135deg, #667eea, #764ba2); }
.server-option:nth-child(2) .server-icon { background: linear-gradient(135deg, #43e97b, #38f9d7); }
.server-option:nth-child(3) .server-icon { background: linear-gradient(135deg, #4facfe, #00f2fe); }

.server-info h4 {
    margin: 0 0 4px 0;
    font-size: 1rem;
    color: var(--text-primary);
}

.server-info p {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-secondary);
}


/* ===== 编辑个人资料弹窗 ===== */
.edit-profile-modal {
    max-width: 500px;
    width: 90%;
}

.edit-form .form-group {
    margin-bottom: 16px;
}

.edit-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 0.95rem;
    resize: vertical;
    font-family: inherit;
    transition: var(--transition);
}

.edit-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.1);
}

.edit-form input[type="text"],
.edit-form select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 0.95rem;
    transition: var(--transition);
    background: white;
}

.edit-form input:focus,
.edit-form select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.1);
}

.edit-profile-form .avatar-upload {
    text-align: center;
    margin-bottom: 20px;
}
.edit-profile-form .avatar-preview {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    overflow: hidden;
    border: 3px solid var(--primary);
    font-size: 2rem;
    color: var(--text-secondary);
}
.edit-profile-form .avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.btn-change-avatar {
    background: none;
    border: 1px dashed var(--primary);
    color: var(--primary);
    padding: 8px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: var(--transition);
}
.btn-change-avatar:hover {
    background: var(--primary);
    color: white;
}
.form-row {
    display: flex;
    gap: 16px;
}
.form-row .form-group {
    flex: 1;
}
.edit-profile-form .form-group input,
.edit-profile-form .form-group select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
    background: white;
    transition: var(--transition);
}
.edit-profile-form .form-group input:focus,
.edit-profile-form .form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.15);
}
