/* =========================================
   Leuchtfeuer Seite
   ========================================= */

.leuchtfeuer-page {
    --img-w: max(100vw, 100vh * 2); 
    --img-h: max(100vh, 100vw / 2);
    
    --lighthouse-x: calc(50vw + var(--img-w) * 0.235517);
    --lighthouse-y: calc(50vh - var(--img-h) * 0.356821);

    background-image: url('images/lighthouse.png');
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

/* =========================================
   Leuchtfeuer Titel
   ========================================= */
.leuchtfeuer-title {
    color: #ffffff;
    font-size: clamp(2.8rem, 10vw, 4.5rem);
    text-shadow: 0 5px 15px rgba(0,0,0,0.8);
}

/* =========================================
   Animierter Leuchtturm-Lichtkegel
   ========================================= */
.lighthouse-light-container {
    position: fixed;
    top: var(--lighthouse-y);
    left: var(--lighthouse-x);
    width: 0;
    height: 0;
    z-index: -1;
    pointer-events: none;
    display: none;
}

@media (min-width: 900px) {
    .lighthouse-light-container {
        display: block;
    }
}

.lighthouse-beam {
    position: absolute;
    top: -10px;
    left: -150px;
    width: 300px;
    height: 20px;
    
    background:
        radial-gradient(ellipse at center, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 240, 0.8) 10%, rgba(255, 255, 240, 0) 35%),
        radial-gradient(ellipse at center, rgba(255, 255, 220, 0.6) 0%, rgba(255, 255, 220, 0.2) 30%, rgba(255, 255, 220, 0) 65%),
        linear-gradient(to right, rgba(255, 255, 220, 0) 0%, rgba(255, 255, 220, 0.05) 25%, rgba(255, 255, 255, 0.5) 50%, rgba(255, 255, 220, 0.05) 75%, rgba(255, 255, 220, 0) 100%);

    border-radius: 50%;
    transform-origin: 50% 50%;
    
    filter: blur(4px);
    
    mix-blend-mode: screen;
    
    animation: beamLensSweep 10s infinite linear;
    animation-delay: -3.5s;
}

.lighthouse-glow {
    position: absolute;
    top: -15px;
    left: -15px;
    width: 30px;
    height: 30px;
    background: radial-gradient(circle, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0.6) 30%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    
    mix-blend-mode: screen;
    animation: pulseLensGlow 10s infinite linear;
    animation-delay: -3.5s;
}

@keyframes beamLensSweep {
    0% {
        transform: perspective(800px) translateX(800px) rotateY(-50deg) scaleX(3) scaleY(0.5);
        opacity: 0;
        filter: blur(4px);
    }
    25% {
        transform: perspective(800px) translateX(400px) rotateY(-40deg) scaleX(5) scaleY(0.8);
        opacity: 0.1;
    }
    30% { 
    }
    45% {
        transform: perspective(800px) translateX(100px) rotateY(-20deg) scaleX(8) scaleY(1.2);
        opacity: 0.4;
        filter: blur(5px);
    }
    49% {
        transform: perspective(800px) translateX(20px) rotateY(-5deg) scaleX(11) scaleY(1.8);
        opacity: 0.9;
    }
    50% { 
        transform: perspective(800px) translateX(0px) rotateY(0deg) scaleX(15) scaleY(3.0);
        opacity: 1; 
        filter: blur(8px);
    }
    51% {
        transform: perspective(800px) translateX(-20px) rotateY(5deg) scaleX(11) scaleY(1.8);
        opacity: 0.9;
    }
    55% {
        transform: perspective(800px) translateX(-100px) rotateY(20deg) scaleX(8) scaleY(1.2);
        opacity: 0.4;
        filter: blur(5px);
    }
    75% {
        transform: perspective(800px) translateX(-400px) rotateY(40deg) scaleX(5) scaleY(0.8);
        opacity: 0.1;
    }
    100% {
        transform: perspective(800px) translateX(-800px) rotateY(50deg) scaleX(3) scaleY(0.5);
        opacity: 0;
        filter: blur(4px);
    }
}

@keyframes pulseLensGlow {
    0%, 25% {
        transform: scale(1);
        opacity: 0.1;
        box-shadow: 0 0 10px 0px rgba(255,255,255,0.1);
    }
    49% {
        transform: scale(2.5);
        opacity: 0.8;
        box-shadow: 0 0 60px 0px rgba(255,255,255,0.6);
    }
    50% { 
        transform: scale(4.0);
        opacity: 1;
        box-shadow: 0 0 120px 0px rgba(255,255,255,1);
    }
    51% {
        transform: scale(2.5);
        opacity: 0.8;
        box-shadow: 0 0 60px 0px rgba(255,255,255,0.6);
    }
    55% {
        transform: scale(1.5);
        opacity: 0.4;
        box-shadow: 0 0 30px 0px rgba(255,255,255,0.2);
    }
    75%, 100% {
        transform: scale(1);
        opacity: 0.1;
        box-shadow: 0 0 10px 0px rgba(255,255,255,0.1);
    }
}

/* =========================================
   Spiele Kacheln
   ========================================= */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    width: 100%;
    max-width: 1000px;
    padding: 0 2rem;
    margin-bottom: 4rem;
}

.game-card {
    background: rgba(15, 35, 25, 0.7);
    border: 1px solid rgba(170, 255, 170, 0.2);
    border-radius: 12px;
    padding: 2rem;
    backdrop-filter: blur(5px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 120px;
}

.game-logo {
    width: auto;
    max-width: 180px;
    height: 60px;
    object-fit: contain;
    filter: drop-shadow(0 0 5px rgba(255,255,255,0.2));
}