/* skin/css/common.css */
:root {
    --lab-blue: #2962ff;
    --lab-light-blue: #e3f2fd;
    --lab-bg: #f0f2f5;
    --lab-text: #1c1e21;
    --lab-sub: #606770;
    --lab-border: #e4e6eb;
    
    --radius-mod: 12px;
    --shadow-mod: 0 1px 3px rgba(0,0,0,0.05);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; min-width: 0;}
body, h1, h2, h3,h4,h5, 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, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--lab-bg);
    color: var(--lab-text);
    line-height: 1.5;
    padding-bottom: 90px; /* 避让底部导航 */
}

.lab-wrapper {
    max-width: 600px;
    margin: 0 auto;
    min-height: 100vh;
}

/* --- Header: 顶部通栏 --- */
.lab-header {
    background: #fff;
    height: 60px;
    display: flex;
    align-items: center;
    padding: 0 15px;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--lab-border);
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}
.lab-logo {
    font-size: 18px;
    font-weight: 800;
    color: var(--lab-blue);
    margin-right: 15px;
    letter-spacing: -0.5px;
}
.lab-logo img{
    height: 49px;
    display: block;
}
.search-input-group {
    flex: 1;
    display: flex;
    background: var(--lab-bg);
    height: 36px;
    border-radius: 6px;
    align-items: center;
    padding: 0 10px;
    border: 1px solid transparent;
    transition: all 0.2s;
}
.search-input-group:focus-within {
    background: #fff;
    border-color: var(--lab-blue);
    box-shadow: 0 0 0 3px var(--lab-light-blue);
}
.search-input-group input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 14px;
    color: var(--lab-text);
}
.search-btn {
    border: none;
    background: transparent;
    color: var(--lab-blue);
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
}

/* --- 通用模块 --- */
.lab-module {
    background: #fff;
    margin: 15px;
    padding: 15px;
    border-radius: var(--radius-mod);
    box-shadow: var(--shadow-mod);
    border: 1px solid var(--lab-border);
}

/* 标题栏 */
.mod-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--lab-light-blue);
}
.mh-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--lab-text);
    display: flex; align-items: center;
}
.mh-title::before {
    content: '';
    display: inline-block;
    width: 4px; height: 16px;
    background: var(--lab-blue);
    margin-right: 8px;
    border-radius: 2px;
}
.mh-more {
    font-size: 12px;
    color: var(--lab-sub);
}

/* 按钮 */
.btn-lab {
    background: var(--lab-light-blue);
    color: var(--lab-blue);
    border: none;
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-lab:hover {
    background: var(--lab-blue);
    color: #fff;
}
.btn-lab:active { transform: translateY(1px); }

/* SVG 图标定义 */
.svg-icon {
    width: 24px; height: 24px;
    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;
    display: inline-block;
}
.i-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='M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'/%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='M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'/%3E%3C/svg%3E"); }
.i-game { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Crect x='2' y='6' width='20' height='12' rx='2'/%3E%3Cpath d='M6 12h4m-2-2v4m10-1h2m-5-2h2'/%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%3Crect x='2' y='6' width='20' height='12' rx='2'/%3E%3Cpath d='M6 12h4m-2-2v4m10-1h2m-5-2h2'/%3E%3C/svg%3E"); }
.i-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='M12 2L2 7l10 5 10-5-10-5zM2 17l10 5 10-5M2 12l10 5 10-5'/%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='M12 2L2 7l10 5 10-5-10-5zM2 17l10 5 10-5M2 12l10 5 10-5'/%3E%3C/svg%3E"); }
.i-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"); }
.i-search { 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"); }
.i-back { 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%3Cline x1='19' y1='12' x2='5' y2='12'%3E%3C/line%3E%3Cpolyline points='12 19 5 12 12 5'%3E%3C/polyline%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%3Cline x1='19' y1='12' x2='5' y2='12'%3E%3C/line%3E%3Cpolyline points='12 19 5 12 12 5'%3E%3C/polyline%3E%3C/svg%3E"); }

/* --- 底部导航 (Dock) --- */
.bottom-dock {
    position: fixed;
    bottom: 20px; left: 20px; right: 20px;
    max-width: 560px; margin: 0 auto;
    height: 64px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 999;
    border: 1px solid var(--lab-border);
}
.dock-link {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    color: var(--lab-sub); transition: all 0.2s;
    flex: 1; height: 100%;
}
.dock-link.active {
    color: var(--lab-blue);
    background: var(--lab-light-blue);
    border-radius: 8px;
    height: 50px;
    flex: 0 0 60px; /* 激活态变宽 */
}
.dock-icon { width: 20px; height: 20px; margin-bottom: 2px; }
.dock-txt { font-size: 10px; font-weight: 600; }

/* 通用横向滚动 (用于首页和下载页) */
.lab-scroll-x {
    display: flex; gap: 15px; overflow-x: auto;
    padding-bottom: 5px;
}
.lab-icon-unit { flex: 0 0 64px; text-align: center; }
.lab-icon-unit img {
    width: 56px; height: 56px; border-radius: 12px; margin: 0 auto 6px;
    border: 1px solid var(--lab-border);
}
.lab-icon-unit span { font-size: 12px; color: var(--lab-text); }