/* skin/css/common.css */
:root {
    --primary-color: #0984e3; /* 电光蓝 */
    --primary-hover: #74b9ff;
    --text-main: #2d3436;
    --text-sub: #636e72;
    --bg-body: #f1f2f6; /* 浅灰背景 */
    --bg-card: #ffffff;
    --border-color: #2d3436; /* 深色描边 DNA */
    --border-width: 2px;
    --border-radius: 4px; /* 小硬角 */
    --shadow-hard: 3px 3px 0px #2d3436; /* 硬投影 DNA */
    --font-stack: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Reset */
* { 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; }
ul { list-style: none; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; border: var(--border-width) solid var(--border-color); border-radius: var(--border-radius); }
i, em { font-style: normal; }

body {
    font-family: var(--font-stack);
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.5;
}

/* Layout */
.container {
    width: 100%;
    padding: 0 15px;
    margin: 0 auto;
}

/* Header */
.header {
    background: #fff;
    border-bottom: var(--border-width) solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.logo img {
    height: 32px;
    width: auto;
    border: none; /* Logo本身不要边框 */
    border-radius: 0;
}

/* Search Box (Retro Style) */
.search-box {
    display: flex;
    align-items: center;
    background: #fff;
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 0 10px;
    width: 170px;
    box-shadow: 2px 2px 0 rgba(0,0,0,0.1);
}

.search-box input {
    border: none;
    background: transparent;
    height: 32px;
    width: 100%;
    font-size: 14px;
    outline: none;
    color: #333;
    font-weight: bold;
}

.search-box button {
    border: none;
    background: transparent;
    color: var(--text-main);
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
}

/* Main Navigation (Tabs Style) */
.main-nav {
    background: #dfe6e9; /* Slightly darker to separate */
    border-bottom: var(--border-width) solid var(--border-color);
}
.scroll-nav {
    display: flex;
    white-space: nowrap;
    overflow-x: auto;
    height: 44px;
    align-items: center;
    gap: 10px;
}
.scroll-nav::-webkit-scrollbar { display: none; }

.scroll-nav a {
    font-size: 14px;
    color: var(--text-main);
    font-weight: 700;
    padding: 4px 12px;
    border: var(--border-width) solid transparent;
    border-radius: var(--border-radius);
    transition: all 0.1s;
}
.scroll-nav a.active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--border-color);
    box-shadow: 2px 2px 0 #000;
}

/* Common Buttons */
.btn-download, .app-btn, .s-btn, .main-down-btn {
    display: inline-block;
    background-color: #fff;
    color: var(--text-main);
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-hard);
    font-weight: bold;
    cursor: pointer;
    transition: all 0.1s;
}
.btn-download:active, .app-btn:active, .s-btn:active, .main-down-btn:active {
    transform: translate(2px, 2px);
    box-shadow: none;
}
/* Highlighted Button */
.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
}

/* Section Titles */
.section-title {
    font-size: 20px;
    font-weight: 900;
    margin: 25px 0 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
}
.section-title::before {
    content: '#';
    color: var(--primary-color);
    margin-right: 5px;
    font-weight: 900;
}
.section-title a {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-sub);
    margin-left: auto;
}

/* Grid Helper */
.grid-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px 10px;
}

/* App Item */
.app-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.app-item a{
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
}
.app-icon {
    width: 60px;
    height: 60px;
    border: var(--border-width) solid var(--border-color);
    border-radius: 10px;
    margin-bottom: 8px;
    box-shadow: var(--shadow-hard);
    background: #fff;
}
.app-name {
    font-size: 13px;
    color: var(--text-main);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
    margin-bottom: 6px;
    font-weight: 600;
}
.app-btn {
    font-size: 12px;
    padding: 2px 10px;
    background: #fff;
}
/* --- Footer Styles --- */
.footer {
    background: #fff;
    border-top: var(--border-width) solid var(--border-color); /* 顶部粗黑边 */
    padding: 40px 0 20px;
    margin-top: 40px;
    text-align: center;
}

.f-links {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    gap: 20px;
    font-weight: bold;
}

.f-links a {
    position: relative;
    color: var(--text-main);
}
/* 链接Hover时的硬朗下划线 */
.f-links a:hover {
    color: var(--primary-color);
    text-decoration: underline;
    text-decoration-thickness: 2px;
}

.copyright, .icp {
    font-size: 12px;
    color: #666;
    line-height: 1.8;
    font-weight: 600;
}

/* Back to Top Button (悬浮按钮) */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: var(--primary-color);
    border: 2px solid #000;
    box-shadow: 4px 4px 0 #000;
    color: #fff;
    text-align: center;
    line-height: 40px;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    z-index: 999;
    display: none; /* JS控制显示 */
    transition: transform 0.1s;
}
.back-to-top:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 #000;
}
@media (min-width: 768px) {
    .container { width: 750px; }
    .search-box { width: 260px; }
    .grid-list { grid-template-columns: repeat(6, 1fr); gap: 20px; }
}