/* ========== QY服务 组件样式 ========== */

/* ========== 基础布局 ========== */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background: #0a0814;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', sans-serif;
    color: #e2e8f0;
    min-height: 100vh;
    padding-top: 50px;
    animation: fadeIn 0.5s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.3);
    z-index: -1;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ========== 容器 ========== */
.container {
    text-align: center;
    padding: 60px 40px;
    background: rgba(255,255,255,0.05);
    border-radius: 24px;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.1);
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.wrapper {
    position: relative; z-index: 1;
    max-width: 1000px; width: 100%; margin: 0 auto;
    padding: 60px 40px 40px;
}

.header {
    text-align: center; margin-bottom: 48px;
}

.header h1 {
    font-size: 2.8rem; font-weight: 800;
    background: linear-gradient(135deg, #a78bfa, #60a5fa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
}

.header p {
    color: #94a3b8; letter-spacing: 3px; font-size: 0.9rem;
}

/* 字体层次 */
h1 { font-weight: 800; letter-spacing: 0.05em; }
.subtitle, .tagline { color: rgba(255,255,255,0.5); font-weight: 400; }
.card h3, .service-card h3 { font-weight: 700; letter-spacing: 0.02em; }

/* ========== 按钮 ========== */
.btn-primary {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
}

.btn-ghost {
    border: 1px solid rgba(255,255,255,0.2);
    color: #cbd5e1;
}

.btn-game {
    background: linear-gradient(135deg, rgba(167,139,250,0.3), rgba(124,58,237,0.5));
    backdrop-filter: blur(12px);
    border: 1px solid rgba(167,139,250,0.4);
    color: #e9d5ff;
    box-shadow: 0 4px 20px rgba(139,92,246,0.2);
}

.btn-game:hover {
    box-shadow: 0 8px 30px rgba(139,92,246,0.4);
}

/* ========== 提示 / 通知 ========== */
.notice {
    text-align: center; padding: 24px;
    background: rgba(239,68,68,0.08);
    border: 1px solid rgba(239,68,68,0.15);
    border-radius: 12px;
    margin-bottom: 32px;
}

.notice p {
    font-size: 0.85rem; color: #fca5a5;
    line-height: 1.8; letter-spacing: 1px;
}

.back-link {
    display: block; text-align: center;
    padding: 12px 28px; margin: 0 auto;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px; color: #94a3b8;
    text-decoration: none; font-size: 0.85rem;
    letter-spacing: 2px; width: fit-content;
    transition: all 0.2s;
}

.back-link:hover {
    border-color: rgba(255,255,255,0.35); color: #fff;
}

.float-back {
    position: fixed; bottom: 28px; right: 28px; z-index: 200;
    width: 48px; height: 48px; border-radius: 50%;
    background: rgba(167,139,250,0.25); border: 1px solid rgba(167,139,250,0.4);
    display: flex; align-items: center; justify-content: center;
    color: #a78bfa; font-size: 1.3rem; text-decoration: none;
    backdrop-filter: blur(10px);
    transition: all 0.3s;
}

.float-back:hover {
    background: rgba(167,139,250,0.45); transform: scale(1.1);
}

/* ========== 页脚 ========== */
.site-footer {
    text-align: center; padding: 32px 16px 80px;
    color: rgba(255,255,255,0.25); font-size: 0.78rem;
}

/* ========== 骨架屏 ========== */
.skeleton {
    background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 75%);
    background-size: 200% 100%;
    animation: skeletonPulse 1.5s ease-in-out infinite;
    border-radius: 8px;
}
.skeleton-text { height: 14px; margin-bottom: 10px; width: 80%; }
.skeleton-text.short { width: 50%; }
.skeleton-text.long { width: 95%; }
.skeleton-title { height: 22px; margin-bottom: 16px; width: 60%; }
.skeleton-avatar { width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0; }
.skeleton-card { height: 100px; border-radius: 12px; margin-bottom: 12px; }
.skeleton-img { height: 180px; border-radius: 12px; margin-bottom: 12px; }
.skeleton-row { display: flex; gap: 12px; align-items: center; padding: 12px 0; }
.skeleton-btn { height: 44px; border-radius: 8px; width: 100%; }

@keyframes skeletonPulse {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ========== Toast ========== */
.toast-container {
    position: fixed; top: 80px; right: 20px; z-index: 9999;
    display: flex; flex-direction: column; gap: 8px;
    pointer-events: none;
}
.toast {
    padding: 12px 20px; border-radius: 10px;
    font-size: 0.85rem; color: #fff;
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
    pointer-events: auto;
    transform: translateX(120%);
    transition: transform 0.3s ease;
    max-width: 360px;
}
.toast.show { transform: translateX(0); }
.toast.success { background: rgba(34,197,94,0.9); border: 1px solid rgba(34,197,94,0.5); }
.toast.error { background: rgba(239,68,68,0.9); border: 1px solid rgba(239,68,68,0.5); }
.toast.info { background: rgba(59,130,246,0.9); border: 1px solid rgba(59,130,246,0.5); }

/* ========== 模态框 ========== */
.modal-overlay {
    display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6); z-index: 999;
    align-items: center; justify-content: center;
}
.modal-overlay.show { display: flex; }
.modal-box {
    background: rgba(30,30,40,0.95); border: 1px solid rgba(167,139,250,0.25);
    border-radius: 16px; padding: 32px 28px; max-width: 420px; width: 90%;
    backdrop-filter: blur(20px); text-align: center;
}
.modal-box h3 { font-size: 1.1rem; color: #a78bfa; margin-bottom: 6px; }
.modal-box .modal-body { font-size: 0.9rem; color: #94a3b8; margin-bottom: 20px; line-height: 1.5; }
.modal-box .modal-btns { display: flex; gap: 12px; justify-content: center; }

/* 购买咨询弹窗 */
.buy-modal-overlay {
    display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6); z-index: 999;
    align-items: center; justify-content: center;
}
.buy-modal-overlay.show { display: flex; }
.buy-modal {
    background: rgba(30,30,40,0.95); border: 1px solid rgba(167,139,250,0.25);
    border-radius: 16px; padding: 32px 28px; max-width: 380px; width: 90%;
    backdrop-filter: blur(20px); text-align: center;
}
.buy-modal h3 { font-size: 1.1rem; color: #a78bfa; margin-bottom: 6px; }
.buy-modal .buy-prod-name { font-size: 0.95rem; color: #e2e8f0; margin-bottom: 4px; }
.buy-modal .buy-price {
    font-size: 1.4rem; font-weight: 700;
    background: linear-gradient(90deg, #a78bfa, #60a5fa);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    margin-bottom: 16px;
}
.buy-modal .buy-msg { font-size: 0.85rem; color: #94a3b8; margin-bottom: 20px; line-height: 1.5; }
.buy-modal .buy-btns { display: flex; gap: 12px; justify-content: center; }
.buy-modal .buy-btn {
    padding: 10px 24px; border-radius: 10px; border: none;
    font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: all 0.2s;
}
.buy-btn-chat { background: linear-gradient(135deg, #a78bfa, #7c3aed); color: #fff; }
.buy-btn-chat:hover { opacity: 0.9; }
.buy-btn-close {
    background: transparent; border: 1px solid rgba(255,255,255,0.15); color: #94a3b8;
}

/* ========== 空状态 / 加载 ========== */
.empty-state {
    text-align: center; padding: 48px 20px; color: #64748b;
}
.empty-state p { font-size: 0.9rem; margin-bottom: 6px; }
.empty-state .sub { font-size: 0.78rem; color: #475569; }

.loading-indicator {
    text-align: center; padding: 48px 20px; color: #64748b;
}
.spinner {
    width: 32px; height: 32px; border: 3px solid rgba(167,139,250,0.2);
    border-top-color: #a78bfa; border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ========== WS 连接状态横幅 ========== */
.ws-status-banner {
    display: none;
    position: fixed;
    top: 50px;
    left: 0;
    right: 0;
    z-index: 300;
    background: linear-gradient(135deg, rgba(234,179,8,0.15), rgba(250,204,21,0.1));
    border-bottom: 1px solid rgba(234,179,8,0.3);
    color: #fde68a;
    text-align: center;
    padding: 10px 16px;
    font-size: 0.85rem;
    backdrop-filter: blur(10px);
    animation: bannerSlideIn 0.3s ease;
}
.ws-status-banner.show { display: block; }
.ws-status-banner.reconnected {
    background: linear-gradient(135deg, rgba(34,197,94,0.15), rgba(74,222,128,0.1));
    border-bottom: 1px solid rgba(34,197,94,0.3);
    color: #86efac;
}

@keyframes bannerSlideIn {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* ========== 订单进度条 ========== */
.order-progress {
    display: flex; align-items: center; gap: 0;
    padding: 8px 0; flex-wrap: wrap;
}
.order-progress .step {
    display: flex; align-items: center; gap: 4px;
    font-size: 0.7rem; color: #475569;
    white-space: nowrap;
}
.order-progress .step .dot {
    width: 10px; height: 10px; border-radius: 50%;
    background: #334155; flex-shrink: 0;
    transition: all 0.3s;
}
.order-progress .step.done .dot { background: #34d399; }
.order-progress .step.current .dot { background: #a78bfa; box-shadow: 0 0 8px rgba(167,139,250,0.5); }
.order-progress .step.done { color: #34d399; }
.order-progress .step.current { color: #a78bfa; font-weight: 600; }
.order-progress .connector {
    width: 16px; height: 1px; background: #334155; flex-shrink: 0; margin: 0 2px;
}
.order-progress .connector.done { background: #34d399; }

/* ========== 通知中心 ========== */
.notif-bell {
    position: relative; cursor: pointer; padding: 6px;
    font-size: 1.2rem; color: rgba(255,255,255,0.7);
    transition: color 0.2s; min-width: 44px; min-height: 44px;
    display: flex; align-items: center; justify-content: center;
}
.notif-bell:hover { color: #a78bfa; }
.notif-badge {
    position: absolute; top: 2px; right: 2px;
    min-width: 16px; height: 16px; border-radius: 8px;
    background: #ef4444; color: #fff; font-size: 0.6rem;
    display: flex; align-items: center; justify-content: center;
    padding: 0 4px; line-height: 1;
}
.notif-badge:empty { display: none; }
.notif-dropdown {
    position: absolute; top: 100%; right: 0;
    width: 340px; max-height: 420px; overflow-y: auto;
    background: rgba(20,20,30,0.98); border: 1px solid rgba(167,139,250,0.15);
    border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,0.6);
    z-index: 300; display: none; backdrop-filter: blur(20px);
}
.notif-dropdown.show { display: block; }
.notif-dropdown .notif-item {
    padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,0.05);
    cursor: pointer; transition: background 0.15s;
}
.notif-dropdown .notif-item:hover { background: rgba(167,139,250,0.08); }
.notif-dropdown .notif-item.unread {
    border-left: 3px solid #a78bfa;
    font-weight: 600; background: rgba(167,139,250,0.04);
}
.notif-dropdown .notif-item .notif-time {
    font-size: 0.68rem; color: #64748b; margin-top: 2px;
}
.notif-dropdown .notif-empty {
    padding: 32px 16px; text-align: center; color: #64748b; font-size: 0.85rem;
}

/* ========== 星级评分 ========== */
.star-rating { display: inline-flex; gap: 2px; align-items: center; }
.star-rating .star { color: #334155; font-size: 0.85rem; }
.star-rating .star.filled { color: #fbbf24; }
.star-rating .star.half { color: #fbbf24; }
.rating-count { font-size: 0.7rem; color: #64748b; margin-left: 4px; }

/* 评分交互 */
.rate-stars { display: inline-flex; gap: 6px; cursor: pointer; }
.rate-stars .rate-star { font-size: 1.5rem; color: #334155; transition: color 0.15s; }
.rate-stars .rate-star.active { color: #fbbf24; }
.rate-stars .rate-star:hover { color: #fbbf24; }
.rate-comment {
    width: 100%; min-height: 60px; padding: 10px; border-radius: 8px;
    border: 1px solid rgba(167,139,250,0.2); background: rgba(255,255,255,0.04);
    color: #e2e8f0; font-size: 0.85rem; resize: vertical; margin-top: 8px;
}

/* ========== 管理仪表盘 ========== */
.dashboard-stats {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
    margin-bottom: 24px;
}
.stat-card {
    background: rgba(255,255,255,0.03); border: 1px solid rgba(167,139,250,0.1);
    border-radius: 14px; padding: 20px;
}
.stat-card .stat-label { font-size: 0.75rem; color: #64748b; text-transform: uppercase; letter-spacing: 1px; }
.stat-card .stat-value { font-size: 1.8rem; font-weight: 700; color: #e2e8f0; margin-top: 6px; }
.stat-card .stat-sub { font-size: 0.7rem; color: #475569; margin-top: 4px; }
.dashboard-section { margin-bottom: 24px; }
.dashboard-section h3 {
    font-size: 0.95rem; font-weight: 600; color: #c4b5fd;
    margin-bottom: 12px; padding-bottom: 8px;
    border-bottom: 1px solid rgba(167,139,250,0.12);
}
.dashboard-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
.dashboard-table th {
    text-align: left; padding: 10px 12px; background: rgba(167,139,250,0.06);
    color: #94a3b8; font-weight: 600; border-bottom: 1px solid rgba(167,139,250,0.1);
}
.dashboard-table td { padding: 10px 12px; border-bottom: 1px solid rgba(255,255,255,0.04); color: #cbd5e1; }

/* ========== 响应式 ========== */
@media (max-width: 1024px) {
    .container { max-width: 90%; }
}

@media (max-width: 768px) {
    .container { padding: 24px 16px; max-width: 100%; border-radius: 16px; }
    .container h1 { font-size: 1.6rem; }
    .wrapper { padding: 24px 16px; }
    .header h1 { font-size: 1.5rem; }

    button, .btn-primary, .btn-ghost, .btn-game {
        min-height: 44px; width: 100%; font-size: 0.95rem;
    }
    input[type="text"], input[type="password"], input[type="email"],
    input[type="search"], input[type="number"], textarea, select {
        min-height: 44px; font-size: 16px;
    }
    a, .nav-links a, .side-drawer a { padding: 10px 4px; }
    body { font-size: 14px; }

    .order-progress { font-size: 0.62rem; }
    .order-progress .step .dot { width: 8px; height: 8px; }
    .order-progress .connector { width: 10px; }
    .notif-dropdown { width: calc(100vw - 24px); right: -80px; }
    .dashboard-stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .wrapper { padding: 40px 20px 30px; }
    .header h1 { font-size: 2rem; }
}

@media (min-width: 769px) {
    .side-drawer, .side-drawer-overlay { display: none !important; }
}
