/* ==========================================
   START: GLOBAL & FONTS
   ========================================== */







:root {
    --inactive-darkness: 0.15;
    --board-darkness: 0.60;
}

body {
    font-family: 'ITC Odin Con', serif;
    margin: 0;
    padding: 0;
    color: #f4e7c7;
    background: #0d0905;
}

/* Global: ALLE Game-Elemente erben ITC Odin Con */
body *, body *::before, body *::after {
    font-family: 'ITC Odin Con', serif;
}



body.game-open,
html.game-open {
    overflow: hidden !important;
    height: 100% !important;
    touch-action: none;
    -webkit-overflow-scrolling: auto;
    overscroll-behavior: none;
}
html.game-open body {
    position: fixed;
    width: 100%;
}

/* Götterspiel-Seite: Footer ohne Abstand */
body.page-template-template-game #Footer,
body.page-template-template-game-php #Footer,
body.page-template-template-game footer,
body.page-template-template-game-php footer {
    margin: 0 !important;
    padding: 0 !important;
}
body.page-template-template-game .footer-holder,
body.page-template-template-game-php .footer-holder {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* ==========================================
   FIX: HINTERGRUND-PATTERN RETTEN
   ========================================== */

/* 1. Pattern auf HTML & BODY erzwingen */
html,
body,
body.page-template-page-game {
    background-color: #0d0905 !important;
    background-image:
        radial-gradient(circle at center, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.85) 100%),
        url('/wp-content/uploads/2025/11/game/card_odin_game_bg_pattern.png') !important;
    background-repeat: repeat !important;
    background-position: center !important;
    background-attachment: fixed !important;
    min-height: 100vh;
}

/* 2. "Zwiebelschichten" entfernen: Alles über dem Body muss transparent sein */
#page,
.site,
.site-content,
#content,
#primary,
#main,
.entry-content,
.ast-container,
.divi-layout,
.et_builder_inner_content,
article {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    /* Theme-Bilder löschen */
    border: none !important;
    box-shadow: none !important;
}

/* 3. Sicherheits-Check: Das Spiel-Overlay darf NICHT sichtbar sein beim Start */
/* Falls das Overlay versehentlich "block" hat, sieht man nur Schwarz */
#gameOverlay {
    display: none !important;
    z-index: -1;
    /* Nach hinten schieben, solange nicht aktiv */
}


.game-template-wrapper {
    padding-top: 180px !important;
    width: 100%;
    flex: 1;
    background: transparent !important;
}

/* ==========================================
   START: LANDING SCREEN
   ========================================= */
.landing-screen {
    padding-bottom: 20px;
    text-align: center;
}

.landing-title {
    font-family: 'ITC Odin Con', serif !important;
    font-size: 3rem;
    letter-spacing: 4px;
    color: #c5a059;
    margin-bottom: 50px;
}

.mode-container {
    display: flex;
    justify-content: center;
    gap: 25px;
    flex-wrap: wrap;
    margin-top: 40px;
}

/* 1. CONTAINER */
.mode-item,
.mode-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 250px;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* 2. BILD-BOX */
.mode-image-wrapper {
    position: relative;
    width: 100%;
    height: 350px;
    border-radius: 20px;
    overflow: hidden;
    border: 2px solid #FDD981;
    cursor: pointer;
    box-shadow: 0px 0px 40px rgba(197, 160, 89, 0.55);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.mode-image-wrapper:hover {
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    border-color: #FDD981;
    box-shadow: 0px 0px 40px rgba(197, 160, 89, 0.55);
}


.mode-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: filter 0.7s ease, transform 0.5s ease;
}





.mode-image-wrapper:hover .mode-img {
    filter: blur(2px) brightness(0.4);
}

.mode-image-wrapper:hover .card-hover-menu,
.mode-image-wrapper.tap-active .card-hover-menu {
    display: flex;
}

/* 3. HOVER MENÜ */
.card-hover-menu {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    display: none;
    flex-direction: column !important;
    justify-content: center;
    align-items: center;
    gap: 10px;
    z-index: 30;
}


/* 4. TEXT */
.mode-text,
.text-container {
    margin-top: 20px;
    text-align: center;
    cursor: default;
}

.mode-title {
    font-family: 'ITC Odin Con', serif !important;
    font-size: 1.8rem;
    margin: 5px 0;
    color: #FDD981;
    text-shadow: 0 2px 5px #000;
}

.mode-desc {
    font-family: 'ITC Odin Con', serif;
    font-size: 1rem;
    opacity: 0.8;
    margin: 0;
    color: #aa9c8d;
    letter-spacing: 1px;
}

/* 5. LOCKED STATE */
.mode-item.locked .mode-image-wrapper,

.mode-item.locked .mode-image-wrapper:hover {
    transform: none;
    border-color: #5e4c35;
}









/*.mode-item.locked .mode-image-wrapper::after,
.mode-card.locked .mode-image-wrapper::after {
    content: "DEMNÄCHST";
    position: absolute;
    top: 25px; right: -45px;
    transform: rotate(45deg);
    width: 180px; padding: 8px 0;
    background: linear-gradient(to bottom, #2b2018 0%, #000 100%);
    border-top: 1px solid #c5a059; border-bottom: 1px solid #c5a059;
    color: #c5a059;
    font-family: 'ITC Odin Con', serif; font-weight: normal; font-size: 1.1rem;
    letter-spacing: 2px; text-align: center; text-transform: uppercase;
    box-shadow: 0 5px 10px rgba(0,0,0,0.8);
    z-index: 20; pointer-events: none;
}

/* ==========================================
   START: BUTTONS (NORSE FONT)
   ========================================== */
.menu-btn,
.header-btn {
    all: unset !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: linear-gradient(90deg, #ffe298 0%, #fcdcb1 60%, #f7e8b0 100%, #fff6d0 100%) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 999px !important;
    position: relative !important;
    overflow: visible !important;
    font-family: 'ITC Odin Con', serif !important;
    font-weight: 500 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.02em !important;
    text-shadow: none !important;
    text-decoration: none !important;
    cursor: pointer !important;
    transition: filter 0.3s ease !important;
    filter: drop-shadow(0 1px 0px rgba(0,0,0,0.5)) !important;
}
.menu-btn::before,
.header-btn::before {
    content: '' !important;
    position: absolute !important;
    inset: 0 !important;
    border-radius: 999px !important;
    padding: 2px !important;
    background: linear-gradient(120deg, #c5a059, #d4b06a, #f3d895, #ffe3a0, #f3d895, #d4b06a, #c5a059) !important;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0) !important;
    -webkit-mask-composite: xor !important;
    mask-composite: exclude !important;
    pointer-events: none !important;
}
.menu-btn:hover,
.header-btn:hover {
    filter: drop-shadow(0 0 12px rgba(244, 192, 100, 0.6)) drop-shadow(0 0 25px rgba(244, 192, 100, 0.3)) !important;

}

.menu-btn:active,
.header-btn:active {
    transform: scale(0.95);
}

.header-btn {
    width: 140px !important;
    height: 45px !important;
    font-size: 1rem !important;
    margin-left: 10px;
}

.header-btn[style*="display: none"] {
    display: none !important;
}



/* ==========================================
   START: GAME WINDOW
   ========================================== */
.game-overlay {
    position: fixed;
    inset: 0;
    display: none;
    justify-content: center;
    align-items: center;
    background: #0d0905;
    z-index: 2147483647 !important;
}

.game-overlay.visible {
    display: flex;
}

.game-window {
    width: 96vw;
    height: 96vh;
    max-width: 1600px;
    border-radius: 4px;
    border: 6px solid #050505;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    background: transparent !important;
}

.game-window::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url('/wp-content/uploads/2025/11/game/card_odin_game_bg_pattern.png');
    background-repeat: repeat;
    background-position: center;
    opacity: 1;
    pointer-events: none;
    z-index: 0;
}

.game-window::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, var(--board-darkness));
    pointer-events: none;
    z-index: 0;
}

/* ==========================================
   START: HEADER UI
   ========================================== */
.ui-header,
.game-header,
.game-board-wrapper,
.fixed-grid,
#fixedGrid {
    position: relative;
    z-index: 1;
    background: transparent !important;
}

.game-header {
    display: flex;
    align-items: flex-start;
    padding: 18px 40px 14px;
    border-bottom: 1px solid #2c2218;
    background: transparent;
    color: #f4e7c7;
}

.header-left {
    flex: 0 0 auto;
    text-align: left;
}

.world-title {
    font-family: 'ITC Odin Con', serif !important;
    font-size: 2.7rem;
    line-height: 2.3rem;
    color: #f4e7c7;
}

.world-subtitle {
    font-family: 'ITC Odin Con', serif;
    font-size: 1.1rem;
    margin-top: 2px;
    color: #e1cfa3;
    letter-spacing: 1px;
}

.header-center {
    flex: auto;
    text-align: center;
}

.stats-label-row {
    display: flex;
    gap: 70px;
    font-size: 1rem;
    opacity: 0.8;
    margin-bottom: 2px;
    font-family: 'ITC Odin Con', serif;
}

.stats-value-row {
    display: flex;
    gap: 70px;
    font-size: 1.8rem;
    line-height: 1.2;
    font-family: 'ITC Odin Con', serif;
    font-weight: normal;
    letter-spacing: 0.05em;
}

.header-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    height: 100%
}

.game-mute-icon {
    height: 40px !important;
    width: auto !important;
    cursor: pointer;
    margin-right: 20px;
    vertical-align: middle;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
    transition: transform 0.2s ease;
}


/* ==========================================
   START: BOARD & KARTEN
   ========================================== */
.game-board-wrapper {
    flex: 1;
    padding: 20px 25px 25px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.fixed-grid {
    width: 100%;
    max-width: 1500px;
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 4px;
}

.fixed-grid .cell {
    position: relative;
    overflow: visible;
    border-radius: 2px;
}

.fixed-grid .cell::before {
    content: "";
    display: block;
    padding-bottom: 100%;
}

.cell.inactive {
    background-image: url('/wp-content/uploads/2025/11/game/card_odin_game_bees_bg_blank.png') !important;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 1 !important;
    filter: none !important;
    background-color: transparent !important;
}

.cell.inactive::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, var(--inactive-darkness));
    pointer-events: none;
}

.cell.active {
    background: none !important;
}

/* KARTEN */
.card {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.3s ease-out;
    cursor: pointer;
    z-index: 1;
}

.card.matched,
.card.flipped {
    z-index: 100 !important;
    transform: rotateY(180deg);
}

.card-front {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    background-color: #3d3027;
    z-index: 2;
    border-radius: 4px;
    background-image: url('/wp-content/uploads/2025/11/game/card_odin_game_bees_bg.png');
    background-size: cover;
    background-position: center;
}

.card-back {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    transform: rotateY(180deg);
    background: #000;
    z-index: 1;
    border-radius: 4px;
}

.card-back>*,
.card-media {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 4px !important;
    display: block !important;
}

.card-back::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 4px;
    pointer-events: none;
    transition: box-shadow 0.5s ease-out;
    z-index: 10;
}

.card.flipped:not(.matched) .card-back::after {
    box-shadow: inset 0 0 0 1.5px #a67c52;
}

.card.matched .card-back {
    background: #000;
}

.card.matched .card-back img,
.card.matched .card-back video {
    border-radius: 4px !important;
}

.card.matched .card-back::after {
    box-shadow: inset 0 0 0 2px #f9d77e, 0 0 15px rgba(249, 215, 126, 0.7);
    animation: none;
}

@property --shimmer-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

@keyframes rotate-shimmer {
    to {
        --shimmer-angle: 360deg;
    }
}

.card.matched .card-back::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 4px;
    padding: 2px;
    pointer-events: none;
    z-index: 25;
    background: linear-gradient(120deg, #8a6d3b, #c5a059, #f3d895, #ffe3a0, #f3d895, #c5a059, #8a6d3b);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}

/* ==========================================
   START: FULLSCREEN & OVERLAY BUTTON
   ========================================== */
.video-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background-color: #0d0905;
    background-image: radial-gradient(circle at center, rgba(0, 0, 0, 0.4) 20%, rgba(0, 0, 0, 0.85) 100%), url('/wp-content/uploads/2025/11/game/card_odin_game_bg_pattern.png');
    background-repeat: repeat;
    background-position: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 1.0s ease;
    display: none;
    justify-content: center;
    align-items: center;
}



.video-overlay.active {
    opacity: 1;
    pointer-events: all;
    display: flex;
}

.fullscreen-video,
.fullscreen-bg-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.fullscreen-bg-img {
    filter: grayscale(50%) brightness(0.7);
}

.video-vignette {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, transparent 30%, rgba(0, 0, 0, 0.95) 100%);
    z-index: 1;
}

.overlay-content {
    position: relative;
    z-index: 2;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    transform: translateY(30px);
    opacity: 0;
    transition: all 1s ease 0.5s;
}

.video-overlay.active .overlay-content {
    transform: translateY(0);
    opacity: 1;
}

.realm-clear-title {
    font-size: 4rem;
    color: #f9d77e;
    text-shadow: 0 0 30px rgba(249, 215, 126, 0.8);
    margin: 0;
    font-family: 'ITC Odin Con', serif !important;
    text-transform: uppercase;
}

.fail-color {
    color: #ff5555 !important;
    text-shadow: 0 0 30px rgba(255, 85, 85, 0.6) !important;
}

.realm-clear-desc {
    font-family: 'ITC Odin Con', serif;
    font-size: 1.2rem;
    color: #eee;
}

.overlay-btn {
    all: unset !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 260px !important;
    height: 50px !important;
    margin: 30px auto 0 auto !important;
    background: linear-gradient(90deg, #ffe298 0%, #fcdcb1 60%, #f7e8b0 100%, #fff6d0 100%) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 999px !important;
    position: relative !important;
    overflow: visible !important;
    font-family: 'ITC Odin Con', serif !important;
    font-size: 1.6rem !important;
    font-weight: 500 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.02em !important;
    text-shadow: none !important;
    cursor: pointer !important;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: all 0.5s ease !important;
    filter: drop-shadow(0 1px 0px rgba(0,0,0,0.5)) !important;
}
.overlay-btn::before {
    content: '' !important;
    position: absolute !important;
    inset: 0 !important;
    border-radius: 999px !important;
    padding: 2px !important;
    background: linear-gradient(120deg, #c5a059, #d4b06a, #f3d895, #ffe3a0, #f3d895, #d4b06a, #c5a059) !important;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0) !important;
    -webkit-mask-composite: xor !important;
    mask-composite: exclude !important;
    pointer-events: none !important;
}

.overlay-btn.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.overlay-btn:hover {
    filter: brightness(1.1) saturate(1.1) drop-shadow(0 0 15px rgba(241, 198, 91, 0.6));
}

/* ==========================================
   START: UTILS
   ========================================== */
.inner-modal {
    display: none;
}

#fixedGrid,
.card,
.card-face,
.game-header {
    user-select: none;
}



/* =========================================================
   ASGARD LEGENDS: FINAL "GLÜHWÜRMCHEN" (CSS ONLY)
   ========================================================= */

.particle {
    position: absolute;
    pointer-events: none;
    z-index: 9999;
    /* Über den Karten */

    /* 1. DER LOOK (Kein Bild, sondern reines Licht) */
    width: 6px;
    height: 6px;
    border-radius: 50%;
    /* Rund */
    background: #fff;
    /* Weißer heißer Kern */

    /* Der goldene Schein (Glow) */
    box-shadow:
        0 0 6px 2px #ffd700,
        /* Inneres Gold */
        0 0 12px 4px rgba(255, 140, 0, 0.6),
        /* Äußeres Orange/Gold */
        0 0 20px 8px rgba(255, 215, 0, 0.2);
    /* Weite Aura */

    /* 2. DIE BEWEGUNG */
    /* Die Dauer wird im JS leicht variiert, aber hier ist die Basis */
    opacity: 0;
    will-change: transform, opacity;
    /* Wir nutzen die Animation 'fly-up' */
    animation: fly-up ease-out forwards;
}

/* Die Flug-Animation */
@keyframes fly-up {
    0% {
        opacity: 0;
        transform: translate(0, 0) scale(0.5);
    }

    10% {
        opacity: 1;
        /* Schnell aufleuchten */
        transform: translate(0, 0) scale(1.2);
    }

    100% {
        opacity: 0;
        /* Langsam verglühen */
        /* Fliegt zu den im JS berechneten Koordinaten (--tx, --ty) */
        transform: translate(var(--tx), var(--ty)) scale(0.2);
    }
}


/* ==========================================
   5. LOCKED STATE (FINALE VERSION: Farbiges Overlay)
   ========================================== */

/* 1. DER GANZE CONTAINER (Interaktion stoppen) */
.mode-item.locked,
.mode-card.locked {
    /* WICHTIG: Hier KEIN grayscale filter mehr, sonst wird das Overlay auch grau! */
    /* filter: grayscale(100%) !important;  <-- ENTFERNT */

    /* Wir lassen die Opazität auf 1, damit dein Overlay-Bild knackig aussieht */
    opacity: 1 !important;

    /* Keine Maus-Interaktion (Klick/Hover) */
    pointer-events: none !important;
    cursor: default !important;
}

/* 2. DER BILD-WRAPPER (Basis für das Overlay) */
.mode-item.locked .mode-image-wrapper,
.mode-card.locked .mode-image-wrapper {
    border-color: #444 !important;
    /* Grauer Rahmen statt Gold */
    box-shadow: none !important;
    transform: none !important;
    /* Kein Hover-Effekt */
    position: relative;
    /* Wichtig, damit sich das Overlay daran orientiert */
    overflow: hidden;
    /* Damit das Overlay die abgerundeten Ecken respektiert */
}

/* 3. DAS NEUE OVERLAY-BILD (Füllt die ganze Box aus & ist FARBIG) */
.mode-item.locked .mode-image-wrapper::after,
.mode-card.locked .mode-image-wrapper::after {
    content: '';
    position: absolute;
    /* Spannt das Bild über den kompletten Wrapper */
    inset: 0;
    width: 100%;
    height: 100%;

    /* DEIN BILD LINK (Wird jetzt farbig angezeigt) */
    background-image: url('/wp-content/uploads/2025/11/game/locked_level_m.png');
    background-repeat: no-repeat;
    background-position: center;

    /* 'cover' sorgt dafür, dass die Box komplett ausgefüllt ist */
    background-size: cover;

    z-index: 50;
    /* Liegt über dem originalen Level-Bild */
    opacity: 1.0;
    /* Volle Deckkraft */
}

/* 4. DER TEXT DARUNTER (Farbe entziehen, damit es trotzdem inaktiv wirkt) */
.mode-item.locked .mode-title {
    color: #888 !important;
    /* Grau statt Gold */
    text-shadow: none !important;
}

.mode-item.locked .mode-desc {
    color: #666 !important;
    /* Dunkelgrau */
}


/* 3. DAS LEVEL-BILD (Der Blur-Effekt) */
.mode-item.locked .mode-img {
    /* Blur: Macht es unscharf (5px ist ein guter Wert) */
    /* Brightness: Dunkelt das Bild auf 40% ab */
    filter: blur(3px) brightness(0.2) !important;

}





/* 4. DIE BANDEROLE (Grau & Dunkel)
.mode-item.locked .mode-image-wrapper::after,
.mode-card.locked .mode-image-wrapper::after {
    content: "DEMNÄCHST";
    position: absolute;
    top: 25px; right: -45px;
    transform: rotate(45deg);
    width: 180px; padding: 8px 0;

    background: linear-gradient(to bottom, #222 0%, #000 100%) !important;
    border-top: 1px solid #555 !important; 
    border-bottom: 1px solid #555 !important;
    

    font-family: 'ITC Odin Con', serif; font-weight: normal; font-size: 1.1rem;
    letter-spacing: 2px; text-align: center; text-transform: uppercase;
    
    box-shadow: none !important;
    z-index: 20;
}*/

.modal {
    /* Deine existierenden Styles lassen ... */
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.7);
    /* Transparenz, damit man Karten sieht */

    /* --- DER FIX --- */
    z-index: 99999 !important;

    /* Das holt das Fenster im 3D-Raum VOR die Karten */
    transform: translateZ(2000px);

    /* Verhindert, dass 3D-Elemente durchstechen */
    transform-style: flat;
}

.game-board {
    /* ... deine existierenden Styles ... */
    position: relative;
    z-index: 1;
}


/* 1. Das Spiel-Overlay etwas verringern (damit Platz nach oben ist) */
#gameOverlay.visible {
    display: flex !important;
    /* War vorher 2147483647 -> Jetzt etwas weniger */
    z-index: 9999 !important;
}

/* 2. Die Bienen (Particles) anpassen */
.particle {
    /* War vorher 2147483647 -> Muss über dem Spiel, aber unter dem Sieg sein */
    z-index: 100001 !important;
    /* ... restlicher code ... */
}

/* 3. Die Sieges-Nachricht (Video Overlay) muss der KING sein */
.video-overlay {
    /* ... deine alten styles ... */
    position: fixed;
    inset: 0;
    background-color: #0d0905;

    /* WICHTIG: Höher als alles andere */
    z-index: 2147483600 !important;

    /* WICHTIG: Holt das Fenster aus dem 3D-Raum der Karten heraus */
    transform: translateZ(2000px);
}


/* ==========================================
   GOLDENER NEUSTART BUTTON (End Screen)
   ========================================== */

/* Standard-Zustand des goldenen Buttons */
.overlay-btn.gold-finish {
    border: 3px solid #FFD700 !important;
    /* Goldener Rand */
    color: #FFD700 !important;
    background-image: none !important;
    /* Kein Bild, oder behalte es, wenn du willst */
    background-color: rgba(0, 0, 0, 0.8) !important;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
    /* Leichtes Leuchten immer */
    transition: all 0.3s ease;
}

/* HOVER: Richtig starkes Leuchten */
.overlay-btn.gold-finish:hover {
    background-color: #FFD700 !important;
    color: #000 !important;
    /* Text wird schwarz für Kontrast */
    box-shadow:
        0 0 30px rgba(255, 215, 0, 0.8),
        0 0 60px rgba(255, 215, 0, 0.4) !important;
    /* Doppelter Glow */
    transform: scale(1.1) translateY(-5px);
    /* Wird größer */
    border-color: #fff !important;
    /* Rand wird weiß beim Leuchten */
}


/* =========================================================
   FIX: WACKELNDE ZAHLEN & SCHIEFE BUTTONS
   ========================================================= */

/* 1. BUTTONS PERFEKT ZENTRIEREN (Hilfe, Neustart, etc.) */
.header-btn {
    display: inline-flex;
    /* Flexbox aktiviert */
    align-items: center !important;
    /* Vertikal mittig */
    justify-content: center !important;
    /* Horizontal mittig */

    /* Odin Font Korrektur: */
    line-height: 1 !important;
    /* Zeilenhöhe verringern */
    padding-top: 0px !important;
    /* Text optisch leicht nach unten schieben */
    padding-bottom: 0 !important;

    height: 45px !important;
    /* Feste Höhe erzwingen */
    min-width: 140px !important;
    /* Feste Mindestbreite */
}

/* 2. STATISTIKEN (Züge, Zeit, Level) - STOPPT DAS SPRINGEN */
.stats-label-row,
.stats-value-row {
    display: flex !important;
    justify-content: center !important;
    gap: 15px !important;
    /* Abstand zwischen den Blöcken */
    width: 100%;
}

/* Wir machen aus jedem Wert (Zeit, Level) eine Box mit fester Breite */
/* Damit ist es egal, ob da "1" oder "10" steht, der Nachbar bewegt sich nicht */
.stats-label,
.stats-value {
    display: inline-block !important;
    width: 100px !important;
    /* FESTE BREITE: Verhindert das Wackeln! */
    text-align: center !important;
    /* Inhalt in der festen Box zentrieren */
    white-space: nowrap !important;
}

/* Den Doppelpunkt oder Strich bei der Zeit stabilisieren */
#timer {
    font-variant-numeric: tabular-nums;
    /* Erzwingt gleich breite Zahlen (falls Font es unterstützt) */
}

/* 3. VORSCHAU LABEL KORREKTUR */
/* Falls "Vorschau" länger ist als "Zeit", passt es nun wegen der festen Breite */


/* =========================================================
   BUTTON SICHTBARKEIT: Wird im finalen Block weiter unten definiert
   ========================================================= */


/* =========================================================
   FIX: HILFE BUTTON DISABLED STATE
   ========================================================= */
.header-btn:disabled,
.header-btn[disabled] {
    opacity: 0.3 !important;
    /* Stark abdunkeln/transparent machen */
    cursor: not-allowed !important;
    /* Verbot-Mauszeiger */
    pointer-events: none !important;
    /* Klicks komplett ignorieren */
    filter: grayscale(100%) !important;
    /* Optional: Grau machen */
}





/* ==========================================
   6. COMPLETED STATE (DAUERHAFT AKTIV & BLUR)
   ========================================== */

/* 1. Der Rahmen & Schatten (Dauerhaft Gold, keine Bewegung) */
.mode-item.completed .mode-image-wrapper,
.mode-card.completed .mode-image-wrapper {
    border-color: #FDD981 !important;
    /* Goldener Rahmen */
    box-shadow: 0 15px 40px rgba(197, 160, 89, 0.25) !important;
    /* Goldener Schein */
    transform: none !important;
    /* WICHTIG: Keine Bewegung/Zoom mehr */
    cursor: default !important;
    /* Standard-Mauszeiger, da Button geklickt wird */
}

/* 2. Das Bild (Dauerhaft unscharf & dunkel) */
.mode-item.completed .mode-img {
    filter: blur(2px) brightness(0.4) !important;
}

/* 3. Das Menü (Dauerhaft sichtbar, nicht nur bei Hover) */
.mode-item.completed .card-hover-menu {
    display: flex !important;
    /* Menü immer anzeigen */
}

/* ==========================================
   7. BUTTON UNIFORMITY (ALLE GLEICH GROSS)
   ========================================== */

/* Hier erzwingen wir, dass Start, Weiter und Neustart exakt gleich aussehen */
/* WICHTIG: display wird NICHT hier gesetzt — die Show/Hide Logik weiter unten regelt das */
.card-hover-menu .menu-btn {
    /* Feste Größe für ALLE Buttons in der Box */
    width: 120px !important;
    height: 51px !important;

    /* Text Anpassung */
    font-size: 1.1rem !important;
    padding: 0 !important;
    margin: 5px 0 !important;

    /* Flexbox Zentrierung (wenn sichtbar) */
    justify-content: center !important;
    align-items: center !important;

    /* Hintergrund sicherstellen */
    background-size: 100% 100% !important;
}










/* =========================================================
   BUTTON LOGIK: Duplikat entfernt — siehe finale Regeln weiter unten
   ========================================================= */



/* =========================================================
   BUTTON LOGIK: WER DARF WANN ZU SEHEN SEIN?
   (Einziger Regelblock — keine Duplikate!)
   ========================================================= */

/* 1. GRUNDZUSTAND: Alles verstecken, was dynamisch ist */
.card-hover-menu .menu-btn,
.card-hover-menu .container-return {
    display: none !important;
}

/* Der REGELN Button ist IMMER da (außer man will ihn explizit ausblenden) */
.card-hover-menu .btn-small-bottom {
    display: inline-flex !important;
}


/* 2. SZENARIO: NEUES SPIEL (.show-start) */
/* -> Zeige nur "BEGINNEN" */
.card-hover-menu.show-start .btn-start {
    display: inline-flex !important;
}

/* Neustart bleibt hier ausgeblendet (Grundzustand) */

/* 2b. SZENARIO: BELEBEN (.show-revive) */
.card-hover-menu .btn-revive {
    display: none !important;
}
.card-hover-menu.show-revive .btn-revive {
    display: inline-flex !important;
    color: #fff !important;
    text-shadow: 0 0 12px rgba(255,255,255,0.6), 0 2px 4px #000 !important;
    animation: nebelGlow 3s ease-in-out infinite;
}
.card-hover-menu.show-revive .btn-start { display: none !important; }
.card-hover-menu.show-revive .menu-center .container-return { display: none !important; }
.card-hover-menu.show-revive .menu-bottom .container-return { display: flex !important; }


/* 3. SZENARIO: SPIEL LÄUFT / PAUSE (.show-return) */
/* -> Zeige "WEITER" und unten "NEUSTART" */
.card-hover-menu.show-return .btn-continue {
    display: inline-flex !important;
}

.card-hover-menu.show-return .container-return {
    display: block !important;
    /* Hier drin ist der rote Neustart Button */
}


/* 4. SZENARIO: LEVEL FERTIG / ABGESCHLOSSEN (.show-restart-only) */
/* -> Zeige nur "NEUSTART" (Mitte ist leer oder Haken) */
.card-hover-menu.show-restart-only .container-return {
    display: block !important;
}

/* Weiter & Start bleiben aus */








/* ==========================================
   6. COMPLETED STATE (FERTIG: Goldrahmen, dunkel, KEIN GLOW)
   ========================================== */

/* 1. Der Rahmen & Schatten (Dauerhaft Gold, keine Bewegung, KEIN GLOW) */
.mode-item.completed .mode-image-wrapper,
.mode-card.completed {
    border: 2px solid rgba(253, 217, 129, 0.5) !important;
    /* Goldener Rahmen bleibt */



    /* HIER IST DIE ÄNDERUNG: */
    box-shadow: none !important;
    /* <--- Kein Schein/Glow mehr */

    transform: none !important;
    /* WICHTIG: Keine Bewegung/Zoom mehr */
    cursor: default !important;
    /* Standard-Mauszeiger */
}

/* 2. Das Bild (Dauerhaft unscharf & dunkel - wie gehabt) */
.mode-item.completed .mode-img {
    filter: blur(2px) brightness(0.2) !important;
}

.mode-item.completed .mode-title,
.mode-item.completed .mode-desc {
    opacity: 0.5;
}



/* 3. Das Menü (Dauerhaft sichtbar - wie gehabt) */
.mode-item.completed .card-hover-menu {
    display: flex !important;
}




/* =========================================================
   UX FIX: KEINE TEXT-SELEKTION & KEIN MARKIEREN
   ========================================================= */

/* 1. Buttons & Texte in den Boxen unmarkierbar machen */
.menu-btn,
.header-btn,
.overlay-btn,
.mode-title,
.mode-desc,
.mode-image-wrapper {
    /* Verhindert das Markieren von Text mit der Maus */
    -webkit-user-select: none;
    /* Safari */
    -moz-user-select: none;
    /* Firefox */
    -ms-user-select: none;
    /* IE/Edge */
    user-select: none;
    /* Standard */

    /* Verhindert das blaue Aufleuchten beim Tippen (Mobile) */
    -webkit-tap-highlight-color: transparent;
}

/* 2. Den blauen Rahmen beim Klicken entfernen (Focus Outline) */
.menu-btn:focus,
.header-btn:focus,
.overlay-btn:focus {
    outline: none !important;
}

/* Sicherheitshalber auch für die ganze Box */
.mode-item,
.mode-card {
    user-select: none;
}


/* =========================================================
   UX FIX: CURSOR LOGIC (HAND NUR AUF BUTTONS)
   ========================================================= */

/* 1. Die Box selbst: Standard-Mauszeiger (Pfeil) */
/* Damit weiß der Nutzer: Hier klicken bringt nichts */
.mode-image-wrapper,
.mode-item,
.mode-card {
    cursor: default !important;
}

/* 2. Die Buttons: Hand-Mauszeiger */
/* Nur hier soll die Hand erscheinen */
.menu-btn,
.header-btn,
.overlay-btn {
    cursor: pointer !important;
}

/* 3. Ausnahme: Gesperrte Level (Bleiben 'Verboten'-Schild) */
.mode-item.locked .mode-image-wrapper,
.mode-card.locked .mode-image-wrapper {
    cursor: not-allowed !important;
    /* Oder default, wenn du kein Verboten-Schild willst */
}








/* =========================================
   FIX: PLAYER ÜBER DEM SCHLOSS (Z-INDEX)
   ========================================= */

/* 1. Der Haupt-Wrapper des Players */
.viking-player-wrapper {
    position: relative !important;
    z-index: 200 !important;
    /* Muss höher sein als das Schloss (50) */
}

/* 2. Das Dropdown-Menü des Players */
.player-dropdown {
    z-index: 210 !important;
    /* Muss noch höher sein als der Wrapper */
}

/* 3. Sicherheitshalber auch das Icon */
.wave-icon {
    position: relative !important;
    z-index: 205 !important;
}

/* 4. Falls der Header selbst zu niedrig ist */
/* (Je nachdem wo der Player eingebaut ist) */
.mfn-header-tmpl,
#Top_bar {
    z-index: 500 !important;
}


/* ==========================================
   FIX: MAGISCHE BIENEN / FUNKEN (CSS ONLY)
   ========================================== */

/* ==========================================
   FIX: MAGISCHE BIENEN (LANGSAMER & SICHTBAR)
   ========================================== */

.particle {
    /* 1. Höchste Ebene (Über dem Spiel) */
    z-index: 2147483647 !important;
    position: absolute !important;
    pointer-events: none;

    /* 2. Goldener Punkt statt Bild */
    background-image: none !important;
    background-color: #FFD700 !important;

    /* 3. Magisches Leuchten */
    box-shadow:
        0 0 6px 2px rgba(255, 215, 0, 0.8),
        0 0 12px 4px rgba(253, 217, 129, 0.4) !important;

    border-radius: 50% !important;
    min-width: 6px !important;
    min-height: 6px !important;

    /* 4. GESCHWINDIGKEIT */
    /* 3s = 3 Sekunden lang schweben (vorher war es 1.5s) */
    animation: bee-drift 3s ease-out forwards !important;

    opacity: 0;
    will-change: transform, opacity;
}

/* Die Flug-Animation (Langsames Schweben) */
@keyframes bee-drift {
    0% {
        transform: translate(0, 0) scale(0.5);
        opacity: 1;
        /* Sofort voll da */
    }

    70% {
        opacity: 1;
        /* Bleibt lange sichtbar */
    }

    100% {
        transform: translate(var(--tx), var(--ty)) scale(0);
        opacity: 0;
        /* Sanftes Ausblenden am Ende */
    }
}






/* ==========================================================================
       1. Z-INDEX FIX (WICHTIG!)
       Damit Overlays ÜBER dem Spiel liegen.
       ========================================================================== */

/* Das Spielfeld bekommt einen hohen, aber nicht den höchsten Wert */
.game-overlay {
    z-index: 2000000000 !important;
}

/* System Overlays (Sieg, Fail, Warnung) bekommen das Maximum */
.video-overlay,
#failOverlay,
#levelCompleteOverlay,
#restartConfirmOverlay {
    z-index: 2147483647 !important;
}






/* ==========================================================================
       4. KARTEN MENÜ LAYOUT (FINAL V2)
       ========================================================================== */



.card-hover-menu {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex !important;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    /* Padding unten verringert (von 20px auf 5px), damit Buttons tiefer sitzen */
    padding: 20px 15px 5px 15px !important;
    box-sizing: border-box;
    opacity: 0;
    transition: opacity 0.3s ease;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 50;
}



/* ==========================================================================
   FIX FÜR WIEDERBELEBEN SCREEN (Hintergrundbild setzen)
   ========================================================================== */

#failOverlay.video-overlay {
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.65)),
        url('/wp-content/themes/betheme-child/img/beleben_bg.jpg') no-repeat center center !important;
    background-size: cover !important;
    background-color: #050510 !important;
}
#failOverlay .fullscreen-bg-img {
    display: none !important;
}

/* ==========================================================================
   5. REGEL OVERLAY (MIT PATTERN & VIGNETTE)
   ========================================================================== */
.card-rules-overlay {
    position: absolute;
    inset: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 30px 20px 12px 20px;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    border: 1px solid rgba(197, 160, 89, 0.3);

    /* HIER PASSIERT DIE MAGIE: */
    background:
        /* 1. VIGNETTE (Radialer Verlauf: Mitte transparent -> Außen Schwarz) */
        radial-gradient(circle at center, rgba(0, 0, 0, 0.4) 40%, rgba(0, 0, 0, 0.55) 90%),

        /* 2. PATTERN */
        /* WICHTIG: Hier steht jetzt 'repeat' statt 'no-repeat', damit es sich kachelt! */
        url('/wp-content/themes/betheme-child/img/card_odin_game_bg_pattern_s.jpg') repeat center center !important;

    /* GRÖSSEN STEUERUNG:
       1. Wert (cover) -> gilt für die Vignette (Gradient)
       2. Wert (150px) -> gilt für das Pattern Bild.
       
       -> Ändere '150px' zu '80px' oder '50px', wenn das Muster noch kleiner sein soll.
    */
    background-size: cover, 150px !important;

    /* ZUSÄTZLICHER SCHATTEN-RAND (Vignette Effekt verstärken) */
    box-shadow: inset 0 0 80px rgba(0, 0, 0, 1);
}




.card-rules-overlay.active {
    opacity: 1;
    pointer-events: auto;
}




















.mode-image-wrapper:hover .card-hover-menu {
    opacity: 1;
}

.menu-center {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
}

/* ==========================================
       FIX: UNTERE BUTTONS (GLEICHE BREITE)
       ========================================== */

/* 1. Container Ausrichtung */
.menu-bottom {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 15px;
    /* Abstand zwischen den Buttons */
    width: 100%;
    margin-top: auto;
    padding-bottom: 8px;
}

/* 2. Container für Neustart - NUR bei show-return und show-restart-only sichtbar */
.menu-bottom .container-return {
    width: auto !important;
    display: none !important;
    margin: 0 !important;
}
.card-hover-menu.show-return .menu-bottom .container-return,
.card-hover-menu.show-restart-only .menu-bottom .container-return {
    display: block !important;
}

/* 3. Button Basis-Stil (Exakt gleiche Maße für beide) */
.btn-small-bottom,
.btn-small-red {
    /* Reset */
    all: unset !important;

    /* Pill + Gold Ring */
    display: inline-flex !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 0 !important;
    height: 38px !important;
    width: 105px !important;
    min-width: 105px !important;
    max-width: 105px !important;

    background: linear-gradient(90deg, #ffe298 0%, #fcdcb1 60%, #f7e8b0 100%, #fff6d0 100%) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;

    border: none !important;
    box-shadow: none !important;
    border-radius: 999px !important;
    position: relative !important;
    overflow: visible !important;

    /* Typografie */
    font-family: 'ITC Odin Con', serif !important;
    font-weight: 500 !important;
    font-size: 0.95rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.02em !important;
    text-shadow: none !important;
    line-height: 1 !important;

    /* Interaktion */
    cursor: pointer !important;
    transition: filter 0.2s ease !important;
    transform: none !important;
    -webkit-user-select: none;
    user-select: none;
    filter: drop-shadow(0 1px 0px rgba(0,0,0,0.5)) !important;
}
.btn-small-red::before {
    content: '' !important;
    position: absolute !important;
    inset: 0 !important;
    border-radius: 999px !important;
    padding: 2px !important;
    background: linear-gradient(120deg, #c5a059, #d4b06a, #f3d895, #ffe3a0, #f3d895, #d4b06a, #c5a059) !important;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0) !important;
    -webkit-mask-composite: xor !important;
    mask-composite: exclude !important;
    pointer-events: none !important;
}

/* ===========================
       REGELN (GOLD) — gleich wie Zurück-Button
       =========================== */
.btn-small-bottom {
    color: #FDD981 !important;
}
.btn-small-bottom::before {
    content: '' !important;
    position: absolute !important;
    inset: 0 !important;
    border-radius: 999px !important;
    padding: 2px !important;
    background: linear-gradient(120deg, #c5a059, #d4b06a, #f3d895, #ffe3a0, #f3d895, #d4b06a, #c5a059) !important;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0) !important;
    -webkit-mask-composite: xor !important;
    mask-composite: exclude !important;
    pointer-events: none !important;
}

.btn-small-bottom:hover {
    filter: drop-shadow(0 0 8px rgba(244, 192, 100, 0.6)) !important;
    color: #FDD981 !important;
    transform: none !important;
}

/* ===========================
       NEUSTART (ROT)
       =========================== */
.btn-small-red {
    /* Rot-Filter Basis */
    filter: hue-rotate(-45deg) saturate(2.5) brightness(0.9) !important;
    color: #fff !important;
}

.btn-small-red:hover {
    /* Rot-Filter + Glow (Sättigung hoch, etwas heller, roter Schatten) */
    filter: hue-rotate(-45deg) saturate(3) brightness(1.1) drop-shadow(0 0 6px rgba(255, 0, 0, 0.7)) !important;
    color: #fff !important;
    /* Farbe bleibt gleich */
    transform: none !important;
    /* Keine Bewegung */
}

/* Active State (Klick) - minimales Feedback, optional */
.btn-small-bottom:active,
.btn-small-red:active {
    opacity: 0.8;
    transform: none !important;
}

/* WICHTIG: Override für den Neustart-Button Wrapper-Klasse */
button.btn-small-red.container-return {
    width: 115px !important;
    max-width: 115px !important;
    min-width: 115px !important;
}

/* Div Container Layout */
div.container-return {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}


/* ==========================================================================
       2. NEUSTART BUTTON & WARNUNG STYLING (FIXED V3)
       ========================================================================== */

/* Roter Filter für den Neustart-Button */
.btn-red-text,
#restartConfirmOverlay .btn-red-text {
    filter: hue-rotate(-45deg) saturate(3) brightness(0.85) !important;
    color: #fff !important;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.8) !important;
    transition: filter 0.3s ease !important;
    /* Kein Transform in Transition */
    transform: none !important;
    /* Sicherheitshalber */
}

/* Hover: Nur Glow, KEINE Bewegung/Transformation */
.btn-red-text:hover,
#restartConfirmOverlay .btn-red-text:hover {
    filter: hue-rotate(-45deg) saturate(4) brightness(1.1) drop-shadow(0 0 15px rgba(255, 50, 50, 0.8)) !important;
    color: #fff !important;
    transform: none !important;
    /* WICHTIG: Keine Bewegung */
}

/* Der neue "Nur Text" Abbrechen Button */
.text-link-cancel {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    padding: 5px 10px !important;
    margin-top: 5px !important;

    font-family: 'ITC Odin Con', serif !important;
    font-size: 1.3em !important;
    /* Klein */
    color: #c5a059 !important;
    /* Grau/Unauffällig */
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.3s ease;

    /* Reset der großen Button Styles falls vererbt */
    width: auto !important;
    height: auto !important;
    display: inline-block !important;
}

.text-link-cancel:hover {
    color: #fff !important;
    /* Gold beim Drüberfahren */

}

/* Header Button Display Fix */
.header-btn.btn-red-text {
    display: inline-flex !important;
}

/* Schriftart Warnung Overlay */
#restartConfirmOverlay .warn-red-head {
    color: #e63939 !important;
    font-family: 'ITC Odin Con', serif !important;
    font-size: 3.5rem !important;
    margin-bottom: 10px;
}

#restartConfirmOverlay .realm-clear-desc {
    font-family: 'ITC Odin Con', serif !important;
    font-size: 1.6rem !important;
    color: #ccc;
    max-width: 600px;
    line-height: 1.4;
}





.rule-hl {
    color: #c5a059;
    font-family: 'ITC Odin Con', serif !important;
    font-size: 26px;
    margin: 0;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(197, 160, 89, 0.3);
    padding-bottom: 10px;
    width: 90%;
}

.rule-txt {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex-grow: 1;
    width: 100%;
}

.rule-odin-fact {
    font-family: 'ITC Odin Con', serif !important;
    font-size: 19px;
    color: #f9d77e;
    text-transform: uppercase;
}

.rule-desc {
    font-family: 'ITC Odin Con', serif !important;
    display: block;
    margin-top: 10px;
    font-size: 15px;
    color: #ccc;
    line-height: 1.2;
}

.close-rules-btn {
    all: unset !important;
    display: inline-flex !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 0 !important;
    height: 38px !important;
    width: 105px !important;
    min-width: 105px !important;
    max-width: 105px !important;
    background: linear-gradient(90deg, #ffe298 0%, #fcdcb1 60%, #f7e8b0 100%, #fff6d0 100%) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 999px !important;
    position: relative !important;
    overflow: visible !important;
    font-family: 'ITC Odin Con', serif !important;
    font-weight: 500 !important;
    font-size: 0.95rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.02em !important;
    text-shadow: none !important;
    line-height: 1 !important;
    cursor: pointer !important;
    transition: filter 0.2s ease !important;
    -webkit-user-select: none;
    user-select: none;
    margin-top: auto;
    margin-bottom: 0;
    filter: drop-shadow(0 1px 0px rgba(0,0,0,0.5)) !important;
}
.close-rules-btn::before {
    content: '' !important;
    position: absolute !important;
    inset: 0 !important;
    border-radius: 999px !important;
    padding: 2px !important;
    background: linear-gradient(120deg, #c5a059, #d4b06a, #f3d895, #ffe3a0, #f3d895, #d4b06a, #c5a059) !important;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0) !important;
    -webkit-mask-composite: xor !important;
    mask-composite: exclude !important;
    pointer-events: none !important;
}
.close-rules-btn:hover {
    filter: drop-shadow(0 0 8px rgba(244, 192, 100, 0.6)) !important;
}


/* ==========================================================================
       6. BILDER ÜBER DEN HEADLINES (Overlay Icons)
       ========================================================================== */
.overlay-top-img {
    display: block;
    width: 120px !important;
    max-width: 120px !important;
    max-height: 120px !important;
    /* Maximale Breite, damit es nicht alles verdeckt */
    height: auto;
    margin: 0 auto 20px auto;
    /* Zentriert + Abstand nach unten zur Headline */
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.6));
    /* Schöner Schatten */
    opacity: 0;
    animation: fadeInImg 0.8s ease forwards 0.3s;
    /* Sanftes Einblenden */
}

@keyframes fadeInImg {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}



/* ===========================
       NEUER WEISSER BUTTON (Wiederbeleben)
       =========================== */
.btn-white-text {
    /* Macht den Stein-Hintergrund hellgrau/weiß und den Text weiß */
    filter: grayscale(100%) brightness(1.3) contrast(1.1) !important;
    color: #fff !important;
    text-shadow: 0 0 4px rgba(0, 0, 0, 1) !important;
    /* Starker Schatten für Lesbarkeit */
    transition: filter 0.3s ease !important;
    transform: none !important;
}

.btn-white-text:hover {
    /* Weißer Glow Effekt */
    filter: grayscale(100%) brightness(1.6) contrast(1.2) drop-shadow(0 0 15px rgba(255, 255, 255, 0.8)) !important;
    transform: none !important;
}


/* ==========================================================================
   WIEDERBELEBEN TEXT (Gradient Fade + Glow)
   ========================================================================== */

#failOverlay #failTitleMain {
    font-family: 'ITC Odin Con', serif !important;
    font-size: 5.6rem !important;
    text-transform: uppercase;
    margin-bottom: 0px;
    padding-top: 0.1em;
    line-height: 1.15 !important;
    font-weight: 500 !important;
    color: #fff !important;
    animation: nebelGlow 3s ease-in-out infinite !important;
    filter: none;
}

@keyframes nebelGlow {
    0%, 100% {
        text-shadow: 0 0 10px rgba(255,255,255,0.6), 0 0 30px rgba(200,220,255,0.3), 0 0 60px rgba(150,180,255,0.15);
    }
    50% {
        text-shadow: 0 0 20px rgba(255,255,255,0.9), 0 0 50px rgba(200,220,255,0.5), 0 0 100px rgba(150,180,255,0.3), 0 0 150px rgba(130,160,255,0.1);
    }
}

/* Der Fließtext bleibt normal weiß/grau */
#failOverlay #failMessageMain {
    font-family: 'ITC Odin Con', serif !important;
    font-size: 1.6rem !important;

    margin-bottom: 0px;
    font-weight: 500 !important;
    -webkit-background-clip: text;
    background-clip: text;
    color: #fff !important;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.7));
}




/* ==========================================================================
   NO-SELECT (Text-Markierung deaktivieren)
   ========================================================================== */

/* Verhindert das Markieren von Text in Overlays, Buttons, Regeln und Headern */
.video-overlay,
.overlay-content,
.overlay-btn,
.text-link-cancel,
.header-btn,
.menu-btn,
.card-rules-overlay,
.rule-txt,
.rule-desc,
.warn-red-head,
.realm-clear-title,
.realm-clear-desc,
#failTitleMain,
#failMessageMain {
    -webkit-user-select: none !important;
    /* Safari / Chrome */
    -moz-user-select: none !important;
    /* Firefox */
    -ms-user-select: none !important;
    /* IE / Edge */
    user-select: none !important;
    /* Standard */
    cursor: default;
    /* Mauszeiger bleibt normal */
}

/* Buttons behalten den Pointer-Cursor */
button,
.menu-btn,
.header-btn,
.overlay-btn,
.text-link-cancel,
.close-rules-btn {
    cursor: pointer !important;
}



/* ==========================================================================
   GRAND FINALE & HALL OF FAME CSS
   ========================================================================== */

/* 1. Grand Finale Overlay (Anderer Hintergrund!) */
#grandFinaleOverlay .fullscreen-bg-img {
    /* Ein episches Bild für das Ende - Bitte URL anpassen */
    background-image: url('/wp-content/uploads/2025/11/game/valhalla_end.jpg') !important;
    filter: brightness(0.6);
}

.finale-input {
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid #c5a059;
    color: #f9d77e;
    padding: 10px 20px;
    font-family: 'ITC Odin Con', serif;
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: 20px;
    width: 300px;
    outline: none;
}

.finale-buttons-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 20px;
}

/* 2. Hall of Fame Button (Unter dem Spiel) */
.hof-trigger-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 20px;
    margin-bottom: 40px;
}

.btn-hof-main {
    all: unset;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 40px;
    height: 50px;
    background: linear-gradient(90deg, #ffe298 0%, #fcdcb1 60%, #f7e8b0 100%, #fff6d0 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    border: none;
    box-shadow: none;
    border-radius: 999px;
    position: relative;
    overflow: visible;
    font-family: 'ITC Odin Con', serif;
    font-size: 1.5rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    text-shadow: none;
    cursor: pointer;
    transition: filter 0.3s ease;
    filter: drop-shadow(0 1px 0px rgba(0,0,0,0.5));
}
.btn-hof-main::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 999px;
    padding: 2px;
    background: linear-gradient(120deg, #c5a059, #d4b06a, #f3d895, #ffe3a0, #f3d895, #d4b06a, #c5a059);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}
.btn-hof-main:hover {
    filter: drop-shadow(0 0 12px rgba(244, 192, 100, 0.6)) drop-shadow(0 0 25px rgba(244, 192, 100, 0.3));
}

/* 3. Hall of Fame Overlay Liste */
#hallOfFameOverlay .overlay-content {
    width: 90%;
    max-width: 800px;
    height: 80vh;
    justify-content: flex-start;
    /* Liste oben starten */
    padding-top: 40px;
}

.hof-list-container {
    width: 100%;
    flex-grow: 1;
    overflow-y: auto;
    margin-top: 20px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid #444;
    padding: 10px;
    border-radius: 4px;
}

/* Scrollbar Style */
.hof-list-container::-webkit-scrollbar {
    width: 8px;
}

.hof-list-container::-webkit-scrollbar-thumb {
    background: #c5a059;
    border-radius: 4px;
}

.hof-list-container::-webkit-scrollbar-track {
    background: #111;
}

.hof-entry {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    margin-bottom: 5px;
    padding: 10px;
    border-bottom: 1px solid #333;
    font-family: 'ITC Odin Con', serif;
    font-size: 1.1rem;
    color: #ccc;
}

.hof-rank {
    width: 40px;
    font-weight: bold;
    color: #888;
}

.hof-name {
    flex-grow: 1;
    text-align: left;
    padding-left: 10px;
    font-weight: bold;
    color: #fff;
}

.hof-totals {
    display: flex;
    gap: 15px;
    font-size: 0.9rem;
    color: #aaa;
}

/* PLATZ 1 STYLING */
.hof-entry.rank-1 {
    background: linear-gradient(90deg, rgba(197, 160, 89, 0.2), transparent);
    border: 1px solid #c5a059;
    padding: 20px 10px;
    /* Größer */
    margin-bottom: 15px;
}

.hof-entry.rank-1 .hof-rank {
    color: #FFD700;
    font-size: 2rem;
}

.hof-entry.rank-1 .hof-name {
    color: #FFD700;
    font-size: 1.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.hof-entry.rank-1 .hof-totals {
    color: #FDD981;
    font-size: 1.1rem;
}

.hof-entry.top-3 .hof-rank {
    color: #fff;
}

.hof-loading {
    color: #fff;
    font-size: 1.5rem;
    animation: blink 1s infinite;
}

@keyframes blink {
    50% {
        opacity: 0.5;
    }
}



















/* =========================================================
   ASGARD LEGENDS: CLEANUP
   (Die Bienen werden jetzt komplett per JS gesteuert)
   ========================================================= */

.bee-particle {
    pointer-events: none !important;
    z-index: 2147483647 !important;
    position: absolute !important;
    /* Wir erzwingen hier keine Animationen mehr per CSS */
    will-change: transform, opacity;
}

/* =========================================================
  BG
   ========================================================= */

/* Styling für das Sieg-Overlay Background */
#levelCompleteOverlay {
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
}

/* Ein dunkler Schleier über dem Bild, damit Text lesbar bleibt */
#levelCompleteOverlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    /* 60% Dunkelheit */
    z-index: -1;
}




/* Das Abgeschlossen-Label */
.completed-icon {
    display: none;
    /* Wird vom JS auf 'flex' gesetzt */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: auto;
    font-family: 'ITC Odin Con', serif !important;
    font-size: clamp(0.75rem, 1.5vw, 1rem);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    text-align: center;
    color: #F4C064;
    background: linear-gradient(135deg, #F4C064 0%, #ffeeb0 50%, #F4C064 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 8px rgba(244, 192, 100, 0.3));
    padding: 0;
    margin: 0;
    z-index: 10;
    pointer-events: none;
    white-space: nowrap;
}

/* Verhindert, dass das Siegel in gesperrten Boxen erscheint */
.mode-item.locked .completed-icon {
    display: none !important;
}





/* =========================================================
   FIX: HILFE & TEXT-SKIP (KEIN VERSCHIEBEN)
   ========================================================= */

/* 1. Der Container (Ankerpunkt) */
.aid-stack {
    position: relative !important;
    /* Wichtig für absolute Positionierung */
    display: flex;
    justify-content: center;
    align-items: center;
    width: 140px;
    /* Feste Breite wie die anderen Buttons */
    margin: 0 10px;
    height: 45px;
    /* Höhe des normalen Buttons */
}

/* 2. Der Hilfe-Button füllt den Container aus */
.aid-stack #btnDivineAid {
    margin: 0 !important;
    width: 100% !important;
    position: relative;
    z-index: 2;
    /* Liegt oben */
}

/* 3. Der Überspringen-Text (Schwebt darunter) */
.text-skip-btn {
    position: absolute !important;
    top: 30px;
    /* 30px Button + 3px Abstand -> Sitzt direkt drunter */
    left: 0;
    width: 100%;

    background: transparent !important;
    border: none !important;
    /* Keine Box */
    box-shadow: none !important;

    color: #c5a059 !important;
    font-family: 'ITC Odin Con', serif !important;
    font-size: 0.85rem !important;
    /* Etwas kleiner */
    text-transform: uppercase;
    text-align: center;
    cursor: pointer;
    letter-spacing: 1px;

    display: none;
    /* Standard: Unsichtbar */
    z-index: 1;
    transition: color 0.2s ease;

    /* Text-Schatten für Lesbarkeit auf dunklem Grund */
    text-shadow: 0 1px 2px #000;
    z-index: 9999 !important;
}



.text-skip-btn:hover {
    color: #FE4E24 !important;
    /* Wird hell beim Drüberfahren */

}








/* =========================================================
   GRAND FINALE: LEGENDEN STATUS (GOLD DESIGN)
   ========================================================= */

/* 1. Das Overlay Hintergrundbild (Dunkler für Kontrast) */
#grandFinaleOverlay .fullscreen-bg-img {
    filter: brightness(0.4);
}

/* 2. Der Container (Karte) */
.finale-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    max-width: 600px;
    width: 90%;
    /* Optional: Ein leichter Rahmen wie bei deinen Produkten */
    /* border: 1px solid rgba(244, 192, 100, 0.3); */
    padding: 20px;
    border-radius: 20px;
}

/* 3. HEADLINE (Dein Gold-Shimmer Effekt) */
.finale-headline {
    font-family: 'ITC Odin Con', serif !important;
    font-size: clamp(2.5em, 5vw, 4.5em);
    margin-bottom: 10px;
    margin-top: 0;
    line-height: 1.1;
    text-transform: uppercase;

    /* GOLD GRADIENT & ANIMATION */
    color: #F4C064 !important;
    background: linear-gradient(135deg, #F4C064 0%, #ffeeb0 50%, #F4C064 100%) !important;
    background-size: 180% auto !important;
    animation: odinShimmer 8s ease-in-out infinite !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    filter: drop-shadow(0 0 15px rgba(244, 192, 100, 0.6)) !important;
}

/* 4. SUBHEADLINE (Dein Stil) */
.finale-subhead {
    font-family: 'ITC Odin Con', serif;
    color: #d6be9f;
    font-size: 1.4rem;
    margin-bottom: 30px;
    text-shadow: 0 2px 4px #000;
    font-weight: 600;
    letter-spacing: 1px;
}

/* 5. STATS ROW (Zeit, Züge, Neustarts) */
.finale-stats-row {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
    font-family: 'ITC Odin Con', serif;
    font-size: 1.5rem;
    color: #fff;
}

.f-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.f-stat-val {
    color: #F4C064;
    font-size: 1.8rem;
    text-shadow: 0 0 10px rgba(244, 192, 100, 0.5);
}

.f-stat-label {
    font-size: 0.9rem;
    color: #888;
    text-transform: uppercase;
    margin-top: 5px;
}

/* 6. INPUT FELD (Dein Glow-Input Stil, aber breiter für Namen) */
.finale-input-gold {
    font-family: 'ITC Odin Con', serif !important;
    font-size: 2.5rem !important;
    font-weight: normal !important;
    width: 100% !important;
    max-width: 400px;
    height: 60px !important;
    margin-bottom: 30px !important;
    padding: 0 !important;
    text-align: center;
    outline: none !important;
    background: transparent !important;
    border: none !important;
    border-bottom: 2px solid rgba(244, 192, 100, 0.3) !important;
    /* Unterstrich zur Orientierung */

    /* Gold Gradient Text */
    background: linear-gradient(120deg, #f3d895 0%, #ffe3a0 40%, #fff0c4 70%, #ffe3a0 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;

    /* Glow */
    filter: brightness(1.06) saturate(1.05) drop-shadow(0 0 10px rgba(255, 215, 130, 0.35));
    caret-color: #ffe3a0;
}

.finale-input-gold::placeholder {
    -webkit-text-fill-color: rgba(255, 255, 255, 0.2) !important;
    text-shadow: none !important;
    filter: none !important;
}

/* 7. BUTTON (Dein odin-grid-btn Stil) */
.finale-btn-gold {
    all: unset;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 240px;
    height: 50px;
    background: linear-gradient(90deg, #ffe298 0%, #fcdcb1 60%, #f7e8b0 100%, #fff6d0 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    border: none;
    box-shadow: none;
    border-radius: 999px;
    position: relative;
    overflow: visible;
    font-family: 'ITC Odin Con', serif;
    font-size: 1.6rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    text-shadow: none;
    text-decoration: none;
    cursor: pointer;
    transition: filter 0.3s ease;
    filter: drop-shadow(0 1px 0px rgba(0,0,0,0.5));
    margin: 0 auto;
}
.finale-btn-gold::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 999px;
    padding: 2px;
    background: linear-gradient(120deg, #c5a059, #d4b06a, #f3d895, #ffe3a0, #f3d895, #d4b06a, #c5a059);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}
.finale-btn-gold:hover {
    filter: drop-shadow(0 0 12px rgba(244, 192, 100, 0.6)) drop-shadow(0 0 25px rgba(244, 192, 100, 0.3));
}

/* 8. SHOP LINK (Klein darunter) */
.finale-shop-link {
    margin-top: 30px;
    color: #888;
    font-family: 'ITC Odin Con', serif;
    text-transform: uppercase;
    text-decoration: none;
    font-size: 1.1rem;
    border-bottom: 1px solid #444;
    transition: all 0.3s;
}

.finale-shop-link:hover {
    color: #F4C064;
    border-color: #F4C064;
}

/* Animation Keyframes (falls noch nicht da) */
@keyframes odinShimmer {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}



/* =========================================================
   TABLET FIX: DOPPEL-KLICK LOGIK
   ========================================================= */

/* Wenn die Karte die Klasse "tap-active" hat, Menü anzeigen */
.mode-image-wrapper.tap-active .card-hover-menu {
    display: flex !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    z-index: 50 !important;
}

/* Den Hover-Effekt (Bild dunkler/Zoom) auch bei "tap-active" aktivieren */
.mode-image-wrapper.tap-active .mode-img {
    filter: blur(2px) brightness(0.4);
}

.mode-image-wrapper.tap-active {
    border-color: #FDD981;
    box-shadow: 0px 0px 40px rgba(197, 160, 89, 0.55);
}