/* skin/css/common.css */
:root {
    --mid-bg: #16161a;
    --mid-card: #242629;
    --mid-text: #fffffe;
    --mid-sub: #94a1b2;
    --mid-primary: #7f5af0;
    --mid-accent: #2cb67d;
    
    --grad-btn: linear-gradient(135deg, #7f5af0 0%, #2cb67d 100%);
    --border-glow: 1px solid rgba(127, 90, 240, 0.2);
    
    --radius-std: 16px;
}

* { 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 Neue", sans-serif;
    color: var(--mid-text);
    line-height: 1.5;
    padding-bottom: 90px;
}

.midnight-wrapper {
    max-width: 600px;
    margin: 0 auto;
    min-height: 100vh;
    position: relative;
}

/* --- Header: 暗色通栏 --- */
.mid-header {
    height: 64px;
    display: flex;
    align-items: center;
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(22, 22, 26, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.mid-logo {
    font-size: 20px;
    font-weight: 800;
    background: var(--grad-btn);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-right: 15px;
    letter-spacing: -0.5px;
}
.mid-logo img{
    height: 40px;
}
.mid-search-bar {
    flex: 1;
    display: flex;
    align-items: center;
    background: #010101;
    height: 38px;
    border-radius: 19px;
    padding: 0 15px;
    border: 1px solid #333;
    transition: border-color 0.3s;
}
.mid-search-bar:focus-within {
    border-color: var(--mid-primary);
}
.mid-search-bar input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 13px;
    color: #fff;
}
.search-icon-btn {
    border: none; background: transparent; padding: 0;
    color: var(--mid-sub); cursor: pointer;
}

/* --- 通用组件 --- */
/* 暗色卡片 */
.dark-card {
    background: var(--mid-card);
    border-radius: var(--radius-std);
    padding: 15px;
    margin: 0 15px 20px;
    border: var(--border-glow);
}

/* 标题 */
.glow-title {
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px 20px 12px;
}
.gt-text {
    font-size: 18px; font-weight: 700; color: #333;
    position: relative; padding-left: 12px;
}
.gt-text::before {
    content: ''; position: absolute; left: 0; top: 4px; bottom: 4px;
    width: 3px; background: var(--mid-primary); border-radius: 2px;
    box-shadow: 0 0 8px var(--mid-primary);
}
.gt-more { font-size: 12px; color: var(--mid-sub); }

/* 按钮 */
.btn-glow {
    background: var(--grad-btn);
    color: #fff;
    border: none;
    padding: 6px 16px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(127, 90, 240, 0.3);
    transition: opacity 0.2s;
}
.btn-glow:active { opacity: 0.8; }

/* SVG Icons (White/Grey) */
.icon-m {
    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='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%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' stroke-linecap='round' stroke-linejoin='round'%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' stroke-linecap='round' stroke-linejoin='round'%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' stroke-linecap='round' stroke-linejoin='round'%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' stroke-linecap='round' stroke-linejoin='round'%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' stroke-linecap='round' stroke-linejoin='round'%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' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9v12m6-18v18m6-9v9'/%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' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9v12m6-18v18m6-9v9'/%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"); }

/* --- 底部导航 (暗色悬浮) --- */
.dark-dock {
    position: fixed;
    bottom: 20px; left: 20px; right: 20px;
    max-width: 560px; margin: 0 auto;
    height: 64px;
    background: rgba(36, 38, 41, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 12px 30px rgba(0,0,0,0.5);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 999;
}
.dock-link {
    flex: 1; height: 100%;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    color: var(--mid-sub);
    transition: all 0.3s;
}
.dock-link.active {
    color: var(--mid-primary);
    text-shadow: 0 0 8px rgba(127, 90, 240, 0.4);
}
.dock-icon { width: 22px; height: 22px; margin-bottom: 3px; }
.dock-txt { font-size: 12px; font-weight: 600; }

/* 通用横向滚动 (用于首页和下载页) */
.mid-scroll-x {
    display: flex; gap: 15px; overflow-x: auto;
    padding: 0 15px 15px;
}
.mid-icon-item {
    flex: 0 0 64px; text-align: center;
}
.mid-icon-item img {
    width: 60px; height: 60px; border-radius: 16px;
    margin: 0 auto 8px; border: 1px solid rgba(255,255,255,0.1);
    background: #2a2a2a;
}
.mid-icon-item span { font-size: 12px; color: #333; }