/* 全站共用：头部、导航、友情链接区、页脚（母版 Site.Master） */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI','Microsoft YaHei',sans-serif;
}

:root {
    --primary: #E94373;
    --primary-light: #f06b90;
    --primary-bg: #fde8ef;
    --accent-green: #4caf50;
    --accent-orange: #ff9800;
    --accent-purple: #9c27b0;
    --accent-red: #f44336;
    --dark: #333;
    --mid: #666;
    --light: #f5f5f5;
    --white: #fff;
    --radius: 8px;
    --shadow: 0 4px 12px rgba(0,0,0,0.08);
    --tr: all 0.3s ease;
}

body {
    background: var(--light);
    color: var(--dark);
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid #eee;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.site-logo {
    height: 60px;
    width: auto;
    max-width: 320px;
    display: block;
    object-fit: contain;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.search-box {
    position: relative;
    width: 280px;
}

.search-box input {
    width: 100%;
    padding: 9px 14px 9px 38px;
    border: 1px solid #ddd;
    border-radius: var(--radius);
    font-size: 15px;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(233,67,115,0.15);
}

.search-box i {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--mid);
}

.auth-buttons {
    display: flex;
    gap: 8px;
}

.btn {
    padding: 9px 18px;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--tr);
    border: none;
    font-size: 15px;
}

.btn-login {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
}

.btn-login:hover {
    background: var(--primary-bg);
}

.btn-register {
    background: var(--primary);
    color: #fff;
}

.btn-register:hover {
    background: var(--primary-light);
}

.auth-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.auth-user-name {
    font-size: 14px;
    color: var(--mid);
}

.auth-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: none;
}

.auth-modal.open {
    display: block;
}

.auth-modal-mask {
    position: absolute;
    inset: 0;
    background: rgba(17, 24, 39, 0.55);
    backdrop-filter: blur(2px);
}

.auth-modal-card {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 92%;
    max-width: 450px;
    transform: translate(-50%, -50%);
    background: linear-gradient(180deg, #ffffff 0%, #fffdfd 100%);
    border: 1px solid rgba(233,67,115,0.16);
    border-radius: 16px;
    padding: 24px 22px 22px;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.25);
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    overscroll-behavior: contain;
}

.auth-close {
    position: absolute;
    top: 10px;
    right: 12px;
    border: none;
    background: transparent;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 22px;
    line-height: 1;
    color: #9ca3af;
    cursor: pointer;
    transition: var(--tr);
}

.auth-close:hover {
    color: #6b7280;
    background: #f3f4f6;
}

.auth-brand {
    margin-bottom: 14px;
    padding-right: 26px;
}

.auth-brand h3 {
    font-size: 18px;
    line-height: 1.3;
    margin-bottom: 4px;
    color: #111827;
    font-weight: 700;
}

.auth-brand p {
    font-size: 12px;
    color: #6b7280;
    letter-spacing: .2px;
}

.auth-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.auth-tab {
    flex: 1;
    border: 1px solid #eceff4;
    background: #f8fafc;
    color: #6b7280;
    border-radius: 10px;
    padding: 9px 0;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: var(--tr);
}

.auth-tab.active {
    background: #fff;
    border-color: rgba(233,67,115,0.35);
    color: var(--primary);
    box-shadow: 0 4px 14px rgba(233,67,115,0.12);
}

.auth-panel {
    display: none;
}

.auth-panel.active {
    display: block;
}

.auth-field {
    margin-bottom: 12px;
}

.auth-field label {
    display: block;
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 5px;
    letter-spacing: .2px;
}

.auth-field input {
    width: 100%;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 14px;
    background: #fff;
    transition: var(--tr);
}

.auth-field select {
    width: 100%;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 14px;
    background: #fff;
    transition: var(--tr);
}

.auth-field input:focus,
.auth-field select:focus,
.auth-area-row select:focus {
    outline: none;
    border-color: rgba(233,67,115,0.45);
    box-shadow: 0 0 0 3px rgba(233,67,115,0.12);
}

.auth-area-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.auth-area-row select {
    width: 100%;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px 8px;
    font-size: 13px;
    background: #fff;
}

.auth-submit {
    width: 100%;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    padding: 11px 0;
    margin-top: 6px;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(233,67,115,0.22);
    transition: var(--tr);
}

.auth-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(233,67,115,0.26);
}

.auth-message-wrap {
    margin-bottom: 12px;
}

.auth-message {
    font-size: 13px;
    color: #b42318;
    background: #fff5f5;
    border: 1px solid #ffd8d8;
    border-radius: 8px;
    padding: 9px 11px;
}

@media (max-width: 576px) {
    .auth-modal-card {
        width: 94%;
        top: 50%;
        transform: translate(-50%, -50%);
        max-height: calc(100vh - 20px);
        padding: 18px 14px 14px;
        border-radius: 14px;
    }
    .auth-area-row {
        grid-template-columns: 1fr;
    }
}

nav {
    padding: 12px 0;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 28px;
    flex-wrap: wrap;
}

.nav-menu a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 600;
    font-size: 16px;
    transition: var(--tr);
    padding-bottom: 4px;
}

.nav-menu a:hover {
    color: var(--primary);
}

.nav-menu a.active {
    color: var(--primary);
    border-bottom: 3px solid var(--primary);
}

.friend-links {
    background: var(--white);
    border-top: 3px solid var(--primary);
    padding: 22px 0;
    box-shadow: var(--shadow);
}

.friend-links-header {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.friend-links-list {
    display: grid;
    grid-template-columns: repeat(5,1fr);
    gap: 14px;
}

.friend-link-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 9px;
    padding: 14px 10px;
    border: 1px solid #eee;
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--dark);
    transition: var(--tr);
    background: #fafafa;
}

.friend-link-item:hover {
    border-color: var(--primary);
    background: var(--primary-bg);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(233,67,115,.12);
}

.friend-link-logo {
    height: 46px;
    object-fit: contain;
    border-radius: 4px;
}

.friend-link-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--dark);
    text-align: center;
}

.friend-link-item:hover .friend-link-name {
    color: var(--primary);
}

footer {
    background: #333;
    color: #fff;
    padding: 46px 0 0;
}

.footer-main {
    display: grid;
    /* 中间列至少容纳两个 120px 二维码 + 间距，避免 flex 子项换行 */
    grid-template-columns: minmax(0, 2fr) minmax(272px, auto) minmax(0, 1.5fr);
    gap: 44px;
    padding-bottom: 34px;
    border-bottom: 1px solid #444;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.footer-logo .site-logo {
    height: 52px;
    max-width: 280px;
}

.footer-desc {
    color: #bbb;
    line-height: 1.8;
    font-size: 13px;
}

.footer-qrcodes {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 24px 32px;
    align-items: flex-start;
    justify-content: center;
}

.footer-qr-item {
    flex: 0 0 auto;
    text-align: center;
    min-width: 120px;
}

.footer-qrcodes h4,
.footer-contact h4 {
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #555;
}

.footer-qr-item .footer-qr-img {
    display: block;
    width: 120px;
    height: 120px;
    margin: 0 auto;
    object-fit: contain;
    background: #fff;
    border-radius: 6px;
    padding: 4px;
}

.footer-contact ul {
    list-style: none;
}

.footer-contact li {
    color: #bbb;
    font-size: 13px;
    margin-bottom: 9px;
    display: flex;
    align-items: flex-start;
    gap: 9px;
    line-height: 1.6;
}

.footer-contact li i {
    color: var(--primary);
    margin-top: 3px;
    flex-shrink: 0;
    width: 13px;
}

.footer-bottom {
    padding: 16px 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
    align-items: center;
}

.footer-bottom-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 6px;
    font-size: 12px;
}

.footer-bottom-links a {
    color: #999;
    text-decoration: none;
    transition: var(--tr);
}

.footer-bottom-links a:hover {
    color: #fff;
}

.footer-divider {
    color: #555;
}

.footer-bottom-copy {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    font-size: 12px;
    color: #777;
}

@media(max-width:992px) {
    .footer-main {
        grid-template-columns: 1fr 1fr;
    }
    .footer-brand {
        grid-column: 1/-1;
    }
}

@media(max-width:768px) {
    .header-top {
        flex-direction: column;
        gap: 16px;
    }
    .search-box {
        width: 100%;
    }
    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
    }
    .friend-links-list {
        grid-template-columns: repeat(3,1fr);
    }
}

@media(max-width:576px) {
    .footer-main {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .friend-links-list {
        grid-template-columns: repeat(2,1fr);
    }
}
