/* 不再从 Google Fonts 加载字体：国内会阻塞渲染，改用系统字体栈 */

:root {
    /* Base Colors - Slate Dark Theme */
    --bg-color: #020617;     /* Slate 950 */
    --surface-color: #0f172a; /* Slate 900 */
    --text-color: #f8fafc;    /* Slate 50 */
    --text-muted: #94a3b8;    /* Slate 400 */
    
    /* Brand Colors - Indigo/Violet for Fintech */
    --primary-color: #6366f1; /* Indigo 500 */
    --primary-hover: #4f46e5; /* Indigo 600 */
    --secondary-color: #8b5cf6; /* Violet 500 */
    --accent-color: #38bdf8;    /* Sky 400 */
    
    /* Glassmorphism */
    --glass-bg: rgba(30, 41, 59, 0.4); /* Slate 800 with opacity */
    --glass-border: 1px solid rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    --glass-highlight: rgba(255, 255, 255, 0.05);

    /* 统一的设计尺度 */
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 24px;
    --space-6: 32px;
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --control-h: 48px;
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.16);
    --surface-1: rgba(255, 255, 255, 0.03);
    --surface-2: rgba(255, 255, 255, 0.05);
    --focus-ring: 0 0 0 3px rgba(129, 140, 248, 0.55);
    --success: #22c55e;
    --danger: #f87171;
    --warning: #fbbf24;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    background-color: var(--bg-color);
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(99, 102, 241, 0.15) 0%, transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.15) 0%, transparent 25%);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

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

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Glass Component */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.glass:hover {
    border-color: rgba(255, 255, 255, 0.15);
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.6), rgba(30, 41, 59, 0.4));
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    white-space: nowrap;
    line-height: 1.2;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-ghost:hover {
    color: var(--text-color);
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
}

/* Typography */
.text-gradient {
    background: linear-gradient(to right, #fff, #cbd5e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-accent-gradient {
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Animations */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.footer {
    text-align: center;
    color: var(--text-muted);
    margin-top: 80px;
    padding: 40px 0;
    border-top: 1px solid rgba(255,255,255,0.05);
}

/* ---------- 通用增强 ---------- */
img, svg, canvas { max-width: 100%; }

/* 键盘焦点可见（鼠标点击不出现） */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, [tabindex]:focus-visible, .btn:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
    border-radius: var(--radius-sm);
}

/* 金额、订单号等数字等宽，列对齐 */
.num, .amount, .value, .money, td { font-variant-numeric: tabular-nums; }

/* 输入框统一高度；16px 字号避免 iOS 聚焦时自动放大 */
input[type="text"], input[type="number"], input[type="email"], input[type="password"], select {
    min-height: var(--control-h);
    font-size: 16px;
    font-family: inherit;
}
input::placeholder { color: rgba(148, 163, 184, 0.7); }

.btn.disabled, .btn[disabled] { cursor: not-allowed; }
.btn-primary:active, .btn-ghost:active { transform: translateY(0); }

@media (max-width: 600px) {
    .container { padding: 0 16px; }
    .footer { margin-top: 48px; padding: 24px 0; font-size: 0.85rem; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
