/* 前台公共样式 */

:root {
    --primary: #1677ff;
    --primary-hover: #0f62d8;
    --primary-light: #eef6ff;
    --primary-soft: #e8f2ff;
    --bg-page: #f5f8fc;
    --bg-card: #ffffff;
    --text-primary: #172033;
    --text-secondary: #5d667a;
    --text-muted: #99a3b7;
    --border: #dfe6f1;
    --border-light: #edf2f8;
    --danger: #ff4d4f;
    --success: #2fc963;
    --warning: #ffae22;
    --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
    --radius: 10px;
    --radius-sm: 6px;
    --shadow-sm: 0 6px 18px rgba(24, 62, 120, .06);
    --shadow-md: 0 14px 34px rgba(24, 62, 120, .1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
html::-webkit-scrollbar { width: 0; height: 0; }
body {
    min-width: 320px;
    font-family: var(--font);
    font-size: 15px;
    color: var(--text-primary);
    line-height: 1.65;
    background: var(--bg-page);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
body::-webkit-scrollbar { width: 0; height: 0; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; }
button, input { font: inherit; }

.home-container { max-width: 1440px; margin: 0 auto; padding: 0 28px; }

.home-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 64px;
    background: rgba(255, 255, 255, .94);
    border-bottom: 1px solid rgba(36, 76, 130, .12);
    box-shadow: 0 4px 16px rgba(38, 69, 111, .05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.home-header .home-container {
    display: flex;
    align-items: center;
    height: 100%;
    gap: 34px;
}

.home-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}
.home-logo-img { height: 38px; width: auto; border-radius: 10px; }
.home-logo-mark {
    position: relative;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: linear-gradient(145deg, #0f7bff, #2468f2);
    box-shadow: 0 8px 18px rgba(22, 119, 255, .28);
}
.home-logo-mark::before {
    content: "";
    position: absolute;
    inset: 9px;
    border: 5px solid #fff;
    border-radius: 5px;
    transform: rotate(45deg);
}
.home-logo-text {
    color: #0f172a;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0;
    white-space: nowrap;
}

.home-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    flex: 1;
    height: 100%;
}
.home-nav-item {
    position: relative;
    display: inline-flex;
    align-items: center;
    height: 100%;
    color: #111827;
    font-size: 15px;
    font-weight: 500;
    white-space: nowrap;
    transition: color .2s;
}
.home-nav-item:hover,
.home-nav-item.active { color: var(--primary); }
.home-nav-item.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: var(--primary);
}
.home-nav-dropdown { position: relative; }
.home-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: -16px;
    min-width: 148px;
    padding: 8px;
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    box-shadow: var(--shadow-md);
}
.home-nav-dropdown:hover .home-dropdown-menu { display: block; }
.home-dropdown-item {
    display: block;
    padding: 9px 12px;
    color: var(--text-secondary);
    border-radius: 7px;
    font-size: 14px;
}
.home-dropdown-item:hover { color: var(--primary); background: var(--primary-light); }

.home-header-right {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}
.home-top-search {
    display: flex;
    width: 278px;
    height: 38px;
    overflow: hidden;
    border: 1px solid #d8e0ec;
    border-radius: 7px;
    background: #fff;
}
.home-top-search input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    padding: 0 14px;
    color: var(--text-primary);
}
.home-top-search button {
    width: 44px;
    border: 0;
    background: var(--primary);
    color: #fff;
    cursor: pointer;
    font-size: 21px;
    line-height: 1;
}
.home-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 66px;
    height: 38px;
    padding: 0 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    transition: all .2s;
    white-space: nowrap;
}
.home-btn-primary {
    color: #fff;
    background: var(--primary);
    box-shadow: 0 8px 18px rgba(22, 119, 255, .22);
}
.home-btn-primary:hover { color: #fff; background: var(--primary-hover); }
.home-btn-outline {
    color: #1f2937;
    background: #fff;
    border: 1px solid #d9e1ec;
}
.home-btn-outline:hover { color: var(--primary); border-color: var(--primary); }

.home-mobile-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border: 0;
    background: transparent;
    cursor: pointer;
}
.home-mobile-toggle span,
.home-mobile-toggle::before,
.home-mobile-toggle::after {
    display: block;
    width: 22px;
    height: 2px;
    margin: 5px auto;
    content: "";
    border-radius: 2px;
    background: #172033;
}

.home-main { min-height: calc(100vh - 64px - 150px); }

.home-footer {
    margin-top: 36px;
    background: #172033;
    color: rgba(255, 255, 255, .65);
    padding: 36px 0 26px;
}
.home-footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 28px;
}
.home-footer-info p { margin-bottom: 4px; font-size: 14px; }
.home-footer-info a,
.home-footer-links a { color: rgba(255, 255, 255, .68); }
.home-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    font-size: 14px;
}
.home-footer a:hover { color: #fff; }

.home-logo-placeholder,
.site-avatar-text {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-weight: 800;
    background: var(--primary-light);
}
.home-empty { padding: 46px 20px; color: var(--text-muted); text-align: center; }
.home-pagination { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 28px; }
.home-pagination a,
.home-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    border-radius: 8px;
    font-size: 14px;
}
.home-pagination a { background: #fff; border: 1px solid var(--border); color: var(--text-secondary); }
.home-pagination a:hover,
.home-pagination a.current { border-color: var(--primary); color: var(--primary); }
.home-pagination span.current { color: #fff; background: var(--primary); }
.home-pagination span.disabled { opacity: .5; color: var(--text-muted); }

@media (max-width: 1100px) {
    .home-header .home-container { gap: 20px; }
    .home-nav { gap: 14px; }
    .home-top-search { width: 220px; }
}

@media (max-width: 900px) {
    .home-header-right { display: none; }
    .home-mobile-toggle { display: block; margin-left: auto; }
    .home-nav {
        display: none;
        position: absolute;
        left: 0;
        right: 0;
        top: 64px;
        height: auto;
        padding: 10px 22px 16px;
        background: #fff;
        border-bottom: 1px solid var(--border-light);
        box-shadow: var(--shadow-md);
    }
    .home-nav.is-open { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; }
    .home-nav-item { height: 38px; }
    .home-nav-item.active::after { display: none; }
}

@media (max-width: 640px) {
    .home-container { padding: 0 16px; }
    .home-logo-text { font-size: 19px; }
    .home-footer-inner { flex-direction: column; }
}
