/* == 全局样式 == */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #8B4513;
    --secondary-color: #D2691E;
    --accent-color: #CD853F;
    --text-color: #333333;
    --light-bg: #FAF0E6;
    --link-color: #FFFFFF;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

body {
    font-family: "Microsoft YaHei", "SimSun", serif;
    line-height: 1.8;
    color: var(--text-color);
    background: linear-gradient(135deg, #FAF0E6 0%, #FFEFD5 100%);
    min-height: 100vh;
}

a { text-decoration: none; color: inherit; transition: var(--transition); }

/* == 导航栏 == */
.navbar {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.logo {
    font-size: 28px;
    font-weight: bold;
    color: var(--link-color);
    padding: 15px 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.logo span { font-size: 14px; opacity: 0.9; margin-left: 10px; }

.nav-menu {
    display: flex;
    list-style: none;
    gap: 10px;
}

.nav-menu li a {
    display: block;
    padding: 6px 16px;
    color: var(--link-color);
    font-size: 16px;
    transition: var(--transition);
}

.nav-menu li a:hover,
.nav-menu li a.active { border-radius: 12px; background: rgba(255,255,255,0.2); }

/* 汉堡菜单样式 */
.menu-toggle {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    -webkit-transition: all 0.3s ease-in-out;
    transition: all 0.3s ease-in-out;
    background-color: var(--link-color);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .nav-menu {
        position: fixed;
        top: 80px;
        right: -100%;
        flex-direction: column;
        background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        z-index: 999;
        padding: 10px 20px;
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-menu li {
        margin: 5px 0;
    }
    
    .menu-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .menu-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .menu-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}

/* == Hero 区域 == */
.hero {
    background: linear-gradient(rgba(139,69,19,0.7), rgba(139,69,19,0.7)), url('../images/banner.jpg') center/cover;
    height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--link-color);
    position: relative;
    overflow: hidden;
}

.hero-content { position: relative; z-index: 1; }

.hero-content h1 {
    font-size: 52px;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    animation: fadeInDown 1s;
    letter-spacing: 8px;
}

.hero-content p {
    font-size: 20px;
    opacity: 0.95;
    animation: fadeInUp 1s 0.3s both;
    letter-spacing: 2px;
}

.hero-poem {
    margin-top: 30px;
    font-size: 16px;
    opacity: 0.9;
    line-height: 2;
    animation: fadeIn 1s 0.6s both;
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* == 首页特色 == */
.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin: 60px 0;
}

.feature-item {
    text-align: center;
    padding: 40px 30px;
    background: var(--link-color);
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.feature-item:hover {
    box-shadow: 0 10px 30px rgba(139,69,19,0.15);
}

.feature-item .icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: var(--link-color);
}

.feature-item h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 20px;
}

.feature-item p {
    color: #666;
    font-size: 14px;
    line-height: 1.8;
}

@media (max-width: 768px) {
    .features { grid-template-columns: 1fr; }
}

/* 每日推荐 */
.daily-poem {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 16px;
    padding: 50px;
    color: var(--link-color);
    text-align: center;
    margin: 60px 0;
    position: relative;
    overflow: hidden;
}

.daily-poem::before {
    content: '"';
    position: absolute;
    top: 20px;
    left: 30px;
    font-size: 120px;
    opacity: 0.1;
    font-family: Georgia, serif;
}

.daily-poem h3 {
    font-size: 14px;
    opacity: 0.8;
    letter-spacing: 3px;
    margin-bottom: 20px;
}

.daily-poem h2 {
    font-size: 28px;
    margin-bottom: 15px;
}

.daily-poem p {
    font-size: 18px;
    line-height: 2;
    margin-bottom: 20px;
}

.daily-poem .author {
    opacity: 0.9;
    font-size: 14px;
}

/* == 主内容区域 == */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 30px;
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
}

.section-title h2 {
    font-size: 32px;
    color: var(--primary-color);
    margin-bottom: 10px;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--accent-color);
}

/* 朝代表签 */
.dynasty-tabs {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.dynasty-tabs a {
    padding: 10px 25px;
    background: var(--link-color);
    border-radius: 25px;
    box-shadow: var(--shadow);
    font-size: 14px;
}

.dynasty-tabs a:hover,
.dynasty-tabs a.active {
    background: var(--primary-color);
    color: var(--link-color);
}

/* == 诗文卡片 == */
.poetry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.poetry-card {
    border-top: 4px solid var(--link-color);
    background: var(--link-color);
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.poetry-card:hover {
    border-top: 4px solid var(--primary-color);
    box-shadow: 0 8px 25px rgba(139,69,19,0.2);
}

.poetry-card .title {
    font-size: 20px;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 10px;
}

.poetry-card .author {
    color: #666;
    font-size: 14px;
    text-align: center;
    margin-bottom: 15px;
}

.poetry-card .content {
    color: var(--text-color);
    font-size: 15px;
    line-height: 2;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.poetry-card .tags {
    margin-top: 15px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tag {
    background: var(--light-bg);
    color: var(--primary-color);
    padding: 3px 12px;
    border-radius: 15px;
    font-size: 12px;
}

/* == 作者卡片 == */
.author-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.author-card {
    border-top: 4px solid var(--link-color);
    background: var(--link-color);
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.author-card:hover {
    border-top: 4px solid var(--primary-color);
    box-shadow: 0 8px 25px rgba(139,69,19,0.2);
}

.author-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: 0 auto 15px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: var(--link-color);
}

.author-avatar img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
}

.author-card .name {
    font-size: 20px;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.author-card .dynasty {
    color: #999;
    font-size: 14px;
    margin-bottom: 10px;
}

.author-card .count {
    background: var(--light-bg);
    display: inline-block;
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 13px;
    color: var(--secondary-color);
}

/* == 收藏卡片 == */
.fav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

.fav-card {
    border-top: 2px solid var(--link-color);
    background: var(--link-color);
    color: var(--primary-color);
    border-radius: 8px;
    padding: 8px 16px;
    text-align: center;
    cursor: pointer;
    box-shadow: var(--shadow);
}

.fav-card:hover {
    border-top: 2px solid var(--primary-color);
    box-shadow: 0 8px 25px rgba(139,69,19,0.2);
}

/* == 作者头部 == */
.author-header {
    background: linear-gradient(rgba(139,69,19,0.85), rgba(139,69,19,0.85)), url('../images/author.jpg') center/cover;
    padding: 60px 20px;
    color: var(--link-color);
    position: relative;
}

.author-header-content {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    gap: 40px;
    align-items: center;
}

.author-avatar-large {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-color), #DEB887);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 72px;
    font-weight: bold;
    color: var(--link-color);
    flex-shrink: 0;
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
    border: 5px solid rgba(255,255,255,0.3);
}

.author-avatar-large img {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
}

.author-info h1 {
    font-size: 42px;
    margin-bottom: 12px;
    letter-spacing: 4px;
}

.author-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
    font-size: 16px;
    opacity: 0.95;
}

.author-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.author-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.author-tag {
    background: rgba(255,255,255,0.2);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    backdrop-filter: blur(5px);
}

/* == 生平简介 == */
.section-card {
    background: var(--link-color);
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.section-title {
    font-size: 22px;
    color: var(--primary-color);
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--light-bg);
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title::before {
    content: '';
    width: 4px;
    height: 22px;
    background: linear-gradient(180deg, var(--primary-color), var(--accent-color));
    border-radius: 2px;
}

.biography-content {
    font-size: 16px;
    line-height: 2;
    color: #555;
}

.biography-content p {
    text-indent: 2em;
    margin-bottom: 15px;
}

/* == 诗文列表 == */
.poems-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.poem-item {
    background: var(--light-bg);
    border-radius: 8px;
    padding: 20px;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.poem-item:hover {
    background: #FFF8F0;
    border-left-color: var(--primary-color);
}

.poem-item .title {
    font-size: 18px;
    color: var(--primary-color);
    margin-bottom: 8px;
    font-weight: 600;
}

.poem-item .excerpt {
    font-size: 14px;
    color: #666;
    line-height: 1.8;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.poem-item .meta {
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #999;
}

.poem-item .tag {
    background: var(--link-color);
    color: var(--primary-color);
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 12px;
}

.view-more {
    text-align: center;
    margin-top: 20px;
}

.view-more a {
    display: inline-block;
    padding: 12px 35px;
    background: var(--light-bg);
    color: var(--primary-color);
    border-radius: 25px;
    font-size: 15px;
}

.view-more a:hover {
    background: var(--primary-color);
    color: var(--link-color);
}

/* 名句列表 */
.quotes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.quotes-card {
    border-top: 4px solid var(--link-color);
    background: var(--link-color);
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.quotes-card:hover {
    border-top: 4px solid var(--primary-color);
    box-shadow: 0 8px 25px rgba(139,69,19,0.2);
}

.quotes-card .content {
    font-size: 16px;
    color: var(--text-color);
    line-height: 1.8;
    margin-bottom: 15px;
    font-style: italic;
}

.quotes-card .author {
    color: #666;
    font-size: 14px;
    margin-bottom: 5px;
    text-align: right;
}

.quotes-card .source {
    color: #999;
    font-size: 12px;
    text-align: right;
}

/* == 侧边栏 == */
.sidebar-card {
    background: var(--link-color);
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--shadow);
    margin-bottom: 25px;
}

.sidebar-title {
    font-size: 18px;
    color: var(--primary-color);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--light-bg);
}

.stats-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: var(--light-bg);
    border-radius: 8px;
}

.stat-item .label { color: #666; font-size: 14px; }

.stat-item .value {
    font-size: 20px;
    font-weight: bold;
    color: var(--primary-color);
}

/* 同朝代作者 */
.related-authors {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.related-author {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 8px;
    transition: var(--transition);
}

.related-author:hover {
    background: var(--light-bg);
}

.related-author .avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--link-color);
    font-size: 18px;
    font-weight: bold;
}

.related-author .avatar img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
}

.related-author .info .name {
    font-size: 15px;
    color: var(--text-color);
}

.related-author .info .count {
    font-size: 12px;
    color: #999;
}

/* 名句摘录 */
.quote-card {
    background: var(--light-bg);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.quote-card:hover {
    background: #FFF8F0;
    border-left-color: var(--primary-color);
}

.quote-card .content {
    font-size: 15px;
    color: #555;
    line-height: 2;
    font-style: italic;
}

.quote-card .source {
    margin-top: 10px;
    color: #999;
    font-size: 13px;
    text-align: right;
}

/* == 详情页 == */
.detail-container {
    background: var(--link-color);
    border-radius: 12px;
    padding: 50px;
    box-shadow: var(--shadow);
    max-width: 800px;
    margin: 40px auto;
}

.detail-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid var(--light-bg);
}

.detail-header h1 {
    font-size: 36px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.detail-header .meta { color: #666; font-size: 16px; }

.detail-content {
    margin-bottom: 40px;
}

.detail-content div {
    font-size: 20px;
    line-height: 2.5;
    text-align: center;
    white-space: pre-line;
}

.detail-content p {
    font-size: 20px;
    line-height: 2.5;
    text-align: left;
    text-indent: 2em;
}

.detail-card {
    border-left: 3px solid var(--light-bg);
    background: var(--light-bg);
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.detail-card:hover {
    background: #FFF8F0;
    border-left: 3px solid var(--primary-color);
}

.detail-card h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 18px;
}

.detail-card p {
    text-indent: 2em;
    white-space: pre-line;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.detail-tag {
    background: var(--primary-color);
    color: var(--link-color);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    backdrop-filter: blur(5px);
}

.detail-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}
.detail-nav a {
    color: var(--primary-color);
    padding: 10px 20px;
    background: var(--light-bg);
    border-radius: 8px;
}
.detail-nav a:hover { background: var(--primary-color); color: var(--link-color); }

/* == 表单样式 == */
.form-container {
    max-width: 450px;
    margin: 50px auto;
    background: var(--link-color);
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.form-container h2 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 30px;
}

.form-group { margin-bottom: 20px; }

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-color);
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    outline: none;
    padding: 12px 15px;
    border: 2px solid #E0D5C7;
    border-radius: 8px;
    font-size: 15px;
    transition: var(--transition);
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}
.form-group textarea { min-height: 150px; resize: vertical; }
.form-submit {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px; 
}
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 20px;
    margin-top: 10px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}
.btn {
    display: inline-block;
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--link-color);
    width: auto;
}
.btn-primary:hover { box-shadow: 0 4px 15px rgba(139,69,19,0.3); }
.btn-secondary { background: var(--light-bg); color: var(--primary-color); }
.btn-danger { background: #dc3545; color: var(--link-color); }
.btn-success { background: #28a745; color: var(--link-color); }
.btn-sm { padding: 6px 15px; font-size: 13px; }

/* 通知样式 */
.notification {
    position: fixed;
    top: 80px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 4px;
    color: white;
    font-size: 14px;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    animation: slideIn 0.3s ease-out;
}

.notification.success {
    background-color: #52c41a;
}

.notification.error {
    background-color: #ff4d4f;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 卡片样式 */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.card {
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background-color: #f5f5f5;
    border-bottom: 1px solid #e8e8e8;
}

.card-id {
    font-size: 12px;
    color: #666;
}

.card-status {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 500;
}

.card-status.success {
    background-color: #f6ffed;
    color: #52c41a;
    border: 1px solid #b7eb8f;
}

.card-status.warning {
    background-color: #fff7e6;
    color: #fa8c16;
    border: 1px solid #ffd591;
}

.card-body {
    padding: 20px;
}

.card-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.card-footer {
    padding: 12px 16px;
    background-color: #f9f9f9;
    border-top: 1px solid #e8e8e8;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

/* === 管理登录 === */
.login-page {
    width: 100%;
    height: 100%;
    position: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
}
.login-container {
    max-width: 450px;
    background: var(--link-color);
    padding: 40px 60px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}
.login-container h2 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 10px;
}
.login-header {
    font-size: 18px;
    color: #666666;
    text-align: center;
    margin-bottom: 10px;
}
.login-container button {
    width: 100%;
}
.login-group {
    display: flex;
    align-items: center;
    margin: 10px 0;
    font-size: 15px;
    color: #666;
}
.login-group input {
    width: auto;
    padding: 12px 15px;
    border: 2px solid #E0D5C7;
    border-radius: 8px;
    font-size: 15px;
    transition: var(--transition);
    font-family: inherit;
}
.login-group input:focus { outline: none; border-color: var(--primary-color); }
.login-footer { text-align: center; margin-top: 25px; font-size: 14px; color: #888; }

/* === 后台管理样式 === */
.admin-container { display: flex; min-height: 100vh; }

.admin-sidebar {
    width: 250px;
    background: linear-gradient(180deg, var(--primary-color), #5D2E0C);
    color: var(--link-color);
    padding: 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.admin-logo {
    padding: 20px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    font-size: 24px;
}

.admin-logo small {
    display: block;
    font-size: 12px;
    opacity: 0.7;
    margin-top: 5px;
    font-weight: normal;
}

.admin-menu { list-style: none; padding: 20px 0; }

.admin-menu li a {
    display: flex;
    align-items: center;
    padding: 15px 25px;
    color: var(--link-color);
    border-left: 4px solid transparent;
    transition: var(--transition);
}

.admin-menu li a:hover,
.admin-menu li a.active {
    background: rgba(255,255,255,0.1);
    border-left: 4px solid var(--link-color);
}

.admin-menu li a .icon {
    width: 20px;
    margin-right: 12px;
    display: flex;
    align-items: center;
    text-align: center;
}

.admin-main {
    flex: 1;
    margin-left: 250px;
    background: #F5F5F5;
    min-height: 100vh;
}

.admin-header {
    background: var(--link-color);
    padding: 20px 30px;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.admin-header h1 {
    font-size: 22px;
    color: var(--primary-color);
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 15px;
}

.admin-user span { color: #666; }

.admin-user a { color: #dc3545; display: inline-flex; align-items: center; gap: 6px; }

.admin-content {
    padding: 30px;
}

.admin-card {
    background: var(--link-color);
    padding: 25px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.admin-card h3 {
    padding-bottom: 10px;
    color: var(--primary-color);
}

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--link-color);
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
}

.stat-card h3 {
    font-size: 42px;
    margin-bottom: 10px;
    position: relative;
}

.stat-card p {
    opacity: 0.9;
    position: relative;
}

.stat-card.green { background: linear-gradient(135deg, #2d8659, #3da35d); }
.stat-card.blue { background: linear-gradient(135deg, #1e5799, #2989d8); }
.stat-card.orange { background: linear-gradient(135deg, #d2691e, #e67e22); }

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}


.quick-actions { display: flex; gap: 15px; flex-wrap: wrap; }
.quick-actions a { padding: 15px 25px; background: var(--light-bg); color: var(--primary-color); border-radius: 8px; display: flex; align-items: center; gap: 8px; }
.quick-actions a:hover { background: var(--primary-color); color: var(--link-color); }
.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 15px; }
.toolbar .search { display: flex; gap: 10px; }
.toolbar input { padding: 10px 15px; border: 2px solid #E0D5C7; border-radius: 6px; width: 250px; }
.toolbar select { padding: 10px 15px; border: 2px solid #E0D5C7; border-radius: 6px; background: var(--white); }
@media (max-width: 768px) { .toolbar { flex-direction: column; align-items: stretch; } .toolbar .search { flex-wrap: wrap; } .toolbar input { width: 100%; } }

/* == 搜索框 == */
.search-box {
    max-width: 600px;
    margin: 30px auto;
    display: flex;
    gap: 10px;
}

.search-box input {
    flex: 1;
    padding: 15px 25px;
    border: 2px solid #E0D5C7;
    border-radius: 30px;
    font-size: 16px;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.search-box button {
    padding: 15px 35px;
    background: var(--primary-color);
    color: var(--link-color);
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: var(--transition);
}

.search-box button:hover { background: var(--secondary-color); }

/* == 筛选器 == */
.filter-bar {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
}

.filter-bar select {
    padding: 10px 20px;
    border: 2px solid #E0D5C7;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    background: var(--link-color);
}

.filter-bar select:focus { outline: none; border-color: var(--primary-color); }

/* == 页脚 == */
.footer {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--link-color);
    text-align: center;
    padding: 40px 20px;
    margin-top: 50px;
}

.footer p { opacity: 0.9; margin: 5px 0; }

.ga img {
    display: inline-block;
    vertical-align: middle;
    margin: 0 5px;
}

/* == 分页 == */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
}

.pagination a {
    padding: 10px 16px;
    background: var(--link-color);
    border-radius: 5px;
    box-shadow: var(--shadow);
    color: var(--primary-color);
}

.pagination a:hover,
.pagination a.active {
    background: var(--primary-color);
    color: var(--link-color);
}

/* == 提示信息 == */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* == 页面标签页 == */
.page-tabs {
    display: flex;
    border-bottom: 2px solid #eee;
    margin-bottom: 25px;
}

.page-tabs a {
    padding: 12px 25px;
    color: #666;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.page-tabs a:hover,
.page-tabs a.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* == 响应式 == */
@media (max-width: 768px) {
    .hero-content h1 { font-size: 32px; letter-spacing: 4px; }
    .detail-container { padding: 25px; }
    .admin-sidebar { 
width: 60px; 
overflow: hidden;
    }
    .admin-sidebar .logo { font-size: 16px; display: none; }
    .admin-sidebar .logo small { display: none; }
    .admin-menu li a { 
padding: 15px 20px; 
justify-content: center;
    }
    .admin-menu li a span { display: none; }
    .admin-menu li a .icon { 
margin-right: 0; 
width: 24px; 
height: 24px;
    }
    .admin-main { margin-left: 60px; }
    .admin-header h1 { font-size: 18px; }
}

/* 表单行布局 */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 600px) {
    .form-row { grid-template-columns: 1fr; }
}

/* 设置表单 */
.settings-section {
    margin-bottom: 40px;
}

.settings-section h4 {
    color: var(--primary-color);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

/* == 响应式 == */
@media (max-width: 900px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .author-header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .author-meta {
        justify-content: center;
    }
    
    .author-tags {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .author-avatar-large {
        width: 120px;
        height: 120px;
        font-size: 52px;
    }
    .author-avatar-large img {
        width: 120px;
        height: 120px;
    }
    
    .author-info h1 { font-size: 32px; }
}