/* ===== 网盘分享站 - 毛玻璃风格 ===== */
:root {
    --primary: #007aff;
    --primary-dark: #005ecb;
    --glass-bg: rgba(255,255,255,0.65);
    --glass-border: rgba(255,255,255,0.8);
    --glass-shadow: 0 8px 32px rgba(0,0,0,0.08);
    --text: #1d1d1f;
    --text-muted: #86868b;
    --bg: #f2f3f5;
    --nav-h: 60px;
}
* { margin:0; padding:0; box-sizing:border-box; -webkit-tap-highlight-color:transparent; }
html { scroll-behavior:smooth; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: var(--bg);
    background-attachment: fixed;
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}
a { text-decoration:none; color:inherit; }

#app {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* ===== 毛玻璃通用 ===== */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

/* ===== 顶部区域 ===== */
.app-header {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: env(safe-area-inset-top, 12px) 16px 12px;
    background: rgba(255,255,255,0.72);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(255,255,255,0.6);
}
.header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.site-title { color: var(--text); font-size: 19px; font-weight: 700; letter-spacing: -0.3px; }
.site-desc { color: var(--text-muted); font-size: 12px; margin-top: 1px; }
.header-avatar .avatar-link {
    display: flex; align-items: center; justify-content: center;
    width: 36px; height: 36px;
    background: rgba(0,122,255,0.1);
    border-radius: 50%;
    color: var(--primary);
    font-weight: 600;
}

/* 搜索栏 */
.search-bar {
    display: flex;
    align-items: center;
    background: rgba(118,118,128,0.08);
    border-radius: 10px;
    padding: 0 10px;
    height: 36px;
}
.search-bar input {
    flex: 1; border: none; background: none; outline: none;
    font-size: 15px; color: var(--text);
}
.search-bar input::placeholder { color: var(--text-muted); }
.search-bar .search-icon { font-size: 15px; color: var(--text-muted); margin-right: 6px; }

/* ===== 滚动公告条 ===== */
.notice-bar {
    display: flex; align-items: center;
    background: rgba(255,255,255,0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 8px 16px;
    border-bottom: 1px solid rgba(0,0,0,0.04);
    overflow: hidden;
}
.notice-bar .notice-icon { flex-shrink: 0; margin-right: 6px; font-size: 14px; }
.notice-bar .notice-text {
    flex: 1; overflow: hidden; white-space: nowrap;
    text-overflow: ellipsis; font-size: 13px; color: var(--text-muted);
}

/* ===== 横幅广告位 ===== */
.banner-bar {
    margin: 10px 14px;
    border-radius: 14px;
    overflow: hidden;
    background: rgba(255,255,255,0.72);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.banner-bar a { display: block; }
.banner-bar img {
    width: 100%; display: block;
    border-radius: 14px;
    aspect-ratio: 4 / 1;
    object-fit: cover;
}

/* ===== 主内容区 ===== */
.app-main {
    flex: 1;
    padding: 12px 14px;
    padding-bottom: calc(var(--nav-h) + 24px);
}

/* ===== 分类圆形入口 ===== */
.category-nav {
    display: flex;
    overflow-x: auto;
    gap: 6px;
    padding: 14px 0;
    -webkit-overflow-scrolling: touch;
}
.category-nav::-webkit-scrollbar { display: none; }
.cat-item {
    display: flex; flex-direction: column; align-items: center;
    gap: 5px; min-width: 60px; cursor: pointer; flex-shrink: 0;
}
.cat-item .cat-icon {
    width: 50px; height: 50px; border-radius: 14px;
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.8);
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; transition: all 0.25s;
}
.cat-item.active .cat-icon {
    background: var(--primary);
    transform: scale(1.05);
    border-color: transparent;
}
.cat-item .cat-name { font-size: 11px; color: var(--text-muted); white-space: nowrap; }
.cat-item.active .cat-name { color: var(--primary); font-weight: 600; }

/* ===== 文件列表卡片 ===== */
.file-list { margin-top: 8px; }
.file-card {
    display: flex; align-items: center; gap: 12px;
    background: rgba(255,255,255,0.65);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255,255,255,0.8);
    border-radius: 14px;
    padding: 14px;
    margin-bottom: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    transition: transform 0.15s;
}
.file-card:active { transform: scale(0.97); }
.file-icon {
    width: 44px; height: 44px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; flex-shrink: 0;
    background: rgba(0,122,255,0.08);
}
.file-info { flex: 1; min-width: 0; }
.file-title {
    font-size: 15px; font-weight: 600; color: var(--text);
    margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.file-desc { font-size: 12px; color: var(--text-muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.file-desc .pwd-tag {
    color: #ff3b30; font-size: 11px;
    background: rgba(255,59,48,0.1); padding: 1px 6px; border-radius: 4px;
}
.file-download {
    flex-shrink: 0;
    background: var(--primary); color: #fff;
    border: none; border-radius: 16px;
    padding: 7px 18px; font-size: 13px; font-weight: 600; cursor: pointer;
}
.file-download:active { background: var(--primary-dark); }

/* ===== 分类标题 ===== */
.section-header {
    display: flex; align-items: center; gap: 6px;
    margin: 16px 0 8px;
}
.section-icon { font-size: 16px; }
.section-title { font-size: 16px; font-weight: 700; letter-spacing: -0.2px; }
.section-desc { font-size: 12px; color: var(--text-muted); margin-left: auto; }

/* ===== 公告卡片 ===== */
.announcement-card {
    background: rgba(255,255,255,0.65);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255,255,255,0.8);
    border-radius: 14px; padding: 16px;
    margin-bottom: 8px; box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
.announcement-title { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.announcement-content { font-size: 13px; color: #555; line-height: 1.7; }
.announcement-time { font-size: 11px; color: var(--text-muted); margin-top: 6px; }

/* ===== 公告弹窗 ===== */
.popup-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.35);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 9999;
    display: flex; align-items: center; justify-content: center; padding: 24px;
}
.popup-card {
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid rgba(255,255,255,0.9);
    border-radius: 20px;
    width: 100%; max-width: 360px; max-height: 80vh;
    overflow: hidden; display: flex; flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}
.popup-header {
    background: linear-gradient(135deg, var(--primary) 0%, #5ac8fa 100%);
    color: #fff; padding: 20px 16px; text-align: center; position: relative;
}
.popup-header h3 { font-size: 17px; font-weight: 700; }
.popup-close {
    position: absolute; top: 10px; right: 12px;
    background: rgba(255,255,255,0.25);
    border: none; color: #fff;
    width: 28px; height: 28px; border-radius: 50%;
    font-size: 16px; cursor: pointer;
}
.popup-body {
    padding: 20px 18px; overflow-y: auto;
    font-size: 14px; color: #444; line-height: 1.8;
}
.popup-body .ann-item {
    margin-bottom: 14px; padding-bottom: 14px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}
.popup-body .ann-item:last-child { border-bottom: none; margin-bottom: 0; }
.popup-body .ann-item h4 { font-size: 15px; margin-bottom: 6px; color: var(--text); }

/* ===== 表单 ===== */
.auth-form-wrap { margin-top: 20px; }
.auth-form {
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255,255,255,0.8);
    border-radius: 16px; padding: 24px 20px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}
.form-group { margin-bottom: 16px; }
.form-group label { display:block; font-size:14px; font-weight:600; color:var(--text); margin-bottom:6px; }
.form-input, .form-textarea {
    width: 100%; padding: 12px 14px;
    border: 1.5px solid rgba(0,0,0,0.08);
    border-radius: 12px; font-size: 16px;
    background: rgba(255,255,255,0.6); outline: none;
    transition: border-color 0.2s;
}
.form-input:focus, .form-textarea:focus {
    border-color: var(--primary);
    background: rgba(255,255,255,0.9);
}
.form-textarea { resize: vertical; font-family: inherit; min-height: 80px; }
.btn-primary {
    background: var(--primary); color:#fff; border:none;
    padding: 13px 24px; border-radius: 12px;
    font-size: 16px; font-weight: 600; cursor: pointer;
    transition: all 0.15s;
}
.btn-primary:active { background: var(--primary-dark); transform: scale(0.97); }
.btn-block { width: 100%; }
.auth-link { text-align:center; margin-top:16px; font-size:14px; color:var(--text-muted); }
.auth-link a { color: var(--primary); font-weight:500; }
.alert-success {
    background: rgba(52,199,89,0.12); color: #248a3d;
    border-radius: 12px; padding: 12px 16px; font-size:14px; margin-bottom:16px;
}
.alert-error {
    background: rgba(255,59,48,0.12); color: #d70015;
    border-radius: 12px; padding: 12px 16px; font-size:14px; margin-bottom:16px;
}
.empty-state { text-align:center; padding:50px 20px; color:var(--text-muted); font-size:14px; }

/* ===== 底部导航（毛玻璃） ===== */
.bottom-nav {
    height: var(--nav-h);
    background: rgba(255,255,255,0.72);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-top: 1px solid rgba(255,255,255,0.6);
    display: flex;
    position: fixed; bottom: 0; left: 0; right: 0;
    max-width: 480px; margin: 0 auto;
    z-index: 200;
}
.nav-item {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 2px;
    color: var(--text-muted); transition: color 0.15s; position: relative;
}
.nav-item.active { color: var(--primary); }
.nav-item.active::before {
    content: ''; position: absolute; top: 0; left: 50%;
    transform: translateX(-50%); width: 30px; height: 3px;
    background: var(--primary); border-radius: 0 0 3px 3px;
}
.nav-icon { font-size: 22px; }
.nav-label { font-size: 10px; font-weight: 500; }

/* ===== 文章 ===== */
.article-card {
    display:block;
    background: rgba(255,255,255,0.65);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255,255,255,0.8);
    border-radius: 14px; padding: 16px; margin-bottom: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    transition: transform 0.15s;
}
.article-card:active { transform: scale(0.98); }
.article-title { font-size:16px; font-weight:700; margin-bottom:8px; letter-spacing:-0.2px; }
.article-excerpt {
    font-size:13px; color:var(--text-muted); line-height:1.6;
    margin-bottom:10px; overflow:hidden;
    display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical;
}
.article-meta { display:flex; gap:12px; font-size:11px; color:var(--text-muted); }
.article-detail {
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255,255,255,0.8);
    border-radius: 16px; padding: 24px 20px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}
.article-detail-title { font-size:22px; font-weight:700; margin-bottom:12px; line-height:1.3; letter-spacing:-0.5px; }
.article-detail-meta { display:flex; gap:16px; font-size:12px; color:var(--text-muted); margin-bottom:20px; padding-bottom:16px; border-bottom:1px solid rgba(0,0,0,0.06); }
.article-detail-content { font-size:15px; line-height:1.8; color:var(--text); }
.post-section { margin-bottom: 20px; }
.btn-toggle-post {
    width:100%; padding:12px;
    border: 1.5px dashed rgba(0,122,255,0.3);
    background: rgba(0,122,255,0.05); color:var(--primary);
    border-radius: 14px; font-size:14px; font-weight:500; cursor:pointer;
}
.post-form {
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.8);
    border-radius: 14px; padding: 16px; margin-top:10px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
.login-hint { text-align:center; padding:20px; color:var(--text-muted); font-size:14px; }
.login-hint a { color:var(--primary); font-weight:500; }
.back-btn { color:var(--primary); font-size:16px; font-weight:500; }

/* ===== 关于页面 ===== */
.about-section {
    background: rgba(255,255,255,0.65);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255,255,255,0.8);
    border-radius: 16px;
    padding: 20px 18px;
    margin-bottom: 12px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.05);
}
.about-app {
    text-align: center; padding: 28px 18px;
}
.about-app .app-icon {
    width: 72px; height: 72px; border-radius: 18px;
    background: linear-gradient(135deg, var(--primary) 0%, #5ac8fa 100%);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 36px; margin-bottom: 12px;
    box-shadow: 0 8px 24px rgba(0,122,255,0.25);
}
.about-app .app-name { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.about-app .app-version { font-size: 13px; color: var(--text-muted); margin-bottom: 2px; }
.about-app .app-slogan { font-size: 14px; color: var(--text-muted); }
.about-section h3 {
    font-size: 14px; font-weight: 700; color: var(--text);
    margin-bottom: 14px; display: flex; align-items: center; gap: 6px;
}
.about-section h3 .h3-icon { font-size: 18px; }

/* 关于页 - 列表项 */
.about-list-item {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    text-decoration: none; color: inherit;
    transition: background 0.15s;
}
.about-list-item:last-child { border-bottom: none; }
.about-list-item:active { background: rgba(0,0,0,0.02); }
.about-list-item .item-icon {
    width: 36px; height: 36px; border-radius: 10px;
    background: rgba(0,122,255,0.08);
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; flex-shrink: 0;
}
.about-list-item .item-info { flex: 1; }
.about-list-item .item-title { font-size: 15px; font-weight: 500; }
.about-list-item .item-desc { font-size: 12px; color: var(--text-muted); }
.about-list-item .item-arrow { color: var(--text-muted); font-size: 14px; }

/* QQ群卡片 */
.qq-group-card {
    text-align: center; padding: 10px 0;
}
.qq-group-card .qq-label { font-size: 13px; color: var(--text-muted); margin-bottom: 8px; }
.qq-group-card .qq-number {
    font-size: 20px; font-weight: 700; color: var(--primary);
    letter-spacing: 1px; margin-bottom: 12px;
    font-family: 'SF Mono', monospace;
}
.qq-group-card .qq-btn {
    display: inline-block;
    background: var(--primary); color: #fff;
    padding: 10px 28px; border-radius: 20px;
    font-size: 14px; font-weight: 600; text-decoration: none;
}

/* 打赏卡片 */
.donate-card { text-align: center; padding: 10px 0; }
.donate-card .donate-text { font-size: 14px; color: var(--text-muted); margin-bottom: 14px; }
.donate-card .donate-qr {
    max-width: 200px; width: 100%;
    border-radius: 12px; box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin: 0 auto; display: block;
}
.donate-text-inline { font-size: 13px; color: var(--text-muted); line-height: 1.8; }

.about-footer {
    text-align: center; padding: 20px;
    font-size: 12px; color: var(--text-muted); line-height: 1.8;
}

@media (min-width: 481px) {
    body { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) fixed; }
    #app { box-shadow: 0 0 60px rgba(0,0,0,0.1); }
}
