/* skin/css/common.css */
:root {
    --mem-purple: #6c5ce7;
    --mem-yellow: #fdcb6e;
    --mem-green: #00b894;
    --mem-pink: #ff7675;
    --mem-black: #2d3436;
    --mem-bg: #fffdf5;
    
    --border-std: 2px solid var(--mem-black);
    --shadow-pop: 4px 4px 0 var(--mem-black);
    --radius-std: 12px;
}

* { 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: "Fredoka", "PingFang SC", "Microsoft YaHei", sans-serif;
    background-color: var(--mem-bg);
    /* 波点背景 */
    background-image: radial-gradient(#e0e0e0 15%, transparent 16%);
    background-size: 20px 20px;
    color: var(--mem-black);
    line-height: 1.5;
    padding-bottom: 90px;
}

.mem-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 15px;
    min-height: 100vh;
    background: rgba(255, 255, 255, 0.8);
    border-left: 1px solid #eee;
    border-right: 1px solid #eee;
}

/* --- Header: 几何拼贴 --- */
.mem-header {
    height: 64px;
    display: flex;
    align-items: center;
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 253, 245, 0.95);
    border-bottom: 2px solid var(--mem-black);
}
.header-logo {
    font-size: 20px;
    font-weight: 900;
    color: var(--mem-purple);
    margin-right: 15px;
    text-shadow: 2px 2px 0 var(--mem-yellow);
    font-style: italic;
}
.header-logo img{
    height: 52px;
}
.header-search {
    flex: 1;
    display: flex;
    align-items: center;
    height: 38px;
    background: #fff;
    border: 2px solid var(--mem-black);
    border-radius: 20px;
    padding: 0 5px 0 15px;
    box-shadow: 2px 2px 0 var(--mem-black);
}
.header-search input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 13px;
    font-weight: bold;
    color: var(--mem-black);
}
.header-search-btn {
    width: 30px; height: 30px;
    background: var(--mem-yellow);
    border: 2px solid var(--mem-black);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
}

/* --- 通用组件 --- */
/* 孟菲斯卡片 */
.mem-card {
    background: #fff;
    border: 2px solid var(--mem-black);
    border-radius: var(--radius-std);
    box-shadow: var(--shadow-pop);
    padding: 15px;
    margin-bottom: 20px;
    transition: transform 0.1s;
}
.mem-card:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 var(--mem-black);
}

/* 标题 */
.section-bar {
    display: flex; justify-content: space-between; align-items: flex-end;
    margin: 25px 5px 15px;
    border-bottom: 2px dashed var(--mem-black);
    padding-bottom: 5px;
}
.sb-title {
    font-size: 18px; font-weight: 900;
    background: var(--mem-green); color: #fff;
    padding: 2px 10px;
    border: 2px solid var(--mem-black);
    border-radius: 8px;
    transform: rotate(-2deg);
    box-shadow: 2px 2px 0 var(--mem-black);
}
.sb-more { font-weight: bold; font-size: 12px; color: var(--mem-purple); text-decoration: underline; }

/* 按钮 */
.btn-mem {
    background: var(--mem-purple); color: #fff;
    border: 2px solid var(--mem-black);
    padding: 6px 16px; border-radius: 20px;
    font-weight: bold; font-size: 12px;
    box-shadow: 2px 2px 0 var(--mem-black);
    cursor: pointer;
}
.btn-mem:active { transform: translate(2px, 2px); box-shadow: none; }

/* 横向滚动容器 */
.scroll-wrap {
    display: flex; gap: 15px; overflow-x: auto;
    padding: 5px 5px 15px; margin: 0 -5px;
}
.scroll-wrap::-webkit-scrollbar { display: none; }

.icon-col { flex: 0 0 68px; text-align: center; }
.icon-col a { display: block; width: 100%; display: block; overflow: hidden; }
.icon-col img {
    width: 60px; height: 60px; border-radius: 14px;
    border: 2px solid var(--mem-black);
    margin: 0 auto 5px; background: #fff;
}
.icon-col span { font-size: 12px; font-weight: bold; width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;  display: block;}

/* --- 底部导航 --- */
.bottom-nav {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 65px;
    background: #fff;
    border-top: 3px solid var(--mem-black);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 999;
}
.nav-block {
    flex: 1; height: 100%;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    color: #999; border-right: 1px dashed #ccc;
    position: relative;
}
.nav-block:last-child { border-right: none; }
.nav-block.active { color: var(--mem-black); background: #f0f0f0; }
.nav-block.active .nav-icon { transform: scale(1.1); }
/* 激活时的彩色底条 */
.nav-block.active::after {
    content: ''; position: absolute; bottom: 0; left: 0; right: 0;
    height: 4px; background: var(--mem-purple);
}

/* SVG Icons */
.nav-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;
    margin-bottom: 2px;
}
.txt { font-size: 11px; font-weight: 900; }

.i-home { 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='2'%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='none' stroke='currentColor' stroke-width='2'%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='none' stroke='currentColor' stroke-width='2'%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='none' stroke='currentColor' stroke-width='2'%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='none' stroke='currentColor' stroke-width='2'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Cline x1='3' y1='9' x2='21' y2='9'/%3E%3Cline x1='9' y1='21' x2='9' y2='9'/%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='2'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Cline x1='3' y1='9' x2='21' y2='9'/%3E%3Cline x1='9' y1='21' x2='9' y2='9'/%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='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M12 2l3 6 7 1-5 5 1 7-6-3-6 3 1-7-5-5 7-1 3-6z'/%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='2'%3E%3Cpath d='M12 2l3 6 7 1-5 5 1 7-6-3-6 3 1-7-5-5 7-1 3-6z'/%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"); }