/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg: #f6f1e8;
    --bg-card: #ffffff;
    --bg-card-hover: rgba(211, 165, 66, 0.08);
    --bg-input: #ffffff;
    --border: #d1d5db;
    --border-light: #e5e7eb;
    --border-gold: #d3a542;
    --gold: #d3a542;
    --gold-light: #e6b84f;
    --gold-dark: #b8922a;
    --soft: #3d2f1f;
    --dark: #1b130b;
    --text: #1b130b;
    --text-muted: #6b5d4a;
    --text-dim: #9a8e7a;
    --fire: #c1443d;
    --water: #2e86c1;
    --earth: #8b6914;
    --air: #28a745;
    --neutral: #6c757d;
    --radius: 8px;
    --shadow: 0 4px 12px rgba(27, 19, 11, 0.1);
    --shadow-lg: 0 4px 12px rgba(27, 19, 11, 0.15);
    --shadow-gold: 0 4px 12px rgba(211, 165, 66, 0.4);
    --glow-gold: 0 0 20px rgba(211, 165, 66, 0.3);
    --timing-fast: 0.2s;
    --timing-normal: 0.3s;
    --timing-slow: 0.5s;
    --ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* === KEYFRAMES === */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}
@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}
@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 4px rgba(211, 165, 66, 0.3); }
    50% { box-shadow: 0 0 12px rgba(211, 165, 66, 0.6); }
}

/* === SCROLL REVEAL === */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity var(--timing-slow) ease, transform var(--timing-slow) ease;
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

html { font-size: 16px; scroll-behavior: smooth; }
h1, h2, h3, h4 { font-weight: 800; letter-spacing: -0.02em; }
body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: var(--gold-dark); text-decoration: none; }
a:hover { color: var(--gold); text-decoration: underline; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; width: 100%; }

main.container { flex: 1; padding-top: 1.5rem; padding-bottom: 2rem; }

/* === HEADER === */
.site-header {
    background: linear-gradient(135deg, #4a3828 0%, var(--soft) 100%);
    border-bottom: 3px solid var(--gold);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 6px 20px rgba(27, 19, 11, 0.4);
}

.navbar {
    display: flex;
    align-items: center;
    gap: 0;
    height: 56px;
}

.logo {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    padding-right: 1.5rem;
    margin-right: 1.5rem;
    border-right: 1px solid rgba(255,255,255,0.15);
    height: 100%;
    align-items: center;
}
.logo-text { font-size: 1.3rem; font-weight: 700; color: #fff; text-shadow: 1px 1px 3px rgba(0,0,0,0.3); }
.logo-sub { font-size: 0.85rem; color: var(--gold-light); text-transform: uppercase; letter-spacing: 0.08em; }
.logo:hover { text-decoration: none; }

/* Nav buttons */
.nav-buttons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.8rem;
    color: rgba(255,255,255,0.85);
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: var(--radius);
    font-size: 0.82rem;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.nav-btn svg { flex-shrink: 0; }
.nav-btn:hover {
    background: rgba(211, 165, 66, 0.2);
    border-color: var(--gold);
    color: var(--gold-light);
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(211, 165, 66, 0.25);
}

/* Search */
.search-wrapper { position: relative; margin-left: auto; flex-shrink: 0; }
.search-input {
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius);
    width: 220px;
    font-size: 0.88rem;
    outline: none;
    transition: all 0.25s ease;
}
.search-input:focus {
    background: rgba(255,255,255,0.22);
    border-color: var(--gold);
    width: 280px;
    box-shadow: 0 0 0 2px rgba(211, 165, 66, 0.3);
}
.search-input::placeholder { color: rgba(255,255,255,0.45); }

.search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 0 0 var(--radius) var(--radius);
    max-height: 400px;
    overflow-y: auto;
    z-index: 200;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transform: scaleY(0.95) translateY(-4px);
    transform-origin: top center;
    pointer-events: none;
    transition: opacity var(--timing-fast) ease, transform var(--timing-fast) ease;
}
.search-dropdown.active {
    opacity: 1;
    transform: scaleY(1) translateY(0);
    pointer-events: auto;
}
.search-dropdown a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.8rem;
    color: var(--text);
    border-bottom: 1px solid var(--border-light);
    font-size: 0.9rem;
}
.search-dropdown a:last-child { border-bottom: none; }
.search-dropdown a:hover { background: var(--bg-card-hover); text-decoration: none; }
.search-dropdown .search-type {
    font-size: 0.75rem;
    color: var(--text-muted);
    background: #f3f4f6;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
}
.search-dropdown .search-all {
    text-align: center;
    display: block;
    padding: 0.6rem;
    color: var(--gold-dark);
    font-weight: 500;
}

/* === FOOTER === */
.site-footer {
    background: linear-gradient(135deg, #4a3828 0%, var(--soft) 100%);
    border-top: 3px solid var(--gold);
    padding: 0.5rem 0;
    margin-top: auto;
}

/* === PAGE TITLE === */
.page-title {
    font-size: 1.8rem;
    color: var(--dark);
    margin-bottom: 1rem;
    border-bottom: none;
    padding-bottom: 0.5rem;
    position: relative;
}
.page-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--gold-light), var(--gold-dark));
    border-radius: 2px;
}

.page-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* === CARDS GRID === */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 1rem;
    transition: all var(--timing-normal) ease;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--gold-light), var(--gold-dark));
    opacity: 0;
    transition: opacity var(--timing-normal) ease;
}
.card:hover::before {
    opacity: 1;
}
.card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(211, 165, 66, 0.08), transparent);
    transition: left var(--timing-slow) ease;
    pointer-events: none;
}
.card:hover::after {
    left: 100%;
}
.card:hover {
    border-color: var(--gold);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(211, 165, 66, 0.25), var(--glow-gold);
}

/* === MONSTER ENTRY (Solomonk style) === */
.mob-list { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 2rem; }

.mob-entry {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: border-color var(--timing-normal) ease, box-shadow var(--timing-normal) ease;
}
.mob-entry:hover {
    border-color: var(--gold);
    box-shadow: var(--shadow-lg), var(--glow-gold);
}

/* Header */
.mob-header {
    background: var(--soft);
    color: #fff;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    transition: background var(--timing-normal) ease;
}
.mob-entry:hover .mob-header {
    background: #4a3828;
}
.mob-name { font-weight: 600; font-size: 1rem; }
.mob-header-right { display: flex; align-items: center; gap: 0.8rem; }
.mob-grades { display: flex; gap: 0.25rem; }
.mob-grade-btn {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.25);
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}
.mob-grade-btn.active {
    background: var(--gold);
    border-color: var(--gold);
}
.mob-grade-btn:hover:not(.active) {
    background: rgba(255,255,255,0.25);
}
.mob-level {
    background: rgba(255,255,255,0.12);
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.85rem;
}
.mob-level-val { font-weight: 700; margin-left: 0.2rem; }

/* Body */
.mob-body { padding: 0; }
.mob-info-row {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.6rem 1rem;
    border-bottom: 1px solid var(--border-light);
}
.mob-img {
    width: 200px;
    height: 200px;
    flex-shrink: 0;
    background: linear-gradient(135deg, #f6f1e8 0%, #ede5d8 100%);
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-light);
    transition: border-color var(--timing-normal) ease;
}
.mob-entry:hover .mob-img {
    border-color: var(--gold);
}
.mob-img img { width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity 0.4s ease; }
.mob-img img.mob-img-loaded { opacity: 1; }
.mob-placeholder { width: 60%; height: 60%; color: var(--text-dim); opacity: 0.3; }
.mob-meta { font-size: 0.85rem; color: var(--text-muted); }
.mob-meta-val { color: var(--gold-dark); }

/* Stats grid */
.mob-stats-panel { display: none; }
.mob-stats-panel.active { display: block; }
.mob-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 0;
    border-bottom: 1px solid var(--border-light);
}
.mob-stats-col { padding: 0.5rem 1rem; }
.mob-stats-title {
    font-size: 0.8rem;
    color: var(--gold-dark);
    font-weight: 600;
    margin-bottom: 0.3rem;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 0.2rem;
}
.mob-stat-line {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    padding: 0.15rem 0;
    color: var(--text);
}

/* Icônes stats */
.ico {
    display: inline-block;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    vertical-align: middle;
    transition: transform var(--timing-fast) ease, filter var(--timing-fast) ease;
}
.mob-stat-line:hover .ico,
.stat-label:hover .ico {
    transform: scale(1.3);
    filter: drop-shadow(0 0 3px rgba(211, 165, 66, 0.5));
}
.ico-hp { background-image: url('/img/icons/Vita.svg'); }
.ico-pa { background-image: url('/img/icons/PA.svg'); }
.ico-pm { background-image: url('/img/icons/PM.svg'); }
.ico-init { background-image: url('/img/icons/Init.svg'); }
.ico-force { background-image: url('/img/icons/EarthBonus.svg'); }
.ico-intel { background-image: url('/img/icons/FireBonus.svg'); }
.ico-chance { background-image: url('/img/icons/WaterBonus.svg'); }
.ico-agi { background-image: url('/img/icons/AirBonus.svg'); }
.ico-neutre { background-image: url('/img/icons/Neutral.svg'); }
.ico-terre { background-image: url('/img/icons/Earth.svg'); }
.ico-feu { background-image: url('/img/icons/Fire.svg'); }
.ico-eau { background-image: url('/img/icons/Water.svg'); }
.ico-air { background-image: url('/img/icons/Air.svg'); }
.ico-xp { background-image: url('/img/icons/XP.svg'); }
.ico-drop { background-image: url('/img/icons/Dropper.svg'); }

/* Sections dépliables */
.mob-section { border-top: 1px solid var(--border-light); }
.mob-section-header {
    background: var(--bg);
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gold-dark);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.15s;
}
.mob-section-header:hover { background: var(--bg-card-hover); }
.mob-toggle-icon { font-size: 0.7rem; transition: transform 0.2s; }
.mob-section-header.open .mob-toggle-icon { transform: rotate(180deg); }
.mob-section-body {
    font-size: 0.85rem;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    padding: 0 1rem;
    transition: max-height var(--timing-normal) ease, opacity var(--timing-normal) ease, padding var(--timing-normal) ease;
}
.mob-section-header.open + .mob-section-body {
    max-height: 500px;
    opacity: 1;
    padding: 0.5rem 1rem;
}
.mob-zones-list { color: var(--text-muted); line-height: 1.6; }
.mob-drops-list { color: var(--text); line-height: 1.8; }
.mob-drops-list a { color: var(--gold-dark); }

.card-img {
    width: 80px;
    height: 80px;
    margin: 0 auto 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.card-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.4s ease;
}
.card-img img.mob-img-loaded { opacity: 1; }

.card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.4rem;
}
.card-title a { color: inherit; }
.card-title a:hover { text-decoration: none; color: var(--gold-dark); }

.card-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.card-badge {
    display: inline-block;
    background: rgba(211, 165, 66, 0.1);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.78rem;
    color: var(--gold-dark);
    border: 1px solid rgba(211, 165, 66, 0.3);
}

/* === FILTERS === */
.filters {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    align-items: flex-end;
    box-shadow: var(--shadow);
}

.filter-group { display: flex; flex-direction: column; gap: 0.25rem; }
.filter-group label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.filter-input, .filter-select {
    background: var(--bg-input);
    border: 2px solid var(--border);
    color: var(--text);
    padding: 0.4rem 0.6rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
    outline: none;
    transition: all 0.25s ease;
}
.filter-input:focus, .filter-select:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 2px rgba(211, 165, 66, 0.2);
}
.filter-select option { background: var(--bg-card); color: var(--text); }

.btn {
    display: inline-block;
    padding: 0.45rem 1rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all var(--timing-fast) ease;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}
.btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.4s ease;
    pointer-events: none;
}
.btn:hover::after {
    left: 100%;
}
.btn:active {
    transform: translateY(1px) scale(0.98);
}
.btn-gold {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(27, 19, 11, 0.2);
}
.btn-gold:hover {
    background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 100%);
    text-decoration: none;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: var(--shadow-gold);
}
.btn-outline {
    background: var(--bg-card);
    border: 2px solid var(--border);
    color: var(--text);
}
.btn-outline:hover {
    border-color: var(--gold);
    color: var(--gold-dark);
    text-decoration: none;
}

/* === PAGINATION === */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.3rem;
    flex-wrap: wrap;
    margin: 1.5rem 0;
}
.page-link {
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius);
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 0.9rem;
    transition: all 0.2s ease;
}
.page-link:hover {
    background: var(--gold);
    color: #fff;
    border-color: var(--gold);
    text-decoration: none;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 12px rgba(211, 165, 66, 0.4);
}
.page-link.active {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    color: #fff;
    border-color: var(--gold);
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(211, 165, 66, 0.4);
}
.page-dots { color: var(--text-muted); padding: 0.4rem 0.3rem; }

/* === DETAIL PAGE === */
.detail-header {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.detail-img {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f6f1e8 0%, #ede5d8 100%);
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
}
.detail-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.4s ease;
}
.detail-img img.mob-img-loaded { opacity: 1; }
.detail-info { flex: 1; }
.detail-name {
    font-size: 2rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 0.3rem;
}
.detail-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    color: var(--text-muted);
    font-size: 0.9rem;
}
.detail-meta span { display: flex; align-items: center; gap: 0.3rem; }

/* Tabs */
.tabs { display: flex; gap: 0.3rem; margin-bottom: 0; flex-wrap: wrap; }
.tab {
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-bottom: none;
    border-radius: var(--radius) var(--radius) 0 0;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}
.tab:hover { color: var(--text); background: #f9fafb; }
.tab.active {
    background: var(--soft);
    color: #fff;
    border-color: var(--soft);
}

.tab-content {
    display: none;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 0 var(--radius) var(--radius) var(--radius);
    padding: 1rem;
}
.tab-content.active {
    display: block;
    animation: fadeIn var(--timing-normal) ease;
}

/* === TABLES === */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.data-table th {
    text-align: left;
    background: var(--soft);
    color: #fff;
    font-weight: 700;
    padding: 0.7rem 0.8rem;
    font-size: 0.8rem;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.data-table th:first-child { border-radius: var(--radius) 0 0 0; }
.data-table th:last-child { border-radius: 0 var(--radius) 0 0; }
.data-table td {
    padding: 0.6rem 0.8rem;
    border-bottom: 1px solid var(--border-light);
    color: var(--text);
    transition: background var(--timing-fast) ease;
}
.data-table tr:hover td { background: var(--bg-card-hover); }
.data-table tr:last-child td { border-bottom: none; }

/* Resistance colors */
.res-neutral { color: var(--neutral); }
.res-earth { color: var(--earth); }
.res-fire { color: var(--fire); }
.res-water { color: var(--water); }
.res-air { color: var(--air); }

/* Stats grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.5rem;
}
.stat-item {
    display: flex;
    justify-content: space-between;
    padding: 0.4rem 0.6rem;
    background: #f3f4f6;
    border-radius: 4px;
    font-size: 0.88rem;
}
.stat-label { color: var(--text-muted); display: inline-flex; align-items: center; gap: 4px; }
.stat-value { color: var(--text); font-weight: 600; }

/* === SECTION === */
.section {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}
.section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.8rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid var(--gold);
    position: relative;
}
.section-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--gold-light), var(--gold-dark));
    transition: width var(--timing-normal) ease;
}
.section:hover .section-title::after {
    width: 100%;
}

/* Item effects */
.effect-positive { color: #15803d; }
.effect-negative { color: var(--fire); }

/* === HOME === */
.home-welcome {
    text-align: center;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    background: radial-gradient(ellipse at center, rgba(211, 165, 66, 0.06) 0%, transparent 70%);
}
.home-welcome h1 {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 0.5rem;
    animation: fadeInUp var(--timing-slow) ease both;
}
.home-welcome p {
    color: var(--text-muted);
    font-size: 1.1rem;
    animation: fadeInUp var(--timing-slow) ease 0.1s both;
}

.home-search {
    max-width: 500px;
    margin: 2rem auto;
    position: relative;
    animation: fadeInUp var(--timing-slow) ease 0.2s both;
}
.home-search input {
    width: 100%;
    padding: 0.8rem 1rem;
    font-size: 1.1rem;
    background: var(--bg-card);
    border: 2px solid var(--border);
    color: var(--text);
    border-radius: var(--radius);
    outline: none;
    transition: all 0.25s ease;
}
.home-search input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(211, 165, 66, 0.2);
}

.home-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}
.home-stat {
    text-align: center;
    padding: 1.8rem 2.2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    min-width: 180px;
    box-shadow: var(--shadow);
    animation: fadeInUp var(--timing-slow) ease both;
    transition: transform var(--timing-fast) ease, box-shadow var(--timing-fast) ease, border-color var(--timing-fast) ease;
    position: relative;
    overflow: hidden;
}
.home-stat::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--gold-light), var(--gold-dark));
}
.home-stat:nth-child(1) { animation-delay: 0.3s; }
.home-stat:nth-child(2) { animation-delay: 0.4s; }
.home-stat:nth-child(3) { animation-delay: 0.5s; }
.home-stat:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--gold);
}
.home-stat .stat-number {
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--gold-dark);
}
.home-stat .stat-label {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-top: 0.3rem;
}

.home-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
    animation: fadeInUp var(--timing-slow) ease 0.6s both;
}

/* === 404 === */
.error-page {
    text-align: center;
    padding: 4rem 0;
}
.error-page h1 { font-size: 4rem; color: var(--gold-dark); }
.error-page p { color: var(--text-muted); margin: 1rem 0; }

/* === SEARCH RESULTS === */
.search-results-list { list-style: none; }
.search-result-item {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 0.8rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
    transition: all var(--timing-normal) ease;
}
.search-result-item:hover {
    border-color: var(--gold);
    transform: translateX(4px);
    box-shadow: var(--shadow-lg);
}
.search-result-name { font-weight: 600; }
.search-result-type {
    font-size: 0.8rem;
    color: var(--text-muted);
    background: #f3f4f6;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

/* === CAPTURABLE BADGE === */
.badge-capturable {
    display: inline-block;
    background: #d4edda;
    color: var(--dark);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.78rem;
    font-weight: 500;
    border: 1px solid #28a745;
}

/* === CARD DROPS === */
.card-drops {
    margin-top: 0.6rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}
.card-drop-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    padding: 0.1rem 0;
}
.card-drop-name { color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 75%; }
.card-drop-name a { color: var(--text-muted); position: relative; z-index: 1; pointer-events: auto; }
.card-drop-name a:hover { color: var(--gold-dark); }
.card-drop-rate { color: var(--gold-dark); font-weight: 600; font-size: 0.78rem; white-space: nowrap; }

/* === TABLE OVERFLOW === */
.table-wrapper { overflow-x: auto; }

/* === MODAL === */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(27, 19, 11, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: flex-start;
    padding: 2rem 1rem;
    overflow-y: auto;
}
.modal-overlay.active {
    display: flex;
}
.modal-content {
    background: var(--bg-card);
    border: 2px solid var(--gold);
    border-radius: var(--radius);
    max-width: 1200px;
    width: 100%;
    position: relative;
    animation: modalFadeIn 0.2s ease-out;
    box-shadow: 0 8px 32px rgba(27, 19, 11, 0.25);
}
@keyframes modalFadeIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-close {
    position: absolute;
    top: 0.5rem;
    right: 0.8rem;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.8rem;
    cursor: pointer;
    z-index: 1;
    line-height: 1;
    transition: color 0.2s;
}
.modal-close:hover { color: var(--fire); }
.modal-body { padding: 1.5rem; }
.modal-loading {
    text-align: center;
    color: var(--text-muted);
    padding: 3rem 0;
}

/* Modal header (image + info) */
.modal-header-section {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--gold);
}
.modal-monster-img {
    width: 300px;
    height: 300px;
    object-fit: contain;
    border-radius: var(--radius);
    background: #f3f4f6;
    border: 1px solid var(--border);
    flex-shrink: 0;
}
.modal-monster-info { flex: 1; min-width: 0; }
.modal-monster-name {
    font-size: 1.5rem;
    color: var(--dark);
    font-weight: 700;
    margin-bottom: 0.4rem;
}
.modal-monster-meta {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}
.modal-section {
    margin-bottom: 1.2rem;
}
.modal-section-title {
    font-size: 1.05rem;
    color: var(--dark);
    font-weight: 600;
    margin-bottom: 0.6rem;
    padding-bottom: 0.3rem;
    border-bottom: 2px solid var(--gold);
}

/* === FADE CONTENT (AJAX) === */
.fade-content {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* === REDUCED MOTION === */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .reveal { opacity: 1; transform: none; }
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .navbar { flex-wrap: wrap; height: auto; min-height: 56px; padding: 0.5rem 0; gap: 0.5rem; }

    .logo {
        border-right: none;
        margin-right: 0;
    }

    .nav-buttons { order: 2; margin-left: auto; }
    .nav-btn span { display: none; }
    .nav-btn { padding: 0.4rem; }

    .search-wrapper { width: 100%; order: 3; }
    .search-input { width: 100%; }
    .search-input:focus { width: 100%; }

    .home-welcome h1 { font-size: 2rem; }
    .home-welcome { padding: 2rem 0; min-height: auto; }
    .home-stats { gap: 1rem; }
    .home-stat { min-width: 140px; padding: 1rem; }
    .detail-header { flex-direction: column; }
    .filters { flex-direction: column; }
    .stats-grid { grid-template-columns: 1fr; }

    .mob-stats-grid { grid-template-columns: 1fr 1fr; }
    .mob-header { flex-direction: column; gap: 0.5rem; }
    .mob-info-row { flex-direction: column; align-items: center; text-align: center; }

    .search-result-item:hover { transform: none; }
}
