/* ──────────────────────────────────────────────────────────────
   HORRORJUNK WIKI STYLES
   ────────────────────────────────────────────────────────────── */

.section-header--wiki { --sh-accent: #00a3ff; }

/* ── Breadcrumb ── */

.wiki-breadcrumb {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #00a3ff;
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 24px;
    padding: 6px 14px;
    background: rgba(0, 163, 255, 0.06);
    border: 1px solid rgba(0, 163, 255, 0.12);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.wiki-breadcrumb:hover {
    background: rgba(0, 163, 255, 0.12);
    color: #33b5ff;
}

/* ── Search Bar ── */

.wiki-search-bar {
    margin-bottom: 20px;
}

.wiki-search-form {
    width: 100%;
}

.wiki-search-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.wiki-search-input-wrap i.fa-search {
    position: absolute;
    left: 16px;
    color: #475569;
    font-size: 0.9rem;
    pointer-events: none;
}

.wiki-search-input-wrap input {
    width: 100%;
    padding: 14px 44px 14px 44px;
    background: #0f1218;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    color: #e2e8f0;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.wiki-search-input-wrap input::placeholder {
    color: #475569;
}

.wiki-search-input-wrap input:focus {
    border-color: rgba(0, 163, 255, 0.4);
    box-shadow: 0 0 12px rgba(0, 163, 255, 0.1);
}

.wiki-search-clear {
    position: absolute;
    right: 14px;
    color: #64748b;
    font-size: 0.85rem;
    transition: color 0.2s;
}

.wiki-search-clear:hover {
    color: #e2e8f0;
}

/* ── Type Filter ── */

.wiki-type-filter {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
}

.wiki-type-filter::-webkit-scrollbar {
    display: none;
}

.wiki-type-btn {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    color: #94a3b8;
    font-family: 'Poppins', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.25s ease;
}

.wiki-type-btn:hover {
    background: rgba(0, 163, 255, 0.08);
    border-color: rgba(0, 163, 255, 0.25);
    color: #e2e8f0;
}

.wiki-type-btn.active {
    background: rgba(0, 163, 255, 0.12);
    border-color: #00a3ff;
    color: #fff;
}

.wiki-type-count {
    background: rgba(0, 163, 255, 0.15);
    color: #33b5ff;
    padding: 1px 7px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
}

.wiki-type-btn.active .wiki-type-count {
    background: rgba(0, 163, 255, 0.3);
    color: #fff;
}

/* ── Alphabet Filter ── */

.wiki-alpha-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 28px;
}

.wiki-alpha-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: #94a3b8;
    font-family: 'Poppins', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
}

.wiki-alpha-btn:hover:not(.disabled) {
    background: rgba(0, 163, 255, 0.08);
    border-color: rgba(0, 163, 255, 0.25);
    color: #fff;
}

.wiki-alpha-btn.active {
    background: #00a3ff;
    border-color: #00a3ff;
    color: #fff;
}

.wiki-alpha-btn.disabled {
    opacity: 0.25;
    cursor: default;
    pointer-events: none;
}

/* ── Card Grid (Overview) ── */

.wiki-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.wiki-card {
    display: flex;
    flex-direction: column;
    background: #0f1218;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.wiki-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 163, 255, 0.3);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4), 0 0 8px rgba(0, 163, 255, 0.1);
}

.wiki-card-img {
    position: relative;
    width: 100%;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #161b22;
}

.wiki-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.wiki-card:hover .wiki-card-img img {
    transform: scale(1.06);
}

.wiki-card-img img.lazy {
    background: linear-gradient(90deg, #12192b 0%, #1a2542 20%, #243156 40%, #1a2542 60%, #12192b 80%);
    background-size: 200% 100%;
    animation: imgShimmer 1.6s ease-in-out infinite;
}

.wiki-card-type {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 0.65rem;
    font-weight: 700;
    background: rgba(0, 0, 0, 0.7);
    color: #94a3b8;
    backdrop-filter: blur(6px);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.wiki-card-body {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.wiki-card-name {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
}

.wiki-card-prof {
    font-size: 0.78rem;
    color: #00a3ff;
    font-weight: 600;
}

.wiki-card-known {
    font-size: 0.75rem;
    color: #64748b;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Single Entry Layout ── */

.wiki-entry {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 32px;
    align-items: start;
}

/* ── Infobox ── */

.wiki-infobox {
    background: #0f1218;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    overflow: hidden;
    position: sticky;
    top: 90px;
}

.wiki-infobox-img {
    width: 100%;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #161b22;
}

.wiki-infobox-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.wiki-infobox-name {
    margin: 0;
    padding: 16px 16px 4px;
    font-family: 'Poppins', sans-serif;
    font-size: 1.25rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
}

.wiki-infobox-known {
    padding: 0 16px 12px;
    margin: 0;
    font-size: 0.82rem;
    color: #00a3ff;
    font-weight: 600;
}

.wiki-infobox-facts {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 12px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wiki-fact {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.wiki-fact-label {
    font-size: 0.68rem;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.wiki-fact-value {
    font-size: 0.85rem;
    color: #e2e8f0;
    font-weight: 500;
}

.wiki-fact-value a {
    color: #00a3ff;
    text-decoration: none;
}

.wiki-fact-value a:hover {
    text-decoration: underline;
}

.wiki-age {
    color: #64748b;
    font-size: 0.78rem;
}

/* ── Main Content ── */

.wiki-content {
    min-width: 0;
}

.wiki-lead {
    font-family: 'Poppins', sans-serif;
    font-size: 1.05rem;
    font-weight: 500;
    color: #cbd5e1;
    line-height: 1.7;
    margin: 0 0 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.wiki-body {
    color: #b0bec5;
    font-size: 0.95rem;
    line-height: 1.75;
}

.wiki-body h2,
.wiki-body h3,
.wiki-body strong[style*="font-size: 24px"] {
    font-family: 'Poppins', sans-serif;
    color: #fff;
    margin-top: 28px;
    margin-bottom: 12px;
}

.wiki-body h2 { font-size: 1.3rem; font-weight: 800; }
.wiki-body h3 { font-size: 1.1rem; font-weight: 700; }

.wiki-body p {
    margin-bottom: 14px;
}

.wiki-body ul,
.wiki-body ol {
    padding-left: 20px;
    margin-bottom: 14px;
}

.wiki-body li {
    margin-bottom: 6px;
}

.wiki-body blockquote {
    border-left: 3px solid #00a3ff;
    padding: 12px 16px;
    margin: 16px 0;
    background: rgba(0, 163, 255, 0.04);
    border-radius: 0 8px 8px 0;
    color: #cbd5e1;
    font-style: italic;
}

.wiki-body img {
    max-width: 100%;
    border-radius: 8px;
}

.wiki-body hr {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    margin: 24px 0;
}

/* ── Sections ── */

.wiki-section {
    margin-top: 36px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.wiki-section-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.15rem;
    font-weight: 800;
    color: #fff;
    margin: 0 0 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.wiki-section-title i {
    color: #00a3ff;
    font-size: 0.95rem;
}

/* ── Filmography ── */

.wiki-filmography {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
}

.wiki-film-card {
    display: flex;
    gap: 12px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: all 0.25s ease;
}

.wiki-film-card:hover {
    background: rgba(0, 163, 255, 0.05);
    border-color: rgba(0, 163, 255, 0.2);
    transform: translateY(-2px);
}

.wiki-film-poster {
    flex-shrink: 0;
    width: 50px;
    height: 75px;
    border-radius: 6px;
    overflow: hidden;
    background: #161b22;
}

.wiki-film-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.wiki-film-poster img.lazy {
    background: linear-gradient(90deg, #12192b 0%, #1a2542 20%, #243156 40%, #1a2542 60%, #12192b 80%);
    background-size: 200% 100%;
    animation: imgShimmer 1.6s ease-in-out infinite;
}

.wiki-film-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    padding: 2px 0;
}

.wiki-film-title {
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.wiki-film-meta {
    font-size: 0.75rem;
    color: #64748b;
}

.wiki-film-rating {
    font-size: 0.75rem;
    color: #fbbf24;
    font-weight: 700;
    margin-top: auto;
}

.wiki-film-rating i {
    font-size: 0.65rem;
}

/* ── Sources ── */

.wiki-sources ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.wiki-sources li a {
    display: inline-block;
    padding: 5px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    color: #64748b;
    font-size: 0.78rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.wiki-sources li a:hover {
    background: rgba(0, 163, 255, 0.06);
    border-color: rgba(0, 163, 255, 0.2);
    color: #00a3ff;
}

/* ── Empty State ── */

.wiki-empty {
    text-align: center;
    padding: 80px 20px;
    color: #475569;
}

.wiki-empty i {
    font-size: 3rem;
    margin-bottom: 16px;
    color: #1e293b;
}

.wiki-empty p {
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 16px;
}

.wiki-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: rgba(0, 163, 255, 0.1);
    border: 1px solid rgba(0, 163, 255, 0.2);
    border-radius: 10px;
    color: #00a3ff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.88rem;
    transition: all 0.2s ease;
}

.wiki-back-btn:hover {
    background: rgba(0, 163, 255, 0.18);
}

/* ── Responsive ── */

@media (max-width: 768px) {
    .wiki-entry {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .wiki-infobox {
        position: static;
        display: grid;
        grid-template-columns: 120px 1fr;
        grid-template-rows: auto auto;
    }

    .wiki-infobox-img {
        grid-row: 1 / 3;
        aspect-ratio: auto;
        height: 100%;
    }

    .wiki-infobox-name {
        font-size: 1.1rem;
        padding: 12px 12px 2px;
    }

    .wiki-infobox-known {
        padding: 0 12px 8px;
    }

    .wiki-infobox-facts {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        padding: 10px 12px 14px;
    }

    .wiki-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .wiki-card-name { font-size: 0.85rem; }
    .wiki-card-body { padding: 10px; }

    .wiki-filmography {
        grid-template-columns: 1fr;
    }

    .wiki-alpha-btn {
        width: 30px;
        height: 30px;
        font-size: 0.7rem;
    }

    .wiki-search-input-wrap input {
        padding: 12px 40px;
        font-size: 0.88rem;
    }
}

@media (max-width: 480px) {
    .wiki-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .wiki-infobox {
        grid-template-columns: 100px 1fr;
    }

    .wiki-infobox-facts {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 2000px) {
    .wiki-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 20px;
    }

    .wiki-entry {
        grid-template-columns: 320px 1fr;
        gap: 40px;
    }

    .wiki-filmography {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 2560px) {
    .wiki-grid {
        grid-template-columns: repeat(8, 1fr);
    }
}
