:root {
    --primary-color: #2c3e50;
    --accent-color: #3498db;
    --bg-color: #f8f9fa;
    --card-bg: #ffffff;
    --text-color: #333333;
    --text-light: #666666;
    --border-radius: 12px;
    --box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

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

/* Header */
header {
    background-color: var(--card-bg);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: 1px;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

nav a {
    text-decoration: none;
    color: var(--text-light);
    font-weight: 500;
    transition: color 0.3s;
}

nav a:hover, nav a.active {
    color: var(--accent-color);
}

/* Hero Section */
.intro {
    text-align: center;
    padding: 60px 0 40px;
}

.intro h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.intro p {
    color: var(--text-light);
    font-size: 1.1rem;
}

/* Article Grid */
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    padding-bottom: 60px;
}

.card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 25px;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.card-tag {
    font-size: 0.8rem;
    color: var(--accent-color);
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 10px;
}

.card h2 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.card p {
    font-size: 0.95rem;
    color: var(--text-light);
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    margin-top: 20px;
    font-size: 0.85rem;
    color: #999;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
    overflow-y: auto;
}

.modal-content {
    background-color: #fff;
    margin: 50px auto;
    padding: 40px;
    width: 90%;
    max-width: 800px;
    border-radius: var(--border-radius);
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close-button {
    color: #aaa;
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

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

/* Markdown Content Styles */
.markdown-body h1 { font-size: 2rem; border-bottom: 1px solid #eaecef; padding-bottom: 0.3em; margin-bottom: 20px; margin-top: 20px;}
.markdown-body h2 { font-size: 1.5rem; border-bottom: 1px solid #eaecef; padding-bottom: 0.3em; margin-bottom: 16px; margin-top: 24px; }
.markdown-body p { margin-bottom: 16px; }
.markdown-body blockquote { border-left: 4px solid #dfe2e5; color: #6a737d; padding: 0 1em; margin: 0 0 16px 0; }
.markdown-body img { max-width: 100%; border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.1); margin: 10px 0; }
.markdown-body code { background-color: rgba(27,31,35,0.05); padding: 0.2em 0.4em; border-radius: 3px; font-family: monospace; }
.markdown-body ul { padding-left: 2em; margin-bottom: 16px; }

/* Footer */
footer {
    background-color: #fff;
    border-top: 1px solid #eee;
    padding: 40px 0;
    margin-top: auto;
}

.footer-content {
    text-align: center;
    color: var(--text-light);
}

.beian-info {
    margin-top: 15px;
    font-size: 0.9rem;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.beian-info a {
    color: #999;
    text-decoration: none;
    transition: color 0.3s;
}

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

.police-icon {
    margin-right: 5px;
}
