/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    font-family: "Helvetica Neue", Helvetica, Arial, "Microsoft YaHei", "微软雅黑", sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #0056b3;
}

/* Page Container */
.page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Top Bar */
.top-bar {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 5px 0;
    font-size: 12px;
}

.top-bar .content-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-right {
    margin-left: auto;
}

.top-bar-right ul {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
}

.top-bar-right ul li a {
    color: #ecf0f1;
    text-decoration: none;
}

.top-bar-right ul li a:hover {
    color: #3498db;
}

/* Content Wrapper */
.content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    width: 100%;
}

/* Header */
header {
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 12px 0;
}

.compact-header {
    padding: 8px 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.site-logo {
    flex-shrink: 0;
}

.site-logo a {
    text-decoration: none;
    color: #333;
    font-size: 20px;
    font-weight: bold;
    display: flex;
    align-items: center;
}

.site-logo a:hover {
    color: #007bff;
}

.site-header {
    text-align: center;
    margin-bottom: 20px;
}

.site-title a {
    text-decoration: none;
    color: #333;
}

.site-title h1 {
    font-size: 36px;
    font-weight: bold;
    margin: 0 0 10px 0;
    color: #2c3e50;
}

.site-title h2 {
    font-size: 18px;
    font-weight: normal;
    margin: 0;
    color: #7f8c8d;
}

/* Navigation */
.main-nav {
    flex: 1;
    display: flex;
    align-items: center;
}

#menu {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
    overflow-x: auto;
    justify-content: center;
}

#menu li {
    flex-shrink: 0;
}

#menu li a {
    display: block;
    padding: 8px 15px;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

#menu li a:hover,
#menu li a.active {
    color: #007bff;
    border-bottom-color: #007bff;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}

/* Search Form */
.search-form {
    display: flex;
    align-items: center;
    gap: 5px;
}

.search-input {
    width: 200px;
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s ease;
}

.search-input:focus {
    border-color: #007bff;
}

.search-button {
    padding: 6px 12px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s ease;
}

.search-button:hover {
    background: #0056b3;
}

/* User Navigation */
.user-nav {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 14px;
    flex-shrink: 0;
}

.user-nav a {
    color: #666;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.user-nav a:hover {
    color: #007bff;
    background-color: #f0f0f0;
}

/* Main Content Area */
.main {
    flex: 1;
    padding: 30px 0;
}

#body {
    width: 100%;
}

/* Featured Section */
.featured {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 60px 0;
    text-align: center;
}

.featured hgroup .title {
    margin-bottom: 20px;
}

.featured h1 {
    font-size: 48px;
    font-weight: bold;
    margin: 0 0 15px 0;
}

.featured h2 {
    font-size: 24px;
    font-weight: normal;
    margin: 0;
    opacity: 0.9;
}

.featured p {
    font-size: 18px;
    opacity: 0.95;
    margin: 20px 0 0 0;
}

/* Main Content Section */
.content-wrapper.main-content {
    padding: 20px 15px;
}

.content-wrapper.main-content article {
    background: white;
    border-radius: 5px;
    padding: 25px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.content-wrapper.main-content article h1 {
    font-size: 28px;
    margin-bottom: 20px;
    color: #2c3e50;
}

.content-wrapper.main-content article h1 a {
    color: #2c3e50;
    text-decoration: none;
}

.content-wrapper.main-content article h1 a:hover {
    color: #007bff;
}

.content-wrapper.main-content article h4 {
    margin: 15px 0;
    font-size: 16px;
}

.biaoqian {
    display: inline-block;
    padding: 3px 8px;
    margin-right: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white !important;
    text-decoration: none;
    border-radius: 3px;
    font-size: 13px;
    font-weight: normal;
}

.wenzhang_zhaiyao {
    margin: 10px 0;
    padding: 10px 0;
    color: #555;
    line-height: 1.8;
    font-size: 14px;
}

.wenzhang_zhaiyao a {
    color: #555;
    text-decoration: none;
}

.wenzhang_zhaiyao a:hover {
    color: #007bff;
}

/* Aside / Sidebar */
aside {
    background: white;
    border-radius: 5px;
    padding: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
}

aside h3 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    margin: 0;
    font-size: 16px;
}

aside ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

aside ul li {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
}

aside ul li:last-child {
    border-bottom: none;
}

aside ul li a {
    color: #333;
    text-decoration: none;
    display: block;
}

aside ul li a:hover {
    color: #007bff;
}

/* Footer */
footer {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 30px 0;
    margin-top: auto;
}

footer p {
    margin: 5px 0;
    text-align: center;
}

.footer-links a {
    color: #3498db;
    text-decoration: none;
}

.footer-links a:hover {
    color: #5dade2;
}

/* Utility Classes */
.clear-fix::after {
    content: "";
    display: table;
    clear: both;
}

/* Form Styles */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 10px 20px;
    margin: 5px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
}

.btn-success {
    background-color: #28a745;
    color: white;
}

.btn-success:hover {
    background-color: #218838;
}

/* Article Detail Styles */
.article-header {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 2px solid #eee;
}

.article-meta {
    color: #666;
    font-size: 14px;
    margin: 10px 0;
}

.article-meta span {
    margin-right: 15px;
}

.article-content {
    line-height: 1.8;
    font-size: 16px;
    color: #333;
}

.article-content img {
    max-width: 100%;
    height: auto;
    margin: 20px 0;
    border-radius: 5px;
}

.article-actions {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    text-align: center;
}

/* Comment Section */
.comment-section {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 2px solid #eee;
}

.comment-form {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 30px;
}

.comment-list {
    list-style: none;
    padding: 0;
}

.comment-item {
    background: white;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 5px;
    border-left: 4px solid #667eea;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 14px;
    color: #666;
}

.comment-author {
    font-weight: bold;
    color: #2c3e50;
}

.comment-time {
    color: #999;
}

.comment-body {
    line-height: 1.6;
    color: #333;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    background: white;
    transition: all 0.2s ease;
}

.pagination a:hover {
    background: #f0f0f0;
    border-color: #999;
}

.pagination span.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
}

/* Alert Messages */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    border-left: 4px solid;
}

.alert-success {
    background-color: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.alert-info {
    background-color: #d1ecf1;
    border-color: #17a2b8;
    color: #0c5460;
}

/* User Profile */
.user-profile {
    background: white;
    padding: 25px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.user-info {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.user-avatar {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 32px;
    font-weight: bold;
    margin-right: 20px;
}

.user-details h2 {
    margin: 0 0 10px 0;
    color: #2c3e50;
}

.user-stats {
    display: flex;
    gap: 20px;
    margin-top: 15px;
}

.stat-item {
    text-align: center;
}

.stat-item .stat-value {
    font-size: 24px;
    font-weight: bold;
    color: #667eea;
}

.stat-item .stat-label {
    font-size: 12px;
    color: #999;
}

/* Responsive Design */
@media (max-width: 768px) {
    .featured h1 {
        font-size: 32px;
    }

    .featured h2 {
        font-size: 18px;
    }

    #menu {
        flex-wrap: wrap;
    }

    #menu li a {
        padding: 12px 15px;
        font-size: 14px;
    }

    .content-wrapper.main-content {
        flex-direction: column;
    }

    aside {
        width: 100% !important;
        margin-top: 20px;
    }
}

/* Admin Layout Styles */
.admin-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #f5f7fa;
}

.admin-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.admin-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-logo a {
    color: white;
    text-decoration: none;
    font-size: 20px;
    font-weight: bold;
}

.admin-nav ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
    gap: 5px;
}

.admin-nav ul li a {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: block;
}

.admin-nav ul li a:hover,
.admin-nav ul li a.active {
    background: rgba(255, 255, 255, 0.2);
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 14px;
}

.admin-user a {
    color: white;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.2s ease;
}

.admin-user a:hover {
    background: rgba(255, 255, 255, 0.3);
}

.admin-main {
    flex: 1;
    padding: 30px 0;
}

.admin-main .content-wrapper {
    background: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.admin-footer {
    background: #2c3e50;
    color: white;
    padding: 20px 0;
    text-align: center;
}

.admin-footer a {
    color: white;
    text-decoration: none;
    margin-left: 15px;
}

.admin-footer a:hover {
    text-decoration: underline;
}

/* Admin Tables */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.admin-table thead {
    background: #f8f9fa;
}

.admin-table th,
.admin-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.admin-table th {
    font-weight: 600;
    color: #2c3e50;
}

.admin-table tbody tr:hover {
    background: #f8f9fa;
}

/* Admin Cards */
.admin-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.admin-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.admin-card h3 {
    font-size: 36px;
    margin: 10px 0;
}

.admin-card p {
    font-size: 14px;
    opacity: 0.9;
}

