/* --- CSS Variables --- */
:root {
    --primary-color: #9933ff;
    --primary-dark: #7a29cc;
    --bg-color: #f9f9f9;
    --container-bg: #ffffff;
    --text-color: #333333;
    --text-light: #666666;
    --border-color: #eaeaea;
}

/* --- Global Styles --- */
body {
    background-color: var(--bg-color);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    color: var(--text-color);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

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

/* 键盘访问时的焦点样式 (Accessibility) */
a:focus-visible {
    outline: 3px solid var(--primary-dark);
    outline-offset: 4px;
    border-radius: 2px;
}

/* --- Container --- */
#home-container {
    max-width: 900px; /* 限制最大宽度，阅读体验更好 */
    margin: 40px auto;
    padding: 40px;
    background-color: var(--container-bg);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
}

/* --- Navigation --- */
#blog-nav-bar {
    margin-bottom: 60px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand a {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: bold;
    font-size: 1.2rem;
}

.brand-logo {
    width: 32px;
    height: 32px;
}

.nav-menu {
    display: flex;
    gap: 20px;
}

.nav-link {
    font-weight: 500;
    color: var(--text-light);
}

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

/* --- Hero Section --- */
#hero-section {
    text-align: center;
    margin-bottom: 60px;
    padding: 0 20px;
}

#hero-section h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: #000;
}

.subtitle {
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.intro-text {
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* --- Blog List --- */
#blog-posts-container {
    flex: 1; /* 让内容撑开高度，把footer挤到底部 */
}

.section-title {
    font-size: 1.5rem;
    margin-bottom: 30px;
    border-left: 4px solid var(--primary-color);
    padding-left: 12px;
}

/* 单篇文章卡片样式 */
.post-card {
    margin-bottom: 30px;
    padding: 20px;
    border: 1px solid transparent;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.post-card:hover {
    background-color: #fafafa;
    border-color: var(--border-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.post-title {
    font-size: 1.3rem;
    margin: 0 0 10px 0;
}

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

.post-meta {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 10px;
}

.post-summary {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* --- Footer --- */
#index_footer {
    margin-top: 60px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: #888;
    font-size: 0.9rem;
}

.tiny-text {
    font-size: 0.8rem;
    margin-top: 5px;
}

/* --- Mobile Responsive --- */
@media (max-width: 600px) {
    #home-container {
        width: 95%; /* 手机上更宽 */
        padding: 20px;
        margin: 10px auto;
    }

    .nav-container {
        flex-direction: column;
        gap: 20px;
    }

    #hero-section h1 {
        font-size: 2rem;
    }
}

/* 番茄时钟样式 */
/* 模态弹窗的背景（半透明黑色） */
        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.6);
            display: flex;
            justify-content: center;
            align-items: center;
            z-index: 1000;
        }

        /* 弹窗内容容器 */
        .modal-content {
            background-color: #ffffff;
            padding: 30px;
            border-radius: 12px;
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
            text-align: center;
            max-width: 400px;
            width: 90%;
            animation: fadeIn 0.3s ease-out;
        }

        /* 动画效果 */
        @keyframes fadeIn {
            from { opacity: 0; transform: scale(0.9); }
            to { opacity: 1; transform: scale(1); }
        }

        /* 提示文字 */
        .modal-content h3 {
            margin-top: 0;
            color: #333;
            font-size: 1.4em;
            margin-bottom: 25px;
        }

        /* 按钮容器 */
        .modal-actions {
            display: flex;
            justify-content: space-around;
            margin-top: 20px;
        }

        /* 按钮样式 */
        .modal-btn {
            padding: 10px 25px;
            border: none;
            border-radius: 6px;
            font-size: 1em;
            cursor: pointer;
            transition: background-color 0.2s, transform 0.1s;
        }

        /* 取消按钮 */
        #cancel-btn {
            background-color: #e0e0e0;
            color: #555;
        }
        #cancel-btn:hover {
            background-color: #d0d0d0;
        }

        /* 确认按钮（跳转） */
        #confirm-btn {
            background-color: #4CAF50; /* 绿色 */
            color: white;
        }
        #confirm-btn:hover {
            background-color: #45a049;
        }