/*
Theme Name: OneNote MVP Theme
Theme URI: https://github.com/copilot/onenote-mvp-theme
Author: GitHub Copilot
Author URI: https://github.com/copilot
Description: 一个专为微软最有价值专家（MVP）设计的 WordPress 主题，专注于 OneNote 内容分享。采用 OneNote 紫色调，简约专业。
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: onenote-mvp
*/

:root {
    --primary: #7719AA;
    --primary-light: #CA5BDD;
    --primary-lighter: #F3E0F9;
    --primary-bg: #FCF5FE;
    --accent: #0078d4;
    --text: #2d2d2d;
    --text-light: #666;
    --text-muted: #999;
    --bg: #FAF5FC;
    --white: #fff;
    --shadow: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-hover: 0 8px 30px rgba(119,25,170,0.15);
    --radius: 16px;
}

* {
    box-sizing: border-box;
}

body {
    font-family: "Segoe UI", "Microsoft YaHei", "PingFang SC", -apple-system, sans-serif;
    line-height: 1.7;
    color: var(--text);
    margin: 0;
    padding: 0;
    background: var(--bg);
    font-size: 16px;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary-light);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ========== Header ========== */
header {
    background: var(--white);
    padding: 20px 0;
    border-bottom: 1px solid rgba(119,25,170,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    background: rgba(255,255,255,0.95);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-branding {
    display: flex;
    align-items: center;
    gap: 16px;
}

.site-logo {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #7719AA 0%, #CA5BDD 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 24px;
    box-shadow: 0 4px 12px rgba(119,25,170,0.25);
}

header h1 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
}

header h1 a {
    color: var(--text);
}

header h1 a:hover {
    color: var(--primary);
}

.mvp-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, var(--accent) 0%, #00a2ed 100%);
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 8px rgba(0,120,212,0.3);
}

.mvp-badge::before {
    content: "★";
    font-size: 10px;
}

/* Navigation */
.main-navigation {
    margin: 0;
}

#primary-menu {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 8px;
}

#primary-menu li a {
    display: block;
    color: var(--text-light);
    font-weight: 500;
    font-size: 15px;
    padding: 10px 18px;
    border-radius: 10px;
    transition: all 0.2s ease;
}

#primary-menu li a:hover {
    background: var(--primary-bg);
    color: var(--primary);
}

/* ========== Main Layout ========== */
.main-content {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
    margin-top: 40px;
    margin-bottom: 60px;
}

main {
    min-width: 0;
}

/* ========== Post Cards ========== */
.post {
    background: var(--white);
    padding: 0;
    margin-bottom: 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid rgba(155,77,202,0.08);
    position: relative;
    overflow: hidden;
}

.entry-header {
    background: linear-gradient(135deg, #7719AA 0%, #CA5BDD 100%);
    padding: 40px 40px 30px 40px;
    color: white;
}

.entry-content {
    padding: 30px 40px;
    color: var(--text-light);
    font-size: 15px;
    line-height: 1.8;
}

.post .read-more {
    margin: 0 40px 30px 40px;
}

.post::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-light) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.post:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.post:hover::before {
    opacity: 1;
}

.post-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 16px 0;
    line-height: 1.4;
}

.post-title a {
    color: white;
    transition: opacity 0.2s ease;
}

.post-title a:hover {
    color: white;
    opacity: 0.85;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 14px;
    color: rgba(255,255,255,0.8);
    margin-bottom: 0;
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.entry-content {
    color: var(--text-light);
    font-size: 15px;
    line-height: 1.8;
}

.entry-content p {
    margin: 0;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 20px;
    padding: 10px 20px;
    background: var(--primary-bg);
    color: var(--primary);
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
}

.read-more:hover {
    background: var(--primary);
    color: white;
}

.read-more::after {
    content: "→";
    transition: transform 0.2s ease;
}

.read-more:hover::after {
    transform: translateX(4px);
}

/* ========== Sidebar ========== */
aside {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.widget {
    background: var(--white);
    padding: 28px;
    margin-bottom: 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid rgba(119,25,170,0.05);
}

.widget h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--bg);
    position: relative;
}

.widget h3::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: 2px;
}

.widget p {
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.7;
    margin: 0;
}

.widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget ul li {
    padding: 10px 0;
    border-bottom: 1px solid var(--bg);
}

.widget ul li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.widget ul li a {
    color: var(--text-light);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.widget ul li a::before {
    content: "●";
    font-size: 8px;
    color: var(--primary-light);
}

.widget ul li a:hover {
    color: var(--primary);
    padding-left: 4px;
}

/* Search Form */
.search-form {
    display: flex;
    gap: 8px;
}

.search-form input[type="search"] {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--bg);
    border-radius: 10px;
    font-size: 14px;
    transition: border-color 0.2s ease;
    outline: none;
}

.search-form input[type="search"]:focus {
    border-color: var(--primary-light);
}

.search-form button {
    padding: 12px 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-form button:hover {
    background: var(--primary-light);
}

/* ========== Footer ========== */
footer {
    background: var(--text);
    color: rgba(255,255,255,0.7);
    text-align: center;
    padding: 40px 0;
    margin-top: 0;
}

footer p {
    margin: 8px 0;
    font-size: 14px;
}

footer a {
    color: rgba(255,255,255,0.9);
}

footer a:hover {
    color: var(--primary-light);
}

/* ========== Single Post ========== */
.single .post {
    padding: 48px;
}

.single .post-title {
    font-size: 36px;
    margin-bottom: 20px;
}

.single .entry-content {
    font-size: 17px;
}

.single .entry-content h2,
.single .entry-content h3,
.single .entry-content h4 {
    margin-top: 40px;
    margin-bottom: 16px;
    color: var(--text);
}

.single .entry-content p {
    margin-bottom: 20px;
}

.single .entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 24px 0;
}

.entry-content blockquote {
    border-left: 4px solid var(--primary);
    padding: 20px 24px;
    margin: 24px 0;
    background: var(--primary-bg);
    border-radius: 0 12px 12px 0;
    font-style: italic;
    color: var(--text-light);
}

.entry-content pre {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 24px;
    border-radius: 12px;
    overflow-x: auto;
    font-family: "Cascadia Code", "Consolas", monospace;
    font-size: 14px;
    line-height: 1.6;
}

.entry-content code {
    background: var(--primary-lighter);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: "Cascadia Code", "Consolas", monospace;
    font-size: 0.9em;
    color: var(--primary);
}

.entry-content pre code {
    background: none;
    padding: 0;
    color: inherit;
}

/* Tags */
.tags-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--bg);
}

.tags-links a {
    background: var(--primary-bg);
    color: var(--primary);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.tags-links a:hover {
    background: var(--primary);
    color: white;
}

/* ========== Responsive ========== */
@media (max-width: 900px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    aside {
        position: static;
    }
    
    .header-inner {
        flex-direction: column;
        gap: 16px;
    }
    
    #primary-menu {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 600px) {
    .post {
        padding: 24px;
    }
    
    .post-title {
        font-size: 20px;
    }
    
    .single .post {
        padding: 24px;
    }
    
    .single .post-title {
        font-size: 28px;
    }
}
