/*
Theme Name: MovieHell
Theme URI: https://moviehell.de
Author: MovieHell Team
Author URI: https://moviehell.de
Description: Ein minimalistisches Dark-Mode WordPress-Theme für Film- und Serienrezensionen. Responsive, PWA-fähig, mit automatischer Genre-Navigation basierend auf Tags.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: moviehell
Tags: dark, entertainment, blog, custom-menu, featured-images, translation-ready
*/

/* ==========================================================================
   CSS Custom Properties
   ========================================================================== */

:root {
    /* === Brand Palette (derived from logo & cinema artwork) === */

    /* Backgrounds — Dark slate with subtle navy undertone */
    --mh-bg-primary: #12151f;
    --mh-bg-secondary: #181d2e;
    --mh-bg-card: #181d2e;
    --mh-bg-card-hover: #1e2438;

    /* Text — Neutral with light warmth, comfortable on dark slate */
    --mh-text-primary: #e0dcd6;     /* 12.3:1 on card — body text */
    --mh-text-secondary: #adb0b8;   /*  7.7:1 on card — meta, subtitles */
    --mh-text-muted: #8e9298;       /*  5.4:1 on card — hints, placeholders (AA) */

    /* Accent Red — Soft flame red */
    --mh-accent: #f06060;           /*  5.5:1 on primary (AA normal) */
    --mh-accent-hover: #f56565;

    /* Accent Gold — Flame gold from logo */
    --mh-accent-gold: #e8a020;      /*  8.0:1 on primary */
    --mh-accent-gold-hover: #f0b840;

    /* Category Colors — used in stats, network graph, legends */
    --mh-color-film: #f06060;       /* Same as accent red */
    --mh-color-serie: #e8a020;      /* Same as accent gold */
    --mh-color-person: #5b9bd5;     /* Soft blue */
    --mh-color-land: #1a9988;       /* Teal (matches land badges) */
    --mh-color-genre: #f0b840;      /* Warm yellow */

    /* Borders — Subtle navy borders */
    --mh-border: #2a3358;
    --mh-border-hover: #3a4568;

    /* Badges */
    --mh-badge-bg: #2a3358;
    --mh-badge-text: #b8c0d4;       /*  6.7:1 on badge-bg */

    /* Links */
    --mh-link: #e8a020;             /* Gold for links — high contrast */
    --mh-link-hover: #f0b840;

    /* Utility */
    --mh-shadow: rgba(0, 0, 0, 0.3);
    --mh-shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.35);
    --mh-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --mh-card-radius: 12px;
    --mh-transition: 0.2s ease;
    --mh-font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ==========================================================================
   Base Styles
   ========================================================================== */

body {
    font-family: var(--mh-font-stack);
    background-color: var(--mh-bg-primary);
    color: var(--mh-text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

a {
    color: var(--mh-link);
    text-decoration: none;
    transition: color var(--mh-transition);
}

a:hover,
a:focus {
    color: var(--mh-link-hover);
}

/* Skip Navigation */
.skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    background: var(--mh-accent);
    color: #fff;
    padding: 0.5rem 1rem;
    z-index: 9999;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
    color: #fff;
}

/* ==========================================================================
   Navbar
   ========================================================================== */

.navbar {
    background-color: #111f44 !important;
    border-bottom: none;
    box-shadow: 0 1px 12px rgba(0, 0, 0, 0.25);
    padding: 0.5rem 0;
}

.navbar-brand {
    color: var(--mh-accent) !important;
    font-weight: 700;
    font-size: 1.4rem;
    letter-spacing: -0.5px;
}

.navbar-brand img,
.navbar-brand .custom-logo,
.custom-logo-link img,
.navbar-brand .custom-logo-link img {
    max-height: 40px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.navbar-brand .custom-logo-link {
    display: inline-flex;
    align-items: center;
}

.navbar-brand:hover {
    color: var(--mh-accent-hover) !important;
}

.navbar .nav-link {
    color: var(--mh-text-primary) !important;
    padding: 0.5rem 1rem !important;
    font-size: 0.95rem;
    transition: color var(--mh-transition);
}

.navbar .nav-link:hover,
.navbar .nav-link:focus {
    color: var(--mh-accent) !important;
}

.navbar .dropdown-menu {
    background-color: var(--mh-bg-secondary);
    border: none;
    border-radius: var(--mh-card-radius);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    padding: 0.5rem 0;
    max-height: 400px;
    overflow-y: auto;
}

.navbar .dropdown-item {
    color: var(--mh-text-primary);
    padding: 0.4rem 1.2rem;
    font-size: 0.9rem;
    transition: background-color var(--mh-transition);
}

.navbar .dropdown-item:hover,
.navbar .dropdown-item:focus {
    background-color: var(--mh-bg-card-hover);
    color: var(--mh-accent);
}

.navbar .search-form {
    position: relative;
}

.navbar .search-form .form-control {
    background-color: var(--mh-bg-primary);
    border: none;
    color: var(--mh-text-primary);
    border-radius: 20px;
    padding: 0.4rem 1rem 0.4rem 2.2rem;
    font-size: 0.9rem;
    width: 200px;
    transition: width var(--mh-transition), background-color var(--mh-transition);
}

.navbar .search-form .form-control:focus {
    width: 280px;
    background-color: var(--mh-bg-primary);
    color: var(--mh-text-primary);
    box-shadow: none;
}

.navbar .search-form .search-icon {
    position: absolute;
    left: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--mh-text-muted);
    pointer-events: none;
    font-size: 0.85rem;
}

/* ==========================================================================
   Breadcrumbs
   ========================================================================== */

.moviehell-breadcrumbs {
    padding: 0.6rem 0;
    font-size: 0.8rem;
    color: var(--mh-text-muted);
}

.moviehell-breadcrumbs a {
    color: var(--mh-text-secondary);
    text-decoration: none;
}

.moviehell-breadcrumbs a:hover {
    color: var(--mh-accent-gold);
}

.moviehell-breadcrumbs .separator {
    margin: 0 0.4rem;
    color: var(--mh-text-muted);
}

/* ==========================================================================
   Section Headers
   ========================================================================== */

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--mh-accent-gold);
}

.section-header .filter-toggle-btn {
    border-radius: 20px;
    font-size: 0.85rem;
    padding: 0.35rem 0.85rem;
    white-space: nowrap;
}

.section-header-photo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    vertical-align: middle;
}

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    color: var(--mh-text-primary);
}

.section-header .view-all {
    font-size: 0.9rem;
    color: var(--mh-text-secondary);
    transition: color var(--mh-transition);
}

.section-header .view-all:hover {
    color: var(--mh-accent);
}

/* ==========================================================================
   Review Cards
   ========================================================================== */

.review-card {
    background-color: var(--mh-bg-card);
    border: none;
    border-radius: var(--mh-card-radius);
    overflow: hidden;
    transition: transform var(--mh-transition), box-shadow var(--mh-transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.review-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--mh-shadow-lg);
}

.review-card .card-img-top {
    aspect-ratio: 2560 / 1071;
    object-fit: cover;
    object-position: center;
    width: 100%;
    height: auto;
}

.review-card .card-img-placeholder {
    aspect-ratio: 2560 / 1071;
    background: linear-gradient(135deg, var(--mh-bg-secondary), var(--mh-bg-card));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--mh-text-muted);
    font-size: 2.5rem;
}

.review-card .card-body {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.review-card .card-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    line-height: 1.3;
}

.review-card .card-title a {
    color: var(--mh-text-primary);
}

.review-card .card-title a:hover {
    color: var(--mh-accent);
}

.review-card .card-meta {
    font-size: 0.8rem;
    color: var(--mh-text-muted);
    margin-bottom: 0.5rem;
}

.review-card .card-excerpt {
    font-size: 0.85rem;
    color: var(--mh-text-secondary);
    margin-bottom: 0.75rem;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.review-card .card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-top: auto;
}

.review-card .badge,
.badge.badge-genre,
.badge.badge-tag {
    font-weight: 500;
    font-size: 0.75rem;
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    transition: background-color var(--mh-transition);
}

/* Genre badges - soft outline */
.badge.badge-genre {
    background-color: rgba(240, 96, 96, 0.12);
    color: var(--mh-accent);
    border: 1px solid rgba(240, 96, 96, 0.25);
}

.badge.badge-genre:hover {
    background-color: rgba(240, 96, 96, 0.22);
    color: var(--mh-accent-hover);
}

/* Tag badges - ghost style */
.badge.badge-tag {
    background-color: rgba(155, 164, 184, 0.08);
    color: var(--mh-text-secondary);
    border: 1px solid rgba(155, 164, 184, 0.15);
}

.badge.badge-tag:hover {
    background-color: rgba(155, 164, 184, 0.18);
    color: var(--mh-text-primary);
}

/* Person badges - gold accent, only on single posts */
.badge.badge-person {
    background-color: rgba(232, 160, 32, 0.12);
    color: var(--mh-accent-gold);
    border: 1px solid rgba(232, 160, 32, 0.25);
    border-radius: 20px;
}

.badge.badge-person:hover {
    background-color: rgba(232, 160, 32, 0.22);
    color: var(--mh-accent-gold-hover);
}

/* Personen dropdown - scrollable when many entries */
.dropdown-menu-persons {
    max-height: 400px;
    overflow-y: auto;
}

/* Länder dropdown - scrollable when many entries */
.dropdown-menu-laender {
    max-height: 400px;
    overflow-y: auto;
}

/* Land badges - teal accent */
.badge.badge-land {
    background-color: rgba(26, 153, 136, 0.12);
    color: #1a9988;
    border: 1px solid rgba(26, 153, 136, 0.25);
    border-radius: 20px;
}

.badge.badge-land:hover {
    background-color: rgba(26, 153, 136, 0.22);
    color: #22bba8;
}

/* Country overview cards */
.country-card .card {
    background-color: var(--mh-bg-card);
    border: none;
    box-shadow: var(--mh-shadow-sm);
    transition: transform var(--mh-transition), box-shadow var(--mh-transition);
}

.country-card .card:hover {
    transform: translateY(-2px);
    box-shadow: var(--mh-shadow-lg);
}

.country-card-icon {
    font-size: 2rem;
    color: #1a9988;
    display: block;
    margin-bottom: 0.5rem;
}

/* World Map */
.country-map-container {
    position: relative;
    background-color: var(--mh-bg-card);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--mh-border);
    overflow: hidden;
}

.country-map-wrapper {
    width: 100%;
    position: relative;
}

.country-map-wrapper svg {
    width: 100%;
    height: auto;
    display: block;
}

.country-map-wrapper svg path,
.country-map-wrapper svg polygon,
.country-map-wrapper svg circle {
    fill: var(--mh-bg-secondary, #2a3258);
    stroke: var(--mh-border);
    stroke-width: 0.5;
    transition: fill 0.2s ease;
}

.country-map-wrapper svg .country-active {
    fill: #1a9988;
    cursor: pointer;
}

.country-map-wrapper svg .country-active:hover {
    fill: var(--mh-accent-gold);
}

.country-map-tooltip {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: var(--mh-bg-primary);
    border: 1px solid var(--mh-border);
    border-radius: 6px;
    padding: 0.4rem 0.75rem;
    pointer-events: none;
    z-index: 10;
    white-space: nowrap;
}

.country-map-tooltip .tooltip-name {
    font-weight: 600;
    color: var(--mh-text-primary, #fff);
    font-size: 0.85rem;
}

.country-map-tooltip .tooltip-count {
    color: var(--mh-text-muted);
    font-size: 0.75rem;
}

/* Person overview cards */
.person-card .card {
    background-color: var(--mh-bg-card);
    border: none;
    box-shadow: var(--mh-shadow-sm);
    transition: transform var(--mh-transition), box-shadow var(--mh-transition), background-color var(--mh-transition);
}

.person-card .card:hover {
    background-color: var(--mh-bg-card-hover);
    box-shadow: var(--mh-shadow-lg);
    transform: translateY(-2px);
}

.person-card-icon {
    font-size: 2.5rem;
    color: var(--mh-accent-gold);
    display: block;
    margin-bottom: 0.5rem;
}

.person-card-photo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 0.5rem;
    border: 2px solid rgba(232, 160, 32, 0.3);
}

.person-card .card-title {
    color: var(--mh-text-primary);
}

/* Inline alpha nav for person overview */
.alpha-nav-inline .btn {
    min-width: 2rem;
    padding: 0.15rem 0.4rem;
    font-size: 0.8rem;
}

/* ==========================================================================
   Single Post
   ========================================================================== */

.single-hero {
    position: relative;
    max-height: 500px;
    overflow: hidden;
    border-radius: var(--mh-card-radius);
    margin-bottom: 2rem;
}

.single-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    max-height: 500px;
}

.single-hero .hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, var(--mh-bg-primary));
    padding: 3rem 2rem 1.5rem;
}

.single-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    color: var(--mh-text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.single-meta svg {
    width: 16px;
    height: 16px;
    vertical-align: -2px;
    margin-right: 4px;
}

.single-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--mh-text-primary);
}

.single-content h2,
.single-content h3,
.single-content h4 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--mh-text-primary);
}

.single-content p {
    margin-bottom: 1.2rem;
}

.single-content blockquote {
    border-left: 3px solid var(--mh-accent);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background-color: var(--mh-bg-secondary);
    border-radius: 0 var(--mh-card-radius) var(--mh-card-radius) 0;
    color: var(--mh-text-secondary);
}

.single-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--mh-card-radius);
}

.external-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 1.5rem 0;
}

.external-links .btn {
    font-size: 0.85rem;
    padding: 0.4rem 1rem;
    border-radius: 20px;
}

/* JustWatch Streaming Widget */
.justwatch-widget-wrapper {
    background-color: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
}

.justwatch-widget-wrapper [data-jw-widget] iframe {
    border-radius: var(--mh-card-radius);
}

.justwatch-attribution {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.7rem;
    color: var(--mh-text-muted);
    text-decoration: none;
    margin-top: 0.5rem;
    transition: color 0.2s;
}

.justwatch-attribution:hover {
    color: var(--mh-text-secondary);
}

.justwatch-attribution .justwatch-logo {
    height: 0.7rem;
    width: auto;
}

.post-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--mh-accent-gold);
}

.post-navigation a {
    color: var(--mh-text-secondary);
    font-size: 0.9rem;
    max-width: 45%;
}

.post-navigation a:hover {
    color: var(--mh-accent);
}

.post-navigation .nav-label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--mh-text-muted);
    margin-bottom: 0.25rem;
}

/* ==========================================================================
   Archive / Sorting / Filtering
   ========================================================================== */

.archive-controls {
    background-color: var(--mh-bg-secondary);
    border: none;
    border-radius: var(--mh-card-radius);
    padding: 1rem 1.25rem;
    margin-bottom: 2rem;
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.archive-controls .input-group-text {
    background-color: transparent;
    border: none;
    color: var(--mh-text-secondary);
}

.archive-controls .search-form {
    position: relative;
}

.archive-controls .search-form .search-icon {
    position: absolute;
    left: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--mh-text-muted);
    pointer-events: none;
    font-size: 0.85rem;
}

.archive-controls .form-control {
    background-color: var(--mh-bg-primary);
    border: none;
    border-radius: 20px;
    padding: 0.5rem 1rem 0.5rem 2.2rem;
    color: var(--mh-text-primary);
}

.archive-controls .form-control:focus {
    background-color: var(--mh-bg-primary);
    color: var(--mh-text-primary);
    box-shadow: none;
}

.sort-buttons .btn {
    font-size: 0.85rem;
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
}

.sort-buttons .btn.active {
    background-color: var(--mh-accent);
    border-color: var(--mh-accent);
    color: #fff;
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.filter-tags .form-check {
    margin: 0;
}

.filter-tags .form-check-input {
    background-color: var(--mh-bg-primary);
    border-color: var(--mh-border);
}

.filter-tags .form-check-input:checked {
    background-color: var(--mh-accent);
    border-color: var(--mh-accent);
}

.filter-tags .form-check-label {
    font-size: 0.85rem;
    color: var(--mh-text-secondary);
    cursor: pointer;
}

/* Genre Chip Input */
.genre-chip-input {
    position: relative;
}

.genre-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--mh-bg-primary);
    border: none;
    border-radius: 20px;
    min-height: 40px;
    cursor: text;
}

.genre-chips:focus-within {
    box-shadow: none;
}

.genre-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: var(--mh-accent);
    color: #fff;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s;
}

.genre-chip:hover {
    background: #c0392b;
    color: #fff;
}

.genre-chip .bi-x-lg {
    font-size: 0.55rem;
}

.genre-search-input {
    flex: 1;
    min-width: 80px;
    border: none;
    outline: none;
    background: transparent;
    color: var(--mh-text-primary);
    font-size: 0.85rem;
    padding: 2px 0;
}

.genre-search-input::placeholder {
    color: var(--mh-text-muted);
}

.genre-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1060;
    background: var(--mh-bg-card);
    border: 1px solid var(--mh-border);
    border-top: none;
    border-radius: 0 0 0.375rem 0.375rem;
    max-height: 200px;
    overflow-y: auto;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.genre-dropdown.show {
    display: block;
}

.genre-dropdown-item {
    display: block;
    padding: 8px 12px;
    color: var(--mh-text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    transition: background 0.1s;
}

.genre-dropdown-item:hover,
.genre-dropdown-item.highlight {
    background: var(--mh-bg-card-hover);
    color: #fff;
}

.genre-dropdown-item.hidden {
    display: none;
}

/* Alphabet Jump Navigation */
.alpha-nav {
    position: sticky;
    top: 70px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 0.5rem 0;
}

.alpha-nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--mh-text-muted);
    border-radius: 50%;
    transition: all var(--mh-transition);
}

.alpha-nav a:hover,
.alpha-nav a.active {
    background-color: var(--mh-accent);
    color: #fff;
}

.alpha-nav a.disabled {
    opacity: 0.3;
    pointer-events: none;
}

/* Year jump links in sidebar */
.alpha-nav a.year-jump {
    width: auto;
    height: auto;
    padding: 0.2rem 0.4rem;
    font-size: 0.75rem;
    border-radius: 3px;
}

/* Year / Letter Group Headers */
.year-group-header,
.letter-group-header {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--mh-text-muted);
    margin: 2rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--mh-border);
}

/* ==========================================================================
   Infinite Scroll
   ========================================================================== */

.infinite-scroll-trigger {
    text-align: center;
    padding: 2rem;
}

.infinite-scroll-trigger .spinner-border {
    width: 2rem;
    height: 2rem;
    color: var(--mh-accent);
}

.load-more-btn {
    border-radius: 20px;
    padding: 0.5rem 2rem;
}

/* ==========================================================================
   Search
   ========================================================================== */

.search-results-header {
    margin-bottom: 2rem;
}

.search-results-header h1 {
    font-size: 1.5rem;
}

.search-results-header .search-query {
    color: var(--mh-accent);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
    background-color: var(--mh-bg-secondary);
    border-top: none;
    padding: 2rem 0;
    margin-top: 3rem;
    color: var(--mh-text-muted);
    font-size: 0.85rem;
}

.site-footer a {
    color: var(--mh-text-secondary);
}

.site-footer a:hover {
    color: var(--mh-accent);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
}

.footer-rss {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
}

.footer-rss-title {
    color: var(--mh-accent-gold);
    font-size: 0.85rem;
    font-weight: 600;
}

.footer-rss-links {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
}

.footer-rss-links a {
    color: var(--mh-text-secondary);
    text-decoration: none;
}

.footer-rss-links a:hover {
    color: var(--mh-accent-gold-hover);
}

/* ==========================================================================
   404 Page
   ========================================================================== */

.error-404 {
    text-align: center;
    padding: 5rem 0;
}

.error-404 h1 {
    font-size: 6rem;
    font-weight: 700;
    color: var(--mh-accent);
    line-height: 1;
}

.error-404 p {
    font-size: 1.1rem;
    color: var(--mh-text-secondary);
}

/* ==========================================================================
   Page Template
   ========================================================================== */

.page-content {
    font-size: 1.05rem;
    line-height: 1.8;
}

.page-content h1,
.page-content h2,
.page-content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}



/* ==========================================================================
   Responsive Overrides
   ========================================================================== */

@media (max-width: 991.98px) {
    .navbar .search-form .form-control {
        width: 100%;
    }

    .navbar .search-form .form-control:focus {
        width: 100%;
    }

    /* Mobile: collapsible A-Z tab */
    .alpha-nav-mobile {
        position: fixed;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        z-index: 1050;
    }

    .alpha-nav-mobile .alpha-nav-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 28px;
        height: 48px;
        background: var(--mh-accent);
        color: #fff;
        border: none;
        border-radius: 8px 0 0 8px;
        font-size: 0.7rem;
        font-weight: 700;
        cursor: pointer;
        writing-mode: vertical-lr;
        letter-spacing: 1px;
        box-shadow: -2px 0 8px rgba(0, 0, 0, 0.3);
    }

    .alpha-nav-mobile .alpha-nav-panel {
        position: absolute;
        right: 28px;
        top: 50%;
        transform: translateY(-50%);
        display: none;
        flex-direction: column;
        align-items: center;
        gap: 1px;
        padding: 6px 4px;
        background: rgba(18, 24, 41, 0.95);
        border-radius: 10px;
        backdrop-filter: blur(8px);
        box-shadow: -4px 0 16px rgba(0, 0, 0, 0.4);
        max-height: 70vh;
        overflow-y: auto;
    }

    .alpha-nav-mobile.open .alpha-nav-panel {
        display: flex;
    }

    .alpha-nav-mobile .alpha-nav-panel a {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 28px;
        height: 22px;
        font-size: 0.65rem;
        font-weight: 600;
        color: var(--mh-text-muted);
        border-radius: 4px;
        text-decoration: none;
        transition: all 0.15s;
    }

    .alpha-nav-mobile .alpha-nav-panel a:hover,
    .alpha-nav-mobile .alpha-nav-panel a:active {
        background-color: var(--mh-accent);
        color: #fff;
    }

    .alpha-nav-mobile .alpha-nav-panel a.disabled {
        opacity: 0.25;
        pointer-events: none;
    }

    .alpha-nav-mobile .alpha-nav-panel a.year-jump {
        width: auto;
        padding: 0 6px;
        font-size: 0.6rem;
    }
}

@media (max-width: 575.98px) {
    .section-header h2 {
        font-size: 1.2rem;
    }

    .review-card .card-title {
        font-size: 0.9rem;
    }

    .review-card .card-excerpt {
        -webkit-line-clamp: 2;
    }

    .single-hero {
        max-height: 300px;
        border-radius: 0;
    }

    .post-navigation {
        flex-direction: column;
        gap: 1rem;
    }

    .post-navigation a {
        max-width: 100%;
    }
}

/* Touch targets for mobile */
@media (pointer: coarse) {
    .navbar .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .navbar .dropdown-item {
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .sort-buttons .btn {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }

    .filter-tags .form-check-label {
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .alpha-nav a {
        width: 36px;
        height: 36px;
    }
}

/* ==========================================================================
   Utility
   ========================================================================== */

.text-accent {
    color: var(--mh-accent) !important;
}

.bg-card {
    background-color: var(--mh-bg-card) !important;
}

/* Review cross-references */
.ref-link {
    color: var(--mh-accent-gold);
    font-weight: 700;
    text-decoration: none;
}

.ref-link:hover {
    color: var(--mh-accent);
    text-decoration: underline;
}

.ref-unresolved {
    font-weight: 700;
    color: var(--mh-text-primary, #fff);
}

/* ==========================================================================
   Table of Contents — Slim collapsible panel (triggered by pill button)
   ========================================================================== */

/* Inhalt pill button in external-links row */
#toc-toggle-btn {
    border-color: var(--mh-border) !important;
    color: var(--mh-text-secondary) !important;
    font-size: 0.8rem;
}

#toc-toggle-btn:hover,
#toc-toggle-btn[aria-expanded="true"] {
    background: rgba(255, 255, 255, 0.08) !important;
    color: var(--mh-text-primary) !important;
}

/* Collapsible panel */
.toc-panel {
    margin-top: 0.75rem;
}

/* Override plugin container inside our panel */
.toc-panel #ez-toc-container {
    background: transparent !important;
    border: none !important;
    border-left: 2px solid var(--mh-border) !important;
    border-radius: 0 !important;
    padding: 0 0 0 0.75rem !important;
    margin: 0 !important;
    width: auto !important;
}

/* Hide plugin's own title + toggle — we have our pill button */
.toc-panel #ez-toc-container .ez-toc-title-container {
    display: none !important;
}

.toc-panel #ez-toc-container nav ul {
    margin: 0 !important;
    padding: 0 !important;
}

.toc-panel #ez-toc-container nav ul li {
    list-style: none !important;
    margin: 0 !important;
    padding: 0.15rem 0 !important;
    border: none !important;
}

.toc-panel #ez-toc-container nav ul li a {
    color: var(--mh-text-secondary) !important;
    text-decoration: none !important;
    font-size: 0.8rem;
    line-height: 1.4;
    transition: color var(--mh-transition);
}

.toc-panel #ez-toc-container nav ul li a:hover {
    color: var(--mh-accent) !important;
}

.toc-panel #ez-toc-container nav ul ul {
    padding-left: 0.75rem !important;
}

.toc-panel #ez-toc-container nav ul ul li a {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.35) !important;
}

/* Counter/numbering reset */
.toc-panel #ez-toc-container ul li a::before,
.toc-panel #ez-toc-container .ez-toc-list-level-1 a::before {
    content: none !important;
}

/* ==========================================================================
   Network Graph
   ========================================================================== */

#moviehell-network {
    width: 100%;
    height: calc(100vh - 200px);
    min-height: 500px;
    background: var(--mh-bg-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
}

.network-controls .btn-group .btn.active {
    color: #fff;
}

.network-controls .btn-group .btn:not(.active) {
    opacity: 0.5;
}

.network-search-wrapper {
    width: auto;
}

@media (max-width: 991.98px) {
    .network-search-wrapper {
        width: 100%;
    }
    .network-controls .btn-group {
        width: 100%;
    }
    .network-controls .btn-group .btn {
        flex: 1;
    }
    .network-legend {
        justify-content: center;
    }
}

@media (min-width: 992px) {
    .network-search-wrapper {
        width: 220px;
    }
}

.network-search-wrapper .search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--mh-text-muted);
    pointer-events: none;
    font-size: 0.85rem;
}

.network-search-wrapper .form-control {
    padding-left: 32px;
    background: var(--mh-bg-card);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--mh-text-primary);
}

.network-legend {
    font-size: 0.8rem;
    color: var(--mh-text-muted);
}

.legend-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 4px;
    vertical-align: middle;
}

.legend-film   { background-color: #e74c3c; }
.legend-serie  { background-color: #e67e22; }
.legend-person { background-color: #3498db; }
.legend-land   { background-color: #2ecc71; }
.legend-genre  { background-color: #f1c40f; }

.network-stats {
    padding: 1rem 0;
}

.network-stat {
    text-align: center;
}

.network-stat-value {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
}

.stat-film   { color: var(--mh-color-film); }
.stat-serie  { color: var(--mh-color-serie); }
.stat-person { color: var(--mh-color-person); }
.stat-land   { color: var(--mh-color-land); }
.stat-genre  { color: var(--mh-color-genre); }

.network-stat-label {
    display: block;
    font-size: 0.75rem;
    color: var(--mh-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.network-tooltip {
    position: fixed;
    z-index: 10000;
    background: var(--mh-bg-card);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 0.4rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    color: var(--mh-text-primary);
    pointer-events: auto;
    max-width: 250px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.network-tooltip a {
    color: var(--mh-accent);
    text-decoration: none;
}

.network-tooltip a:hover {
    text-decoration: underline;
}
