/*
Theme Name: Q&A Modern
Theme URI: https://server.xymww.com
Author: AI Developer
Author URI: https://server.xymww.com
Description: 简约现代化问答风格WordPress主题，SEO优化，安全可靠。
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: qa-modern
Tags:问答, 现代化, 响应式, SEO优化
*/

:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #64748b;
    --background-color: #f8fafc;
    --card-background: #ffffff;
    --text-color: #1e293b;
    --text-light: #64748b;
    --border-color: #e2e8f0;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --radius: 12px;
    --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

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

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Breadcrumb */
.breadcrumb {
    padding: 1rem 0;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

.breadcrumb a {
    color: var(--text-light);
}

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

.breadcrumb span[aria-current="page"] {
    color: var(--text-color);
    font-weight: 500;
}

/* Header */
.site-header {
    background: var(--card-background);
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem 0;
    margin-bottom: 2rem;
}

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

.site-title a {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
}

/* Question Card */
.question-card {
    background: var(--card-background);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

.question-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

.question-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.question-excerpt {
    color: var(--text-light);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.question-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-light);
    align-items: center;
}

.meta-tag {
    background: #e0f2fe;
    color: #0369a1;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Single Question */
.single-question {
    background: var(--card-background);
    border-radius: var(--radius);
    padding: 2.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.single-title {
    font-size: 1.75rem;
    line-height: 1.3;
    margin-bottom: 1.5rem;
}

.question-content {
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.question-content h2, .question-content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.question-content ul, .question-content ol {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.question-content p {
    margin-bottom: 1.25rem;
}

/* Footer */
.site-footer {
    text-align: center;
    padding: 2rem 0;
    color: var(--text-light);
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
    margin-top: 3rem;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 2rem 0;
}

.page-numbers {
    padding: 0.5rem 1rem;
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.page-numbers.current {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Related Questions */
.related-questions {
    margin-top: 3rem;
}

.related-questions-seo {
    margin-top: 3rem;
    padding: 2rem;
    background: var(--background-color);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

.related-questions-seo h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.related-questions-seo ul {
    list-style: none;
    padding: 0;
}

.related-questions-seo li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.related-questions-seo li:last-child {
    border-bottom: none;
}

.related-questions-seo a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.related-questions-seo a:hover {
    text-decoration: underline;
}

.section-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
}

/* Navigation Menu */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

.nav-menu a {
    color: var(--text-color);
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s;
}

.nav-menu a:hover::after {
    width: 100%;
}

/* Tags */
.question-tags {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: var(--text-light);
}

.question-tags a {
    display: inline-block;
    background: #f1f5f9;
    color: var(--secondary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    margin-right: 0.5rem;
    margin-top: 0.5rem;
    font-size: 0.85rem;
}

.question-tags a:hover {
    background: #e2e8f0;
}

/* Button */
.button {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: var(--primary-color);
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s;
}

.button:hover {
    background: var(--primary-hover);
    color: white;
}

/* Responsive */
@media (max-width: 640px) {
    .single-question {
        padding: 1.5rem;
    }
    
    .header-inner {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}
