/* WhyKiki Custom Styles */
/* Space/Universe Aesthetic - Vollbild zentriert */


@font-face {
    font-family: 'minecraftmedium';
    src: url('../fonts/minecraft-webfont.woff2') format('woff2'),
    url('../fonts/minecraft-webfont.woff') format('woff');
    font-weight: normal;
    font-style: normal;

}

/* Logo Basis-Styles - versteckt wenn PixiJS aktiv */
#logo {
    max-width: 32rem;
}

/* Parent Container für Vollbild-Zentrierung */
.uk-panel > div {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* PixiJS Logo Animation Container - Vollbild zentriert */
#pixi-logo-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

#pixi-logo-container.loaded {
    opacity: 1;
}

#pixi-logo-container canvas {
    display: block;
    max-width: 90vw;
    max-height: 80vh;
    pointer-events: auto;
}

/* Fallback wenn PixiJS nicht geladen */
.no-pixi #logo {
    display: block !important;
}

.no-pixi #pixi-logo-container {
    display: none;
}

/* Animation-Glow-Effekt via CSS als Fallback */
@keyframes logo-glow {
    0%, 100% {
        filter: drop-shadow(0 0 10px rgba(0, 212, 255, 0.3));
    }
    50% {
        filter: drop-shadow(0 0 25px rgba(0, 212, 255, 0.7));
    }
}

.no-pixi #logo {
    animation: logo-glow 3s ease-in-out infinite;
}

/* Buttons im Fullscreen sichtbar machen */
#buttons {
    position: fixed;
    bottom: 5vh;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    pointer-events: auto;
}

#buttons a,
#buttons button,
#buttons .uk-button {
    pointer-events: auto;
}

/* Mobile Anpassungen */
@media screen and (max-width: 768px) {
    #logo {
        max-width: 20rem;
    }

    #pixi-logo-container canvas {
        max-width: 95vw;
        max-height: 70vh;
    }

    #buttons {
        bottom: 3vh;
        gap: 0.75rem;
        flex-wrap: wrap;
        max-width: 90vw;
    }
}

@media screen and (max-width: 480px) {
    #logo {
        max-width: 16rem;
    }

    #pixi-logo-container canvas {
        max-width: 98vw;
        max-height: 60vh;
    }

    #buttons {
        bottom: 2vh;
        gap: 0.5rem;
        max-width: 95vw;
    }
}

/* Nyan Dackel Easter Egg Styles */
#nyan-dackel-hint {
    position: fixed;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1000;
}

#nyan-dackel-hint.show {
    opacity: 1;
}

/* Nyan Dackel Animation Overlay */
.nyan-dackel-active {
    overflow: hidden;
}

.nyan-dackel-active #pixi-logo-container {
    filter: brightness(1.2);
}

/* ===== SPACE INVADERS EASTER EGG ===== */

/* Zielfernrohr-Cursor wenn Dackel jagbar ist */
.dackel-hunt-mode,
.dackel-hunt-mode * {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Ccircle cx='16' cy='16' r='14' fill='none' stroke='%23ff0000' stroke-width='2'/%3E%3Ccircle cx='16' cy='16' r='8' fill='none' stroke='%23ff0000' stroke-width='1.5'/%3E%3Cline x1='16' y1='0' x2='16' y2='10' stroke='%23ff0000' stroke-width='2'/%3E%3Cline x1='16' y1='22' x2='16' y2='32' stroke='%23ff0000' stroke-width='2'/%3E%3Cline x1='0' y1='16' x2='10' y2='16' stroke='%23ff0000' stroke-width='2'/%3E%3Cline x1='22' y1='16' x2='32' y2='16' stroke='%23ff0000' stroke-width='2'/%3E%3Ccircle cx='16' cy='16' r='2' fill='%23ff0000'/%3E%3C/svg%3E") 16 16, crosshair !important;
}

/* Nyan Dackel klickbar machen während Hunt Mode */
.dackel-hunt-mode #nyan-dackel-container {
    pointer-events: auto !important;
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Ccircle cx='16' cy='16' r='14' fill='none' stroke='%23ff0000' stroke-width='2'/%3E%3Ccircle cx='16' cy='16' r='8' fill='none' stroke='%23ff0000' stroke-width='1.5'/%3E%3Cline x1='16' y1='0' x2='16' y2='10' stroke='%23ff0000' stroke-width='2'/%3E%3Cline x1='16' y1='22' x2='16' y2='32' stroke='%23ff0000' stroke-width='2'/%3E%3Cline x1='0' y1='16' x2='10' y2='16' stroke='%23ff0000' stroke-width='2'/%3E%3Cline x1='22' y1='16' x2='32' y2='16' stroke='%23ff0000' stroke-width='2'/%3E%3Ccircle cx='16' cy='16' r='2' fill='%23ff0000'/%3E%3C/svg%3E") 16 16, crosshair !important;
}

/* Space Invaders Game Container */
#space-invaders-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 100000;
    display: none;
    justify-content: center;
    align-items: center;
    background: linear-gradient(180deg, #000011 0%, #000033 50%, #000011 100%);
}

#space-invaders-container.active {
    display: flex;
}

/* Retro CRT Monitor Effekt */
#space-invaders-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.15),
        rgba(0, 0, 0, 0.15) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
    z-index: 10;
}

/* Sterne im Hintergrund */
#space-invaders-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(2px 2px at 20px 30px, white, transparent),
        radial-gradient(2px 2px at 40px 70px, white, transparent),
        radial-gradient(1px 1px at 90px 40px, white, transparent),
        radial-gradient(2px 2px at 130px 80px, white, transparent),
        radial-gradient(1px 1px at 160px 120px, white, transparent),
        radial-gradient(2px 2px at 200px 50px, white, transparent),
        radial-gradient(1px 1px at 250px 90px, white, transparent),
        radial-gradient(2px 2px at 300px 30px, white, transparent),
        radial-gradient(1px 1px at 350px 100px, white, transparent),
        radial-gradient(2px 2px at 400px 60px, white, transparent);
    background-repeat: repeat;
    background-size: 500px 200px;
    opacity: 0.5;
    animation: twinkle-stars 4s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: 1;
}

@keyframes twinkle-stars {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.7; }
}

/* Game Canvas Styling */
#space-invaders-canvas {
    border: 4px solid #00ffff;
    border-radius: 8px;
    box-shadow:
        0 0 20px rgba(0, 255, 255, 0.5),
        0 0 40px rgba(0, 255, 255, 0.3),
        inset 0 0 20px rgba(0, 0, 0, 0.5);
    z-index: 5;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

/* Game UI Overlay */
#space-invaders-ui {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 3rem;
    font-family: 'minecraftmedium', 'Courier New', monospace;
    font-size: 1rem;
    line-height: 1.2;
    letter-spacing: 0.06em;
    font-variant-numeric: tabular-nums;
    -webkit-font-smoothing: none;
    -moz-osx-font-smoothing: auto;
    color: #ffffff;
    text-shadow: 0 0 10px #00ffff;
    z-index: 20;
}

#space-invaders-ui span {
    display: flex;
    gap: 0.5rem;
    align-items: baseline;
}

#space-invaders-ui .label {
    color: #00ffff;
    text-transform: uppercase;
}

/* Exit Button */
#space-invaders-exit {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 10px 20px;
    font-family: 'minecraftmedium', 'Courier New', monospace;
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    -webkit-font-smoothing: none;
    -moz-osx-font-smoothing: auto;
    background: rgba(255, 0, 0, 0.3);
    border: 2px solid #ff0000;
    color: #ff0000;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 20;
}

#space-invaders-exit:hover {
    background: rgba(255, 0, 0, 0.6);
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.5);
}

/* Game Over / Victory Screen */
.game-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'minecraftmedium', 'Courier New', monospace;
    text-align: center;
    z-index: 30;
    animation: game-message-pulse 1s ease-in-out infinite alternate;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    -webkit-font-smoothing: none;
    -moz-osx-font-smoothing: auto;
}

.game-message h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    text-shadow: 0 0 20px currentColor;
}

.game-message p {
    font-size: 0.8rem;
    color: #ffffff;
}

.game-message.victory {
    color: #00ff00;
}

.game-message.game-over {
    color: #ff0000;
}

@keyframes game-message-pulse {
    0% { transform: translate(-50%, -50%) scale(1); }
    100% { transform: translate(-50%, -50%) scale(1.05); }
}

/* Dackel Hit Animation */
@keyframes dackel-hit {
    0% { filter: brightness(1); }
    25% { filter: brightness(3) sepia(1) hue-rotate(-30deg); }
    50% { filter: brightness(5) sepia(1) hue-rotate(30deg); }
    75% { filter: brightness(3) sepia(1) hue-rotate(-30deg); }
    100% { opacity: 0; transform: scale(2) rotate(360deg); }
}

.dackel-hit-animation {
    animation: dackel-hit 0.6s ease-out forwards;
}

/* Hide UI when Space Invaders is active */
body.space-invaders-active #pixi-logo-container,
body.space-invaders-active #buttons,
body.space-invaders-active .uk-section,
body.space-invaders-active header,
body.space-invaders-active footer,
body.space-invaders-active nav {
    opacity: 0 !important;
    pointer-events: none !important;
    transition: opacity 0.5s ease;
}

/* Mobile Adjustments for Space Invaders */
@media screen and (max-width: 768px) {
    #space-invaders-ui {
        font-size: 0.8rem;
        gap: 1.5rem;
        flex-wrap: wrap;
        justify-content: center;
        max-width: 90vw;
    }

    #space-invaders-exit {
        font-size: 0.6rem;
        padding: 8px 12px;
    }

    .game-message h2 {
        font-size: 1.2rem;
    }

    .game-message p {
        font-size: 0.6rem;
    }
}


#buttons .uk-icon {
    width: 35px;
    height: 35px;
}
#buttons .uk-icon svg{
    width: 35px;
    height: rgba35px;
}

#buttons .uk-icon svg path{
    fill: rgba(255,255,255,0.7);
}
