:root {
    --bg: #edf4ff;
    --bg-warm: rgba(255, 226, 199, 0.48);
    --bg-cool: rgba(192, 224, 255, 0.55);
    --panel: #ffffff;
    --panel-soft: rgba(255, 255, 255, 0.92);
    --line: #dde5f2;
    --line-dark: #272727;
    --text: #181818;
    --muted: #98a0b3;
    --shadow: 0 18px 40px rgba(94, 112, 144, 0.12);
    --font: "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    color: var(--text);
    font-family: var(--font);
    background:
        radial-gradient(circle at 12% 24%, var(--bg-cool), transparent 32%),
        radial-gradient(circle at 88% 82%, var(--bg-warm), transparent 22%),
        linear-gradient(135deg, #f7fbff 0%, var(--bg) 62%, #f3f6ff 100%);
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.layout-shell {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

.left-rail {
    position: fixed;
    inset: 0 auto 0 0;
    width: 114px;
    background: rgba(255, 255, 255, 0.88);
    border-right: 1px solid rgba(218, 224, 236, 0.8);
    border-radius: 0 22px 22px 0;
    box-shadow: 2px 0 18px rgba(94, 112, 144, 0.06);
    z-index: 5;
}

.rail-logo {
    width: 46px;
    margin: 14px 0 0 34px;
}

.rail-trigger {
    position: absolute;
    left: 84px;
    top: 50%;
    width: 52px;
    height: 52px;
    border: 1px solid #eef2f8;
    border-radius: 50%;
    background: #fff;
    box-shadow: var(--shadow);
    transform: translateY(-50%);
}

.rail-trigger::before {
    content: "";
    position: absolute;
    inset: 18px 20px 18px 16px;
    border-top: 3px solid #1f1f1f;
    border-right: 3px solid #1f1f1f;
    transform: rotate(45deg);
}

.page {
    margin-left: 114px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.topbar {
    height: 76px;
    padding: 0 30px 0 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(220, 228, 240, 0.92);
}

.brand-anchor {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.brand-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 17px;
    font-weight: 700;
}

.brand-badge {
    width: 18px;
    height: 22px;
    border-radius: 3px;
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 18px;
    line-height: 1;
}

.brand-underline {
    width: 58px;
    height: 3px;
    border-radius: 999px;
    background: var(--red);
}

.topbar-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 20px;
}

.lang-box {
    min-width: 150px;
    height: 46px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.86);
    display: flex;
    align-items: center;
    gap: 12px;
}

.top-icon {
    width: 28px;
    height: 28px;
    color: #63697b;
    display: grid;
    place-items: center;
    font-size: 24px;
}

.divider {
    width: 1px;
    height: 32px;
    background: #e7ebf3;
}

.gem-icon {
    width: 22px;
    height: 22px;
    color: #f4b550;
    display: grid;
    place-items: center;
    font-size: 22px;
}

.user-pill {
    min-width: 210px;
    height: 46px;
    padding: 0 12px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.88);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.auth-guest {
    height: 46px;
    padding: 0 14px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.88);
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
}

.auth-guest a:first-child {
    color: var(--red);
}

.auth-guest a + a {
    color: #5f6778;
}

.user-pill-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.user-pill img {
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

.user-name {
    max-width: 70px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 700;
}

.caret {
    color: #8a8f9f;
    font-size: 18px;
}

.logout-button {
    border: 0;
    height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    color: #fff;
    background: var(--red);
    font-size: 13px;
    font-weight: 700;
}

.logout-button:hover {
    background: #d72f2a;
}

.home-main,
.result-main {
    flex: 1;
    width: min(1400px, calc(100% - 120px));
    margin: 0 auto;
}

.home-main {
    display: grid;
    place-items: center;
    padding: 64px 0 48px;
}

.hero-block {
    width: min(998px, 100%);
    text-align: center;
}

.hero-logo {
    width: min(500px, 70%);
    margin-bottom: 12px;
}

.hero-slogan {
    margin: 16px 0 54px;
    color: #8e94a2;
    font-size: 28px;
    font-weight: 700;
}

.search-shell {
    width: 100%;
    min-height: 92px;
    padding: 12px 16px;
    border: 3px solid #252525;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.98);
    display: flex;
    align-items: center;
    gap: 16px;
}

.lang-switcher {
    flex: 0 0 220px;
    height: 56px;
    border: 1px solid #f0f2f5;
    border-radius: 18px;
    background: #f8f9fc;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 800;
}

.lang-switcher select {
    border: 0;
    background: transparent;
    font-size: 20px;
    font-weight: 800;
    appearance: none;
    color: #242424;
    padding-right: 16px;
    background-image: linear-gradient(45deg, transparent 50%, #b6bdca 50%), linear-gradient(135deg, #b6bdca 50%, transparent 50%);
    background-position: calc(100% - 10px) 50%, calc(100% - 4px) 50%;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}

.lang-divider {
    color: #434852;
}

.lang-swap-button {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    color: #434852;
    background: transparent;
    display: grid;
    place-items: center;
    font-size: 26px;
    font-weight: 800;
    line-height: 1;
    transition: background 0.16s ease, transform 0.16s ease;
}

.lang-swap-button:hover {
    background: #eef2f8;
    transform: rotate(180deg);
}

.search-input {
    flex: 1;
    border: 0;
    background: transparent;
    font-size: 22px;
    color: #232323;
    outline: none;
}

.search-input::placeholder,
.modal-input::placeholder {
    color: #b7bece;
}

.search-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.clear-dot {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    color: #d0d5de;
    background: #eceff6;
    display: grid;
    place-items: center;
    font-size: 18px;
}

.vertical-line {
    width: 1px;
    height: 34px;
    background: #e4e8f1;
}

.icon-button {
    width: 56px;
    height: 56px;
    border: 0;
    position: relative;
}

.icon-button-search {

    background: url(../assets/d75TUyEpSf.svg) no-repeat center;
}

.icon-button-audio {

    background: url(../assets/wWVGSBeZSb.svg) no-repeat center;
}

.search-icon-red::before,
.sound-icon::before {
    content: "";
    position: absolute;
}

.search-icon-red::before {
    left: 12px;
    top: 11px;
    width: 24px;
    height: 24px;
    border: 5px solid var(--red);
    border-radius: 50%;
}

.search-icon-red::after,
.sound-icon::after {
    content: "";
    position: absolute;
}

.search-icon-red::after {
    right: 11px;
    bottom: 12px;
    width: 16px;
    height: 5px;
    border-radius: 999px;
    background: var(--red);
    transform: rotate(45deg);
}

.sound-icon::before {
    left: 12px;
    top: 12px;
    width: 28px;
    height: 28px;
    border: 5px solid var(--cyan);
    border-left-color: transparent;
    border-radius: 50%;
}

.sound-icon::after {
    left: 12px;
    top: 20px;
    width: 19px;
    height: 14px;
    border: 5px solid var(--cyan);
    border-top-color: transparent;
    border-left-color: transparent;
    border-bottom-left-radius: 18px;
    transform: rotate(45deg);
}

.site-footer {
    padding: 24px 0 16px;
    text-align: center;
    color: #9da4b4;
    font-size: 18px;
}

.stamp {
    width: 44px;
    height: 44px;
    margin: 0 auto 12px;
    border-radius: 10px;
    color: #fff;
    background: linear-gradient(180deg, #ffa4a1, #ec655e);
    display: grid;
    place-items: center;
    font-size: 16px;
    font-weight: 700;
}

.stamp-image {
    width: 52px;
    height: 52px;
    display: block;
    margin: 0 auto 12px;
    object-fit: contain;
}

.overlay-page::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(26, 26, 26, 0.48);
    z-index: 10;
}

.modal-stage {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    z-index: 11;
    padding: 20px;
}

.modal-card {
    position: relative;
    width: 600px;
    max-width: calc(100vw - 32px);
    min-height: 640px;
    padding: 34px 44px 30px;
    border-radius: 28px;
    background: linear-gradient(180deg, #fff9f8 0%, #ffffff 18%);
    box-shadow: 0 20px 48px rgba(37, 37, 37, 0.14);
}

.modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: #8f97a8;
    display: grid;
    place-items: center;
    font-size: 30px;
    line-height: 1;
    transition: background 0.16s ease, color 0.16s ease;
}

.modal-close:hover {
    color: #252525;
    background: #f3f5f8;
}

.modal-card.short {
    min-height: 514px;
}

.modal-logo {
    display: block;
    width: 220px;
    margin: 0 auto 14px;
}

.modal-title-row {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 36px;
}

.modal-title-row::before,
.modal-title-row::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e9edf2;
}

.modal-title {
    flex: 0 0 auto;
    font-size: 28px;
    font-weight: 700;
}

.modal-tip {
    margin: 6px 0 28px;
    color: #b4bbca;
    font-size: 18px;
    line-height: 1.6;
}

.modal-form {
    display: grid;
    gap: 22px;
}

.modal-input,
.inline-shell {
    width: 100%;
    height: 58px;
    border: 2px solid #e1e7f1;
    border-radius: 12px;
    background: #fff;
}

.modal-input {
    padding: 0 18px;
    font-size: 18px;
    outline: none;
}

.inline-shell {
    display: flex;
    align-items: center;
    overflow: hidden;
}

.phone-prefix {
    flex: 0 0 auto;
    padding: 0 16px;
    font-size: 18px;
    font-weight: 700;
}

.inline-shell input {
    flex: 1;
    height: 100%;
    border: 0;
    padding: 0 16px 0 0;
    outline: none;
    font-size: 18px;
}

.split-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 150px;
    gap: 16px;
}

.outline-button,
.primary-button {
    border: 0;
    border-radius: 14px;
    font-size: 18px;
    font-weight: 700;
}

.outline-button {
    height: 58px;
    border: 2px solid #e1e7f1;
    background: #fff;
}

.primary-button {
    height: 66px;
    color: #fff;
    background: red;
}

.agree-row {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #9ea6b6;
    font-size: 18px;
}

.agree-row input {
    width: 22px;
    height: 22px;
    accent-color: var(--red);
}

.agree-row a,
.link-left {
    color: var(--red);
}

.modal-actions {
    margin-top: 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    color: #8f97a8;
    font-size: 16px;
}

.link-right {
    color: #8f97a8;
}

.message-line {
    min-height: 24px;
    color: #9aa3b5;
    font-size: 15px;
}

.message-line[data-type="error"] {
    color: #cb342f;
}

.message-line[data-type="success"] {
    color: #198a54;
}

.result-main {
    padding: 26px 0 42px;
}

.result-search-wrap {
    margin-top: 0;
}

.result-title {
    margin: 34px 0 34px;
    font-size: 54px;
    font-weight: 800;
}

.status-panel,
.result-card {
    border: 1px solid rgba(222, 229, 242, 0.9);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow);
}

.status-panel {
    margin-bottom: 30px;
    overflow: hidden;
}

.status-head {
    min-height: 70px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 20px;
    font-weight: 700;
}

.status-dot {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #f0f0f0;
    position: relative;
}

.status-dot::before {
    content: "";
    position: absolute;
    inset: 9px;
    border-radius: 50%;
    background: #202020;
}

.status-progress {
    height: 6px;
    background: rgba(246, 50, 46, 0.14);
}

.status-progress span {
    display: block;
    width: 68%;
    height: 100%;
    background: var(--red);
}

.skeleton-grid {
    display: grid;
    gap: 24px;
}

.result-card {
    padding: 22px 28px;
    margin-bottom: 18px;
}

.card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.card-main {
    flex: 1;
    min-width: 0;
}

.card-index-title {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.card-index {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    color: #a9b0c0;
    background: #f6f8fb;
    display: grid;
    place-items: center;
    font-size: 16px;
}

.card-title {
    color: var(--red);
    font-size: 22px;
    font-weight: 700;
}

.check-mark {
    position: relative;
    width: 28px;
    height: 28px;
    margin-top: 6px;
}

.check-mark::before,
.check-mark::after {
    content: "";
    position: absolute;
    background: var(--red);
    border-radius: 999px;
}

.check-mark::before {
    width: 8px;
    height: 4px;
    left: 2px;
    top: 14px;
    transform: rotate(45deg);
}

.check-mark::after {
    width: 20px;
    height: 4px;
    left: 7px;
    top: 11px;
    transform: rotate(-45deg);
}

.source-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
}

.source-badge {
    width: 36px;
    height: 36px;
    border: 1px solid #edf1f5;
    border-radius: 8px;
    background: #fff;
    color: #677086;
    display: grid;
    place-items: center;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: border-color 0.16s ease, color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.source-badge.is-active {
    border-color: rgba(239, 47, 45, 0.45);
    color: var(--red);
    background: #fff5f5;
    box-shadow: 0 8px 18px rgba(239, 47, 45, 0.12);
}

.source-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    border-radius: 4px;
}

.source-fallback {
    line-height: 1;
}

.card-divider {
    height: 1px;
    margin: 0 0 16px;
    background: #edf1f6;
}

.card-text {
    color: #697286;
    font-size: 16px;
    line-height: 1.8;
}

.card-text .hit {
    color: var(--red);
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-top: 20px;
}

.cache-tag {
    color: #7e8799;
    font-size: 14px;
}

.link-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.source-link {
    color: var(--red);
    font-size: 14px;
    border-bottom: 1px solid transparent;
    transition: color 0.16s ease, border-color 0.16s ease, font-weight 0.16s ease;
}

.source-link.is-active {
    color: #121821;
    font-weight: 700;
    border-color: var(--red);
}

.skeleton-card {
    padding: 20px 26px;
}

.skeleton-line,
.skeleton-box {
    background: linear-gradient(90deg, #f4f6fb, #eef2f8, #f4f6fb);
    background-size: 220% 100%;
    animation: shimmer 1.2s linear infinite;
    border-radius: 10px;
}

.skeleton-line {
    height: 18px;
}

.skeleton-line.lg {
    height: 24px;
    width: 308px;
}

.skeleton-line.sm {
    width: 130px;
}

.skeleton-box {
    width: 36px;
    height: 36px;
}

.skeleton-badges {
    display: flex;
    gap: 12px;
    margin: 16px 0;
}

.skeleton-body {
    height: 84px;
    margin: 18px 0;
}

.hidden {
    display: none !important;
}

@keyframes shimmer {
    from {
        background-position: 0 0;
    }
    to {
        background-position: 220% 0;
    }
}

@media (max-width: 1280px) {
    .home-main,
    .result-main {
        width: calc(100% - 90px);
    }
}

@media (max-width: 960px) {
    .left-rail {
        display: none;
    }

    .page {
        margin-left: 0;
    }

    .topbar {
        padding: 0 16px;
    }

    .brand-anchor {
        position: static;
        transform: none;
    }

    .topbar {
        gap: 14px;
        justify-content: space-between;
    }

    .topbar-right {
        gap: 10px;
    }

    .hero-slogan {
        font-size: 22px;
        margin-bottom: 32px;
    }

    .search-shell {
        flex-wrap: wrap;
        padding: 12px;
        min-height: auto;
    }

    .lang-switcher {
        flex: 1 1 100%;
    }

    .search-input {
        flex: 1 1 100%;
        min-height: 46px;
    }

    .search-actions {
        margin-left: auto;
    }

    .result-title {
        font-size: 40px;
    }

    .modal-card {
        width: 100%;
        padding: 28px 22px 24px;
    }
}

@media (max-width: 640px) {
    .topbar {
        flex-wrap: wrap;
        height: auto;
        padding-top: 12px;
        padding-bottom: 12px;
    }

    .topbar-right {
        width: 100%;
        justify-content: flex-end;
    }

    .lang-box {
        min-width: 0;
        width: 130px;
    }

    .user-pill {
        min-width: 176px;
    }

    .home-main,
    .result-main {
        width: calc(100% - 28px);
    }

    .hero-logo {
        width: 86%;
    }

    .hero-slogan {
        font-size: 20px;
    }

    .search-shell {
        border-width: 2px;
    }

    .split-row {
        grid-template-columns: 1fr;
    }

    .modal-actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .result-title {
        font-size: 28px;
    }

    .card-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .link-list {
        justify-content: flex-start;
    }
}
