:root {
    color-scheme: dark;
    --bg: #0a101a;
    --bg-soft: rgba(28, 38, 56, 0.92);
    --panel: rgba(31, 42, 61, 0.9);
    --panel-strong: rgba(18, 25, 39, 0.94);
    --border: rgba(255, 255, 255, 0.12);
    --border-strong: rgba(255, 255, 255, 0.24);
    --text: #fbfdff;
    --muted: #b3bfd4;
    --gold: #f2cb73;
    --rose: #d86fb6;
    --blue: #78aaf8;
    --green: #7ed7a1;
    --danger: #f07b8f;
    --shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
}

* {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    font-family: "Lato", "Microsoft JhengHei", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 12% 16%, rgba(76, 167, 255, 0.3), transparent 0 28%),
        radial-gradient(circle at 84% 18%, rgba(231, 190, 104, 0.18), transparent 0 24%),
        radial-gradient(circle at 78% 72%, rgba(216, 111, 182, 0.22), transparent 0 28%),
        radial-gradient(circle at 26% 84%, rgba(87, 230, 198, 0.16), transparent 0 24%),
        linear-gradient(135deg, #0c1320 0%, #0c1320 34%, #11182a 68%, #090e18 100%);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 100%),
        linear-gradient(115deg, transparent 0 20%, rgba(120, 170, 248, 0.08) 34%, transparent 48%),
        linear-gradient(295deg, transparent 0 24%, rgba(216, 111, 182, 0.07) 40%, transparent 56%);
    background-size: 17px 17px, 100% 100%, 100% 100%;
    opacity: 0.92;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        conic-gradient(from 210deg at 78% 22%, rgba(120, 170, 248, 0.11), transparent 18%, transparent 72%, rgba(120, 170, 248, 0.08) 88%, transparent),
        linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 22%, transparent 78%, rgba(255, 255, 255, 0.018));
    mix-blend-mode: screen;
    opacity: 0.68;
}

.shell {
    position: relative;
    width: min(1420px, calc(100vw - 40px));
    margin: 0 auto;
    padding: 28px 0 56px;
}

.hero {
    position: relative;
    padding: 18px 0 8px;
}

.hero-bar,
.hero-copy,
.control-panel,
.page-grid {
    position: relative;
    z-index: 1;
}

.hero-bar {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    min-height: 44px;
}

.brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    text-decoration: none;
}

.brand-logo {
    display: block;
    width: min(430px, 66vw);
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.32));
}

.brand-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 72px;
    padding: 0 26px;
    border: 1px solid rgba(231, 190, 104, 0.3);
    border-radius: 22px;
    background: linear-gradient(145deg, rgba(231, 190, 104, 0.18), rgba(231, 190, 104, 0.04));
    color: #f7d58b;
    font: 700 clamp(1.32rem, 2vw, 1.8rem)/1 "Poppins", "Microsoft JhengHei", sans-serif;
    letter-spacing: 0.06em;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.hero-copy h1,
.section-heading h2,
.detail-head h2,
.drop-group h4 {
    font-family: "Poppins", "Microsoft JhengHei", sans-serif;
}

.eyebrow,
.section-note,
.detail-note {
    color: var(--muted);
}

.hero-copy {
    max-width: 900px;
    margin: 18px auto 0;
    text-align: center;
}

.eyebrow {
    margin: 0 0 10px;
    font: 700 0.74rem/1 "Poppins", sans-serif;
    letter-spacing: 0.24em;
    text-transform: uppercase;
}

.hero-copy h1 {
    margin: 0;
    font-size: clamp(2.6rem, 5vw, 4.6rem);
    line-height: 1.02;
}

.control-panel {
    margin-top: 16px;
    padding: 0 0 64px;
    background: transparent;
    border: 0;
}

.search-wrap,
.summary-strip,
.section-heading,
.result-card-top,
.result-drop-head {
    display: flex;
    align-items: center;
    gap: 14px;
}

.search-wrap {
    justify-content: center;
    flex-wrap: wrap;
}

.search-controls {
    display: grid;
    grid-template-columns: 196px minmax(0, 1fr);
    gap: 12px;
    align-items: end;
    width: min(1120px, 100%);
}

.mode-field,
.search-field {
    display: grid;
    gap: 12px;
    min-width: 0;
    text-align: center;
}

.mode-field {
    text-align: left;
}

.mode-field span,
.search-field span {
    font-size: 1rem;
    line-height: 1.8;
    color: #d2daeb;
}

.mode-field select,
.search-field input {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    min-height: 56px;
    margin: 0;
    padding: 0 22px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: rgba(12, 17, 28, 0.78);
    color: var(--text);
    font: inherit;
}

.mode-field select {
    padding-right: 44px;
    background-image:
        linear-gradient(45deg, transparent 50%, #90a5c8 50%),
        linear-gradient(135deg, #90a5c8 50%, transparent 50%);
    background-position:
        calc(100% - 24px) calc(50% - 3px),
        calc(100% - 18px) calc(50% - 3px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}

.search-field {
    flex: 0 1 900px;
    width: 100%;
}

.search-field input::placeholder {
    color: #72809c;
}

.mode-field select:focus,
.search-field input:focus {
    outline: none;
    border-color: rgba(120, 170, 248, 0.5);
    box-shadow: 0 0 0 3px rgba(120, 170, 248, 0.12);
}

.page-grid {
    align-items: start;
    margin-top: 24px;
    gap: 24px;
}

.results-column {
    flex: 1 1 0;
    min-width: 0;
}

.summary-strip {
    flex-wrap: wrap;
    margin-bottom: 20px;
    justify-content: center;
}

.summary-card,
.result-card,
.empty-state {
    border: 1px solid var(--border);
    background: var(--panel);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(12px);
}

.summary-card {
    min-width: 170px;
    padding: 18px 18px 16px;
    border-radius: 20px;
    text-align: center;
}

.summary-card strong {
    display: block;
    margin-bottom: 6px;
    font: 700 1.65rem/1 "Poppins", sans-serif;
}

.summary-card span {
    color: var(--muted);
    font-size: 0.88rem;
}

.section-heading {
    justify-content: space-between;
    margin-bottom: 14px;
}

.section-heading h2 {
    margin: 4px 0 0;
    font-size: 1.45rem;
}

.result-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
    gap: 12px;
}

.result-sentinel {
    width: 100%;
    height: 1px;
}

.result-card {
    width: 100%;
    min-height: 0;
    padding: 14px 16px 14px;
    border-radius: 18px;
    text-align: left;
    color: inherit;
    transition: border-color 0.18s ease, background 0.18s ease;
}

.result-card:hover,
.result-card:focus-visible {
    border-color: rgba(120, 170, 248, 0.5);
    background:
        linear-gradient(180deg, rgba(40, 53, 76, 0.96), rgba(25, 34, 52, 0.95)),
        linear-gradient(110deg, rgba(120, 170, 248, 0.08), transparent 38%, rgba(216, 111, 182, 0.06));
}

.result-card h3 {
    margin: 0;
    font-size: 1.18rem;
    line-height: 1.24;
    color: #ffd978;
    text-shadow: 0 0 16px rgba(255, 217, 120, 0.12);
}

.result-zones,
.result-meta {
    color: var(--muted);
}

.result-zones,
.result-meta {
    margin: 4px 0 0;
    font-size: 0.9rem;
}

.result-zones {
    color: #ff7d88;
    text-shadow: 0 0 14px rgba(255, 125, 136, 0.12);
}

.result-card-top {
    align-items: flex-start;
}

.result-drop-panel {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.result-drop-head {
    justify-content: flex-end;
    gap: 10px;
    margin-bottom: 10px;
}

.result-drop-count {
    color: var(--muted);
    font-size: 0.88rem;
}

.result-drop-list {
    display: grid;
    gap: 8px;
    max-height: 248px;
    overflow: auto;
    padding-right: 4px;
}

.result-drop-list::-webkit-scrollbar {
    width: 8px;
}

.result-drop-list::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(120, 170, 248, 0.28);
}

.drop-row {
    min-height: 52px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.042);
}

.drop-row.rare {
    border-color: rgba(231, 190, 104, 0.26);
    background: rgba(231, 190, 104, 0.07);
}

.drop-name {
    display: block;
    font-size: 0.96rem;
    line-height: 1.4;
    color: #f7faff;
}

.drop-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
    min-height: 0;
    margin-top: 0;
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.35;
}

.drop-meta.has-content {
    margin-top: 6px;
}

.result-card.item-mode .drop-row {
    min-height: 58px;
}

.empty-state {
    margin-top: 14px;
    padding: 24px;
    border-radius: 22px;
    text-align: center;
}

.empty-state strong {
    display: block;
    font: 600 1.1rem/1.4 "Poppins", sans-serif;
}

.empty-state p {
    margin: 10px 0 0;
    color: var(--muted);
}

.scroll-top-button {
    position: fixed;
    right: 28px;
    bottom: 26px;
    z-index: 30;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 56px;
    padding: 0 18px 0 16px;
    border: 1px solid rgba(120, 170, 248, 0.28);
    border-radius: 999px;
    background:
        linear-gradient(135deg, rgba(22, 30, 46, 0.94), rgba(9, 13, 22, 0.98)),
        linear-gradient(135deg, rgba(120, 170, 248, 0.08), rgba(216, 111, 182, 0.08));
    color: #eef4ff;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.34), 0 0 0 1px rgba(255, 255, 255, 0.03) inset;
    backdrop-filter: blur(14px);
    cursor: pointer;
    opacity: 0;
    transform: translateY(18px) scale(0.96);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.scroll-top-button.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.scroll-top-button:hover,
.scroll-top-button:focus-visible {
    border-color: rgba(231, 190, 104, 0.42);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.4), 0 0 28px rgba(120, 170, 248, 0.16);
    outline: none;
}

.scroll-top-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(120, 170, 248, 0.26), rgba(216, 111, 182, 0.18));
    font: 700 1rem/1 "Poppins", sans-serif;
}

.scroll-top-label {
    font: 700 0.92rem/1 "Poppins", "Microsoft JhengHei", sans-serif;
    letter-spacing: 0.04em;
}

@media (min-width: 1500px) {
    .result-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1120px) {
    .page-grid {
        display: block;
    }
}

@media (max-width: 720px) {
    .shell {
        width: min(100vw - 24px, 100%);
        padding: 12px 0 30px;
    }

    .hero {
        padding: 12px 0 8px;
    }

    .hero-bar,
    .search-wrap,
    .section-heading,
    .result-card-top {
        align-items: flex-start;
        flex-direction: column;
    }

    .hero-bar {
        align-items: center;
        justify-content: center;
        padding-top: 0;
    }

    .brand-logo {
        width: min(350px, 86vw);
    }

    .brand-fallback {
        min-height: 64px;
        padding: 0 20px;
        font-size: 1.22rem;
    }

    .result-list {
        grid-template-columns: 1fr;
    }

    .summary-card {
        min-width: calc(50% - 7px);
    }

    .control-panel {
        padding: 0 0 14px;
    }

    .search-field {
        width: 100%;
        flex: none;
    }

    .search-controls {
        grid-template-columns: 1fr;
        width: 100%;
    }

    .mode-field {
        width: 100%;
    }

    .search-field input {
        min-height: 56px;
        font-size: 16px;
    }

    .scroll-top-button {
        right: 16px;
        bottom: 16px;
        min-height: 52px;
        padding: 0 16px 0 14px;
    }

    .scroll-top-label {
        font-size: 0.88rem;
    }

}
