/* =========================================
   Halle der Helden Seite
   ========================================= */

.halle-page {
    background-color: #000000 !important;
    background-image: none !important;
    color: #ffffff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 0;
}

/* Weicher Cross-Fade der Hintergrundbilder */
.halle-page::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120vh;
    background-color: #000000;
    z-index: -2;
    opacity: 1;
    transition: opacity 1s ease-in-out;
    display: block !important;
}

.halle-page::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120vh;
    background-image: 
        linear-gradient(to bottom, rgba(0, 0, 0, 0) 70%, rgba(0, 0, 0, 1) 100%),
        linear-gradient(to right, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 1) 30%, rgba(0, 0, 0, 0.75) 45%, rgba(0, 0, 0, 0.25) 65%, rgba(0, 0, 0, 0) 85%), 
        url('images/halle_inner.png');
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    z-index: -1;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    display: block !important;
    pointer-events: none;
}

.halle-page.hall-entered::before {
    opacity: 0;
}

.halle-page.hall-entered::after {
    opacity: 1;
}

.halle-main {
    flex: 1;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0rem 2rem 5rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: padding 0.5s ease;
}

.hall-entered .halle-main {
    padding-top: 8rem;
}

.halle-intro {
    position: absolute;
    top: 8%;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    width: 90%;
    max-width: 800px;
    z-index: 6; /* higher than doors and gears */
    pointer-events: none; /* clicks pass through to the seal trigger */
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.halle-intro h1 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    color: #ffffff;
    text-shadow: 0 5px 15px rgba(0, 0, 0, 0.8);
    letter-spacing: 2px;
}

.halle-intro p {
    font-size: 1.2rem;
    line-height: 1.8;
    color: #cccccc;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
}

.gate-opening .halle-intro {
    opacity: 0;
    transform: translate(-50%, -30px);
}

/* =========================================
   Filter & Suche
   ========================================= */
.halle-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 3rem;
    width: 100%;
    max-width: 800px;
}

.halle-search, .halle-filter {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(170, 255, 170, 0.3);
    color: #ffffff;
    border-radius: 8px;
    padding: 0.8rem 1.2rem;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.halle-search {
    flex: 1;
    min-width: 200px;
}

.halle-filter {
    cursor: pointer;
    min-width: 150px;
}

.halle-search:focus, .halle-filter:focus, .halle-filter:hover {
    border-color: #aaffaa;
    box-shadow: 0 0 10px rgba(170, 255, 170, 0.3);
}

.halle-filter option {
    background-color: #050a08;
    color: #ffffff;
}

/* =========================================
   Helden-Grid & Karten
   ========================================= */
.heroes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
    width: 100%;
}

.hero-card {
    position: relative;
    background: rgba(10, 25, 15, 0.6);
    border: 1px solid rgba(170, 255, 170, 0.15);
    border-radius: 12px;
    padding: 2.5rem 2rem;
    text-align: center;
    backdrop-filter: blur(8px);
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.4s ease, border-color 0.4s ease;
    overflow: hidden;
}

.hero-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.6), 0 0 25px rgba(170, 255, 170, 0.15);
    border-color: rgba(170, 255, 170, 0.6);
}

/* Zierlinie oben an der Karte */
.hero-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, transparent, #aaffaa, transparent);
    opacity: 0.5;
    transition: opacity 0.4s ease;
}

.hero-card:hover::before {
    opacity: 1;
}

.hero-avatar {
    width: 120px;
    height: 120px;
    margin: 0 auto 1.5rem auto;
    border-radius: 50%;
    border: 2px solid #aaffaa;
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 20px rgba(170, 255, 170, 0.2), inset 0 0 10px rgba(170, 255, 170, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.hero-card h2 {
    color: #ffffff;
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 5px rgba(0,0,0,0.8);
}

.hero-title {
    color: #aaffaa;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-desc {
    color: #aaaaaa;
    font-size: 1.05rem;
    line-height: 1.6;
}

.hero-meta {
    margin-top: 1.5rem;
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-meta .tag {
    background: rgba(170, 255, 170, 0.1);
    color: #aaffaa;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    border: 1px solid rgba(170, 255, 170, 0.3);
}

/* Keine Ergebnisse */
.no-results {
    width: 100%;
    text-align: center;
    color: #ff5555;
    font-size: 1.15rem;
    font-weight: 500;
    padding: 0.5rem 0 1.5rem 0;
    display: none;
}

/* Loading Indicator */
.loading-indicator {
    width: 100%;
    text-align: center;
    color: #aaffaa;
    padding: 3rem;
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.hall-entered .loading-indicator {
    display: flex;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(170, 255, 170, 0.2);
    border-radius: 50%;
    border-top-color: #aaffaa;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Pagination */
.pagination-controls {
    display: none;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    width: 100%;
}

.pagination-btn {
    background: rgba(170, 255, 170, 0.1);
    border: 1px solid rgba(170, 255, 170, 0.3);
    color: #aaffaa;
    padding: 0.5rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.pagination-btn:hover:not(:disabled) {
    background: rgba(170, 255, 170, 0.25);
    border-color: rgba(170, 255, 170, 0.6);
}

.pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    color: #888888;
    border-color: #444444;
    background: rgba(0, 0, 0, 0.3);
}

.page-info {
    color: #cccccc;
    font-size: 1.05rem;
    min-width: 120px;
    text-align: center;
}

/* Helden-Irrlichter */
.hero-wisp {
    position: absolute;
    z-index: 10;
}

.hw-1 { top: 20px; right: 20px; width: 10px; height: 10px; animation: wispWobble 3s infinite alternate ease-in-out; }
.hw-2 { top: 40px; left: 30px; width: 8px; height: 8px; background: #cceeff; box-shadow: 0 0 15px rgba(204, 238, 255, 0.8); animation: wispWobble 2.5s infinite alternate-reverse ease-in-out; }

@media (max-width: 768px) {
    .halle-intro h1 {
        font-size: 2.5rem;
    }
    .halle-main {
        padding-top: 0rem;
    }
    .hall-entered .halle-main {
        padding-top: 6rem;
    }
}

/* =========================================
   Legende (Titel & Auszeichnungen)
   ========================================= */
.halle-legend {
    position: relative;
    z-index: 96;
    margin-top: -12rem;
    width: 100%;
    max-width: 900px;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(170, 255, 170, 0.2);
    border-radius: 12px;
    padding: 3rem 2rem;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.7);
}

.halle-legend h2 {
    text-align: center;
    color: #ffffff;
    margin-bottom: 1.2rem;
    font-size: 2.4rem;
    letter-spacing: 1px;
}

.legend-intro {
    text-align: center;
    color: #cccccc;
    margin-bottom: 2.5rem;
    font-size: 1.2rem;
    line-height: 1.6;
}

.legend-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.legend-item {
    background: rgba(255, 255, 255, 0.04);
    padding: 1.8rem;
    border-radius: 8px;
    border-left: 4px solid #aaffaa;
    transition: transform 0.3s ease, background 0.3s ease;
}

.legend-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-3px);
}

.legend-item .hero-title {
    display: block;
    margin-bottom: 0.8rem;
    font-size: 1.3rem;
    font-weight: 600;
}

.legend-item p {
    color: #aaaaaa;
    font-size: 1.1rem;
    line-height: 1.6;
    margin: 0;
}

.legend-proposal {
    margin-top: 2.5rem;
    text-align: center;
    background: rgba(170, 255, 170, 0.05);
    border: 1px solid rgba(170, 255, 170, 0.2);
    border-radius: 8px;
    padding: 1.5rem;
    color: #cccccc;
    font-size: 1.1rem;
    line-height: 1.6;
}

.legend-proposal strong {
    color: #aaffaa;
}

/* =========================================
   Ansichts-Steuerung (Standard: Titel & Auszeichnungen)
   ========================================= */
.halle-controls,
.heroes-grid {
    display: none !important;
}

.halle-legend {
    display: block;
    animation: fadeIn 0.8s forwards ease-in-out;
}

/* Wenn die Halle betreten wurde */
.hall-entered .halle-controls {
    display: flex !important;
}
.hall-entered .heroes-grid {
    display: flex !important;
    flex-direction: column;
}
.hall-entered .halle-legend {
    display: none !important;
}
.hall-entered .explore-action {
    display: none !important;
}
.hall-entered .no-results {
    display: block;
}
.hall-entered .pagination-controls {
    display: flex;
}

/* Hilfsklasse zum Ausblenden */
.hero-card.list-layout.is-hidden,
.is-hidden {
    display: none !important;
}

/* Weiche Einblend-Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hall-entered .halle-controls,
.hall-entered .heroes-grid {
    animation: fadeIn 0.8s forwards ease-in-out;
}

/* Erkunden-Button */
.explore-action {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
    width: 100%;
}

.explore-btn {
    background: rgba(170, 255, 170, 0.1);
    border: 2px solid rgba(170, 255, 170, 0.4);
    color: #aaffaa;
    font-size: 1.3rem;
    font-weight: 600;
    padding: 1.2rem 2.5rem;
    border-radius: 50px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    box-shadow: 0 0 15px rgba(170, 255, 170, 0.1);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.explore-btn:hover {
    background: #aaffaa;
    color: #050a08;
    box-shadow: 0 0 30px rgba(170, 255, 170, 0.6), 0 0 50px rgba(170, 255, 170, 0.3);
    transform: translateY(-3px) scale(1.05);
}

.explore-btn:active {
    transform: translateY(-1px) scale(1.02);
}

/* Zurück-Button */
.back-to-legend-container {
    display: none;
    margin-bottom: 2rem;
    width: 100%;
    max-width: 900px;
}

.hall-entered .back-to-legend-container {
    display: flex;
    justify-content: flex-start;
}

.back-to-legend-btn {
    background: transparent;
    border: none;
    color: #aaaaaa;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease, transform 0.3s ease;
}

.back-to-legend-btn:hover {
    color: #aaffaa;
    transform: translateX(-5px);
}

/* Goldene Trennlinie entfernt */

/* =========================================
   Kompaktes Tabellen-Layout für Helden
   ========================================= */

/* Avatar ausblenden */
.hero-avatar {
    display: none !important;
}

/* Karte kompakter machen */
.hero-card.list-layout {
    background: rgba(0, 0, 0, 0.4) !important;
    border: 1px solid rgba(170, 255, 170, 0.1) !important;
    border-radius: 6px !important;
    margin-bottom: 0.5rem;
}

.hero-card.list-layout:hover {
    background: rgba(10, 25, 15, 0.7) !important;
    border-color: rgba(170, 255, 170, 0.3) !important;
}

/* Header anpassen für tabellarische Struktur */
.hero-card-header {
    padding: 0.75rem 1.25rem !important;
    gap: 1rem !important;
    display: flex !important;
    align-items: center !important;
}

.hero-info-main {
    flex: 1 1 auto;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 1.5rem !important;
}

.hero-info-main h2 {
    font-size: 1.15rem !important;
    font-weight: 600;
    margin: 0 !important;
    min-width: 220px; /* Spaltenbreite für Namen auf Desktop */
}

.hero-info-main .hero-title {
    font-size: 0.9rem !important;
    margin: 0 !important;
    color: #aaffaa !important;
    text-transform: none !important;
    letter-spacing: 0.5px !important;
    font-weight: 500 !important;
    opacity: 0.85;
}

/* Meta-Tags kompakter ausrichten */
.hero-card.list-layout .hero-meta {
    min-width: auto !important;
    display: flex !important;
    gap: 0.5rem !important;
    justify-content: flex-end !important;
    align-items: center !important;
    margin-top: 0 !important;
}

.hero-meta .tag {
    font-size: 0.75rem !important;
    padding: 0.2rem 0.6rem !important;
    border-radius: 4px !important;
}

/* Toggle Pfeil */
.hero-toggle-icon {
    font-size: 0.9rem !important;
    margin-left: 0.5rem !important;
}

/* Body (Beschreibung) kompakter machen */
.hero-card.list-layout.expanded .hero-card-body {
    padding: 0 1.25rem 1rem 1.25rem !important;
}

.hero-card.list-layout .hero-desc {
    padding-top: 0.75rem !important;
    font-size: 0.95rem !important;
    color: #bbbbbb !important;
}

/* Mobile Anpassungen für das Tabellen-Layout */
@media (max-width: 768px) {
    .hero-card-header {
        position: relative;
    }
    
    .hero-info-main {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.25rem !important;
        width: 100% !important;
        padding-right: 2.5rem; /* Platz für den Pfeil */
    }
    
    .hero-info-main h2 {
        min-width: 0 !important;
        font-size: 1.1rem !important;
    }
    
    .hero-info-main .hero-title {
        font-size: 0.85rem !important;
    }
    
    .hero-card.list-layout .hero-meta {
        width: auto !important;
        position: absolute;
        right: 3rem;
        top: 50%;
        transform: translateY(-50%);
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .hero-toggle-icon {
        position: absolute !important;
        right: 1.25rem !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        margin: 0 !important;
    }
    
    .hero-card.list-layout.expanded .hero-toggle-icon {
        transform: translateY(-50%) rotate(180deg) !important;
    }
}

@media (max-width: 480px) {
    .hero-card.list-layout .hero-meta {
        display: none !important;
    }
}

/* =========================================
   Mechanisches Tor (Eingangsanimation)
   ========================================= */

.gate-wrapper {
    position: relative;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 95;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background: transparent;
    pointer-events: auto;
    transition: opacity 0.8s ease-in-out;
}

/* Schwarzer Verlauf über der Toranimation (oben) */
.gate-wrapper::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120px;
    background: linear-gradient(to bottom, #000000, transparent);
    z-index: 10;
    pointer-events: none;
}

/* Schwarzer Verlauf unter der Toranimation */
.gate-wrapper::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 150px;
    background: linear-gradient(to bottom, transparent, #000000);
    z-index: 10;
    pointer-events: none;
}

body.hall-entered .gate-wrapper {
    display: none !important;
}

/* Erschütterung des Tors beim Aktivieren */
@keyframes gateShake {
    0%, 100% { transform: translate3d(0, 0, 0); }
    10%, 90% { transform: translate3d(-3px, 2px, 0); }
    20%, 80% { transform: translate3d(3px, -2px, 0); }
    30%, 70% { transform: translate3d(-2px, -3px, 0); }
    40%, 60% { transform: translate3d(2px, 3px, 0); }
    50% { transform: translate3d(-2px, 2px, 0); }
}

.gate-wrapper.gate-opening {
    animation: gateShake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}

/* Torflügel */
.gate-door {
    position: absolute;
    top: 0;
    width: 50%;
    height: 100vh;
    border: none;
    box-shadow: inset 0 0 120px rgba(0, 0, 0, 0.95);
    transition: transform 1.4s cubic-bezier(0.25, 1, 0.5, 1) 0.8s;
    will-change: transform;
    z-index: 2;
    overflow: hidden;
}

.gate-door::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('images/gate_door_texture.png');
    background-size: cover;
    background-position: center;
    z-index: -1;
    filter: brightness(0.45);
}

.door-left {
    left: 0;
    transform-origin: left center;
}

.door-left::before {
    transform: scaleX(-1);
}

.door-right {
    right: 0;
    transform-origin: right center;
}

/* Bewegung der Torflügel beim Öffnen */
.gate-opening .door-left {
    transform: translateX(-102%);
}

.gate-opening .door-right {
    transform: translateX(102%);
}

/* Türverkleidung & Metallbeschläge */

/* Das mystische Siegel in der Mitte */
.gate-seal-half {
    position: absolute;
    top: 50%;
    width: 90px;
    height: 180px;
    z-index: 5;
    background-image: url('images/gate_seal.png');
    background-size: 180px 180px;
    mix-blend-mode: screen;
    transition: all 0.4s ease;
    will-change: opacity, transform;
}

.seal-left {
    right: 0;
    background-position: left center;
    transform: translateY(-50%);
}

.seal-right {
    left: 0;
    background-position: right center;
    transform: translateY(-50%);
}

.seal-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.seal-left .seal-inner {
    padding-left: 25px;
}

.seal-right .seal-inner {
    padding-right: 25px;
}

/* Pulsieren des Siegels im Ruhezustand */
@keyframes sealPulse {
    0%, 100% { filter: drop-shadow(0 0 8px rgba(170, 255, 170, 0.4)) brightness(1); }
    50% { filter: drop-shadow(0 0 18px rgba(170, 255, 170, 0.8)) brightness(1.25); }
}

.gate-seal-half {
    animation: sealPulse 3s infinite ease-in-out;
}

/* Hover-Effekte auf das Siegel via Klick-Trigger oder JS-Kopplung */
.gate-click-trigger:hover ~ .gate-door .gate-seal-half,
.gate-wrapper.seal-hover .gate-door .gate-seal-half {
    filter: drop-shadow(0 0 20px rgba(170, 255, 170, 0.9)) brightness(1.3);
}

/* Heftiges Aufglühen beim Öffnen */
.gate-opening .gate-door .gate-seal-half {
    filter: drop-shadow(0 0 35px rgba(170, 255, 170, 1)) brightness(1.6) !important;
    animation: none;
}

/* Zahnrad-Kaskaden */
.gate-gears-container {
    position: absolute;
    top: 0;
    height: 100vh;
    width: 300px;
    z-index: 3;
    pointer-events: none;
    will-change: transform;
    transition: transform 1.4s cubic-bezier(0.25, 1, 0.5, 1) 0.8s;
}

.gears-left {
    left: 4%;
}

.gears-right {
    right: 4%;
}

.gate-opening .gears-left {
    transform: translateX(-51vw);
}

.gate-opening .gears-right {
    transform: translateX(51vw);
}

.gear-img {
    width: 100%;
    height: 100%;
    mix-blend-mode: screen;
    display: block;
    filter: drop-shadow(0 0 8px rgba(170, 255, 170, 0.3)) brightness(0.35);
    transform: rotate(0deg);
    transition: transform 2.2s cubic-bezier(0.5, 0, 0.25, 1), filter 0.4s ease;
}

.gate-click-trigger:hover ~ .gate-gears-container .gear-img,
.gate-wrapper.seal-hover .gate-gears-container .gear-img {
    filter: drop-shadow(0 0 14px rgba(170, 255, 170, 0.7)) brightness(0.7);
}

/* Drehung der Kaskaden-Zahnräder beim Öffnen */
.gate-opening .dynamic-gear .gear-img {
    transform: rotate(var(--target-rotation));
}



/* Unsichtbarer Klick-Trigger */
.gate-click-trigger {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 180px;
    height: 180px;
    z-index: 10;
    border-radius: 50%;
    border: none;
    background: transparent;
    cursor: pointer;
    outline: none;
}

/* Hinweis zum Betreten über das Siegel */
.gate-seal-hint {
    position: absolute;
    top: 64%;
    left: 50%;
    transform: translateX(-50%);
    color: #aaffaa;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0.5;
    transition: all 0.3s ease;
    text-shadow: 0 0 8px rgba(170, 255, 170, 0.4);
    pointer-events: none;
    z-index: 10;
    animation: hintPulse 3s infinite ease-in-out;
}

@keyframes hintPulse {
    0%, 100% { opacity: 0.4; text-shadow: 0 0 6px rgba(170, 255, 170, 0.3); }
    50% { opacity: 0.75; text-shadow: 0 0 12px rgba(170, 255, 170, 0.6); }
}

.gate-click-trigger:hover ~ .gate-seal-hint {
    opacity: 1 !important;
    text-shadow: 0 0 15px rgba(170, 255, 170, 0.9);
    letter-spacing: 2.5px;
}

.gate-opening .gate-seal-hint {
    opacity: 0 !important;
    transform: translate(-50%, 20px) scale(0.9);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

/* Hängende Lampe rechts neben dem Tor */
.gate-lamp-container {
    position: absolute;
    top: 0;
    right: 8%;
    z-index: 4; /* Vor den Toren (z-index: 2) und Zahnrädern (z-index: 3) */
    pointer-events: none;
    transition: transform 1.4s cubic-bezier(0.25, 1, 0.5, 1) 0.8s;
}

.gate-lamp {
    width: 90px;
    height: auto;
    display: block;
    filter: drop-shadow(0 0 15px rgba(170, 255, 170, 0.4));
    transform-origin: top center;
    animation: lampSwing 6s infinite ease-in-out;
}

@keyframes lampSwing {
    0%, 100% { transform: rotate(-4deg); }
    50% { transform: rotate(4deg); }
}

/* Heftigereres Baumeln und Beiseite-Fahren bei Erschütterung durch Toröffnung */
.gate-opening .gate-lamp-container {
    transform: translateX(51vw);
}

.gate-opening .gate-lamp {
    animation: lampSwingFast 0.8s infinite ease-in-out;
}

@keyframes lampSwingFast {
    0%, 100% { transform: rotate(-7deg); }
    50% { transform: rotate(7deg); }
}

/* Hängende Lampe links neben dem Tor */
.gate-lamp-container-left {
    position: absolute;
    top: 0;
    left: 8%;
    z-index: 4; /* Vor den Toren (z-index: 2) und Zahnrädern (z-index: 3) */
    pointer-events: none;
    transition: transform 1.4s cubic-bezier(0.25, 1, 0.5, 1) 0.8s;
}

.gate-lamp-left {
    width: 90px;
    height: auto;
    display: block;
    filter: drop-shadow(0 0 15px rgba(170, 255, 170, 0.4));
    transform-origin: top center;
    animation: lampSwingLeft 6.5s infinite ease-in-out;
}

@keyframes lampSwingLeft {
    0%, 100% { transform: rotate(4deg); }
    50% { transform: rotate(-4deg); }
}

/* Heftigereres Baumeln und Beiseite-Fahren bei Erschütterung durch Toröffnung */
.gate-opening .gate-lamp-container-left {
    transform: translateX(-51vw);
}

.gate-opening .gate-lamp-left {
    animation: lampSwingLeftFast 0.85s infinite ease-in-out;
}

@keyframes lampSwingLeftFast {
    0%, 100% { transform: rotate(7deg); }
    50% { transform: rotate(-7deg); }
}

.gate-wrapper.fade-out {
    opacity: 0;
    pointer-events: none;
}

.halle-page .site-footer {
    position: relative;
    z-index: 96;
}

/* Responsive Anpassungen für Mobilgeräte */
@media (max-width: 768px) {
    .gate-gears-container, .gate-chain {
        display: none !important; /* Performance und Platzersparnis auf Mobile */
    }
    
    .gate-seal-half {
        width: 70px;
        height: 140px;
    }
    
    .seal-left {
        border-radius: 70px 0 0 70px;
    }
    
    .seal-right {
        border-radius: 0 70px 70px 0;
    }
    
    .seal-inner .rune {
        font-size: 2.8rem;
    }
    
    .gate-click-trigger {
        width: 140px;
        height: 140px;
    }

    .halle-legend {
        margin-top: -6rem;
        padding: 2rem 1.5rem;
    }
    
    .halle-legend h2 {
        font-size: 1.8rem;
    }
    
    .legend-intro {
        font-size: 1.1rem;
    }
    
    .legend-item {
        padding: 1.4rem;
    }
    
    .legend-item .hero-title {
        font-size: 1.15rem;
    }
    
    .legend-item p {
        font-size: 1rem;
    }
    
    .legend-proposal {
        font-size: 1rem;
        padding: 1.2rem;
    }

    .gate-seal-hint {
        font-size: 0.8rem;
        top: 66%;
        letter-spacing: 1px;
    }

    .gate-lamp-container {
        right: 4%;
    }

    .gate-lamp {
        width: 50px;
    }

    .gate-lamp-container-left {
        left: 4%;
    }

    .gate-lamp-left {
        width: 50px;
    }
}