/* 订单页面样式 */

/* 订单类型切换 */
.order-tabs {
    display: flex;
    background: white;
    border-bottom: 1px solid var(--gray-100);
}

.tab-item {
    flex: 1;
    padding: 16px;
    text-align: center;
    font-size: 15px;
    color: var(--gray-500);
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
}

.tab-item.active {
    color: var(--primary);
    font-weight: 600;
}

.tab-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 25%;
    right: 25%;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
}

/* 状态筛选 */
.status-filter {
    background: white;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-100);
}

.status-scroll {
    display: flex;
    gap: 8px;
    padding: 0 16px;
    overflow-x: auto;
    scrollbar-width: none;
}

.status-scroll::-webkit-scrollbar {
    display: none;
}

.status-item {
    white-space: nowrap;
    padding: 8px 16px;
    background: var(--gray-100);
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.status-item.active {
    background: var(--gradient-primary);
    color: white;
}

/* 订单列表 */
.order-list {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.order-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-100);
}

.order-no {
    font-size: 12px;
    color: var(--gray-500);
}

.order-status {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.order-status.pending {
    background: #fef3c7;
    color: #92400e;
}

.order-status.paid {
    background: #dbeafe;
    color: #1e40af;
}

.order-status.delivering {
    background: #e0e7ff;
    color: #3730a3;
}

.order-status.completed {
    background: #dcfce7;
    color: #166534;
}

.order-body {
    padding: 16px;
}

.order-game {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.order-game-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.order-game-info h3 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 4px;
}

.order-game-info p {
    font-size: 13px;
    color: var(--gray-500);
}

.order-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid var(--gray-100);
}

.order-price-label {
    font-size: 13px;
    color: var(--gray-500);
}

.order-price-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--danger);
}

.order-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 12px 16px;
    border-top: 1px solid var(--gray-100);
}

.btn-order-action {
    padding: 8px 16px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-order-action.secondary {
    background: white;
    border: 1px solid var(--gray-200);
    color: var(--gray-600);
}

.btn-order-action.primary {
    background: var(--gradient-primary);
    border: none;
    color: white;
}

.btn-order-action:hover {
    transform: scale(1.05);
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 80px 20px;
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.empty-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-700);
    margin-bottom: 8px;
}

.empty-desc {
    font-size: 14px;
    color: var(--gray-500);
    margin-bottom: 24px;
}

/* 订单详情弹窗 */
.modal-large {
    max-height: 85vh;
}

.order-detail-header {
    text-align: center;
    padding: 20px;
    background: var(--gray-50);
    margin: -20px -20px 20px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.order-status-large {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
}

.order-status-large.pending {
    background: #fef3c7;
    color: #92400e;
}

.order-status-large.paid {
    background: #dbeafe;
    color: #1e40af;
}

.order-status-large.delivering {
    background: #e0e7ff;
    color: #3730a3;
}

.order-status-large.completed {
    background: #dcfce7;
    color: #166534;
}

.detail-section {
    margin-bottom: 20px;
}

.detail-section h3 {
    font-size: 14px;
    font-weight: 700;
    color: var(--gray-700);
    margin-bottom: 12px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--gray-100);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-size: 14px;
    color: var(--gray-500);
}

.detail-value {
    font-size: 14px;
    color: var(--gray-800);
    font-weight: 500;
}

.detail-value.price {
    color: var(--danger);
    font-weight: 700;
}

.timeline {
    position: relative;
    padding-left: 24px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: var(--gray-200);
}

.timeline-item {
    position: relative;
    padding-bottom: 20px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -24px;
    top: 2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--gray-300);
    border: 2px solid white;
}

.timeline-item.active .timeline-dot {
    background: var(--primary);
}

.timeline-item.completed .timeline-dot {
    background: var(--success);
}

.timeline-content {
    font-size: 14px;
}

.timeline-title {
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 4px;
}

.timeline-time {
    font-size: 12px;
    color: var(--gray-500);
}

/* 支付弹窗 */
.payment-amount {
    text-align: center;
    padding: 20px;
    background: var(--gray-50);
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.amount-label {
    display: block;
    font-size: 14px;
    color: var(--gray-500);
    margin-bottom: 8px;
}

.amount-value {
    display: block;
    font-size: 32px;
    font-weight: 700;
    color: var(--danger);
}

.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.payment-method {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
}

.payment-method.active {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.method-icon {
    font-size: 24px;
}

.method-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.method-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-800);
}

.method-balance {
    font-size: 12px;
    color: var(--gray-500);
}

.method-check {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: white;
    opacity: 0;
    transition: all 0.2s;
}

.payment-method.active .method-check {
    background: var(--primary);
    opacity: 1;
}

/* 响应式 */
@media (max-width: 380px) {
    .order-footer {
        flex-direction: column;
    }
    
    .btn-order-action {
        width: 100%;
        text-align: center;
    }
}