/* ========================================
   HK Template - 暗黑红色风格
   ======================================== */

:root {
    /* HK 主题色 - 暗黑红 */
    --hk-primary: #e74c3c;
    --hk-primary-dark: #c0392b;
    --hk-secondary: #9b59b6;
    --hk-accent: #e91e63;
    
    --hk-text: #ecf0f1;
    --hk-text-light: #bdc3c7;
    --hk-bg: #1a1a2e;
    --hk-bg-alt: #16213e;
    --hk-bg-card: #0f3460;
    --hk-border: #2c3e50;
    
    --hk-hero-bg: linear-gradient(135deg, #1a1a2e 0%, #e74c3c 100%);
    --hk-hero-text: #ffffff;
    
    --hk-shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --hk-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --hk-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
    
    --hk-radius-sm: 4px;
    --hk-radius-md: 8px;
    --hk-radius-lg: 12px;
    
    --hk-spacing-xs: 0.25rem;
    --hk-spacing-sm: 0.5rem;
    --hk-spacing-md: 1rem;
    --hk-spacing-lg: 1.5rem;
    --hk-spacing-xl: 2rem;
    --hk-spacing-2xl: 3rem;
    --hk-spacing-3xl: 4rem;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--hk-text);
    background-color: var(--hk-bg);
}

a {
    color: var(--hk-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--hk-accent);
}

img {
    max-width: 100%;
    height: auto;
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--hk-spacing-lg);
}

.container-narrow {
    max-width: 800px;
}

/* Header */
.header {
    background-color: var(--hk-bg-alt);
    border-bottom: 1px solid var(--hk-primary);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--hk-primary);
    display: flex;
    align-items: center;
    gap: var(--hk-spacing-sm);
}

.nav-logo::before {
    content: "🔥";
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--hk-spacing-xl);
}

.nav-link {
    color: var(--hk-text);
    font-weight: 500;
    padding: var(--hk-spacing-sm) 0;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--hk-primary);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--hk-primary);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--hk-spacing-sm);
}

.hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--hk-primary);
    position: relative;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background-color: var(--hk-primary);
    left: 0;
    transition: transform 0.3s ease;
}

.hamburger::before { top: -7px; }
.hamburger::after { bottom: -7px; }

@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background-color: var(--hk-bg-alt);
        flex-direction: column;
        padding: var(--hk-spacing-lg);
        gap: 0;
        border-bottom: 1px solid var(--hk-primary);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-item {
        border-bottom: 1px solid var(--hk-border);
    }
    
    .nav-link {
        display: block;
        padding: var(--hk-spacing-md) 0;
    }
}

/* Hero Section */
.hero {
    background: var(--hk-hero-bg);
    color: var(--hk-hero-text);
    padding: var(--hk-spacing-3xl) 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23e74c3c' fill-opacity='0.1' fill-rule='evenodd'%3E%3Cpath d='M0 40L40 0H20L0 20M40 40V20L20 40'/%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.3;
}

.hero-content {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: var(--hk-spacing-md);
    text-shadow: 0 2px 10px rgba(231, 76, 60, 0.5);
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: var(--hk-spacing-xl);
}

.hero-small {
    padding: var(--hk-spacing-2xl) 0;
}

.hero-small .hero-title {
    font-size: 2.25rem;
}

.hero-small .hero-subtitle {
    margin-bottom: var(--hk-spacing-lg);
}

@media (max-width: 768px) {
    .hero {
        padding: var(--hk-spacing-2xl) 0;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
}

/* Buttons */
.btn {
    display: inline-block;
    padding: var(--hk-spacing-sm) var(--hk-spacing-lg);
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    border-radius: var(--hk-radius-md);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--hk-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
}

.btn-primary:hover {
    background-color: var(--hk-primary-dark);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.6);
}

.btn-outline {
    background-color: transparent;
    border-color: var(--hk-primary);
    color: var(--hk-primary);
}

.btn-outline:hover {
    background-color: var(--hk-primary);
    color: white;
}

.btn-lg {
    padding: var(--hk-spacing-md) var(--hk-spacing-xl);
    font-size: 1.125rem;
}

/* Sections */
.section {
    padding: var(--hk-spacing-3xl) 0;
}

.section-alt {
    background-color: var(--hk-bg-alt);
}

.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: var(--hk-spacing-xl);
    text-align: center;
    color: var(--hk-primary);
}

.section-footer {
    text-align: center;
    margin-top: var(--hk-spacing-xl);
}

/* Article Grid & Cards */
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--hk-spacing-xl);
}

.article-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 992px) {
    .article-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .article-grid-3 {
        grid-template-columns: 1fr;
    }
}

.article-card {
    background-color: var(--hk-bg-card);
    border-radius: var(--hk-radius-lg);
    overflow: hidden;
    box-shadow: var(--hk-shadow-sm);
    border: 1px solid var(--hk-border);
    transition: all 0.3s ease;
}

.article-card:hover {
    box-shadow: var(--hk-shadow-lg);
    transform: translateY(-5px);
    border-color: var(--hk-primary);
}

.article-card-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.article-card-content {
    padding: var(--hk-spacing-lg);
}

.article-card-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: var(--hk-spacing-sm);
    line-height: 1.4;
}

.article-card-title a {
    color: var(--hk-text);
}

.article-card-title a:hover {
    color: var(--hk-primary);
}

.article-card-excerpt {
    color: var(--hk-text-light);
    font-size: 0.9375rem;
    margin-bottom: var(--hk-spacing-md);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--hk-spacing-md);
    font-size: 0.8125rem;
    color: var(--hk-text-light);
}

.article-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--hk-spacing-xs);
    margin-top: var(--hk-spacing-md);
}

/* Tags */
.tag {
    display: inline-block;
    padding: var(--hk-spacing-xs) var(--hk-spacing-sm);
    background-color: rgba(231, 76, 60, 0.2);
    color: var(--hk-primary);
    font-size: 0.75rem;
    border-radius: var(--hk-radius-sm);
    transition: all 0.2s ease;
}

.tag:hover {
    background-color: var(--hk-primary);
    color: white;
}

/* Category Grid */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--hk-spacing-lg);
}

.category-grid-large {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--hk-spacing-xl);
    background-color: var(--hk-bg-card);
    border-radius: var(--hk-radius-lg);
    border: 1px solid var(--hk-border);
    transition: all 0.3s ease;
}

.category-card:hover {
    border-color: var(--hk-primary);
    box-shadow: var(--hk-shadow-md);
    transform: translateY(-3px);
}

.category-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--hk-text);
    margin-bottom: var(--hk-spacing-xs);
}

.category-count {
    font-size: 0.875rem;
    color: var(--hk-primary);
}

/* Article Detail */
.article-detail {
    padding: var(--hk-spacing-2xl) 0;
}

.article-header {
    margin-bottom: var(--hk-spacing-xl);
}

.article-title {
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: var(--hk-spacing-md);
    color: var(--hk-text);
}

/* Article CTA */
.article-cta {
    background: linear-gradient(135deg, var(--hk-primary) 0%, var(--hk-secondary) 100%);
    color: white;
    padding: var(--hk-spacing-lg);
    border-radius: var(--hk-radius-lg);
    margin-bottom: var(--hk-spacing-lg);
    text-align: center;
    box-shadow: 0 4px 20px rgba(231, 76, 60, 0.3);
}

.article-cta .cta-text {
    margin-bottom: var(--hk-spacing-md);
    font-size: 1rem;
    opacity: 0.95;
}

.article-cta .btn {
    background-color: white;
    color: var(--hk-primary);
}

.article-cta .btn:hover {
    background-color: rgba(255, 255, 255, 0.9);
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--hk-spacing-lg);
    color: var(--hk-text-light);
    font-size: 0.9375rem;
    margin-bottom: var(--hk-spacing-md);
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--hk-spacing-sm);
}

.article-cover {
    margin-bottom: var(--hk-spacing-xl);
    border-radius: var(--hk-radius-lg);
    overflow: hidden;
    box-shadow: var(--hk-shadow-md);
}

.article-cover img {
    width: 100%;
}

.article-footer {
    margin-top: var(--hk-spacing-2xl);
    padding-top: var(--hk-spacing-xl);
    border-top: 1px solid var(--hk-border);
}

/* Prose */
.prose {
    font-size: 1.0625rem;
    line-height: 1.8;
    color: var(--hk-text);
}

.prose h1, .prose h2, .prose h3, .prose h4, .prose h5, .prose h6 {
    margin-top: var(--hk-spacing-xl);
    margin-bottom: var(--hk-spacing-md);
    font-weight: 700;
    color: var(--hk-text);
}

.prose p {
    margin-bottom: var(--hk-spacing-md);
}

.prose a {
    color: var(--hk-primary);
    text-decoration: underline;
}

.prose img {
    border-radius: var(--hk-radius-md);
    margin: var(--hk-spacing-lg) 0;
}

.prose blockquote {
    border-left: 4px solid var(--hk-primary);
    padding-left: var(--hk-spacing-lg);
    margin: var(--hk-spacing-lg) 0;
    color: var(--hk-text-light);
    font-style: italic;
    background-color: var(--hk-bg-alt);
    padding: var(--hk-spacing-md) var(--hk-spacing-lg);
    border-radius: 0 var(--hk-radius-md) var(--hk-radius-md) 0;
}

.prose code {
    background-color: var(--hk-bg-alt);
    padding: 0.2em 0.4em;
    border-radius: var(--hk-radius-sm);
    font-size: 0.9em;
    color: var(--hk-primary);
}

.prose pre {
    background-color: #0a0a0a;
    color: var(--hk-text);
    padding: var(--hk-spacing-lg);
    border-radius: var(--hk-radius-md);
    overflow-x: auto;
    margin: var(--hk-spacing-lg) 0;
    border: 1px solid var(--hk-border);
}

.prose pre code {
    background: none;
    padding: 0;
    color: inherit;
}

.prose ul, .prose ol {
    margin-bottom: var(--hk-spacing-md);
    padding-left: var(--hk-spacing-xl);
}

.prose li {
    margin-bottom: var(--hk-spacing-sm);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--hk-spacing-lg);
    margin-top: var(--hk-spacing-2xl);
}

.pagination-link {
    padding: var(--hk-spacing-sm) var(--hk-spacing-lg);
    background-color: var(--hk-primary);
    color: white;
    border-radius: var(--hk-radius-md);
    font-weight: 500;
}

.pagination-link:hover {
    background-color: var(--hk-primary-dark);
    color: white;
}

.pagination-info {
    color: var(--hk-text-light);
}

/* Footer */
.footer {
    background-color: var(--hk-bg-alt);
    color: var(--hk-text);
    padding: var(--hk-spacing-xl) 0;
    text-align: center;
    border-top: 1px solid var(--hk-border);
}

.footer-text {
    font-size: 0.875rem;
    opacity: 0.8;
}

/* Empty State */
.empty-message {
    text-align: center;
    color: var(--hk-text-light);
    padding: var(--hk-spacing-3xl);
    font-size: 1.125rem;
}

/* Error Pages */
.error-page {
    text-align: center;
    padding: var(--hk-spacing-3xl) 0;
}

.error-code {
    font-size: 6rem;
    font-weight: 800;
    color: var(--hk-primary);
    line-height: 1;
    margin-bottom: var(--hk-spacing-md);
    text-shadow: 0 0 20px rgba(231, 76, 60, 0.5);
}

.error-title {
    font-size: 1.5rem;
    margin-bottom: var(--hk-spacing-md);
}

.error-message {
    color: var(--hk-text-light);
    margin-bottom: var(--hk-spacing-xl);
}
