/*
Theme Name: Forum Theme
Theme URI: https://example.com/forum-theme
Author: Developer
Author URI: https://example.com
Description: A modern, responsive forum theme for WordPress with clean design and powerful features. Perfect for community discussions, Q&A sites, and forum-style websites.
Version: 1.0.0
Requires at least: 5.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: forum-theme
Tags: blog, forum, community, discussion, two-columns, responsive-layout, custom-colors, custom-menu, featured-images, threaded-comments

Forum Theme is a modern WordPress theme designed specifically for forum-style websites and community discussions.
*/

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4a90e2;
    --secondary-color: #3a7bc8;
    --accent-color: #e74c3c;
    --background-color: #f5f7fa;
    --card-background: #ffffff;
    --text-color: #333333;
    --text-light: #7f8c8d;
    --border-color: #e1e8ed;
    --hover-color: #f8f9fa;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --header-height: 68px;
    --sidebar-width: 300px;
    --border-radius: 8px;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding-top: var(--header-height);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ==========================================================================
   Layout
   ========================================================================== */

.site-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-header {
    background: var(--card-background);
    box-shadow: var(--shadow);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--header-height);
    transition: transform 0.3s ease;
}

.site-header.header-hidden {
    transform: translateY(-100%);
}

.header-inner {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
    box-sizing: border-box;
}

.site-branding {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    margin-left: 0;
    padding-left: 0;
}

/* 自定义Logo */
.custom-logo-link {
    display: inline-block;
    line-height: 0;
}

.custom-logo {
    max-height: 50px;
    width: auto;
    display: block;
}

/* 网站标题 */
.site-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
}

.site-title a {
    color: var(--secondary-color);
    display: inline-block;
}

.site-description {
    font-size: 14px;
    color: var(--text-light);
    margin: 0 0 0 15px;
}

.main-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 30px 20px;
    display: flex;
    gap: 30px;
    flex: 1;
    width: 100%;
}

.content-area {
    flex: 1;
    min-width: 0;
}

.widget-area {
    width: var(--sidebar-width);
    flex-shrink: 0;
}

.site-footer {
    background: var(--secondary-color);
    color: #ffffff;
    padding: 30px 20px;
    margin-top: auto;
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    text-align: center;
}

/* ==========================================================================
   Navigation
   ========================================================================== */

/* 导航相关样式已移至 header-actions.css */

/* ==========================================================================
   Forum Post List
   ========================================================================== */

.forum-posts-list {
    background: var(--card-background);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.forum-post-item {
    display: flex;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
    gap: 15px;
}

.forum-post-item:last-child {
    border-bottom: none;
}

.forum-post-item:hover {
    background: var(--hover-color);
}

.post-avatar {
    flex-shrink: 0;
}

.post-avatar img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.post-content-wrapper {
    flex: 1;
    min-width: 0;
}

.post-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 8px;
}

.post-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    line-height: 1.4;
}

.post-title a {
    color: var(--text-color);
}

.post-title a:hover {
    color: var(--primary-color);
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 14px;
    color: var(--text-light);
    flex-wrap: wrap;
}

.post-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.post-meta-item i {
    font-size: 16px;
}

.post-author {
    color: var(--primary-color);
    font-weight: 500;
}

.post-excerpt {
    color: var(--text-light);
    margin: 10px 0 0 0;
    line-height: 1.5;
}

.post-stats {
    display: flex;
    gap: 20px;
    margin-top: 12px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: var(--text-light);
}

.stat-number {
    font-weight: 600;
    color: var(--text-color);
}

.post-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.post-category {
    display: inline-block;
    padding: 4px 12px;
    background: var(--primary-color);
    color: #ffffff;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    transition: var(--transition);
}

.post-category:hover {
    background: var(--secondary-color);
    color: #ffffff;
}

/* ==========================================================================
   Single Post
   ========================================================================== */

.single-post-container {
    background: var(--card-background);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 30px;
}

.single-post-header {
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.single-post-title {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 15px 0;
    line-height: 1.3;
    color: var(--secondary-color);
}

.single-post-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.post-author-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.post-author-info img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.author-details .author-name {
    font-weight: 600;
    color: var(--primary-color);
}

.author-details .post-date {
    font-size: 14px;
    color: var(--text-light);
}

.single-post-content {
    font-size: 17px;
    line-height: 1.8;
    color: var(--text-color);
}

.single-post-content h1,
.single-post-content h2,
.single-post-content h3,
.single-post-content h4,
.single-post-content h5,
.single-post-content h6 {
    margin: 30px 0 15px 0;
    color: var(--secondary-color);
    font-weight: 600;
}

.single-post-content p {
    margin: 0 0 20px 0;
}

.single-post-content img {
    border-radius: var(--border-radius);
    margin: 20px 0;
}

.single-post-content ul,
.single-post-content ol {
    margin: 0 0 20px 30px;
}

.single-post-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding: 15px 20px;
    margin: 20px 0;
    background: var(--hover-color);
    border-radius: var(--border-radius);
    font-style: italic;
}

.single-post-content code {
    background: var(--hover-color);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.single-post-content pre {
    background: var(--secondary-color);
    color: #ffffff;
    padding: 20px;
    border-radius: var(--border-radius);
    overflow-x: auto;
    margin: 20px 0;
}

.single-post-content pre code {
    background: none;
    padding: 0;
    color: inherit;
}

.post-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.post-tag {
    display: inline-block;
    padding: 6px 14px;
    background: var(--hover-color);
    color: var(--text-color);
    border-radius: 20px;
    font-size: 14px;
    transition: var(--transition);
}

.post-tag:hover {
    background: var(--primary-color);
    color: #ffffff;
}

.post-navigation {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.post-nav-link {
    flex: 1;
    padding: 15px 20px;
    background: var(--hover-color);
    border-radius: var(--border-radius);
    text-align: center;
    transition: var(--transition);
}

.post-nav-link:hover {
    background: var(--primary-color);
    color: #ffffff;
    transform: translateY(-2px);
}

/* ==========================================================================
   Comments
   ========================================================================== */

.comments-area {
    background: var(--card-background);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 30px;
    margin-top: 30px;
}

.comments-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 25px 0;
    color: var(--secondary-color);
}

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

.comment {
    padding: 20px;
    border-left: 3px solid var(--border-color);
    margin-bottom: 20px;
    background: var(--hover-color);
    border-radius: var(--border-radius);
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.comment-author img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.comment-author-name {
    font-weight: 600;
    color: var(--primary-color);
}

.comment-metadata {
    font-size: 14px;
    color: var(--text-light);
}

.comment-content {
    margin-left: 52px;
    line-height: 1.6;
}

.comment-reply-link {
    display: inline-block;
    margin-left: 52px;
    margin-top: 10px;
    padding: 6px 14px;
    background: var(--primary-color);
    color: #ffffff;
    border-radius: var(--border-radius);
    font-size: 14px;
    transition: var(--transition);
}

.comment-reply-link:hover {
    background: var(--secondary-color);
    color: #ffffff;
}

.children {
    list-style: none;
    margin-left: 40px;
    margin-top: 15px;
}

.comment-respond {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid var(--border-color);
}

.comment-reply-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 20px 0;
}

.comment-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.comment-form-comment textarea,
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 15px;
    font-family: inherit;
    transition: var(--transition);
}

.comment-form-comment textarea {
    min-height: 150px;
    resize: vertical;
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.form-submit input[type="submit"] {
    padding: 12px 30px;
    background: var(--primary-color);
    color: #ffffff;
    border: none;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.form-submit input[type="submit"]:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

/* ==========================================================================
   Sidebar Widgets
   ========================================================================== */

.widget {
    background: var(--card-background);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 20px;
    margin-bottom: 25px;
}

.widget-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 15px 0;
    color: var(--secondary-color);
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

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

.widget li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.widget li:last-child {
    border-bottom: none;
}

.widget a {
    color: var(--text-color);
    transition: var(--transition);
}

.widget a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

/* Search Widget */
.search-form {
    display: flex;
    gap: 10px;
}

.search-form input[type="search"] {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 14px;
}

.search-form button {
    padding: 10px 20px;
    background: var(--primary-color);
    color: #ffffff;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
}

.search-form button:hover {
    background: var(--secondary-color);
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.pagination .page-numbers {
    display: inline-block;
    padding: 10px 15px;
    background: var(--card-background);
    color: var(--text-color);
    border-radius: var(--border-radius);
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.pagination .page-numbers:hover,
.pagination .page-numbers.current {
    background: var(--primary-color);
    color: #ffffff;
    transform: translateY(-2px);
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
    display: inline-block;
    padding: 12px 24px;
    background: var(--primary-color);
    color: #ffffff;
    border-radius: var(--border-radius);
    font-weight: 600;
    text-align: center;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn:hover {
    background: var(--secondary-color);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-secondary {
    background: var(--secondary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 1024px) {
    .main-content {
        flex-direction: column;
    }
    
    .widget-area {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .header-inner {
        padding: 0 15px;
    }
    
    .site-description {
        display: none;
    }
    
    .single-post-title {
        font-size: 24px;
    }
    
    .single-post-container {
        padding: 20px;
    }
    
    .post-navigation {
        flex-direction: column;
    }
    
    .children {
        margin-left: 20px;
    }
    
    .comment-content {
        margin-left: 0;
        margin-top: 10px;
    }
    
    .comment-reply-link {
        margin-left: 0;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 20px 10px;
    }
    
    .forum-post-item {
        flex-direction: column;
    }
    
    .post-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .single-post-container,
    .comments-area,
    .widget {
        padding: 15px;
    }
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

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

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.hidden {
    display: none;
}

.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

