* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    margin: 0;
    font-family: "Microsoft YaHei", Arial, sans-serif;
    background: #eef2ff;
    color: #1e293b;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-header,
.site-footer {
    flex: 0 0 auto;
}

main {
    flex: 1 0 auto;
}

.container {
    width: min(1100px, 92%);
    margin: 0 auto;
}

.header-wide {
    width: 99%;
    max-width: none;
    margin: 0;
    padding-left: 20px;
    padding-right: 20px;
    box-sizing: border-box;
}

.site-header {
    background:
        radial-gradient(520px 160px at 10% -40%, rgba(125, 211, 252, 0.26), transparent 72%),
        radial-gradient(620px 180px at 95% -50%, rgba(167, 139, 250, 0.22), transparent 74%),
        linear-gradient(90deg, rgba(7, 11, 24, 0.72), rgba(18, 30, 58, 0.66));
    color: #fff;
    box-shadow: 0 10px 26px rgba(2, 6, 23, 0.24), inset 0 1px 0 rgba(255,255,255,0.14);
    position: sticky;
    top: 0;
    z-index: 30;
    backdrop-filter: blur(16px) saturate(165%);
    -webkit-backdrop-filter: blur(16px) saturate(165%);
    border-bottom: 1px solid rgba(191, 219, 254, 0.28);
    transform: translateY(0);
    transition: transform 0.28s ease, box-shadow 0.28s ease, background 0.28s ease;
}

.site-header.is-hidden {
    transform: translateY(-62%);
    box-shadow: 0 8px 18px rgba(2, 6, 23, 0.2);
}

.header-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 6px 0;
    min-height: 48px;
}

.nav-left {
    justify-self: start;
    padding-left: 8px;
}

.nav-center {
    justify-self: center;
}

.nav-right {
    justify-self: end;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.header-search-form {
    display: inline-flex;
    align-items: center;
}

.header-search-input {
    width: 170px;
    height: 30px;
    border-radius: 999px;
    border: 1px solid rgba(191, 219, 254, 0.34);
    background: rgba(15, 23, 42, 0.32);
    color: #f8fafc;
    padding: 0 11px;
    font-size: 12px;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease, width .2s ease;
}

.header-search-input::placeholder {
    color: rgba(226, 232, 240, 0.8);
}

.header-search-input:focus {
    width: 200px;
    border-color: rgba(191, 219, 254, 0.82);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.24), 0 8px 16px rgba(2, 6, 23, 0.18);
}

.front-search-modal {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: none;
}

.front-search-modal.open {
    display: block;
}

.front-search-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.52);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.front-search-panel {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(760px, 92vw);
    border-radius: 18px;
    border: 1px solid rgba(219, 234, 254, 0.36);
    background:
        radial-gradient(640px 180px at 12% 0%, rgba(59,130,246,0.22), transparent 64%),
        radial-gradient(560px 180px at 96% 10%, rgba(14,165,233,0.18), transparent 66%),
        linear-gradient(180deg, rgba(255,255,255,0.22), rgba(255,255,255,0.10));
    box-shadow: 0 26px 70px rgba(2, 6, 23, 0.42), inset 0 1px 0 rgba(255,255,255,0.22);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    overflow: hidden;
    animation: slideIn 0.22s ease both;
    max-height: min(74vh, 620px);
}

.front-search-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 14px 10px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.14);
}

.front-search-title {
    font-weight: 900;
    letter-spacing: 0.2px;
    color: rgba(255, 255, 255, 0.96);
    text-shadow: 0 2px 14px rgba(2, 6, 23, 0.4);
}

.front-search-close {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    border: 1px solid rgba(219, 234, 254, 0.28);
    background: rgba(15, 23, 42, 0.28);
    color: rgba(241, 245, 249, 0.96);
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
}

.front-search-close:hover {
    background: rgba(59, 130, 246, 0.22);
    border-color: rgba(191, 219, 254, 0.5);
}

.front-search-input-wrap {
    padding: 12px 14px 8px;
}

.front-search-input {
    width: 100%;
    height: 42px;
    border-radius: 14px;
    border: 1px solid rgba(219, 234, 254, 0.34);
    background: rgba(15, 23, 42, 0.28);
    color: rgba(248, 250, 252, 0.98);
    padding: 0 14px;
    outline: none;
    font-size: 14px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.12);
}

.front-search-input::placeholder {
    color: rgba(226, 232, 240, 0.82);
}

.front-search-input:focus {
    border-color: rgba(191, 219, 254, 0.78);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.24), 0 14px 28px rgba(2, 6, 23, 0.2);
}

.front-search-status {
    padding: 0 14px 10px;
    font-size: 12px;
    color: rgba(226, 232, 240, 0.82);
}

.front-search-results {
    padding: 0 10px 10px;
    max-height: calc(min(74vh, 620px) - 176px);
    overflow: auto;
}

.front-search-item {
    display: block;
    text-decoration: none;
    padding: 12px 12px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.10);
    margin: 8px 4px;
    transition: transform .15s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.front-search-item:hover {
    transform: translateY(-1px);
    background: rgba(59, 130, 246, 0.14);
    border-color: rgba(191, 219, 254, 0.42);
    box-shadow: 0 16px 34px rgba(2,6,23,0.18), inset 0 1px 0 rgba(255,255,255,0.14);
}

.front-search-item-title {
    font-weight: 900;
    color: rgba(255, 255, 255, 0.96);
    letter-spacing: 0.15px;
}

.front-search-item-summary {
    margin-top: 6px;
    color: rgba(226, 232, 240, 0.86);
    font-size: 13px;
    line-height: 1.55;
}

.front-search-empty {
    margin: 8px 4px 14px;
    border-radius: 14px;
    border: 1px dashed rgba(191, 219, 254, 0.32);
    background: rgba(15, 23, 42, 0.16);
    color: rgba(226, 232, 240, 0.86);
    padding: 14px 12px;
}

.front-search-foot {
    padding: 10px 14px 14px;
    border-top: 1px solid rgba(226, 232, 240, 0.14);
}

.front-search-tip {
    font-size: 12px;
    color: rgba(226, 232, 240, 0.72);
}

.front-search-results::-webkit-scrollbar { width: 8px; }
.front-search-results::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, 0.35); border-radius: 999px; }
.front-search-results::-webkit-scrollbar-track { background: rgba(15, 23, 42, 0.18); border-radius: 999px; }

@media screen and (max-width: 760px) {
    .front-search-panel {
        top: 50%;
        width: 94vw;
        border-radius: 16px;
    }
}

/* Ensure mobile/tablet nav is fixed at bottom */
@media screen and (max-width: 980px) {
    body {
        padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    }

    .nav-center {
        position: fixed !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        top: auto !important;
        z-index: 45 !important;
    }
}

.logo {
    color: #fff;
    text-decoration: none;
    font-size: 19px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 136px;
}

.logo-img {
    width: 24px;
    height: 24px;
    border-radius: 7px;
    object-fit: cover;
    box-shadow: 0 6px 14px rgba(0,0,0,0.22);
}

.logo-text {
    letter-spacing: 0.2px;
}

.top-nav {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255,255,255,0.23), rgba(255,255,255,0.08));
    border: 1px solid rgba(219, 234, 254, 0.42);
    box-shadow: 0 10px 22px rgba(2, 6, 23, 0.24), inset 0 1px 0 rgba(255,255,255,0.34);
    backdrop-filter: blur(14px) saturate(165%);
    -webkit-backdrop-filter: blur(14px) saturate(165%);
}

.nav-actions {
    background: transparent;
    border: 0;
    padding: 0;
}

.top-nav a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: rgba(241, 245, 249, 0.98);
    text-decoration: none;
    font-size: 11px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.24);
    border: 1px solid rgba(148, 163, 184, 0.2);
    backdrop-filter: blur(10px);
    transition: all 0.2s ease;
    letter-spacing: 0.2px;
    position: relative;
    overflow: hidden;
}

.top-nav a .nav-link-icon {
    font-size: 12px;
    line-height: 1;
    opacity: 0.92;
}

.top-nav a:hover {
    color: #fff;
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.70), rgba(14, 165, 233, 0.58));
    border-color: rgba(191, 219, 254, 0.74);
    box-shadow: 0 12px 22px rgba(2, 6, 23, 0.3), 0 0 0 1px rgba(191,219,254,0.26);
    transform: translateY(-1px);
}

.top-nav a.is-active {
    color: #fff;
    background: linear-gradient(90deg, rgba(29, 78, 216, 0.88), rgba(14, 165, 233, 0.72));
    border-color: rgba(219, 234, 254, 0.82);
    box-shadow: 0 14px 24px rgba(37,99,235,0.32), inset 0 1px 0 rgba(255,255,255,0.34);
}

.top-nav a.is-active::after {
    content: "";
    position: absolute;
    left: -35%;
    bottom: 2px;
    width: 36%;
    height: 2px;
    border-radius: 99px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.95), transparent);
    animation: activeNavGlow 2.6s linear infinite;
}

.mobile-bottom-nav {
    display: none;
}

.front-user-menu {
    display: inline-flex;
    align-items: center;
    position: relative;
    margin-left: 0;
}

.front-user-menu::after {
    content: '';
    position: absolute;
    left: -6px;
    right: -6px;
    top: 30px;
    height: 14px;
}

.front-avatar-btn {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    border: 1px solid rgba(191, 219, 254, 0.62);
    background: linear-gradient(120deg, #1d4ed8, #0ea5e9);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 9px 20px rgba(29, 78, 216, 0.34), inset 0 1px 0 rgba(255,255,255,0.28);
    transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.front-avatar-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(14, 165, 233, 0.42);
}

.front-avatar-btn.has-image {
    padding: 0;
    overflow: hidden;
}

.front-avatar-btn.has-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.front-dropdown {
    position: absolute;
    right: 0;
    top: 40px;
    min-width: 156px;
    border-radius: 16px;
    border: 1px solid rgba(219, 234, 254, 0.42);
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.24),
        rgba(255, 255, 255, 0.12)
    );
    backdrop-filter: blur(16px) saturate(170%);
    -webkit-backdrop-filter: blur(16px) saturate(170%);
    box-shadow:
        0 18px 40px rgba(2, 6, 23, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.35),
        inset 0 -1px 0 rgba(15, 23, 42, 0.14);
    display: none;
    padding: 10px;
}

@media screen and (max-width: 1100px) {
    body {
        padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    }

    .site-header,
    .site-header.is-hidden {
        transform: none;
    }

    .header-inner {
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "left right"
            "center center";
        row-gap: 8px;
        padding-top: 6px;
        padding-bottom: 6px;
    }
    .nav-left {
        grid-area: left;
    }
    .nav-right {
        grid-area: right;
    }
    .header-search-input {
        width: 118px;
    }
    .header-search-input:focus {
        width: 136px;
    }
    .nav-center {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 45;
        grid-area: unset;
        justify-self: stretch;
        width: auto;
        margin: 0;
        padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px));
        background: linear-gradient(180deg, rgba(15, 23, 42, 0.12), rgba(15, 23, 42, 0.85));
        border-top: 1px solid rgba(191, 219, 254, 0.2);
        backdrop-filter: blur(12px) saturate(145%);
        -webkit-backdrop-filter: blur(12px) saturate(145%);
        overflow: visible;
    }

    .nav-center::-webkit-scrollbar { height: 0; }

    .top-nav {
        width: 100%;
        max-width: 680px;
        margin: 0 auto;
        justify-content: space-between;
        gap: 6px;
        border-radius: 14px;
        padding: 6px;
        background: linear-gradient(180deg, rgba(15, 23, 42, 0.72), rgba(30, 41, 59, 0.65));
        border: 1px solid rgba(191, 219, 254, 0.26);
        box-shadow: 0 12px 28px rgba(2, 6, 23, 0.36), inset 0 1px 0 rgba(255,255,255,0.14);
    }

    .top-nav a {
        flex: 1 1 0;
        min-width: 0;
        justify-content: center;
        padding: 8px 6px;
        font-size: 11px;
        gap: 4px;
    }

    .top-nav a .nav-link-icon {
        font-size: 13px;
    }

    .top-nav a.is-active::after {
        display: none;
    }

    .logo {
        font-size: 16px;
    }

    .site-header .top-nav.nav-center {
        display: none !important;
    }

    .mobile-bottom-nav {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 999;
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 6px;
        padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px));
        background:
            radial-gradient(520px 90px at 50% -50%, rgba(186, 230, 253, 0.22), transparent 70%),
            linear-gradient(180deg, rgba(30, 41, 59, 0.34), rgba(15, 23, 42, 0.62));
        border-top: 1px solid rgba(226, 232, 240, 0.22);
        box-shadow: 0 -6px 18px rgba(2, 6, 23, 0.24);
        backdrop-filter: blur(14px) saturate(132%);
        -webkit-backdrop-filter: blur(14px) saturate(132%);
    }

    .mobile-bottom-nav a {
        min-width: 0;
        display: inline-flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        text-decoration: none;
        color: rgba(226, 232, 240, 0.88);
        padding: 6px 2px;
        border-radius: 10px;
        border: 1px solid rgba(203, 213, 225, 0.16);
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.03));
        font-size: 10px;
        line-height: 1.2;
        font-weight: 700;
        transition: all 0.2s ease;
    }

    .mobile-bottom-nav a .nav-link-icon {
        font-size: 14px;
        line-height: 1;
        opacity: 0.92;
    }

    .mobile-bottom-nav a.is-active {
        color: #fff;
        border-color: rgba(191, 219, 254, 0.56);
        background: linear-gradient(90deg, rgba(59, 130, 246, 0.56), rgba(125, 211, 252, 0.42));
        box-shadow: 0 8px 16px rgba(37,99,235,0.18), inset 0 1px 0 rgba(255,255,255,0.22);
    }

    .mobile-bottom-nav a:active {
        transform: scale(0.98);
    }
}

.front-user-menu:hover .front-dropdown {
    display: block;
}

.front-user-menu.open .front-dropdown {
    display: block;
}

.front-user-name {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.98);
    font-weight: 800;
    letter-spacing: 0.2px;
    text-shadow: 0 2px 10px rgba(2, 6, 23, 0.55);
    padding: 8px 10px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.front-dropdown a {
    display: block;
    color: rgba(255, 255, 255, 0.98);
    font-weight: 800;
    letter-spacing: 0.15px;
    text-shadow: 0 2px 10px rgba(2, 6, 23, 0.45);
    text-decoration: none;
    padding: 9px 10px;
    border-radius: 12px;
    margin: 2px 0;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.06);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        0 8px 18px rgba(2, 6, 23, 0.08);
    transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.front-dropdown a:hover {
    background: rgba(59, 130, 246, 0.20);
    border-color: rgba(147, 197, 253, 0.35);
    box-shadow:
        0 12px 26px rgba(2, 6, 23, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
    transform: translateY(-1px);
}

.store-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 58px 0 54px;
    position: relative;
    overflow: hidden;
    min-height: 440px;
    display: flex;
    align-items: center;
}

.banner-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.9;
    pointer-events: none;
}

.store-content {
    position: relative;
    z-index: 2;
}

.store-banner::before,
.store-banner::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(2px);
    pointer-events: none;
}

.store-banner::before {
    width: 260px;
    height: 260px;
    right: -60px;
    top: -70px;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.25), transparent 70%);
    animation: floatGlow 7s ease-in-out infinite;
}

.store-banner::after {
    width: 320px;
    height: 320px;
    left: -110px;
    bottom: -140px;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.18), transparent 70%);
    animation: floatGlow 9s ease-in-out infinite reverse;
}

.store-content {
    display: flex;
    gap: 24px;
    align-items: center;
}

.store-left {
    flex: 0 0 46%;
    max-width: 520px;
    padding-right: 32px;
}

.store-right {
    flex: 0 0 54%;
}

/* PC only: stabilize hero swiper alignment */
@media screen and (min-width: 981px) {
    .store-right {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .store-right .home-swiper {
        width: min(100%, 680px);
        margin: 0 auto;
    }
}

.store-title-wrap {
    margin-bottom: 18px;
}

.store-title {
    font-size: 42px;
    font-weight: 800;
    margin-right: 10px;
}

.store-name-tag {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    font-size: 13px;
    padding: 5px 10px;
}

.store-left-info {
    margin-bottom: 8px;
    font-size: 17px;
}

.store-tips {
    margin-top: 16px;
    line-height: 1.8;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 12px;
    padding: 14px 16px;
}

.home-swiper {
    width: 100%;
    height: 380px;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.28);
}

.home-slide {
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    background: linear-gradient(145deg, #ffffff, #eef2ff);
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    min-height: 100%;
}

.home-slide-fallback {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(720px 260px at 20% -10%, rgba(59,130,246,0.35), transparent 70%),
        radial-gradient(620px 220px at 80% 120%, rgba(139,92,246,0.35), transparent 70%),
        linear-gradient(135deg, #1e3a8a, #5b21b6);
}

.home-slide-content {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 20px 20px 24px;
    color: #fff;
    background: linear-gradient(180deg, rgba(2,6,23,0), rgba(2,6,23,0.75));
}

.home-slide-content h3 {
    margin: 0 0 8px;
    font-size: 24px;
}

.home-slide-content p {
    margin: 0;
    opacity: 0.92;
    line-height: 1.7;
    min-height: 48px;
}

.hero-slide-link {
    display: inline-block;
    margin-top: 10px;
    padding: 9px 16px;
    border-radius: 999px;
    text-decoration: none;
    color: #fff;
    background: linear-gradient(90deg, #2563eb, #7c3aed);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.42);
    transition: transform 0.2s ease;
    width: fit-content;
    position: relative;
    overflow: hidden;
    animation: breatheGlow 2.6s ease-in-out infinite;
}

.hero-slide-link:hover {
    transform: translateY(-2px);
}

.attr-button {
    position: relative;
    overflow: hidden;
    animation: breatheGlow 2.8s ease-in-out infinite;
}

.ripple {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 999px;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.55);
    pointer-events: none;
    animation: ripple 0.65s ease-out forwards;
}

.home-swiper .swiper-pagination {
    bottom: 10px !important;
}

.home-swiper .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: #fff;
    opacity: 0.58;
    transition: all 0.2s ease;
}

.home-swiper .swiper-pagination-bullet-active {
    width: 24px;
    border-radius: 999px;
    opacity: 1;
    background: linear-gradient(90deg, #2563eb, #7c3aed);
}

.store-body {
    margin-top: 24px;
    margin-bottom: 24px;
}

.article-search-panel {
    margin-bottom: 20px;
    padding: 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.3);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.article-search-meta {
    margin-top: 12px;
    color: #6b7280;
    font-size: 14px;
}

.article-search-list {
    margin-top: 10px;
    display: grid;
    gap: 10px;
}

.article-search-item {
    display: grid;
    grid-template-columns: 24px 1fr;
    gap: 10px;
    text-decoration: none;
    border-radius: 10px;
    padding: 10px 8px;
}

.article-search-item:hover {
    background: rgba(148, 163, 184, 0.1);
}

.article-search-icon {
    color: #6b7280;
    margin-top: 2px;
}

.article-search-main {
    display: grid;
    gap: 2px;
}

.article-search-title {
    color: #111827;
    font-size: 18px;
    font-weight: 700;
}

.article-search-path {
    color: #9ca3af;
    font-size: 12px;
}

.article-search-desc {
    color: #6b7280;
    font-size: 13px;
    line-height: 1.5;
}

.article-search-empty {
    color: #6b7280;
    font-size: 14px;
}

.section-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 16px;
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 18px;
    padding-bottom: 30px;
}

.post-card {
    background: #ffffffde;
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    border: 1px solid #ffffffc7;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    display: flex;
    flex-direction: column;
    min-height: 230px;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 26px rgba(15, 23, 42, 0.14);
}

.post-card h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
    line-height: 1.35;
}

.card-style .post-card:nth-child(6n + 1) { background: #dbeafe; }
.card-style .post-card:nth-child(6n + 2) { background: #e9d5ff; }
.card-style .post-card:nth-child(6n + 3) { background: #fee2e2; }
.card-style .post-card:nth-child(6n + 4) { background: #fef3c7; }
.card-style .post-card:nth-child(6n + 5) { background: #dcfce7; }
.card-style .post-card:nth-child(6n + 6) { background: #dbeafe; }

.post-card p {
    color: #475569;
    line-height: 1.6;
    margin: 0;
    flex: 1 1 auto;
}

.meta {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: #64748b;
    font-size: 13px;
    min-height: 20px;
}

.attr-button {
    margin-top: 12px;
    display: inline-block;
    padding: 8px 16px;
    border-radius: 8px;
    color: #fff;
    background: #2563eb;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
    align-self: flex-start;
}

.attr-button:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

.post-detail {
    margin: 28px 0 40px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    padding: 24px;
}

.post-cover {
    width: 100%;
    max-height: 320px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 14px;
}

.post-detail h1 {
    margin-top: 0;
}

.content {
    margin-top: 20px;
    line-height: 1.8;
    color: #334155;
}

.markdown-content img {
    max-width: min(100%, 520px);
    height: auto;
    border-radius: 12px;
    border: 1px solid rgba(148,163,184,0.35);
    margin: 8px 0;
    box-shadow: 0 10px 24px rgba(2,6,23,0.10);
}

.level-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
    color: #4338ca;
    background: rgba(99,102,241,0.15);
    border: 1px solid rgba(99,102,241,0.30);
    margin-left: 6px;
}

.profile-level-panel {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 12px;
    margin-bottom: 12px;
    border-radius: 12px;
    background: rgba(238,242,255,0.65);
    border: 1px solid rgba(148,163,184,0.35);
}

.profile-modern {
    max-width: 1200px;
}

.profile-top-card {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    padding: 16px;
    border-radius: 14px;
    background: rgba(248,250,252,0.9);
    border: 1px solid rgba(148,163,184,0.35);
    margin-bottom: 12px;
}

.profile-top-left {
    display: flex;
    gap: 14px;
    align-items: center;
}

.profile-top-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(148,163,184,0.35);
}
.profile-top-avatar.fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #38bdf8, #6366f1);
    color: #fff;
    font-size: 24px;
    font-weight: 700;
}

.profile-top-name {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
}

.profile-top-id {
    color: #64748b;
    font-size: 13px;
    margin-top: 2px;
}

.profile-top-stats {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: #334155;
    font-size: 13px;
}

.profile-main-grid {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 16px;
}

.profile-page {
    width: min(1280px, 96%);
}

@media (max-width: 980px) {
    .profile-main-grid {
        grid-template-columns: 1fr;
    }
}

.profile-side-nav {
    border-radius: 12px;
    border: 1px solid rgba(148,163,184,0.35);
    background: rgba(248,250,252,0.9);
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.profile-side-nav .nav-title {
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 4px;
}

.profile-side-nav a {
    display: block;
    text-decoration: none;
    color: #475569;
    border-radius: 8px;
    padding: 8px 10px;
}

.profile-side-nav a.active,
.profile-side-nav a:hover {
    background: rgba(59,130,246,0.12);
    color: #1d4ed8;
}

.signin-calendar {
    margin-bottom: 14px;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid rgba(148,163,184,0.35);
    background: rgba(248,250,252,0.8);
}

.signin-calendar-title {
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 8px;
}

.signin-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
}

.signin-week span {
    text-align: center;
    color: #64748b;
    font-size: 12px;
}

.signin-grid .day {
    text-align: center;
    border-radius: 8px;
    padding: 6px 0;
    background: #fff;
    border: 1px solid rgba(148,163,184,0.25);
    font-size: 12px;
}

.signin-grid .day.empty {
    border: none;
    background: transparent;
}

.signin-grid .day.signed {
    background: rgba(34,197,94,0.15);
    border-color: rgba(34,197,94,0.35);
    color: #166534;
    font-weight: 700;
}

.back-link {
    display: inline-block;
    margin-top: 20px;
    color: #2563eb;
    text-decoration: none;
}

.post-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 18px 0;
    padding: 14px;
    border-radius: 12px;
    background: #f8fafc;
}

.post-nav a {
    color: #0f172a;
    text-decoration: none;
}

.comment-box {
    margin-top: 16px;
    padding-top: 8px;
    border-top: 1px dashed #cbd5e1;
}

.comment-list {
    margin-top: 10px;
    display: grid;
    gap: 10px;
}

.comment-item {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 12px;
    background: #fff;
}

.comment-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 12px;
    color: #64748b;
    margin-bottom: 6px;
}

.auth-wrap {
    padding: 34px 0;
}

.auth-card {
    max-width: 460px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 12px 24px rgba(15,23,42,0.1);
}

.auth-card h1 {
    margin-top: 0;
}

.auth-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.auth-tabs a {
    flex: 1;
    text-align: center;
    text-decoration: none;
    padding: 9px 10px;
    border-radius: 10px;
    color: #0f172a;
    background: #f1f5f9;
}

.auth-tabs a.active {
    color: #fff;
    background: linear-gradient(90deg, #2563eb, #7c3aed);
}

.auth-card label {
    display: grid;
    gap: 6px;
    margin-bottom: 10px;
}

/* Profile page hard overrides (must be after .auth-card) */
.profile-page {
    width: min(1320px, 96%);
}

.profile-page .auth-card.profile-modern {
    max-width: 1240px;
    width: 100%;
    margin: 0 auto;
    padding: 16px;
}

.profile-page .profile-main-grid {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 16px;
    align-items: start;
}

.profile-page .profile-top-card {
    margin-bottom: 14px;
}

.profile-page .profile-level-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 980px) {
    .profile-page .auth-card.profile-modern {
        max-width: 100%;
        padding: 12px;
    }
    .profile-page .profile-main-grid {
        grid-template-columns: 1fr;
    }
    .profile-page .profile-top-card {
        flex-direction: column;
        align-items: flex-start;
    }
}

.auth-input {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 14px;
}

.profile-avatar {
    width: 72px;
    height: 72px;
    border-radius: 999px;
    object-fit: cover;
    border: 2px solid #e2e8f0;
    margin: 8px 0;
}

.auth-btn {
    margin-top: 8px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(90deg, #2563eb, #7c3aed);
    color: #fff;
    padding: 10px 14px;
    cursor: pointer;
}

.auth-btn.secondary {
    background: #0f172a;
}

.auth-inline {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    margin-bottom: 10px;
}

.auth-error,
.auth-info {
    font-size: 13px;
    border-radius: 8px;
    padding: 8px 10px;
    margin-bottom: 10px;
}

.auth-error {
    background: #fee2e2;
    color: #991b1b;
}

.auth-info {
    background: #dbeafe;
    color: #1d4ed8;
}

.front-toast {
    position: fixed;
    left: 50%;
    top: 72px;
    min-width: 240px;
    max-width: min(86vw, 420px);
    text-align: center;
    background: linear-gradient(180deg, rgba(15,23,42,0.85), rgba(2,6,23,0.82));
    color: rgba(248,250,252,0.98);
    border: 1px solid rgba(255,255,255,0.42);
    border-radius: 14px;
    padding: 12px 16px;
    backdrop-filter: blur(14px) saturate(150%);
    -webkit-backdrop-filter: blur(14px) saturate(150%);
    box-shadow: 0 22px 48px rgba(2,6,23,0.42), inset 0 1px 0 rgba(255,255,255,0.22);
    opacity: 0;
    transform: translate(-50%, 0) scale(0.94);
    transition: all 0.25s ease;
    z-index: 100;
    font-size: 15px;
    font-weight: 900;
    line-height: 1.35;
    letter-spacing: 0.2px;
    text-shadow: 0 2px 12px rgba(0,0,0,0.35);
}

.front-toast.show {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
}

.back-to-top-btn {
    position: fixed;
    right: 22px;
    bottom: 24px;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(191, 219, 254, 0.7);
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.9), rgba(14, 165, 233, 0.9));
    color: #ffffff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 14px 30px rgba(2, 6, 23, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.32);
    z-index: 90;
    opacity: 0;
    transform: translateY(10px) scale(0.92);
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease, box-shadow .2s ease;
}

.back-to-top-btn.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.back-to-top-btn:hover {
    box-shadow: 0 18px 34px rgba(29, 78, 216, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.38);
    transform: translateY(-1px) scale(1.02);
}

.site-footer {
    margin-top: auto;
    padding: 18px 0 22px;
    background: linear-gradient(180deg, #22314a, #243754);
    color: #e2e8f4;
    text-align: center;
    border-top: 0;
}

.footer-inner {
    width: 100%;
    max-width: none;
    padding: 0 18px;
}

.footer-card {
    width: 100%;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(1300px 280px at 50% -40%, rgba(186,230,253,0.20), transparent 64%),
        linear-gradient(180deg, rgba(51,65,85,0.58), rgba(37,99,235,0.26));
    border: 0;
    border-radius: 12px;
    padding: 20px 16px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), 0 6px 14px rgba(15,23,42,0.10);
}

.footer-card::before {
    content: "";
    position: absolute;
    inset: -2px auto -2px -30%;
    width: 30%;
    background: linear-gradient(90deg, transparent, rgba(125, 211, 252, 0.18), transparent);
    transform: skewX(-20deg);
    animation: footerGlowSweep 8s linear infinite;
    pointer-events: none;
}

.footer-card > * {
    position: relative;
    z-index: 1;
}

.footer-title {
    color: #f3f7ff;
    font-size: 22px;
    font-weight: 800;
}

.footer-subtitle {
    margin-top: 6px;
    font-size: 14px;
    color: rgba(226, 232, 240, 0.95);
}

.footer-icp {
    margin-top: 10px;
}

.footer-icp a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(191, 219, 254, 0.30);
    background: linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.03));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.16), 0 6px 14px rgba(15,23,42,0.08);
    color: #dbeafe;
    text-decoration: none;
    transition: all 0.2s ease;
}

.footer-icp a:hover {
    color: #eff6ff;
    border-color: rgba(191, 219, 254, 0.45);
    background: linear-gradient(180deg, rgba(191,219,254,0.18), rgba(191,219,254,0.08));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), 0 10px 18px rgba(15,23,42,0.12);
    transform: translateY(-1px);
}

.footer-copyright {
    margin-top: 10px;
    font-size: 12px;
    color: rgba(203, 213, 225, 0.88);
}

@media screen and (max-width: 760px) {
    .back-to-top-btn {
        right: 14px;
    }

    .footer-inner {
        padding: 0 10px;
    }
    .footer-card {
        border-radius: 10px;
        padding: 16px 12px;
    }
    .footer-title {
        font-size: 18px;
    }
}

@keyframes footerGlowSweep {
    0% {
        left: -34%;
        opacity: 0;
    }
    12% {
        opacity: 1;
    }
    50% {
        opacity: 0.9;
    }
    100% {
        left: 120%;
        opacity: 0;
    }
}

@media screen and (max-width: 980px) {
    .store-content {
        flex-direction: column;
        align-items: stretch;
    }

    .store-left {
        max-width: 100%;
        padding-right: 0;
        flex: 1 1 auto;
    }

    .store-right {
        flex: 1 1 auto;
    }

    .home-swiper {
        height: 320px;
    }
}

@media screen and (max-width: 767px) {
    .home-swiper {
        height: 280px;
    }
}

@media screen and (max-width: 640px) {
    .store-title {
        font-size: 32px;
    }

    .store-left-info {
        font-size: 15px;
    }
}

@keyframes floatGlow {
    0% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-14px) scale(1.06); }
    100% { transform: translateY(0) scale(1); }
}

@keyframes slideIn {
    from { opacity: 0; transform: translate(-50%, -50%) translateY(10px); }
    to { opacity: 1; transform: translate(-50%, -50%) translateY(0); }
}

@keyframes ripple {
    from { opacity: 0.8; transform: translate(-50%, -50%) scale(1); }
    to { opacity: 0; transform: translate(-50%, -50%) scale(18); }
}

@keyframes breatheGlow {
    0%, 100% { box-shadow: 0 6px 16px rgba(79, 70, 229, 0.35); }
    50% { box-shadow: 0 10px 24px rgba(124, 58, 237, 0.55); }
}

@keyframes activeNavGlow {
    0% { left: -38%; opacity: 0; }
    12% { opacity: 1; }
    60% { opacity: 1; }
    100% { left: 110%; opacity: 0; }
}

/* Final mobile nav override (must stay at file end) */
@media screen and (max-width: 1100px) {
    .back-to-top-btn {
        bottom: calc(86px + env(safe-area-inset-bottom, 0px));
    }

    body {
        padding-bottom: calc(78px + env(safe-area-inset-bottom, 0px)) !important;
    }

    .site-header .top-nav.nav-center {
        display: none !important;
    }

    .mobile-bottom-nav {
        display: grid !important;
    }
}
