:root {
    /* 1. 色彩体系 (Brand Colors) */
    /* 主色 - 广州塔橙 (Canton Orange) */
    --primary-color: #FF6B35;
    --primary-hover: #E55A2B;
    --primary-active: #CC481F;
    --primary-light: #FFF5F0;
    
    /* 辅色 - 珠江蓝 (Pearl River Blue) & 榕树绿 (Banyan Green) */
    --secondary-blue: #3B82F6;
    --secondary-green: #10B981;
    --secondary-purple: #8B5CF6;

    /* 中性色 (Neutrals) */
    --text-primary: #1F2937; /* Gray 900 */
    --text-secondary: #4B5563; /* Gray 600 */
    --text-tertiary: #9CA3AF; /* Gray 400 */
    --bg-page: #F9FAFB;
    --bg-card: #FFFFFF;
    --border-color: #E5E7EB;

    /* 2. 字体层级 (Typography) */
    --font-family-base: 'Inter', -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
    --line-height-base: 1.6;
    
    --h1-size: 28px; --h1-weight: 700;
    --h2-size: 22px; --h2-weight: 600;
    --h3-size: 18px; --h3-weight: 600;
    --body-size: 15px; --body-weight: 400;
    --small-size: 12px; --small-weight: 400;

    /* 3. 形状与阴影 (Shape & Shadow) */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;

    /* 柔和阴影 (Soft Shadow) */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-float: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    /* 4. 动画 (Animation) */
    --transition-fast: 100ms ease;
    --transition-base: 200ms ease-out;
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    
    /* 5. 交互反馈 (Interaction) */
    --feedback-success: #10B981;
    --feedback-error: #EF4444;
    --feedback-warning: #F59E0B;
}

/* 全局重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent; /* 移除默认的高亮 */
}

/* ===== 交互通用类 ===== */

/* 1. 触控区域优化 */
.touch-target {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    touch-action: manipulation; /* 优化点击延迟 */
    user-select: none; /* 防止长按选中文字 */
    -webkit-user-select: none;
}

/* 2. 波纹效果 (Ripple Effect) */
.ripple-container {
    position: relative;
    overflow: hidden;
    transform: translate3d(0, 0, 0); /* 开启硬件加速 */
}

.ripple-effect {
    position: absolute;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.1); /* 默认深色波纹 */
    transform: scale(0);
    animation: ripple-anim 0.6s linear;
    pointer-events: none;
}

.ripple-light .ripple-effect {
    background-color: rgba(255, 255, 255, 0.3); /* 浅色波纹 */
}

@keyframes ripple-anim {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* 3. 反馈 Toast (Level 2/3 Feedback) */
.toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    width: 90%;
    max-width: 400px;
}

.toast {
    background: rgba(31, 41, 55, 0.95);
    color: white;
    padding: 12px 20px;
    border-radius: var(--radius-full);
    font-size: 14px;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 10px;
    animation: toast-in 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    pointer-events: auto;
    backdrop-filter: blur(8px);
}

.toast.success { border-left: 4px solid var(--feedback-success); }
.toast.error { border-left: 4px solid var(--feedback-error); }
.toast.warning { border-left: 4px solid var(--feedback-warning); }

@keyframes toast-in {
    from { opacity: 0; transform: translateY(-20px) scale(0.9); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toast-out {
    to { opacity: 0; transform: translateY(-20px) scale(0.9); }
}

/* 4. 点击态 (Active State) */
.active-scale:active {
    transform: scale(0.96);
    transition: transform var(--transition-fast);
}

.active-opacity:active {
    opacity: 0.7;
    transition: opacity var(--transition-fast);
}

body {
    font-family: var(--font-family-base);
    font-size: var(--body-size);
    line-height: var(--line-height-base);
    color: var(--text-primary);
    background-color: var(--bg-page);
    -webkit-font-smoothing: antialiased;
}

/* 通用工具类 */
.container {
    max-width: 600px; /* 移动端优先，限制最大宽度 */
    margin: 0 auto;
    padding: 0 16px;
}

/* 按钮基础样式 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 48px; /* 触控目标 >= 48px */
    padding: 0 24px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 16px;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    user-select: none;
}

.btn:active {
    transform: scale(0.96);
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(255, 107, 53, 0.4);
}

.btn-secondary {
    background: white;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-page);
    border-color: var(--text-tertiary);
}
