:root {
    --fan-primary: #5b67f1;
    --fan-primary-deep: #4652d9;
    --fan-secondary: #20b8a6;
    --fan-accent: #ff9b6a;
    --fan-text: #26324b;
    --fan-muted: #68748d;
    --fan-border: #e5e9f5;
    --fan-surface: rgba(255, 255, 255, 0.92);
    --fan-shadow: 0 24px 70px rgba(68, 79, 142, 0.14);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body.fan-page {
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    color: var(--fan-text);
    font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
    line-height: 1.7;
    background:
        radial-gradient(circle at 8% 8%, rgba(118, 210, 255, 0.28), transparent 30%),
        radial-gradient(circle at 92% 12%, rgba(190, 165, 255, 0.26), transparent 27%),
        radial-gradient(circle at 82% 88%, rgba(113, 230, 193, 0.18), transparent 28%),
        linear-gradient(145deg, #f7fbff 0%, #f9f7ff 48%, #f7fffc 100%);
    background-attachment: fixed;
}

body.fan-page::before,
body.fan-page::after {
    position: fixed;
    z-index: -1;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    content: "";
    filter: blur(4px);
    opacity: 0.55;
}

body.fan-page::before {
    top: 18%;
    left: -130px;
    background: linear-gradient(135deg, #bcecff, #d9d4ff);
}

body.fan-page::after {
    right: -120px;
    bottom: 8%;
    background: linear-gradient(135deg, #d6fff1, #ffe3d3);
}

.fan-shell {
    width: min(1160px, calc(100% - 40px));
    margin: 0 auto;
    padding: 54px 0 72px;
}

.fan-hero {
    position: relative;
    overflow: hidden;
    margin-bottom: 24px;
    padding: 42px 46px;
    border: 1px solid rgba(255, 255, 255, 0.85);
    border-radius: 30px;
    background: linear-gradient(120deg, rgba(255, 255, 255, 0.96), rgba(248, 249, 255, 0.84));
    box-shadow: var(--fan-shadow);
}

.fan-hero::after {
    position: absolute;
    top: -76px;
    right: -42px;
    width: 250px;
    height: 250px;
    border-radius: 44% 56% 58% 42%;
    background: linear-gradient(135deg, rgba(91, 103, 241, 0.16), rgba(32, 184, 166, 0.13));
    content: "";
    transform: rotate(18deg);
}

.fan-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding: 6px 12px;
    color: var(--fan-primary-deep);
    border: 1px solid rgba(91, 103, 241, 0.16);
    border-radius: 999px;
    background: rgba(91, 103, 241, 0.08);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.fan-title {
    position: relative;
    z-index: 1;
    margin: 0;
    color: #293254;
    font-size: clamp(34px, 5vw, 54px);
    font-weight: 800;
    letter-spacing: -0.04em;
}

.fan-title-dot {
    color: var(--fan-primary);
}

.fan-subtitle {
    position: relative;
    z-index: 1;
    max-width: 780px;
    margin: 12px 0 0;
    color: var(--fan-muted);
    font-size: 17px;
}

.fan-badges {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.fan-badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 13px;
    color: #4d5874;
    border: 1px solid var(--fan-border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    font-weight: 600;
}

.fan-card {
    margin-top: 22px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 26px;
    background: var(--fan-surface);
    box-shadow: 0 16px 50px rgba(74, 83, 135, 0.1);
    backdrop-filter: blur(14px);
}

.fan-card-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 22px;
    color: #313b5e;
    font-size: 19px;
    font-weight: 750;
}

.fan-card-title::before {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--fan-primary), var(--fan-secondary));
    box-shadow: 0 0 0 6px rgba(91, 103, 241, 0.09);
    content: "";
}

.fan-form,
.fan-form-grid {
    display: grid;
    grid-template-columns: minmax(180px, 0.8fr) minmax(260px, 1.2fr) auto;
    gap: 16px;
    align-items: end;
}

.fan-form-grid.three-fields {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.fan-field {
    min-width: 0;
}

.fan-field label,
.fan-page .form-group label {
    display: block;
    margin: 0 0 8px;
    color: #4b5672;
    font-size: 14px;
    font-weight: 700;
}

.fan-page input[type="text"],
.fan-page input[type="date"],
.fan-page input[type="number"],
.fan-page select,
.fan-page textarea,
.fan-page .form-control {
    width: 100% !important;
    min-height: 50px;
    padding: 12px 15px;
    color: var(--fan-text);
    border: 1px solid #dfe4f1;
    border-radius: 14px;
    outline: none;
    background: #fbfcff;
    box-shadow: inset 0 1px 2px rgba(67, 76, 122, 0.03);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.fan-page input[type="text"]::placeholder,
.fan-page textarea::placeholder {
    color: #9aa4b9;
}

.fan-page input[type="text"]:focus,
.fan-page input[type="date"]:focus,
.fan-page input[type="number"]:focus,
.fan-page select:focus,
.fan-page textarea:focus,
.fan-page .form-control:focus {
    border-color: rgba(91, 103, 241, 0.65);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(91, 103, 241, 0.1);
}

.fan-page button,
.fan-page input[type="submit"],
.fan-page .btn-primary {
    min-height: 50px;
    padding: 12px 24px;
    color: #fff;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--fan-primary), #7b62e9);
    box-shadow: 0 10px 24px rgba(91, 103, 241, 0.25);
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.fan-page button:hover,
.fan-page input[type="submit"]:hover,
.fan-page .btn-primary:hover {
    color: #fff;
    filter: saturate(1.08);
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(91, 103, 241, 0.32);
}

.fan-page button:active,
.fan-page input[type="submit"]:active {
    transform: translateY(0);
}

.fan-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 18px;
    padding: 13px 15px;
    color: #59647c;
    border: 1px solid #e7e9f5;
    border-radius: 14px;
    background: linear-gradient(135deg, #f9f8ff, #f5fffc);
    font-size: 14px;
}

.fan-note::before {
    color: var(--fan-accent);
    content: "●";
    font-size: 10px;
}

.fan-results {
    min-height: 120px;
    overflow-wrap: anywhere;
}

.fan-results:empty::before {
    display: grid;
    min-height: 118px;
    place-items: center;
    color: #9aa4b8;
    border: 1px dashed #dfe4ef;
    border-radius: 16px;
    background: rgba(248, 250, 255, 0.7);
    content: "查询结果将在这里展示";
}

.fan-results li,
.fan-result-item {
    margin: 10px 0;
    padding: 16px 18px;
    list-style: none;
    border: 1px solid var(--fan-border);
    border-radius: 15px;
    background: #fbfcff;
}

.fan-results a,
.fan-result-item a {
    color: var(--fan-primary-deep);
    font-weight: 700;
    text-decoration: none;
}

.fan-result-item {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    align-items: center;
    color: var(--fan-text);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.fan-result-item:hover {
    border-color: rgba(91, 103, 241, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(75, 84, 137, 0.09);
}

.fan-result-item span:first-child {
    flex: 1 1 260px;
    font-weight: 700;
}

.fan-empty {
    min-height: 120px;
    display: grid;
    place-items: center;
    color: #9aa4b8;
    border: 1px dashed #dfe4ef;
    border-radius: 16px;
    background: rgba(248, 250, 255, 0.7);
}

.fan-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.fan-action {
    position: relative;
    display: block;
    overflow: hidden;
    min-height: 220px;
    padding: 30px;
    color: inherit;
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 16px 50px rgba(74, 83, 135, 0.1);
    text-decoration: none;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.fan-action:hover {
    color: inherit;
    text-decoration: none;
    transform: translateY(-6px);
    box-shadow: 0 24px 60px rgba(74, 83, 135, 0.16);
}

.fan-action::after {
    position: absolute;
    right: -30px;
    bottom: -50px;
    width: 170px;
    height: 170px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(91, 103, 241, 0.16), rgba(32, 184, 166, 0.12));
    content: "";
}

.fan-action-icon {
    display: grid;
    width: 54px;
    height: 54px;
    margin-bottom: 24px;
    place-items: center;
    color: var(--fan-primary-deep);
    border-radius: 17px;
    background: linear-gradient(135deg, rgba(91, 103, 241, 0.13), rgba(32, 184, 166, 0.12));
    font-size: 25px;
    font-weight: 800;
}

.fan-action h2 {
    margin: 0 0 8px;
    color: #303a5d;
    font-size: 23px;
}

.fan-action p {
    margin: 0;
    color: var(--fan-muted);
}

.fan-action button {
    margin-top: 24px;
    pointer-events: none;
}

.fan-crack .container,
.fan-analysis .container {
    width: min(1160px, calc(100% - 40px));
    max-width: none;
    margin: 0 auto;
    padding: 54px 0 72px;
}

.fan-analysis .fan-hero,
.fan-crack .fan-hero {
    margin-bottom: 22px;
}

.fan-analysis .fan-card,
.fan-crack .fan-card {
    padding: 30px;
}

.fan-analysis .fan-card > .row,
.fan-crack .fan-card > .row {
    display: flex;
    gap: 18px;
    margin: 0;
    padding: 0;
    background: transparent;
}

.fan-analysis .fan-card > .row > .col-md-3,
.fan-crack .fan-card > .row > .col-md-3 {
    flex: 1 1 240px;
    max-width: none;
    padding: 0;
}

.fan-analysis .fan-submit-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin: 8px 0 0;
}

.fan-inline-note {
    color: var(--fan-muted);
    font-size: 14px;
}

.fan-search-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.fan-date-field {
    grid-column: span 1;
}

.fan-date-range {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 8px;
    align-items: center;
}

.fan-date-range span {
    color: var(--fan-muted);
    font-size: 13px;
}

.fan-search-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-top: 24px;
}

.fan-page .fan-secondary-button {
    color: var(--fan-primary-deep);
    border: 1px solid rgba(91, 103, 241, 0.22);
    background: rgba(91, 103, 241, 0.08);
    box-shadow: none;
}

.fan-page .fan-secondary-button:hover {
    color: var(--fan-primary-deep);
    background: rgba(91, 103, 241, 0.13);
    box-shadow: 0 10px 24px rgba(91, 103, 241, 0.12);
}

.fan-export-card {
    border-color: rgba(32, 184, 166, 0.18);
}

.fan-export-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
    gap: 16px;
    align-items: end;
}

.fan-pagination {
    margin-top: 24px;
    padding-top: 22px;
    border-top: 1px solid var(--fan-border);
}

.fan-pagination .pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
}

.fan-pagination .page-link {
    display: grid;
    min-height: 46px;
    padding: 10px 16px;
    place-items: center;
    color: var(--fan-primary-deep);
    border: 1px solid var(--fan-border);
    border-radius: 12px;
    background: #fbfcff;
    cursor: pointer;
    text-decoration: none;
}

.fan-pagination #page {
    width: 88px !important;
    min-height: 46px;
    text-align: center;
}

.fan-pagination button {
    min-height: 46px;
}

.fan-analysis .fan-card #result,
.fan-crack .fan-card #result {
    min-height: 120px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.fan-crack .fan-guide h5 {
    margin-right: 0 !important;
    margin-left: 0 !important;
}

.fan-crack .container,
.fan-analysis .container {
    overflow-wrap: anywhere;
}

.fan-crack .row,
.fan-analysis .row {
    margin: 0;
}

.fan-crack .row > [class*="col-"],
.fan-analysis .row > [class*="col-"] {
    max-width: none;
    padding: 0;
}

.fan-analysis #Btn {
    margin-top: 14px;
    background: linear-gradient(135deg, var(--fan-secondary), #35c7a9);
    box-shadow: 0 10px 24px rgba(32, 184, 166, 0.22);
}

.fan-analysis #result:empty::before,
.fan-crack #result:empty::before {
    display: grid;
    min-height: 80px;
    place-items: center;
    color: #9aa4b8;
    content: "处理结果将在这里展示";
}

.fan-crack .container > .row[style] {
    margin: 0 !important;
    padding-top: 22px;
    padding-bottom: 28px;
    border-radius: 0 0 24px 24px;
}

.fan-crack .container > .row[style] .form-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin: 0;
}

.fan-crack .container > .row[style] span {
    padding-left: 0 !important;
    color: var(--fan-muted);
    font-size: 14px;
}

.fan-crack .container > div:nth-last-of-type(1) {
    margin-top: 22px;
}

.fan-crack h5 {
    position: relative;
    margin: 14px 0 0 !important;
    padding: 18px 52px 18px 22px;
    color: #35405f;
    border: 1px solid var(--fan-border);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 8px 24px rgba(74, 83, 135, 0.06);
    font-size: 17px;
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.fan-crack h5::after {
    position: absolute;
    top: 50%;
    right: 22px;
    color: var(--fan-primary);
    content: "+";
    font-size: 24px;
    transform: translateY(-52%);
}

.fan-crack h5:hover {
    border-color: rgba(91, 103, 241, 0.35);
    transform: translateY(-1px);
}

.fan-crack .description {
    max-height: 520px;
    overflow: auto;
    margin: 8px 0 18px !important;
    padding: 20px 22px !important;
    border: 1px solid #e7eaf3;
    border-radius: 16px;
    background: #fbfcff;
    color: #56617a;
    font-size: 14px;
}

.fan-crack .description p {
    margin-bottom: 10px;
}

@media (max-width: 800px) {
    .fan-shell,
    .fan-crack .container,
    .fan-analysis .container {
        width: min(100% - 24px, 1160px);
        padding-top: 24px;
    }

    .fan-hero {
        padding: 30px 24px;
        border-radius: 22px;
    }

    .fan-card {
        padding: 22px 18px;
        border-radius: 20px;
    }

    .fan-form,
    .fan-form-grid,
    .fan-form-grid.three-fields,
    .fan-actions,
    .fan-search-grid,
    .fan-export-grid {
        grid-template-columns: 1fr;
    }

    .fan-date-range {
        grid-template-columns: 1fr;
    }

    .fan-date-range span {
        display: none;
    }

    .fan-search-actions {
        align-items: stretch;
    }

    .fan-search-actions .fan-inline-note {
        width: 100%;
    }

    .fan-pagination .pagination {
        display: grid;
        grid-template-columns: 1fr 86px 1fr;
    }

    .fan-pagination .page-item:last-child {
        grid-column: 1 / -1;
    }

    .fan-pagination #page {
        width: 100% !important;
    }

    .fan-page button,
    .fan-page input[type="submit"] {
        width: 100%;
    }

    .fan-analysis .fan-card > .row,
    .fan-crack .fan-card > .row {
        flex-direction: column;
        gap: 0;
    }

    .fan-analysis .fan-card > .row > .col-md-3,
    .fan-crack .fan-card > .row > .col-md-3 {
        flex: none;
        width: 100%;
    }

    .fan-crack .fan-card > .row[style] .form-group {
        width: 100%;
        min-width: 0;
    }

    .fan-crack .fan-card > .row[style] span {
        display: block;
        padding: 10px 0 0 !important;
        overflow-wrap: anywhere;
    }

}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
