:root {
    --bg: #0b0d10;
    --panel: #14171b;
    --panel-2: #1b1f24;
    --line: rgba(229, 177, 74, .28);
    --gold: #e5b14a;
    --gold-light: #ffd77c;
    --red: #8d251e;
    --text: #eee7d9;
    --muted: #aaa398;
    --green: #72c785;
    --shadow: 0 18px 55px rgba(0, 0, 0, .42);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at 12% 8%, rgba(141, 37, 30, .17), transparent 28rem),
        radial-gradient(circle at 88% 32%, rgba(229, 177, 74, .08), transparent 32rem),
        var(--bg);
    font: 15px/1.55 "Segoe UI", Arial, sans-serif;
}
a { color: inherit; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    min-height: 74px;
    padding: 0 4vw;
    border-bottom: 1px solid var(--line);
    background: rgba(8, 10, 12, .93);
    backdrop-filter: blur(14px);
}
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-right: auto;
    color: var(--gold-light);
    text-decoration: none;
    font-family: Georgia, serif;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: .08em;
}
.brand img { width: 118px; height: 48px; object-fit: contain; }
.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a {
    padding: 11px 12px;
    border-radius: 6px;
    color: #d8d1c5;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .02em;
}
.main-nav a:hover, .main-nav a.active { color: #fff4cf; background: rgba(229, 177, 74, .13); }
.menu-toggle { display: none; color: var(--gold); background: none; border: 0; font-size: 26px; }

.hero {
    position: relative;
    min-height: 420px;
    display: grid;
    place-items: center;
    overflow: visible;
    border-bottom: 1px solid var(--line);
    background: url("lupus2-top-bg.jpg") center 34% / cover no-repeat;
}
.hero-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(6, 7, 9, .92), rgba(6, 7, 9, .48) 52%, rgba(6, 7, 9, .82)), linear-gradient(0deg, var(--bg), transparent 48%); }
.hero-content { position: relative; z-index: 10; width: min(820px, 90vw); text-align: center; }
.eyebrow { color: var(--gold); font-weight: 800; font-size: 12px; letter-spacing: .22em; }
.hero h1 { margin: 10px 0 4px; color: #fff3ce; font: 700 clamp(40px, 7vw, 76px)/1 Georgia, serif; text-shadow: 0 3px 20px #000, 0 0 30px rgba(229, 177, 74, .22); }
.hero p { margin: 15px 0 25px; color: #d4cec3; font-size: 17px; }
.global-search { display: flex; padding: 7px; border: 1px solid rgba(255, 215, 124, .5); border-radius: 9px; background: rgba(8, 10, 12, .92); box-shadow: var(--shadow); }
.global-search input { flex: 1; min-width: 0; padding: 14px 16px; color: #fff; background: transparent; border: 0; outline: 0; }
.global-search button, .primary-button {
    padding: 12px 22px;
    border: 1px solid #f0c666;
    border-radius: 6px;
    color: #25180b;
    background: linear-gradient(#f6d577, #bf8125);
    font-weight: 800;
    cursor: pointer;
}
.search-suggestions { position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 20; max-height: 360px; overflow: auto; scrollbar-width: thin; scrollbar-color: rgba(229, 177, 74, .85) #0d0f12; scrollbar-gutter: stable; border: 1px solid var(--line); border-radius: 8px; background: #121519; box-shadow: var(--shadow); text-align: left; }
.search-suggestions::-webkit-scrollbar { width: 9px; }
.search-suggestions::-webkit-scrollbar-track { background: #0d0f12; border-left: 1px solid rgba(229, 177, 74, .12); }
.search-suggestions::-webkit-scrollbar-thumb { border: 2px solid #0d0f12; border-radius: 999px; background: linear-gradient(#f0c666, #a86d1e); }
.search-suggestions::-webkit-scrollbar-thumb:hover { background: linear-gradient(#ffd77c, #c88a2d); }
.search-suggestions::-webkit-scrollbar-corner { background: #0d0f12; }
.suggestion { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid rgba(255,255,255,.05); text-decoration: none; }
.suggestion:hover { background: rgba(229,177,74,.1); }
.suggestion img { width: 32px; height: 32px; object-fit: contain; }
.suggestion small { color: var(--gold); margin-left: auto; }

.page-shell { width: min(1280px, 94vw); min-height: 550px; margin: 0 auto; padding: 42px 0 80px; }
.loading-panel { min-height: 330px; display: grid; place-content: center; justify-items: center; color: var(--muted); }
.spinner { width: 38px; height: 38px; border: 3px solid rgba(229,177,74,.18); border-top-color: var(--gold); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.section-head { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin: 0 0 24px; }
.section-head h2, .detail-title h1 { margin: 0; color: #fff0c4; font: 700 clamp(28px, 4vw, 42px)/1.15 Georgia, serif; }
.section-head p, .detail-title p { margin: 6px 0 0; color: var(--muted); }
.stat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin: -75px auto 42px; position: relative; z-index: 4; }
.stat-card { padding: 20px; border: 1px solid var(--line); border-radius: 10px; background: linear-gradient(145deg, rgba(31,35,40,.97), rgba(15,17,20,.97)); box-shadow: var(--shadow); }
.stat-card strong { display: block; color: var(--gold-light); font: 700 28px/1 Georgia, serif; }
.stat-card span { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }

.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.content-card { position: relative; overflow: hidden; min-height: 220px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); box-shadow: 0 12px 30px rgba(0,0,0,.2); text-decoration: none; transition: .18s ease; }
.content-card:hover { transform: translateY(-3px); border-color: rgba(255,215,124,.68); box-shadow: 0 16px 34px rgba(0,0,0,.36); }
.guide-card { min-height: 255px; display: flex; align-items: end; background-position: center; background-size: cover; }
.guide-card::before { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(8,10,12,.97), rgba(8,10,12,.2) 80%); }
.guide-card-body { position: relative; z-index: 2; padding: 20px; }
.guide-card h3, .list-card h3 { margin: 0 0 7px; color: #fff0c5; font: 700 20px/1.2 Georgia, serif; }
.guide-card p, .list-card p { margin: 0; color: #c5beb3; }
.tag { display: inline-flex; padding: 4px 8px; border: 1px solid rgba(229,177,74,.25); border-radius: 999px; color: var(--gold-light); background: rgba(229,177,74,.09); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.list-card { display: flex; align-items: center; gap: 16px; min-height: 105px; padding: 16px; }
.list-card img, .item-icon { flex: 0 0 auto; width: 58px; height: 70px; object-fit: contain; image-rendering: auto; }
.list-card .fallback-icon, .detail-icon .fallback-icon { display: grid; place-items: center; width: 58px; height: 58px; border: 1px solid var(--line); border-radius: 8px; color: var(--gold); background: #0d0f12; font-weight: 800; }
.list-card small { color: var(--muted); }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 22px; }
.toolbar input, .toolbar select { min-height: 42px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 7px; color: var(--text); background: #111418; outline: 0; }
.toolbar input { flex: 1; min-width: 230px; }
.pager { display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: 28px; }
.pager button { padding: 9px 14px; border: 1px solid var(--line); border-radius: 6px; color: var(--text); background: var(--panel); cursor: pointer; }
.pager button:disabled { opacity: .35; cursor: default; }

.detail-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 24px; }
.detail-side, .detail-main, .info-panel { border: 1px solid var(--line); border-radius: 10px; background: linear-gradient(145deg, #191c21, #111317); box-shadow: var(--shadow); }
.detail-side { align-self: start; padding: 24px; text-align: center; position: sticky; top: 94px; }
.detail-icon { min-height: 150px; display: grid; place-items: center; margin-bottom: 18px; border-radius: 8px; background: radial-gradient(circle, rgba(229,177,74,.13), transparent 65%); }
.detail-icon img { max-width: 150px; max-height: 150px; object-fit: contain; }
.detail-side dl { margin: 20px 0 0; text-align: left; }
.detail-side dl div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid rgba(255,255,255,.06); }
.detail-side dt { color: var(--muted); }
.detail-side dd { margin: 0; color: #fff1c8; text-align: right; }
.detail-main { padding: 26px; }
.detail-title { margin-bottom: 25px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.info-panel { margin-top: 18px; padding: 22px; box-shadow: none; }
.info-panel h2, .info-panel h3 { margin: 0 0 14px; color: var(--gold-light); font: 700 22px/1.2 Georgia, serif; }
.empty { padding: 18px; border: 1px dashed rgba(255,255,255,.16); border-radius: 8px; color: var(--muted); text-align: center; }
.item-chips { display: flex; flex-wrap: wrap; gap: 9px; }
.item-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 6px 10px; border: 1px solid rgba(229,177,74,.2); border-radius: 7px; color: #eee6d8; background: #101215; text-decoration: none; }
.item-chip:hover { border-color: var(--gold); background: rgba(229,177,74,.08); }
.item-chip img { width: 30px; height: 30px; object-fit: contain; }
.item-chip b { color: var(--gold-light); }

.recipe-list { display: grid; gap: 14px; }
.recipe-card { padding: 18px; border: 1px solid rgba(229,177,74,.2); border-radius: 8px; background: #0f1114; }
.recipe-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.recipe-output { font-size: 17px; font-weight: 800; color: #fff0c7; }
.recipe-meta { display: flex; flex-wrap: wrap; gap: 7px; margin: 12px 0 0; color: var(--muted); font-size: 12px; }
.recipe-meta span { padding: 4px 7px; border-radius: 5px; background: rgba(255,255,255,.05); }
.recipe-arrow { color: var(--gold); font-size: 18px; }

.guide-hero { min-height: 350px; display: flex; align-items: end; position: relative; overflow: hidden; margin-bottom: 22px; border: 1px solid var(--line); border-radius: 10px; background-size: cover; background-position: center; box-shadow: var(--shadow); }
.guide-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(8,10,12,.96), rgba(8,10,12,.15)); }
.guide-hero .detail-title { position: relative; z-index: 2; width: 100%; margin: 0; padding: 30px; border: 0; }
.prose-section { margin: 0 0 16px; padding: 24px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); }
.prose-section h2 { margin: 0 0 12px; color: var(--gold-light); font: 700 24px/1.2 Georgia, serif; }
.prose-section p { margin: 9px 0; color: #d8d0c4; font-size: 16px; }
.source-note { margin-top: 24px; padding: 14px 18px; border-left: 3px solid var(--gold); color: var(--muted); background: rgba(229,177,74,.07); }

.site-footer { display: flex; justify-content: center; gap: 20px; padding: 30px 4vw; border-top: 1px solid var(--line); color: var(--muted); background: #080a0c; }
.site-footer p { margin: 0; }
.site-footer a { color: var(--gold-light); }

@media (max-width: 980px) {
    .menu-toggle { display: block; }
    .main-nav { display: none; position: absolute; top: 74px; left: 0; right: 0; flex-direction: column; align-items: stretch; padding: 12px; background: #0b0d10; border-bottom: 1px solid var(--line); }
    .main-nav.open { display: flex; }
    .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stat-grid { grid-template-columns: repeat(3, 1fr); }
    .detail-layout { grid-template-columns: 1fr; }
    .detail-side { position: static; }
}

@media (max-width: 620px) {
    .brand span { display: none; }
    .hero { min-height: 360px; }
    .global-search button { padding: 10px 13px; }
    .stat-grid { grid-template-columns: repeat(2, 1fr); margin-top: -45px; }
    .card-grid { grid-template-columns: 1fr; }
    .section-head { align-items: start; flex-direction: column; }
    .site-footer { flex-direction: column; align-items: center; text-align: center; }
}
