/* ========================================
   yl.css - 全局通用样式 (所有页面共用)
   ======================================== */

/* CSS Variables */
:root {
    --primary-color: #07C160;
    --primary-hover: #06AD56;
    --secondary-color: #101828;
    --text-main: #1D2939;
    --text-muted: #667085;
    --bg-light: #F9FAFB;
    --white: #FFFFFF;
    --border-color: #EAECF0;
    --transition: all 0.3s ease;
}

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

/* Body Base */
html, body {
    overflow-x: hidden;
    width: 100%;
}

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

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }
    .encyclopedia-grid {
        display: grid;
        grid-template-columns: 280px 1fr;
        gap: 48px;
        padding: 60px 0;
        min-width: 0; /* 允许网格项在窄屏下正确收缩 */
    }

    .content-main {
        min-width: 0;
    }
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 71px;
        left: 0;
        width: 100%;
        background: white;
        padding: 16px 0;
        border-bottom: 1px solid var(--border-color);
        box-shadow: 0 10px 15px rgba(0, 0, 0, 0.05);
        z-index: 1000;
        gap: 0;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    font-size: 16px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: none;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(7, 193, 96, 0.2);
}

.btn-secondary {
    background-color: white;
    color: var(--text-main);
    border: 1px solid var(--border-color);
    margin-left: 12px;
}

.btn-secondary:hover {
    background-color: var(--bg-light);
    border-color: var(--text-muted);
}

/* Badge */
.badge {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(7, 193, 96, 0.1);
    color: var(--primary-color);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
}

/* Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}
