/* ===== layout.css ===== */
/* 整体布局容器、头部区域、功能栏、导航菜单结构 */

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 48px 24px;
    position: relative;
    z-index: 1;
}

/* 头部 */
.hero {
    text-align: center;
    margin-bottom: 56px;
    animation: fade-in-up 0.8s ease;
}

.hero h1 {
    font-size: clamp(2.8rem, 10vw, 4.5rem);
    color: var(--accent);
    font-weight: 600;
    letter-spacing: 0.25em;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    margin-bottom: 12px;
}

.hero p {
    color: var(--text-secondary);
    font-style: italic;
    font-size: 1.1rem;
    letter-spacing: 0.1em;
}

/* 功能栏 */
.function-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 32px;
    /* 移除背景和圆角，由内部元素自行处理，保证对齐 */
}

.search-section {
    display: flex;
    flex: 2;
    min-width: 200px;
}

/* 确保触发框充满宽度 */
.search-trigger-box {
    width: 100%;
    box-sizing: border-box;
}

.random-section {
    display: flex;
}

.random-section button {
    white-space: nowrap;
    padding: 10px 22px;
    background: var(--accent);
    color: #0b0c0e;
    border-radius: 40px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.random-section button:hover {
    background: var(--accent-light);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

/* 内容网格 */
.chronicle-grid {
    min-height: 400px;
}

/* 页脚 */
footer {
    text-align: center;
    padding: 48px 20px 24px;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 64px;
}

.footer-motto {
    margin-top: 8px;
    opacity: 0.7;
    font-style: italic;
    letter-spacing: 0.1em;
}

/* 手机端适配 */
@media (max-width: 600px) {
    .container {
        padding: 32px 16px;
    }

    .function-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .search-section {
        width: 100%;
    }

    .random-section {
        width: 100%;
    }

    .random-section button {
        width: 100%;
        text-align: center;
    }

    .hero h1 {
        letter-spacing: 0.1em;
    }

    .extra-categories {
        gap: 8px;
    }

    .extra-btn {
        padding: 6px 18px;
        font-size: 0.9rem;
    }

    .grade-btn {
        padding: 5px 16px;
        font-size: 0.8rem;
    }
}