@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;700&display=swap');

:root {
    --ios-bg: #F9F7F2;
    --ios-card: #FFFFFF;
    --ios-primary: #5D4037;
    --ios-accent: #A1887F;
    --ios-text: #2D2926;
    --ios-secondary-text: #636366;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
    background-color: var(--ios-bg);
    color: var(--ios-text);
    font-size: 18px;
    /* 适老化：基础字号略大 */
    line-height: 1.6;
}

.serif {
    font-family: 'Noto Serif SC', serif;
}

.ios-card {
    background: var(--ios-card);
    border-radius: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    transition: transform 0.2s ease;
}

.ios-card-hover:hover {
    transform: translateY(-2px);
}

.ios-btn {
    background-color: var(--ios-primary);
    color: white;
    border-radius: 12px;
    font-weight: 600;
    padding: 12px 24px;
    transition: opacity 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ios-btn:active {
    opacity: 0.7;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-align: center;
}

.feature-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
    color: var(--ios-primary);
}

/* 隐藏滚动条 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #D1D1D6;
    border-radius: 4px;
}

/* 详情页专用 */
.content-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 20px;
}

.detail-card {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.back-btn {
    display: inline-block;
    margin-bottom: 20px;
    color: var(--ios-primary);
    font-weight: 600;
    text-decoration: none;
}

.highlight {
    color: #D70015;
    font-weight: 600;
}

/* 相关文档导航栏 */
.related-docs-nav {
    background: white;
    padding: 16px 24px;
    border-radius: 12px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.nav-label {
    font-size: 14px;
    color: var(--ios-secondary-text);
    margin-bottom: 12px;
    font-weight: 600;
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.nav-link {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 8px;
    background-color: var(--ios-bg);
    color: var(--ios-primary);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.2s;
}

.nav-link:hover {
    background-color: var(--ios-accent);
    color: white;
}

.nav-link.active {
    background-color: var(--ios-primary);
    color: white;
    cursor: default;
}

/* 警告提示框 */
.warning-box {
    background-color: #FFF7ED;
    border-left: 4px solid #F97316;
    padding: 16px 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.warning-box p {
    margin: 8px 0;
    color: #9A3412;
    line-height: 1.6;
}

.warning-box p:first-child {
    margin-top: 0;
}

.warning-box p:last-child {
    margin-bottom: 0;
}

.warning-box strong {
    color: #7C2D12;
}

/* 信息提示框（蓝色变体） */
.info-box {
    background-color: #EFF6FF;
    border-left: 4px solid #3B82F6;
    padding: 16px 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.info-box p {
    margin: 8px 0;
    color: #1E40AF;
    line-height: 1.6;
}

.info-box p:first-child {
    margin-top: 0;
}

.info-box p:last-child {
    margin-bottom: 0;
}

/* 成功提示框（绿色变体） */
.success-box {
    background-color: #F0FDF4;
    border-left: 4px solid #22C55E;
    padding: 16px 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.success-box p {
    margin: 8px 0;
    color: #166534;
    line-height: 1.6;
}

.success-box p:first-child {
    margin-top: 0;
}

.success-box p:last-child {
    margin-bottom: 0;
}

/* 语种切换器 */
.lang-switcher {
    display: flex;
    background: rgba(0, 0, 0, 0.05);
    padding: 2px;
    border-radius: 8px;
    margin-left: 16px;
}

.lang-switcher-btn {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--ios-secondary-text);
}

.lang-switcher-btn:hover {
    color: var(--ios-primary);
}

.lang-switcher-btn.active-lang {
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    color: var(--ios-primary);
}

/* 移动端适配 */
@media (max-width: 640px) {
    .nav-links {
        flex-direction: column;
    }

    .nav-link {
        text-align: center;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .warning-box,
    .info-box,
    .success-box {
        padding: 12px 16px;
        font-size: 16px;
    }

    .detail-card {
        padding: 24px 20px;
    }
}