/* skin/css/common.css */
:root {
    --primary-color: #ff6b6b; /* 活力橙红 */
    --primary-bg: #fff5f5;
    --text-main: #2d3436;
    --text-sub: #8395a7;
    --bg-body: #f7f9fc; /* 淡蓝灰背景 */
    --card-bg: #ffffff;
    --card-radius: 16px;
    --shadow-card: 0 4px 20px rgba(0,0,0,0.04);
    --shadow-float: 0 10px 30px rgba(255, 107, 107, 0.2);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; min-width: 0;}
body, h1, h2, h3, p, ul, li, input, button { margin: 0; padding: 0; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; object-fit: cover; }
ul { list-style: none; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.5;
    padding-bottom: 90px; /* 避让底部导航 */
}

/* 核心容器 */
.app-container {
    max-width: 600px;
    margin: 0 auto;
    min-height: 100vh;
    position: relative;
    padding: 0 15px;
}

/* --- 1. 顶部栏 (直接搜索) --- */
.top-header {
    height: 60px;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(247, 249, 252, 0.95); /* 与背景色一致 */
    backdrop-filter: blur(10px);
    margin: 0 -15px; /* 抵消容器 padding */
    padding: 0 15px;
}
.header-logo {
    font-size: 20px;
    font-weight: 900;
    color: var(--primary-color);
    margin-right: 15px;
    font-style: italic;
}
.header-logo img{
    height: 52px;
}
/* 搜索表单 */
.header-search {
    flex: 1;
    display: flex;
    align-items: center;
    background: #fff;
    height: 38px;
    border-radius: 19px;
    padding: 0 5px 0 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    border: 1px solid #eee;
}
.header-search input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 13px;
    background: transparent;
    color: var(--text-main);
}
.header-search-btn {
    width: 30px; height: 30px;
    background: var(--primary-color);
    border: none; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
}
/* 搜索图标(白色) */
.icon-search-white {
    width: 14px; height: 14px; background: #fff;
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='3'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='3'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E");
}

/* --- 2. 通用组件 --- */
/* 白色卡片 */
.soft-card {
    background: var(--card-bg);
    border-radius: var(--card-radius);
    box-shadow: var(--shadow-card);
    padding: 15px;
    margin-bottom: 20px;
}

/* 标题栏 */
.section-title {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 12px; padding: 0 5px;
}
.st-text { font-size: 17px; font-weight: 800; color: var(--text-main); border-left: 4px solid var(--primary-color); padding-left: 10px; line-height: 1; }
.st-more { font-size: 12px; color: var(--text-sub); }

/* 横向滚动容器 (首页/详情页通用) */
.scroll-x-box {
    display: flex; gap: 15px; overflow-x: auto;
    padding-bottom: 10px; /* 预留阴影空间 */
    margin: 0 -5px; padding: 0 5px 10px 5px;
}

/* 按钮 */
.btn-soft {
    background: var(--primary-bg); color: var(--primary-color);
    padding: 6px 14px; border-radius: 20px; font-size: 12px; font-weight: bold;
    border: none; cursor: pointer; transition: all 0.2s;
}
.btn-soft:active { transform: scale(0.95); }

/* --- 3. 底部导航 (固定) --- */
.nav-dock {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 60px;
    background: #fff;
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-top: 1px solid #eee;
    z-index: 999;
    padding-bottom: constant(safe-area-inset-bottom);
    padding-bottom: env(safe-area-inset-bottom);
}
.nav-item {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    color: #ccc; transition: all 0.2s;
}
.nav-item.active { color: var(--primary-color); transform: translateY(-2px); }
.nav-icon {
    width: 22px; height: 22px; margin-bottom: 3px;
    background-color: currentColor;
    mask-size: contain; -webkit-mask-size: contain;
    mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat;
    mask-position: center; -webkit-mask-position: center;
}
.nav-text { font-size: 10px; font-weight: bold; }

/* 导航图标 SVG */
.ic-home { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z'/%3E%3C/svg%3E"); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z'/%3E%3C/svg%3E"); }
.ic-game { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M21 6H3c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm-10 7H8v3H6v-3H3v-2h3V8h2v3h3v2z'/%3E%3C/svg%3E"); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M21 6H3c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm-10 7H8v3H6v-3H3v-2h3V8h2v3h3v2z'/%3E%3C/svg%3E"); }
.ic-soft { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M4 8h4V4H4v4zm6 12h4v-4h-4v4zm-6 0h4v-4H4v4zm0-6h4v-4H4v4zm6 0h4v-4h-4v4zm6-10v4h4V4h-4zm-6 4h4V4h-4v4zm6 6h4v-4h-4v4zm0 6h4v-4h-4v4z'/%3E%3C/svg%3E"); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M4 8h4V4H4v4zm6 12h4v-4h-4v4zm-6 0h4v-4H4v4zm0-6h4v-4H4v4zm6 0h4v-4h-4v4zm6-10v4h4V4h-4zm-6 4h4V4h-4v4zm6 6h4v-4h-4v4zm0 6h4v-4h-4v4z'/%3E%3C/svg%3E"); }
.ic-rank { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M16 6l2.29 2.29-4.88 4.88-4-4L2 16.59 3.41 18l6-6 4 4 6.3-6.29L22 12V6z'/%3E%3C/svg%3E"); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M16 6l2.29 2.29-4.88 4.88-4-4L2 16.59 3.41 18l6-6 4 4 6.3-6.29L22 12V6z'/%3E%3C/svg%3E"); }