/* 聚合付CMS - 主样式
 * 简约清爽大气的企业风格
 */
@import url("/assets/css/font-awesome.min.css");
:root {
    --primary: #4F6EF7;
    --primary-dark: #3A56D4;
    --primary-light: #EEF1FF;
    --secondary: #764ba2;
    --success: #52c41a;
    --warning: #faad14;
    --danger: #ff4d4f;
    --info: #1890ff;
    --text: #2c3e50;
    --text-secondary: #6b7c93;
    --text-light: #999;
    --bg: #f8f9fc;
    --bg-white: #fff;
    --border: #e8ecf1;
    --shadow: 0 2px 12px rgba(79,110,247,.08);
    --shadow-hover: 0 8px 30px rgba(79,110,247,.12);
    --radius: 10px;
    --radius-sm: 6px;
    --radius-lg: 16px;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; transition: color .3s; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; }
ul { list-style: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 10px 24px; border: none; border-radius: var(--radius-sm);
    font-size: 14px; font-weight: 600; cursor: pointer;
    transition: all .3s; text-decoration: none;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
.btn-outline { background: transparent; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: 6px 16px; font-size: 13px; }
.btn-lg { padding: 14px 36px; font-size: 16px; }
.btn-block { display: flex; width: 100%; justify-content: center; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; }

/* Header */
.site-header {
    background: #fff; border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 1000;
    box-shadow: 0 1px 4px rgba(0,0,0,.03);
}
.header-inner {
    display: flex; align-items: center; height: 64px;
    justify-content: space-between;
}
.logo { display: flex; align-items: center; gap: 8px; }
.logo img { height: 38px; }
.logo-text { font-size: 22px; font-weight: 800; background: linear-gradient(135deg, var(--primary), var(--secondary)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.main-nav { display: flex; gap: 4px; }
.main-nav a {
    padding: 8px 18px; color: var(--text-secondary); font-size: 15px;
    border-radius: var(--radius-sm); transition: all .3s;
}
.main-nav a:hover, .main-nav a.active { color: var(--primary); background: var(--primary-light); }
.header-actions { display: flex; gap: 8px; align-items: center; }
.mobile-menu-btn { display: none; background: none; border: none; font-size: 24px; color: var(--text); cursor: pointer; padding: 4px; }
.mobile-menu { display: none; background: #fff; border-bottom: 1px solid var(--border); padding: 8px 20px; }
.mobile-menu.show { display: block; }
.mobile-menu a { display: block; padding: 10px 0; color: var(--text); border-bottom: 1px solid var(--border); }
.mobile-menu a:last-child { border-bottom: none; }

/* Section */
.section { padding: 60px 0; }
.section-header { text-align: center; margin-bottom: 40px; }
.section-header h2 { font-size: 28px; font-weight: 700; margin-bottom: 8px; position: relative; display: inline-block; }
.section-header h2:after { content: ''; display: block; width: 40px; height: 3px; background: var(--primary); border-radius: 2px; margin: 10px auto 0; }
.section-header p { color: var(--text-secondary); font-size: 15px; }
.section-header .more-link { display: inline-block; margin-top: 12px; color: var(--primary); font-weight: 600; }

/* Hero Slider */
.hero-slider { position: relative; overflow: hidden; height: 420px; background: #1a1a2e; }
.swiper-container { position: relative; height: 100%; }
.swiper-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .8s ease; }
.swiper-slide.active { opacity: 1; }
.swiper-slide img { width: 100%; height: 100%; object-fit: cover; }
.slide-caption { position: absolute; bottom: 40px; left: 40px; color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,.5); }
.slide-caption h2 { font-size: 32px; font-weight: 700; }
.swiper-dots { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; }
.swiper-dots .dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.4); cursor: pointer; transition: all .3s; }
.swiper-dots .dot.active { background: #fff; width: 24px; border-radius: 5px; }

/* Membership Levels */
.levels-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.level-card {
    background: #fff; border-radius: var(--radius-lg); padding: 30px 20px; text-align: center;
    box-shadow: var(--shadow); transition: all .3s; border: 1px solid var(--border);
    position: relative; overflow: hidden;
}
.level-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.level-card.free { border-color: var(--primary-light); }
.level-icon { width: 56px; height: 56px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 800; margin-bottom: 12px; color: #fff; }
.level-icon-0 { background: #e8e8e8; color: #999; }
.level-icon-1 { background: linear-gradient(135deg, #CD7F32, #A0522D); }
.level-icon-2 { background: linear-gradient(135deg, #C0C0C0, #A8A8A8); }
.level-icon-3 { background: linear-gradient(135deg, #FFD700, #DAA520); }
.level-icon-5 { background: linear-gradient(135deg, #00B4D8, #0077B6); }
.level-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.level-discount { color: var(--primary); font-size: 14px; font-weight: 600; margin-bottom: 12px; }
.level-benefits { text-align: left; margin: 0 0 16px; padding: 0; }
.level-benefits li { padding: 4px 0; font-size: 13px; color: var(--text-secondary); position: relative; padding-left: 18px; }
.level-benefits li:before { content: '✓'; position: absolute; left: 0; color: var(--success); font-weight: 700; }
.level-price { margin: 12px 0; }
.level-price .price { font-size: 28px; font-weight: 800; color: var(--primary); }
.level-price .price.free { color: var(--success); }
.level-price .unit { font-size: 14px; color: var(--text-secondary); }

/* Features */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.feature-card { background: #fff; border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); transition: all .3s; border: 1px solid var(--border); }
.feature-card:hover { box-shadow: var(--shadow-hover); }
.feature-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 10px; color: var(--primary); }
.feature-content { font-size: 14px; color: var(--text-secondary); line-height: 1.8; }

/* Ads */
.ads-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.ad-card { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: all .3s; border: 1px solid var(--border); display: block; }
.ad-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.ad-card img { width: 100%; height: 160px; object-fit: cover; }
.ad-card h4 { padding: 12px 16px; font-size: 14px; color: var(--text); }

/* Articles */
.article-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 20px; }
.article-card { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: all .3s; display: flex; flex-direction: column; border: 1px solid var(--border); }
.article-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.article-thumb { height: 200px; overflow: hidden; }
.article-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.article-card:hover .article-thumb img { transform: scale(1.05); }
.article-info { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.article-info h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; line-height: 1.4; }
.article-info p { font-size: 14px; color: var(--text-secondary); flex: 1; }
.article-meta { display: flex; gap: 16px; margin-top: 12px; font-size: 12px; color: var(--text-light); }

/* Footer */
.site-footer { background: #1a1a2e; color: #b0b0c0; padding: 60px 0 30px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 30px; margin-bottom: 30px; }
.footer-col h4 { color: #fff; font-size: 17px; font-weight: 700; margin-bottom: 16px; }
.footer-col p { font-size: 14px; line-height: 1.8; }
.footer-col ul li { padding: 4px 0; }
.footer-col ul li a { color: #b0b0c0; font-size: 14px; }
.footer-col ul li a:hover { color: #fff; }
.footer-col .qr-code { width: 100px; height: 100px; margin-top: 10px; border-radius: var(--radius-sm); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding-top: 20px; text-align: center; font-size: 13px; }
.footer-bottom a { color: #b0b0c0; }
.footer-bottom a:hover { color: #fff; }

/* Forms */
.form-card { max-width: 440px; margin: 40px auto; background: #fff; border-radius: var(--radius-lg); padding: 36px; box-shadow: var(--shadow); }
.form-card h2 { text-align: center; font-size: 22px; margin-bottom: 24px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 10px 14px; border: 1.5px solid var(--border);
    border-radius: var(--radius-sm); font-size: 14px; transition: all .3s;
    background: #fff; color: var(--text);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px rgba(79,110,247,.1); }
.form-group .hint { font-size: 12px; color: var(--text-light); margin-top: 4px; }
.form-code { display: flex; gap: 8px; }
.form-code input { flex: 1; }
.form-code .btn { white-space: nowrap; }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; }
table th, table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); font-size: 14px; }
table th { background: var(--bg); font-weight: 600; color: var(--text-secondary); }
table tr:hover td { background: rgba(79,110,247,.02); }

/* Tags */
.tag { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.tag-success { background: #f6ffed; color: var(--success); }
.tag-warning { background: #fffbe6; color: var(--warning); }
.tag-danger { background: #fff2f0; color: var(--danger); }
.tag-info { background: #e6f7ff; color: var(--info); }

/* Pagination */
.pagination { display: flex; justify-content: center; gap: 6px; margin: 30px 0; }
.page-item, .page-dots { display: inline-flex; width: 36px; height: 36px; align-items: center; justify-content: center; border-radius: var(--radius-sm); font-size: 14px; }
.page-item { background: #fff; border: 1px solid var(--border); color: var(--text); transition: all .3s; }
.page-item:hover { border-color: var(--primary); color: var(--primary); }
.page-item.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.page-dots { color: var(--text-light); }

/* Message Page */
.msg-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.msg-box { text-align: center; padding: 60px; }
.msg-icon { width: 64px; height: 64px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 28px; margin-bottom: 16px; }
.msg-success .msg-icon { background: #f6ffed; color: var(--success); }
.msg-error .msg-icon { background: #fff2f0; color: var(--danger); }
.msg-box p { font-size: 16px; color: var(--text); margin-bottom: 8px; }
.msg-link { margin-top: 16px; }

/* Admin Layout */
.admin-wrap { display: flex; min-height: 100vh; }
.admin-sidebar { width: 240px; background: #1a1a2e; color: #fff; flex-shrink: 0; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.admin-sidebar .sidebar-header { padding: 20px; border-bottom: 1px solid rgba(255,255,255,.08); }
.admin-sidebar .sidebar-header h2 { font-size: 18px; }
.admin-sidebar .sidebar-menu { padding: 12px 0; }
.admin-sidebar .sidebar-menu .menu-item { display: flex; align-items: center; gap: 10px; padding: 12px 24px; color: #d4d4e0; font-size: 14px; transition: all .3s; }
.admin-sidebar .sidebar-menu .menu-item:hover { background: rgba(255,255,255,.08); color: #fff; }
.admin-sidebar .sidebar-menu .menu-item.active { background: #2a2a4a; color: #fff; font-weight: 600; border-left: 3px solid #4F6EF7; padding-left: 21px; }
.admin-main { flex: 1; background: var(--bg); }
.admin-header { background: #fff; padding: 16px 24px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border); }
.admin-content { padding: 24px; }
.admin-card { background: #fff; border-radius: var(--radius); padding: 24px; margin-bottom: 20px; box-shadow: var(--shadow); border: 1px solid var(--border); }
.admin-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }

/* Member Layout */
.member-wrap { display: flex; min-height: 100vh; }
.member-sidebar { width: 220px; background: #fff; border-right: 1px solid var(--border); flex-shrink: 0; position: sticky; top: 64px; height: calc(100vh - 64px); overflow-y: auto; }
.member-sidebar .user-card { padding: 24px 20px; text-align: center; border-bottom: 1px solid var(--border); }
.member-sidebar .user-card .avatar { width: 60px; height: 60px; border-radius: 50%; background: var(--primary-light); display: inline-flex; align-items: center; justify-content: center; font-size: 24px; color: var(--primary); margin-bottom: 8px; overflow: hidden; }
.member-sidebar .user-card .avatar img { width: 100%; height: 100%; object-fit: cover; }
.member-sidebar .user-card .name { font-weight: 700; }
.member-sidebar .user-card .level { font-size: 12px; color: var(--primary); font-weight: 600; }
.member-sidebar .sidebar-menu { padding: 12px 0; }
.member-sidebar .sidebar-menu a { display: flex; align-items: center; gap: 10px; padding: 10px 20px; color: var(--text-secondary); font-size: 14px; transition: all .3s; border-radius: 0; margin: 2px 0; }
.member-sidebar .sidebar-menu a:hover, .member-sidebar .sidebar-menu a.active { background: var(--primary-light); color: var(--primary); }
.member-main { flex: 1; padding: 24px; max-width: 960px; }
.member-header { margin-bottom: 24px; }
.member-header h2 { font-size: 22px; font-weight: 700; }
.member-header p { color: var(--text-secondary); font-size: 14px; }

/* Stats Cards */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: #fff; border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); border: 1px solid var(--border); }
.stat-card .stat-icon { width: 40px; height: 40px; border-radius: var(--radius-sm); display: inline-flex; align-items: center; justify-content: center; font-size: 18px; margin-bottom: 8px; }
.stat-card .stat-value { font-size: 24px; font-weight: 800; margin-bottom: 4px; }
.stat-card .stat-label { font-size: 13px; color: var(--text-secondary); }
/* Admin Hamburger Menu Button */
.admin-hamburger {
    display: none;
    background: none; border: none;
    font-size: 22px; cursor: pointer;
    padding: 4px 8px 4px 0;
    color: var(--text);
    line-height: 1;
}
.admin-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Responsive */
@media (max-width: 768px) {
    .main-nav, .header-actions { display: none; }
    .mobile-menu-btn { display: block; }
    .hero-slider { height: 240px; }
    .slide-caption { bottom: 20px; left: 20px; }
    .slide-caption h2 { font-size: 22px; }
    .section { padding: 40px 0; }
    .levels-grid { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
    .admin-hamburger { display: inline-flex; }
    .admin-sidebar { display: none; }
    .member-sidebar { display: none; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .article-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .footer-grid { grid-template-columns: 1fr; }
    .form-card { padding: 24px 16px; }
}
