* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html {
    margin: 0;
    padding: 0;
    height: 100%;
}
body {
    background: #f5f0eb;
    color: #1e1a18;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica Neue, Arial, sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    padding: 0;
    margin: 0;
}

/* 主容器居中，PC最大1200px，不会全屏过宽 */
.ao3-container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    background: #fcf9f6;
    overflow: hidden;
    padding: 0;
}
/* 只针对居中横幅图片 */
p[align="center"] img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* 头部红色通栏 */
.ao3-header {
    background: #8b1a1a;
    color: #f5ede7;
    padding: 0.8rem 0;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    border-bottom: 4px solid #c0392b;
    width: 100%;
}
.header-inner {
    width: 100%;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    padding: 0 2rem;
}

.logo-area {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    gap: 12px;
}

.ao3-logo-img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    -ms-flex-negative: 0;
    flex-shrink: 0;
}

.logo-area h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #f5ede7;
    letter-spacing: 0.3px;
    margin: 0;
}

/* 导航搜索栏 */
.ao3-nav {
    background: #5c1010;
    padding: 0.3rem 0;
    border-bottom: 1px solid #7a2a2a;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: end;
    -ms-flex-pack: end;
    justify-content: flex-end;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    width: 100%;
}
.nav-inner {
    width: 100%;
    padding: 0 2rem;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: end;
    -ms-flex-pack: end;
    justify-content: flex-end;
}

.search-form {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    gap: 6px;
}

.search-form input[type="text"] {
    background: #f5ede7;
    border: 1px solid #7a2a2a;
    -webkit-border-radius: 20px;
    border-radius: 20px;
    padding: 0.25rem 1rem;
    width: 200px;
    font-size: 0.85rem;
    color: #1e1a18;
    placeholder="搜索ao3链接、ao3网页版入口"
}

.search-form input[type="submit"] {
    background: #c0392b;
    border: none;
    -webkit-border-radius: 20px;
    border-radius: 20px;
    padding: 0.25rem 1.2rem;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.85rem;
    -webkit-transition: background 0.2s;
    transition: background 0.2s;
}

.search-form input[type="submit"]:hover {
    background: #e74c3c;
}

/* 主体区域 */
.ao3-main {
    padding: 2rem 2rem 1.5rem;
}

/* 顶部免责声明（风控保命模块） */
.disclaimer-box {
    background: #fff0f0;
    border: 1px solid #c0392b;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
}
.disclaimer-box h3 {
    color: #8b1a1a;
    font-size: 1rem;
    margin-bottom: 0.4rem;
}
.disclaimer-box p {
    font-size: 0.9rem;
    color: #3d2e26;
    line-height: 1.6;
}

.welcome-banner {
    background: #fcf5f0;
    -webkit-border-radius: 8px;
    border-radius: 8px;
    padding: 2.2rem 1.8rem;
    border-left: 6px solid #c0392b;
    margin-bottom: 2rem;
}
.welcome-banner h2 {
    font-size: 1.4rem;
    color: #8b1a1a;
    margin-bottom: 1rem;
}
.welcome-banner p {
    color: #3d2e26;
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 0.8rem;
}

/* 入口卡片容器 - 加宽间距 */
.download-section {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    gap: 2.2rem;
    margin: 1.8rem 0;
}

/* 卡片外层a标签，整卡点击 */
.download-card-link {
    flex: 1;
    min-width: 200px;
    text-decoration: none;
    color: inherit;
    display: block;
}

.download-card {
    background: white;
    -webkit-border-radius: 12px;
    border-radius: 12px;
    padding: 3.2rem 0.8rem;
    border: 1px solid #ded3cb;
    text-align: center;
    -webkit-transition: 0.2s ease;
    transition: 0.2s ease;
    color: #1e1a18;
    -webkit-box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.download-card-link:hover .download-card {
    -webkit-transform: translateY(-3px);
    transform: translateY(-3px);
    -webkit-box-shadow: 0 8px 16px rgba(0, 0, 0, 0.06);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.06);
    border-color: #c0392b;
}

.download-card .icon i {
    font-size: 2.4rem;
    color: #8b1a1a;
    margin-bottom: 0.3rem;
    display: block;
}

.download-card .platform {
    font-weight: 600;
    font-size: 1.1rem;
    color: #2c1f1a;
}

.download-card .desc {
    font-size: 0.85rem;
    color: #5f4a3c;
    margin-top: 0.1rem;
}

.download-card .badge {
    display: inline-block;
    background: #8b1a1a;
    color: #f5ede7;
    font-size: 0.7rem;
    padding: 0.1rem 1rem;
    -webkit-border-radius: 30px;
    border-radius: 30px;
    margin-top: 0.4rem;
}

.feature-tags {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    gap: 0.8rem;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    margin: 2.5rem 0 0.8rem;
}
.feature-tags .tag {
    /* 保留你原来所有属性不变，只新增下面3行 */
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    gap: 4px; /* 图标和文字间距，替代原来margin-right */

    background: #fcf5f0;
    border: 1px solid #e0c8b8;
    padding: 0.2rem 1.2rem;
    -webkit-border-radius: 30px;
    border-radius: 30px;
    font-size: 0.85rem;
    color: #3d2e26;
}
.feature-tags .tag i {
    /* 删掉原来的margin-right:4px，改用上面gap控制间距 */
    color: #c0392b;
    width: 14px;
    text-align: center;
}
/* 底部页脚 */
.ao3-footer {
    background: #5c1010;
    color: #e8d5c8;
    padding: 3.5rem 0 1rem;
    border-top: 1px solid #7a2a2a;
    width: 100%;
}
.footer-inner {
    width: 100%;
    padding: 0 2rem;
}

.footer-grid {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 1rem;
}
.footer-grid > div {
    -webkit-box-flex: 1;
    -ms-flex: 1;
    flex: 1;
    min-width: 150px;
}

.footer-grid h4 {
    color: #f5ede7;
    font-size: 0.95rem;
    margin-bottom: 0.4rem;
    border-bottom: 2px solid #a52a2a;
    padding-bottom: 0.2rem;
}
.footer-grid h4 i {
    margin-right: 6px;
    width: 16px;
    text-align: center;
}

.footer-grid ul {
    list-style: none;
    font-size: 0.85rem;
}

.footer-grid ul li {
    margin-bottom: 0.3rem;
}

.footer-grid ul li a {
    color: #dcc8bc;
    text-decoration: none;
    -webkit-transition: color 0.2s;
    transition: color 0.2s;
}

.footer-grid ul li a:hover {
    color: #f5ede7;
    text-decoration: underline;
}

.footer-bottom {
    border-top: 1px solid #7a2a2a;
    padding-top: 0.8rem;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #c0a898;
}

.footer-bottom a {
    color: #c0a898;
    text-decoration: none;
    margin-right: 1.2rem;
    -webkit-transition: color 0.2s;
    transition: color 0.2s;
}

.footer-bottom a:hover {
    color: #f5ede7;
    text-decoration: underline;
}

/* 响应式适配 */
@media (max-width: 720px) {
    .header-inner, .nav-inner, .footer-inner {
        padding: 0 1.2rem;
    }
    .ao3-header {
        flex-direction: column;
        align-items: stretch;
        gap: 0.4rem;
    }
    .ao3-logo-img {
        width: 60px;
        height: 60px;
    }
    /* 新增缩小标题 */
    .logo-area h1 {
        font-size: 1.2rem;
    }
    .ao3-nav {
        justify-content: center;
    }
    .nav-inner {
        justify-content: center;
    }
    .search-form input[type="text"] {
        width: 140px;
    }
    .ao3-main {
        padding: 1.2rem;
    }
    .download-section {
        gap: 1.2rem;
    }
    .download-card-link {
        min-width: calc(50% - 0.8rem);
    }
    /* 之前标签两列代码保留 */
    .feature-tags {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        max-width: 500px;
        margin-left: auto;
        margin-right: auto;
    }
    .feature-tags .tag {
        display: flex;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .download-card-link {
        min-width: 100%;
    }
    .footer-grid > div {
        min-width: calc(50% - 1rem);
    }
    .ao3-logo-img {
        width: 54px;
        height: 54px;
    }
    /* 手机端再缩小一点 */
    .logo-area h1 {
        font-size: 1.1rem;
    }
}