* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: #F6E3C5;
    font-family: "Microsoft Yahei", "PingFang SC", Arial, Helvetica, sans-serif;
    color: #4a3727;
    padding: 8px 4px;
    display: flex;
    justify-content: center;
    transition: padding 0.2s ease;
}

.container {
    width: 750px;
    max-width: 100%;
    margin: 0 auto;
    background: transparent;
    padding: 0 0px 30px;
}

/* ----- 顶部导航 ----- */
.nav-top {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    gap: 12px 18px;
    padding-bottom: 0px;
    margin-bottom: 0px;
    white-space: nowrap;
}
.nav-top a {
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.3px;
    padding: 5px 0;
    color: #755f35;
    text-decoration: none;
    flex-shrink: 0;
    transition: all 0.2s ease;
}
.nav-top a:hover {
    color: #b65d2a;
    text-decoration: underline;
    transform: translateY(-1px);
}
.nav-top a:active {
    color: #ce741a;
    transform: scale(0.98);
}
.nav-top .onlink {
    font-weight: 800;
    border-bottom: 2px solid #e09a30;
    padding-bottom: 10px;
    display: inline-block;
}

/* ----- Banner ----- */
.hero-banner {
    width: 100%;
    margin-bottom: 0px;
    border-radius: 0px;
    overflow: hidden;
    background: #e2cfb8;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    mask-image: linear-gradient(to bottom, #000 0%, #000 70%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 70%, transparent 100%);
}
.hero-banner::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30px;
    background: linear-gradient(to bottom, rgba(246, 227, 197, 0), #F6E3C5);
    pointer-events: none;
    z-index: 1;
}
.hero-banner img {
    width: 750px;
    height: 200px;
    display: block;
    flex-shrink: 0;
    object-fit: cover;
}
.banner-fallback {
    background: linear-gradient(120deg, #dbb68c, #c4925f);
    padding: 28px 20px;
    text-align: center;
    font-weight: bold;
    font-size: 22px;
    letter-spacing: 2px;
    color: #fff3e6;
    flex-shrink: 0;
    width: 100%;
}

/* ----- 二级导航 ----- */
.nav-second-wrapper {
    margin-top: -16px;
    position: relative;
    z-index: 5;
    background: transparent;
    padding: 0 4px 0px 4px;
}
.nav-second {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: stretch;
    gap: 16px;
    padding: 0;
    margin: 0;
    list-style: none;
    width: 100%;
}
.nav-second li {
    display: flex;
    flex: 1;
    justify-content: center;
    align-items: center;
    font-size: 16px;
    font-weight: 500;
    color: #69461f;
    padding: 12px 0;
    white-space: nowrap;
    background-image: url('../img/yun.png');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 52px;
    background-origin: padding-box;
    background-clip: border-box;
}

/* ----- 标语 ----- */
.hero-slogan {
    text-align: center;
    margin: 20px 0 24px 0;
    font-size: 19px;
    font-weight: 800;
    background: linear-gradient(135deg, #b97f3a, #e0a56b);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    letter-spacing: 2px;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

/* ----- 表单卡片 ----- */
.form-card {
    background: #F7EFE2;
    border-radius: 24px;
    padding: 18px 12px;
    margin: 8px 0 0px;
    width: 100%;
    transition: padding 0.2s ease;
}

/* ----- 四宫格卡片 ----- */
.four-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin: 30px 0 28px;
    width: 100%;
}
.destiny-card {
    background: #F7EFE2;
    border-radius: 20px;
    padding: 14px 8px 16px;
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.25s ease;
}
.destiny-card-img {
    width: 64px;
    max-width: 70%;
    height: auto;
    margin-bottom: 10px;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
.destiny-card .title {
    font-size: 16px;
    font-weight: 700;
    background: linear-gradient(145deg, #c27e42, #b16228);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}
.destiny-card .desc {
    display: block;
    margin-top: 5px;
    font-size: 14px;
    color: #6e4f31;
    background: #f7ede2;
    padding: 6px 8px;
    border-radius: 40px;
    text-align: center;
}

/* ----- 表单行 ----- */
.row-flex {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    width: 100%;
}
.field-group {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 50px;
    flex: 1 1 auto;
    min-width: 0;
}
.field-label {
    font-weight: 500;
    color: #b65d2a;
    padding: 4px 8px;
    border-radius: 30px;
    font-size: 16px;
    text-decoration: none;
    white-space: nowrap;
}
.name-input {
    border: none;
    background: #fff3e6;
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    color: #2e241d;
    width: 100%;
    min-width: 150px;
    max-width: 600px;
    outline: none;
    font-family: inherit;
    text-align: left;
}

.gender-group {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-shrink: 0;
}
.gender-option input[type="radio"] {
    display: none;
}
.gender-card {
    display: inline-block;
    padding: 4px 16px;
    background: #ede0d1;
    border: 1px solid #e9d4c0;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    color: #2e241d;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.5px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}
.gender-card:hover {
    background: #fef8f0;
    border-color: #dabb9a;
    transform: translateY(-1px);
}
.gender-option input[type="radio"]:checked+.gender-card {
    background: #d9b48b;
    border-color: #ce741a;
    color: white;
    box-shadow: 0 4px 10px rgba(206, 116, 26, 0.25);
}

.datetime-group {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    padding: 4px 4px;
    border-radius: 60px;
    width: 100%;
    flex: 1;
}
.date-input,
.time-select {
    border: none;
    background: #fff3e6;
    padding: 5px 8px;
    border-radius: 8px;
    font-size: 16px;
    font-family: monospace;
    outline: none;
    color: #2e241d;
    padding-right: 32px;
    background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACcAAAAnCAMAAAC7faEHAAAAllBMVEUAAAD5eGb5eWb6jHH6iG/6kXT4b2H2ZFz6hm33al74d2X3Zlz6hm74dGT4emf5g2z1XFf4cmP4cWP2X1n3aF75hm36im/2XFf2X1n2ZFz4emf4fGj1XFf1XVj2ZVz2W1f3a1/6j3P1W1b1XFf2Y1v2YVr6jnL4fGj3bGD2X1n6kHP2Y1v2XVj6j3P5gGr4d2X3bmH5iG/ZciAdAAAAK3RSTlMAOkJbT4ouloRoBoRIhGAto1BJvBEnjyDatZN+zbOpSxrVeELz8ahxcVzE9GhvTAAAAZJJREFUOMvFkNtygjAQhjeRAkKoCFGkarXaM4mH93+57m5oIeMoven0u/jX+flmxw38sE034LPZabhkbUzlFZUxOVyyMmbvFXtjVtAjGed5voPSmG2Vd1S4r4Rdnkcfbv3CIAvykr3pkIkxa+CPKw3Av7AhT4c9L9S0b21YxKNcW/I+z0tcy2wgbZgXqMoUoqYjgrTcwkvDpOQxNQCMmz7098vG85jFc+PzvKDsvMeIeKzryKeu2y+tp+E2uvXCAS9k73RCT4+vodE7nb69IhNI+k4pU0njPaXMCt8TgMgQeHCGPKRsvYw9WVA5ZTuZJjTElLJwXvZ773gc9I7Hv/LcvWIGPDhnrio8TzzcIw/ZPQ/OzFWi9eLDgbylRJZvlGqpaLy5irzDISZvAiDdO0967zzhITAnPU9RGbg7AndHQKn+3TufB73z+dtTV99ZeZ6Yj5B5POLBGbtKdB5tUQGiMJE2XUWb2bMWvZvMrI3hztr5gDcnL7DWvo5u8YqGAniywzwBwHZY/NRABPHdLWK6+QtyJ1Xlod0ZowAAAABJRU5ErkJggg==");
    background-repeat: no-repeat;
    background-position: 100% center;
    background-size: 20px;
    cursor: pointer;
}
.date-input {
    flex: 3;
    min-width: 110px;
}
.time-select {
    flex: 2;
    min-width: 95px;
}

/* ----- 按钮 ----- */
.action-buttons {
    display: flex;
    justify-content: center;
    margin: 24px 0 16px;
}
.btn-link {
    background-image: url('/img/bz-bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: transparent;
    border: none;
    padding: 22px 32px;
    border-radius: 60px;
    font-weight: bold;
    color: white !important;
    font-size: 19px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    width: 40%;
    cursor: pointer;
    letter-spacing: 2px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.2s ease;
    box-shadow: none;
    animation: gentleScale 0.8s ease-in-out infinite alternate;
}
@keyframes gentleScale {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(1.09);
    }
}
.btn-link:hover {
    animation: gentleScale 0.8s ease-in-out infinite alternate;
    filter: brightness(1.02);
}
.btn-link:active {
    transform: scale(0.98);
    animation: none;
    transition: transform 0.05s;
}

/* ----- 通用卡片 ----- */
.card {
    background-color: #F7EFE2;
    border-radius: 24px;
    padding: 20px 16px;
    margin-bottom: 18px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.03);
}
.section-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #f0e0d0;
    color: #915e30;
    display: inline-block;
}

/* ----- 图标链接网格 ----- */
.grid-4 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
@media (min-width: 480px) {
    .grid-4 {
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
    }
}
.icon-link {
    display: block;
    background: #fffbf5;
    text-align: center;
    padding: 10px 4px;
    border-radius: 15px;
    font-size: 16px;
    font-weight: 500;
    color: #6e4a26;
    text-decoration: none;
    transition: all 0.2s;
    border: 1px solid #ffe3cd;
    white-space: nowrap;
    overflow-x: auto;
    text-overflow: ellipsis;
}
.icon-link:hover {
    background: #e9d9ca;
    color: #4f341b;
    transform: translateY(-2px);
    border-color: #ce741a;
}
.icon-link:active {
    background: #ce741a;
    color: white;
    transform: scale(0.96);
}

/* ----- 文章列表 ----- */
.article-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.article-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    background: #fffcf8;
    border-radius: 20px;
    padding: 0px 0;
    transition: all 0.2s;
}
.article-item:hover {
    background: #fcf4ea;
    transform: translateX(4px);
}
.article-item:active {
    background: #eedbcb;
    transform: scale(0.99);
}
.article-img {
    flex-shrink: 0;
    width: 230px;
    max-width: 40%;
    height: auto;
}
.article-img img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 6px;
    background: #e9d9ca;
    display: block;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}
.article-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 6px 0;
}
.article-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
}
.article-title a {
    text-decoration: none;
    color: #2f2419;
    transition: all 0.2s;
}
.article-title a:hover {
    color: #b45f2b;
    text-decoration: underline;
}
.article-title a:active {
    color: #ce741a;
    transform: scale(0.98);
    display: inline-block;
}
.article-desc {
    font-size: 13px;
    color: #8f775e;
}
.article-date {
    font-size: 12px;
    color: #b78d64;
}

/* ----- 友情链接 & 页脚 ----- */
.friend-links {
    background: #fffaf2;
    border-radius: 24px;
    padding: 16px 10px;
    margin: 12px 0 8px;
    text-align: center;
    font-size: 14px;
}
.friend-links a {
    color: #a56f3e;
    text-decoration: none;
    margin: 0 8px;
    transition: all 0.2s;
}
.friend-links a:hover {
    color: #ce741a;
    text-decoration: underline;
    background: #f2e3d4;
    border-radius: 12px;
}
.friend-links a:active {
    color: #7a431d;
    transform: scale(0.96);
}

.footer-bar {
    text-align: center;
    margin-top: 24px;
    padding-top: 12px;
    font-size: 12px;
    line-height: 200%;
    color: #a6805c;
    border-top: 1px dashed #e3cfbc;
}
.footer-bar a {
    color: #9b6e42;
    text-decoration: none;
    margin: 0 10px;
    transition: all 0.2s;
}
.footer-bar a:hover {
    color: #ce741a;
    text-decoration: underline;
    background: #f5e9dd;
    border-radius: 12px;
}
.footer-bar a:active {
    color: #5c3a1c;
}

/* ============================================================
   移动端适配（< 780px）
   ============================================================ */
@media (max-width: 780px) {
    body {
        padding: 5px 3px;
    }
    .container {
        padding: 0;
    }
    .form-card {
        padding: 14px 8px;
    }
    .row-flex,
    .datetime-group {
        flex-wrap: nowrap;
        overflow-x: visible;
    }
    .date-input {
        min-width: 105px;
        font-size: 16px;
        padding: 5px 6px;
    }
    .time-select {
        min-width: 88px;
        font-size: 16px;
        padding: 5px 4px;
    }
    .name-input {
        width: 100%;
        min-width: 60px;
        font-size: 16px;
        padding: 4px 4px;
    }
    .field-group {
        padding: 3px 2px;
    }
    .gender-group {
        gap: 8px;
    }
    .gender-card {
        padding: 4px 12px;
    }
    .four-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .destiny-card-img {
        width: 52px;
    }
    .btn-link {
        width: 75%;
        padding: 12px 20px;
        font-size: 18px;
    }
}

@media (max-width: 560px) {
    .nav-second {
        gap: 10px;
    }
    .nav-second li {
        font-size: 14px;
        padding: 10px 2px;
        white-space: nowrap;
    }
    .article-img {
        width: 110px;
        max-width: 35%;
    }
    .article-img img {
        height: 110px;
        width: 100%;
    }
    .article-item {
        gap: 12px;
    }
}

@media (max-width: 420px) {
    .nav-second li {
        font-size: 12px;
        padding: 8px 0;
    }
    .nav-second {
        gap: 6px;
    }
    .icon-link {
        white-space: normal;
        font-size: 16px;
        padding: 6px 4px;
    }
    .name-input {
        min-width: 60px;
    }
    .date-input {
        min-width: 90px;
    }
    .time-select {
        min-width: 80px;
    }
    .gender-group {
        gap: 6px;
    }
    .btn-link {
        width: 65%;
        font-size: 16px;
    }
}

/* 滚动条美化 */
.nav-top::-webkit-scrollbar,
.nav-second-wrapper::-webkit-scrollbar {
    height: 3px;
}
.nav-top::-webkit-scrollbar-thumb,
.nav-second-wrapper::-webkit-scrollbar-thumb {
    background-color: rgba(100, 70, 40, 0.3);
    border-radius: 10px;
}

/* ----- 文章占位图（SVG） ----- */
.article-item:first-child .article-img img {
    content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 60' fill='%23dbb88c'%3E%3Crect width='100' height='60'/%3E%3Ctext x='10' y='35' fill='%23945e34' font-size='12'%3E八字命理%3C/text%3E%3C/svg%3E");
}
.article-item:last-child .article-img img {
    content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 60' fill='%23dbb88c'%3E%3Crect width='100' height='60'/%3E%3Ctext x='10' y='35' fill='%23945e34' font-size='12'%3E运势解析%3C/text%3E%3C/svg%3E");
}

/* ============================================================
   桌面端优化 (≥ 1024px)
   ============================================================ */
@media (min-width: 1024px) {
    body {
        padding: 32px 48px;
    }

    .container {
        max-width: 920px;
        padding: 0 8px 40px;
    }

    .nav-top {
        gap: 20px 28px;
    }
    .nav-top a {
        font-size: 13px;
        letter-spacing: 0.4px;
        padding: 4px 0;
    }
    .nav-top .onlink {
        padding-bottom: 8px;
    }

    .nav-second-wrapper {
        padding: 0 8px 0px 8px;
    }
    .nav-second {
        gap: 20px;
    }
    .nav-second li {
        font-size: 14px;
        padding: 10px 0;
        min-height: 44px;
    }

    .hero-slogan {
        font-size: 17px;
        margin: 16px 0 20px 0;
        letter-spacing: 2.5px;
    }

    .form-card {
        padding: 20px 28px;
        border-radius: 28px;
        margin: 4px 0 0px;
    }

    .field-label {
        font-size: 14px;
        padding: 4px 10px;
    }
    .name-input {
        font-size: 14px;
        padding: 5px 12px;
        min-width: 120px;
    }
    .gender-card {
        font-size: 14px;
        padding: 4px 18px;
        border-radius: 14px;
    }
    .gender-group {
        gap: 10px;
    }
    .date-input,
    .time-select {
        font-size: 14px;
        padding: 5px 10px;
    }
    .date-input {
        min-width: 130px;
    }
    .time-select {
        min-width: 100px;
    }

    .action-buttons {
        margin: 18px 0 12px;
    }
    .btn-link {
        font-size: 16px;
        padding: 16px 28px;
        width: 32%;
        letter-spacing: 2.5px;
        border-radius: 50px;
    }

    .four-grid {
        gap: 20px;
        margin: 24px 0 24px;
    }
    .destiny-card {
        padding: 18px 12px 20px;
        border-radius: 24px;
    }
    .destiny-card-img {
        width: 56px;
        margin-bottom: 8px;
    }
    .destiny-card .title {
        font-size: 14px;
    }
    .destiny-card .desc {
        font-size: 12px;
        padding: 4px 10px;
        margin-top: 4px;
    }

    .card {
        padding: 18px 20px;
        border-radius: 28px;
        margin-bottom: 16px;
    }
    .section-title {
        font-size: 16px;
        margin-bottom: 14px;
        padding-bottom: 6px;
    }

    .icon-link {
        font-size: 14px;
        padding: 8px 6px;
        border-radius: 16px;
    }

    .article-list {
        gap: 16px;
    }
    .article-item {
        gap: 18px;
        border-radius: 24px;
        padding: 0px 0;
    }
    .article-img {
        width: 200px;
        max-width: 32%;
    }
    .article-img img {
        height: 130px;
        border-radius: 8px;
    }
    .article-content {
        padding: 4px 0;
        gap: 4px;
    }
    .article-title {
        font-size: 14px;
    }
    .article-desc {
        font-size: 12px;
    }
    .article-date {
        font-size: 11px;
    }

    .friend-links {
        font-size: 13px;
        padding: 14px 24px;
        border-radius: 28px;
        margin: 10px 0 6px;
    }
    .footer-bar {
        font-size: 11px;
        margin-top: 20px;
        padding-top: 10px;
    }
}

/* ============================================================
   大桌面端 (≥ 1440px) 进一步微调
   ============================================================ */
@media (min-width: 1440px) {
    body {
        padding: 40px 64px;
    }
    .container {
        max-width: 1000px;
    }
    .nav-top a {
        font-size: 12px;
    }
    .nav-second li {
        font-size: 13px;
    }
    .hero-slogan {
        font-size: 16px;
    }
    .btn-link {
        font-size: 15px;
        padding: 14px 26px;
        width: 28%;
    }
    .destiny-card .title {
        font-size: 14px;
    }
    .destiny-card .desc {
        font-size: 11px;
    }
    .article-title {
        font-size: 13px;
    }
    .article-desc {
        font-size: 11.5px;
    }
}