/* === HwTrail 基础样式与设计变量 === */

:root {
    /* 品牌色 - 绿色主题 */
    --color-brand:       #4CAF50;
    --color-brand-dark:  #388E3C;
    --color-brand-light: #C8E6C9;
    --color-brand-deep:  #1f7665;
    --color-brand-bg:    #e8f5e9;

    /* 语义色（保持原有变量名兼容） */
    --primary:   #2c3e50;
    --secondary: #3498db;
    --success:   #27ae60;
    --warning:   #f39c12;
    --danger:    #e74c3c;
    --info:      #0dcaf0;

    /* 结构色 */
    --light:     #f8f9fa;
    --dark:      #2c3e50;
    --gray:      #95a5a6;
    --border:    #e0e0e0;
    --shadow:    0 2px 12px rgba(0,0,0,0.08);
    --radius:    8px;

    /* 扩展语义色 */
    --text-primary:  #0f172a;
    --text-soft:     #64748b;
    --text-muted:    #94a3b8;
    --bg-white:      #ffffff;
    --bg-page:       #f8f9fa;
    --bg-alt:        #f6f8fb;
    --border-light:  #eef2f7;

    /* 半径扩展 */
    --radius-sm:   4px;
    --radius-md:   10px;
    --radius-lg:   14px;
    --radius-xl:   18px;
    --radius-full: 999px;

    /* 渐变 */
    --gradient-brand: linear-gradient(135deg, #34d399, #059669);
    --gradient-hero:  linear-gradient(135deg, #1f7665, #0d9488, #059669);
    --gradient-accent:linear-gradient(135deg, #ff8f42, #ff6f3c);

    /* 阴影层次 */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.06);
    --shadow-lg: 0 12px 32px rgba(0,0,0,0.10);

    /* 排版 */
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
        'Microsoft YaHei', sans-serif;
}

/* === Reset & 基础排版 === */
*,
*::before,
*::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-family);
    font-size: 15px;
    line-height: 1.65;
    color: var(--text-primary);
    background: var(--bg-page);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--secondary);
    text-decoration: none;
}
a:hover { color: #1976d2; }
img { max-width: 100%; height: auto; }
h1, h2, h3, h4, h5, h6 { margin-top: 0; color: var(--dark); }

/* === 布局工具 === */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
.section { padding: 50px 0; }
.text-center { text-align: center; }
.muted { color: #888; }

/* 两栏布局 */
.two-col { display: flex; gap: 30px; }
.col-main { flex: 1; min-width: 0; }
.col-side { width: 320px; flex-shrink: 0; }

/* === 按钮基础 === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-white);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    line-height: 1.4;
}
.btn:hover { border-color: var(--secondary); color: var(--secondary); }
.btn-primary {
    background: var(--color-brand);
    color: #fff;
    border-color: var(--color-brand);
}
.btn-primary:hover {
    background: var(--color-brand-dark);
    border-color: var(--color-brand-dark);
    color: #fff;
}
.btn-secondary {
    background: var(--bg-white);
    color: var(--text-soft);
    border-color: var(--border-light);
}
.btn-secondary:hover { background: var(--bg-page); color: var(--text-primary); }
.btn-lg { padding: 12px 28px; font-size: 16px; border-radius: 12px; }
.btn-sm { padding: 6px 14px; font-size: 13px; border-radius: 6px; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* === 表单基础 === */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="tel"],
input[type="url"],
textarea,
select {
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font: inherit;
    font-size: 14px;
    color: var(--text-primary);
    background: var(--bg-white);
    transition: border-color 0.2s;
}
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--color-brand);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.15);
}

/* === 难度徽章 === */
.difficulty-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
}
.difficulty-1 { background: #8bc34a; }
.difficulty-2 { background: #4caf50; }
.difficulty-3 { background: #ff9800; }
.difficulty-4 { background: #f44336; }
.difficulty-5 { background: #9c27b0; }

/* === 空状态 === */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}
.empty-state i { font-size: 48px; margin-bottom: 12px; }
.empty-state h3 { margin-top: 8px; color: var(--text-soft); }

/* === 标签 === */
.tag {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--bg-page);
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 600;
}
