﻿* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Microsoft YaHei", Arial, sans-serif;
    background: #f5f5f5;
    color: #333;
}

.header {
    background: #2d2250;
    color: white;
    padding: 15px 20px;
}

.header-inner {
    max-width: 1200px;
    margin: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: bold;
}

.nav a {
    color: white;
    margin-left: 20px;
    text-decoration: none;
}

.container {
    max-width: 1200px;
    margin: auto;
    padding: 20px;
}

.section-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.section-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    min-height: 160px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

    .section-card h3 {
        margin-top: 0;
    }

.post-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.post-card {
    background: white;
    padding: 15px;
    border-radius: 8px;
}

.footer {
    background: #1f1b2e;
    color: #ccc;
    margin-top: 40px;
}

.footer-inner {
    max-width: 1200px;
    margin: auto;
    padding: 30px 20px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.footer-col h4 {
    color: #fff;
    margin-bottom: 10px;
}

.footer-col p {
    font-size: 14px;
    line-height: 1.6;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col li {
    margin-bottom: 8px;
}

.footer-col a {
    color: #ccc;
    text-decoration: none;
}

.footer-col a:hover {
    color: #fff;
}

.form-box {
    background: white;
    max-width: 420px;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

    .form-box label {
        display: block;
        margin-top: 12px;
        margin-bottom: 5px;
    }

    .form-box input {
        width: 100%;
        padding: 10px;
        border: 1px solid #ccc;
        border-radius: 6px;
    }

    .form-box button {
        margin-top: 18px;
        width: 100%;
        padding: 12px;
        border: none;
        background: #2d2250;
        color: white;
        border-radius: 6px;
        cursor: pointer;
    }

.error {
    background: #ffe5e5;
    color: #a00000;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 6px;
}

.btn-main {
    display: inline-block;
    background: #2d2250;
    color: white;
    padding: 10px 16px;
    border-radius: 6px;
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.post-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.post-card {
    background: white;
    padding: 18px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

    .post-card h3 {
        margin-top: 0;
    }

    .post-card a {
        color: #2d2250;
        text-decoration: none;
    }

.post-meta {
    font-size: 13px;
    color: #777;
}

.tag {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 5px;
    font-size: 12px;
    margin-right: 5px;
}

.vip {
    background: #fff3cd;
    color: #8a6500;
}

.paid {
    background: #e5f0ff;
    color: #004a99;
}

.article-box {
    background: white;
    padding: 25px;
    border-radius: 10px;
}

.article-content {
    line-height: 1.8;
    font-size: 16px;
}

.paid-box {
    background: #f8f8f8;
    padding: 25px;
    border-radius: 8px;
    text-align: center;
}

.wide-form {
    max-width: 800px;
}

.form-box select,
.form-box textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
}


.profile-box {
    background: white;
    padding: 20px;
    border-radius: 10px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 25px;
}

.profile-avatar {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    background: #eee;
}

.my-post-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.my-post-card {
    background: white;
    padding: 18px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

    .my-post-card h3 {
        margin-top: 0;
    }

.my-post-actions {
    margin-top: 10px;
    font-size: 14px;
}

    .my-post-actions a {
        color: #2d2250;
        text-decoration: none;
    }

        .my-post-actions a:hover {
            text-decoration: underline;
        }


.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.admin-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

    .admin-card h3 {
        margin: 0;
        font-size: 28px;
        color: #2d2250;
    }

    .admin-card p {
        margin-top: 8px;
        color: #666;
    }

    .admin-card.warning {
        background: #fff3cd;
    }

.admin-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
@media (max-width: 768px) {
    .profile-box {
        flex-direction: column;
    }

    .profile-avatar {
        width: 90px;
        height: 90px;
    }
}

@media (max-width: 768px) {
    .post-list {
        grid-template-columns: 1fr;
    }

    .article-box {
        padding: 15px;
    }
}


.comments-box {
    margin-top: 30px;
    background: white;
    padding: 20px;
    border-radius: 10px;
}

.comment-item {
    border-bottom: 1px solid #eee;
    padding: 12px 0;
}

.comment-head {
    display: flex;
    justify-content: space-between;
    color: #666;
    font-size: 14px;
}

.comment-content {
    margin-top: 8px;
    line-height: 1.6;
}

.comment-actions {
    margin-top: 8px;
    font-size: 13px;
}

    .comment-actions a {
        color: #a00000;
        text-decoration: none;
    }

.comment-form textarea {
    width: 100%;
    padding: 10px;
    resize: vertical;
    border: 1px solid #ccc;
    border-radius: 6px;
}



.expert-box {
    margin-top: 30px;
    background: #fffaf0;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #f0d79c;
}

.expert-review {
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 4px solid #b8860b;
}

.expert-head {
    display: flex;
    justify-content: space-between;
    color: #665200;
    font-size: 14px;
}

.expert-rating {
    margin-top: 8px;
    font-weight: bold;
    color: #8a6500;
}

.expert-content {
    margin-top: 10px;
    line-height: 1.7;
}

.comment-form select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    margin-bottom: 10px;
}



.member-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.member-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.info-box {
    background: #eef7ee;
    color: #1f6b1f;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 15px;
}

.btn-danger {
    display: inline-block;
    background: #9c1c1c;
    color: white;
    padding: 10px 16px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
}


.chapter-row {
    background: white;
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
}

    .chapter-row a {
        text-decoration: none;
        color: #2d2250;
    }

.chapter-nav {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

@media (max-width: 768px) {
    .chapter-nav {
        flex-direction: column;
    }

        .chapter-nav .btn-main {
            text-align: center;
        }
}

.home-hero {
    min-height: 430px;
    background-image: url('/images/home-bg.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.home-hero-mask {
    width: 100%;
    min-height: 430px;
    background: rgba(20, 15, 45, 0.55);
    color: white;
    text-align: center;
    padding: 90px 20px;
}

.home-hero h1 {
    font-size: 48px;
    margin: 0 0 15px;
}

.home-hero p {
    font-size: 20px;
    margin-bottom: 35px;
}

.home-section-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
}

    .home-section-buttons a {
        display: inline-block;
        min-width: 120px;
        padding: 14px 22px;
        background: rgba(255,255,255,0.9);
        color: #2d2250;
        border-radius: 999px;
        text-decoration: none;
        font-weight: bold;
    }

        .home-section-buttons a:hover {
            background: #fff3cd;
        }

.home-icons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin: 35px 0;
}

.home-icon-card {
    background: white;
    border-radius: 14px;
    padding: 24px 18px;
    text-align: center;
    text-decoration: none;
    color: #333;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

    .home-icon-card:hover {
        transform: translateY(-3px);
    }

.home-icon {
    font-size: 38px;
    margin-bottom: 10px;
}

.home-icon-card h3 {
    margin: 8px 0;
    color: #2d2250;
}

.home-icon-card p {
    font-size: 14px;
    color: #666;
}

.featured-section {
    margin-top: 35px;
}

.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .section-title a {
        color: #2d2250;
        text-decoration: none;
    }

@media (max-width: 768px) {
    .home-hero h1 {
        font-size: 34px;
    }

    .home-hero p {
        font-size: 16px;
    }

    .home-section-buttons {
        flex-direction: column;
        align-items: center;
    }

        .home-section-buttons a {
            width: 80%;
        }

    .home-icons {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .home-icons {
        grid-template-columns: repeat(2, 1fr);
    }
}






@media (min-width: 769px) and (max-width: 1024px) {
    .post-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 响应式 */
@media (max-width: 768px) {
    .footer-inner {
        grid-template-columns: 1fr;
    }
}


@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .nav {
        margin-top: 10px;
    }

        .nav a {
            display: inline-block;
            margin: 5px 10px 5px 0;
        }

    .section-grid {
        grid-template-columns: 1fr;
    }

    .post-list {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .section-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .post-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

.site-header {
    background: #1d1633;
    color: white;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    max-width: 1200px;
    margin: auto;
    padding: 0 20px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-logo img {
    height: 46px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 18px;
}

    .main-nav > a,
    .nav-dropdown > span {
        color: white;
        text-decoration: none;
        cursor: pointer;
        padding: 10px 0;
    }

    .main-nav a:hover,
    .nav-dropdown span:hover {
        color: #ffe08a;
    }

.nav-dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    /*top: 40px;*/
    left: 0;
    background: white;
    min-width: 180px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

    .dropdown-menu a {
        display: block;
        padding: 12px 16px;
        color: #333;
        text-decoration: none;
    }

        .dropdown-menu a:hover {
            background: #f5f5f5;
        }

.nav-dropdown:hover .dropdown-menu {
    display: block;
}

/* 手机版汉堡按钮 */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 30px;
    cursor: pointer;
}

@media (max-width: 768px) {

    .mobile-menu-btn {
        display: block;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        background: #1d1633;
        flex-direction: column;
        align-items: stretch;
        padding: 10px 0;
    }

        .main-nav.show {
            display: flex;
        }

        .main-nav > a,
        .nav-dropdown > span {
            padding: 14px 20px;
            border-bottom: 1px solid rgba(255,255,255,0.08);
        }

    .dropdown-menu {
        position: static;
        display: block;
        background: #2a2145;
        box-shadow: none;
        border-radius: 0;
    }

        .dropdown-menu a {
            color: white;
            padding-left: 40px;
        }

            .dropdown-menu a:hover {
                background: rgba(255,255,255,0.08);
            }

    .nav-dropdown:hover .dropdown-menu {
        display: block;
    }
}

.user-menu {
    position: relative;
}

.user-menu-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 15px;
}

.nav-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    background: #eee;
}

.user-dropdown {
    display: none;
    position: absolute;
    right: 0;
    /*top: 45px;*/
    min-width: 180px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

    .user-dropdown a {
        display: block;
        padding: 12px 16px;
        color: #333;
        text-decoration: none;
    }

        .user-dropdown a:hover {
            background: #f5f5f5;
        }

    .user-dropdown hr {
        margin: 4px 0;
        border: none;
        border-top: 1px solid #eee;
    }

.user-menu:hover .user-dropdown {
    display: block;
}

@media (max-width: 768px) {
    .user-menu {
        padding: 10px 20px;
    }

    .user-menu-btn {
        width: 100%;
        justify-content: flex-start;
    }

    .user-dropdown {
        display: block;
        position: static;
        background: #2a2145;
        box-shadow: none;
        border-radius: 0;
        margin-top: 8px;
    }

        .user-dropdown a {
            color: white;
            padding-left: 40px;
        }

            .user-dropdown a:hover {
                background: rgba(255,255,255,0.08);
            }

        .user-dropdown hr {
            border-top-color: rgba(255,255,255,0.12);
        }
}
.user-home {
    background: #f5f5f5;
}

.user-cover {
    min-height: 320px;
    background-size: cover;
    background-position: center;
}

.user-cover-mask {
    min-height: 320px;
    background: rgba(0,0,0,0.45);
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.user-home-avatar {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    border: 4px solid white;
    object-fit: cover;
    background: #eee;
}

.user-cover-mask h1 {
    margin: 15px 0 5px;
}

.user-home-body {
    max-width: 1200px;
    margin: auto;
    padding: 25px 20px;
}

.user-bio-card {
    background: white;
    border-left: 5px solid var(--user-theme-color);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 25px;
}

.user-home .post-card h3 a {
    color: var(--user-theme-color);
}

/* 风格：古典 */
.theme-classic .user-cover-mask {
    background: linear-gradient( rgba(45,34,80,0.65), rgba(20,15,40,0.75) );
}

/* 风格：清新 */
.theme-light {
    background: #f9fbff;
}

    .theme-light .user-cover-mask {
        background: rgba(255,255,255,0.45);
        color: #333;
    }

/* 风格：深色 */
.theme-dark {
    background: #111;
    color: #eee;
}

    .theme-dark .user-bio-card,
    .theme-dark .post-card {
        background: #1f1f1f;
        color: #eee;
    }

/* 风格：粉色 */
.theme-pink {
    background: #fff4f7;
}

    .theme-pink .user-bio-card {
        border-left-color: #d65a8a;
    }

@media (max-width: 768px) {
    .user-cover,
    .user-cover-mask {
        min-height: 260px;
    }

    .user-home-avatar {
        width: 95px;
        height: 95px;
    }
}