/**
 * Wonder 支付系统 - 完整样式
 * 1:1 还原 wonder.app 官网风格
 */
:root {
    --wonder-blue: #2D7BFF;
    --wonder-blue-light: #5C9AFF;
    --wonder-blue-dark: #1A5FE0;
    --wonder-blue-bg: #EDF4FF;
    --wonder-black: #111111;
    --wonder-gray: #666666;
    --wonder-gray-light: #999999;
    --wonder-bg: #FFFFFF;
    --wonder-border: #E5E5E5;
    --wonder-radius: 16px;
    --wonder-radius-lg: 24px;
    --wonder-radius-sm: 10px;
    --wonder-shadow: 0 4px 20px rgba(0,0,0,0.06);
    --wonder-shadow-blue: 0 8px 30px rgba(45,123,255,0.15);
    --wonder-green: #34C759;
    --wonder-red: #FF3B30;
    --wonder-orange: #FF9500;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: var(--wonder-bg);
    color: var(--wonder-black);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; }
input { font-family: inherit; outline: none; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ========== 顶部导航 ========== */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0,0,0,0.04);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}
.logo {
    font-size: 22px;
    font-weight: 700;
    color: var(--wonder-black);
    letter-spacing: -0.5px;
}
.nav {
    display: flex;
    align-items: center;
    gap: 36px;
}
.nav a {
    font-size: 15px;
    color: var(--wonder-black);
    font-weight: 500;
    transition: color 0.2s;
    position: relative;
}
.nav a:hover, .nav a.active { color: var(--wonder-blue); }
.nav a.active::after {
    content: '';
    position: absolute;
    bottom: -22px;
    left: 0; right: 0;
    height: 2px;
    background: var(--wonder-blue);
}
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}
.btn-live {
    width: 8px; height: 8px;
    background: var(--wonder-green);
    border-radius: 50%;
    position: relative;
}
.btn-live::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: rgba(52,199,89,0.2);
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0; }
}

/* ========== 按钮 ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 22px;
    border-radius: var(--wonder-radius-sm);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    white-space: nowrap;
}
.btn-primary { background: var(--wonder-black); color: #fff; }
.btn-primary:hover { background: #333; transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--wonder-black); border: 1.5px solid var(--wonder-border); }
.btn-outline:hover { border-color: var(--wonder-black); }
.btn-blue { background: var(--wonder-blue); color: #fff; }
.btn-blue:hover { background: var(--wonder-blue-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(45,123,255,0.3); }
.btn-lg { padding: 14px 32px; font-size: 16px; border-radius: 12px; }
.btn-block { width: 100%; }
.btn-sm { padding: 6px 14px; font-size: 13px; }

/* ========== Hero ========== */
.hero {
    padding: 80px 0 60px;
    position: relative;
    overflow: hidden;
}
.hero-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}
.hero-title {
    font-size: 56px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -1.5px;
    margin-bottom: 24px;
}
.hero-title .blue { color: var(--wonder-blue); }
.hero-title .wonder-text {
    background: linear-gradient(135deg, var(--wonder-blue) 0%, var(--wonder-blue-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-desc {
    font-size: 16px;
    color: var(--wonder-gray);
    line-height: 1.8;
    margin-bottom: 32px;
    max-width: 480px;
}
.hero-buttons { display: flex; gap: 16px; }
.hero-right { position: relative; }
.hero-pill {
    width: 60px; height: 28px;
    background: linear-gradient(135deg, var(--wonder-blue), var(--wonder-blue-light));
    border-radius: 14px;
    margin-bottom: 20px;
}
.hero-tag {
    display: inline-block;
    padding: 6px 14px;
    background: var(--wonder-blue-bg);
    color: var(--wonder-blue);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 16px;
}

/* ========== 横向产品卡片 ========== */
.products-section {
    background: var(--wonder-blue-bg);
    padding: 60px 0;
}
.products-scroll {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding: 10px 0;
    scrollbar-width: none;
}
.products-scroll::-webkit-scrollbar { display: none; }
.product-card {
    flex: 0 0 280px;
    height: 220px;
    background: #fff;
    border-radius: var(--wonder-radius-lg);
    box-shadow: var(--wonder-shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 12px;
    color: var(--wonder-blue);
    font-weight: 500;
    cursor: pointer;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--wonder-shadow-blue); }
.product-card .icon { font-size: 48px; opacity: 0.6; }

/* ========== 通用区块 ========== */
.section { padding: 80px 0; }
.section-header { text-align: center; margin-bottom: 48px; }
.section-title {
    font-size: 40px;
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: 16px;
}
.section-title .blue { color: var(--wonder-blue); }
.section-desc {
    font-size: 16px;
    color: var(--wonder-gray);
    max-width: 600px;
    margin: 0 auto;
}

/* ========== 功能卡片 ========== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.feature-card {
    padding: 32px;
    background: #fff;
    border-radius: var(--wonder-radius-lg);
    border: 1px solid var(--wonder-border);
    transition: all 0.3s;
}
.feature-card:hover {
    border-color: var(--wonder-blue);
    box-shadow: var(--wonder-shadow-blue);
    transform: translateY(-2px);
}
.feature-icon {
    width: 56px; height: 56px;
    background: var(--wonder-blue-bg);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 28px;
}
.feature-card h3 { font-size: 20px; font-weight: 600; margin-bottom: 10px; }
.feature-card p { font-size: 14px; color: var(--wonder-gray); line-height: 1.7; }

/* ========== 价格卡片 ========== */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.price-card {
    padding: 36px 32px;
    background: #fff;
    border-radius: var(--wonder-radius-lg);
    border: 1px solid var(--wonder-border);
    position: relative;
    transition: all 0.3s;
}
.price-card.featured {
    border-color: var(--wonder-blue);
    box-shadow: 0 8px 30px rgba(45,123,255,0.12);
}
.price-card.featured::before {
    content: '推薦';
    position: absolute;
    top: -12px; left: 50%;
    transform: translateX(-50%);
    background: var(--wonder-blue);
    color: #fff;
    padding: 4px 16px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}
.price-name { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.price-amount { font-size: 40px; font-weight: 700; margin-bottom: 4px; }
.price-amount .unit { font-size: 16px; color: var(--wonder-gray); font-weight: 400; }
.price-desc { font-size: 14px; color: var(--wonder-gray); margin-bottom: 24px; }
.price-features { margin-bottom: 28px; }
.price-features li {
    padding: 8px 0;
    font-size: 14px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}
.price-features li::before {
    content: '✓';
    color: var(--wonder-blue);
    font-weight: bold;
}

/* ========== 底部 ========== */
.footer {
    background: var(--wonder-black);
    color: #fff;
    padding: 60px 0 30px;
}
.footer-inner {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}
.footer-brand .logo { color: #fff; margin-bottom: 16px; }
.footer-brand p { font-size: 14px; color: #999; line-height: 1.8; max-width: 300px; }
.footer-col h4 { font-size: 15px; font-weight: 600; margin-bottom: 20px; }
.footer-col a {
    display: block;
    font-size: 14px;
    color: #999;
    padding: 6px 0;
    transition: color 0.2s;
}
.footer-col a:hover { color: var(--wonder-blue-light); }
.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #666;
}

/* ========== 登录/注册页 ========== */
.auth-page {
    min-height: calc(100vh - 64px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: linear-gradient(180deg, var(--wonder-blue-bg) 0%, #fff 100%);
}
.auth-card {
    width: 100%;
    max-width: 440px;
    background: #fff;
    border-radius: var(--wonder-radius-lg);
    padding: 40px;
    box-shadow: var(--wonder-shadow);
}
.auth-card h2 { font-size: 28px; font-weight: 700; margin-bottom: 8px; text-align: center; }
.auth-card .subtitle { text-align: center; color: var(--wonder-gray); font-size: 14px; margin-bottom: 32px; }
.form-group { margin-bottom: 20px; }
.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: #333;
}
.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--wonder-border);
    border-radius: var(--wonder-radius-sm);
    font-size: 15px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-control:focus {
    border-color: var(--wonder-blue);
    box-shadow: 0 0 0 3px rgba(45,123,255,0.1);
}
.form-submit {
    width: 100%;
    padding: 14px;
    background: var(--wonder-black);
    color: #fff;
    border: none;
    border-radius: var(--wonder-radius-sm);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 8px;
}
.form-submit:hover { background: #333; }
.form-submit.blue { background: var(--wonder-blue); }
.form-submit.blue:hover { background: var(--wonder-blue-dark); }
.auth-footer { text-align: center; margin-top: 24px; font-size: 14px; color: var(--wonder-gray); }
.auth-footer a { color: var(--wonder-blue); font-weight: 500; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ========== 用户中心布局 ========== */
.user-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: calc(100vh - 64px);
}
.user-sidebar {
    background: #fafafa;
    border-right: 1px solid var(--wonder-border);
    padding: 24px 0;
}
.user-sidebar .menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    font-size: 14px;
    color: #333;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}
.user-sidebar .menu-item:hover,
.user-sidebar .menu-item.active {
    background: var(--wonder-blue-bg);
    color: var(--wonder-blue);
    border-left-color: var(--wonder-blue);
}
.user-sidebar .menu-section {
    padding: 16px 24px 8px;
    font-size: 12px;
    color: var(--wonder-gray-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.user-content { padding: 32px; background: #fafafa; }
.page-title { font-size: 28px; font-weight: 700; margin-bottom: 24px; }
.card {
    background: #fff;
    border-radius: var(--wonder-radius);
    border: 1px solid var(--wonder-border);
    padding: 24px;
    margin-bottom: 20px;
}
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.card-title { font-size: 18px; font-weight: 600; }

/* 统计卡片 */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}
.stat-card {
    background: #fff;
    border-radius: var(--wonder-radius);
    border: 1px solid var(--wonder-border);
    padding: 24px;
}
.stat-card .label { font-size: 14px; color: var(--wonder-gray); margin-bottom: 8px; }
.stat-card .value { font-size: 32px; font-weight: 700; }
.stat-card .value.blue { color: var(--wonder-blue); }
.stat-card .change { font-size: 12px; margin-top: 8px; }
.stat-card .change.up { color: var(--wonder-green); }
.stat-card .change.down { color: var(--wonder-red); }

/* 表格 */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
table th, table td {
    padding: 14px 16px;
    text-align: left;
    font-size: 14px;
    border-bottom: 1px solid var(--wonder-border);
}
table th { font-weight: 600; color: var(--wonder-gray); background: #fafafa; }
table tr:hover td { background: #fafafa; }
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}
.status-badge.success { background: #E8F8ED; color: var(--wonder-green); }
.status-badge.pending { background: #FFF4E5; color: var(--wonder-orange); }
.status-badge.failed { background: #FFE5E5; color: var(--wonder-red); }

/* 搜索筛选 */
.filter-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.filter-bar .form-control { width: auto; min-width: 180px; }
.filter-bar select { padding: 10px 16px; border: 1.5px solid var(--wonder-border); border-radius: var(--wonder-radius-sm); font-size: 14px; background: #fff; }

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}
.pagination a, .pagination span {
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 14px;
    border: 1px solid var(--wonder-border);
    transition: all 0.2s;
}
.pagination a:hover { border-color: var(--wonder-blue); color: var(--wonder-blue); }
.pagination .active { background: var(--wonder-blue); color: #fff; border-color: var(--wonder-blue); }

/* ========== 支付页 ========== */
.pay-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4edf5 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.pay-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
    text-align: center;
}
.pay-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 24px;
    font-size: 24px;
    font-weight: 700;
}
.pay-logo .logo-icon {
    width: 36px; height: 36px;
    background: var(--wonder-black);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.pay-logo .logo-icon::before {
    content: '';
    width: 6px; height: 6px;
    background: #fff;
    border-radius: 50%;
    position: absolute;
    top: 10px; left: 10px;
    box-shadow: 10px 0 0 #fff;
}
.pay-logo .logo-icon::after {
    content: '';
    width: 6px; height: 6px;
    background: #fff;
    border-radius: 50%;
    position: absolute;
    bottom: 10px; left: 15px;
}
.pay-merchant { font-size: 14px; color: var(--wonder-gray); margin-bottom: 8px; }
.pay-amount {
    font-size: 48px;
    font-weight: 700;
    color: var(--wonder-black);
    margin: 16px 0;
}
.pay-amount .yuan { font-size: 24px; margin-right: 4px; }
.pay-order { font-size: 13px; color: var(--wonder-gray-light); margin-bottom: 24px; }

/* 二维码 */
.qrcode-box {
    width: 220px;
    height: 220px;
    margin: 0 auto 24px;
    background: #fff;
    border: 1px solid var(--wonder-border);
    border-radius: 16px;
    padding: 12px;
    position: relative;
    overflow: hidden;
}
.qrcode-box img { width: 100%; height: 100%; border-radius: 8px; }
.qrcode-box::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--wonder-blue), transparent);
    animation: scan 2s linear infinite;
}
@keyframes scan {
    0% { top: 0; }
    100% { top: 100%; }
}

/* 支付方式 */
.pay-methods {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 24px;
}
.pay-method {
    padding: 10px 20px;
    border-radius: var(--wonder-radius-sm);
    border: 1.5px solid var(--wonder-border);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}
.pay-method:hover { border-color: var(--wonder-blue); }
.pay-method.active { border-color: var(--wonder-blue); background: var(--wonder-blue-bg); color: var(--wonder-blue); }
.pay-method .dot { width: 8px; height: 8px; border-radius: 50%; }
.pay-method.wechat .dot { background: #07C160; }
.pay-method.alipay .dot { background: #1677FF; }
.pay-method.union .dot { background: #E60012; }

.pay-timer {
    font-size: 13px;
    color: var(--wonder-gray);
}
.pay-timer .time { color: var(--wonder-red); font-weight: 600; }

/* 支付成功 */
.success-icon {
    width: 80px; height: 80px;
    background: var(--wonder-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: #fff;
    font-size: 40px;
    animation: popIn 0.5s ease;
}
@keyframes popIn {
    0% { transform: scale(0); }
    70% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
    .nav { display: none; }
    .hero-inner { grid-template-columns: 1fr; gap: 40px; }
    .hero-title { font-size: 36px; }
    .features-grid, .pricing-grid { grid-template-columns: 1fr; }
    .footer-inner { grid-template-columns: 1fr 1fr; gap: 24px; }
    .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
    .user-layout { grid-template-columns: 1fr; }
    .user-sidebar { display: none; }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .section-title { font-size: 28px; }
    .form-row { grid-template-columns: 1fr; }
}

/* 语言切换器 - Wonder官网风格 */
.lang-switcher { position: relative; display: inline-block; }
.lang-btn {
    width: 38px; height: 38px;
    background: transparent;
    border: 1px solid #e5e5e5;
    border-radius: 50%;
    cursor: pointer;
    color: #333;
    display: inline-flex; align-items: center; justify-content: center;
    transition: all .2s;
    padding: 0;
    flex-shrink: 0;
}
.lang-btn:hover { border-color: #333; background: #f5f5f5; }
.lang-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.15);
    width: 240px;
    z-index: 99999;
    padding: 8px;
}
.lang-dropdown::before {
    content: '';
    position: absolute;
    top: -6px; right: 14px;
    width: 12px; height: 12px;
    background: #fff;
    transform: rotate(45deg);
}
.lang-dropdown a {
    display: flex !important;
    align-items: center !important;
    gap: 12px;
    padding: 11px 14px !important;
    border-radius: 8px;
    font-size: 14px !important;
    color: #333 !important;
    text-decoration: none !important;
    transition: background .15s;
    line-height: 1.4 !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    white-space: nowrap;
    box-sizing: border-box;
}
.lang-dropdown a:hover { background: #f5f5f7 !important; }
.lang-dropdown a.active { background: #f0f4ff !important; color: var(--wonder-blue) !important; font-weight: 500 !important; }
.lang-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px; height: 20px;
    border-radius: 4px;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}
.lang-name { flex: 1; display: inline-block; }
