@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600&display=swap');

body {
    font-family: 'Poppins', sans-serif;
    background: black;
    color: white;
    text-align: center;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden;
    position: relative;
}

.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 4;
}

/* Efekti ekrana kao stari TV */
.tv-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.05) 0px,
        rgba(255, 255, 255, 0.05) 2px,
        transparent 4px,
        transparent 6px
    );
    z-index: 2;
    pointer-events: none;
    animation: flicker 0.3s infinite alternate;
}

/* Glitch efekat za tekst */
.glitch {
    font-size: 2em;
    font-weight: 300;
    position: relative;
    display: inline-block;
    color: white;
    animation: glitch-animation 1s infinite alternate;
}

/* Glitch efekat za logo */
.logo {
    width: 30%;
    height: auto;
    margin-bottom: 15px;
    animation: glitch-img 1s infinite alternate, signal-glitch 5s infinite;
    position: relative;
    filter: brightness(1.2) contrast(1.2);
}

@keyframes signal-glitch {
    0%, 100% {
        opacity: 1;
        transform: none;
        filter: none;
    }
    10% {
        opacity: 0.8;
        transform: skewX(-2deg) scale(1.01);
    }
    20% {
        opacity: 0.3;
        transform: translateY(2px) skewY(3deg);
        filter: contrast(1.5) brightness(0.8);
    }
    22% {
        opacity: 0;
        transform: translateY(-10px) scale(1.05) skewX(10deg);
    }
    24% {
        opacity: 1;
        transform: none;
        filter: none;
    }
    40% {
        opacity: 0.5;
        transform: scale(1.03);
    }
    41% {
        opacity: 0;
        transform: scale(1.1) skewX(-10deg);
    }
    42% {
        opacity: 1;
        transform: none;
    }
    60% {
        filter: contrast(1.3) brightness(1.1);
    }
}

@keyframes glitch-animation {
    0% { transform: skew(-2deg); text-shadow: -3px 3px #ff00ff; }
    25% { transform: skew(2deg); text-shadow: 3px -3px #00ffff; }
    50% { transform: skew(-3deg); text-shadow: -3px -3px #ff00ff; }
    75% { transform: skew(3deg); text-shadow: 3px 3px #00ffff; }
    100% { transform: skew(-1deg); text-shadow: -1px 1px #ff00ff; }
}

/* Efekat TV treperenja */
@keyframes flicker {
    0% { opacity: 0.8; }
    100% { opacity: 1; }
}

/* Statički šum */
canvas#static-noise {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.1;
    z-index: 3;
    pointer-events: none;
}

/* Zakrivljeni okvir ispod naslova */
.contact-frame {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding: 0.75rem 1.5rem;
    border: 2px solid rgba(255,255,255,0.6);
    border-radius: 50px;
    background-color: rgba(0,0,0,0.4);
    margin-top: 1.5rem;
    z-index: 4;
}

/* Stil za linkove u okviru */
.contact-frame a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #fff;
    font-size: 1.4rem;
    text-decoration: none;
    transition: color 0.2s;
}

/* Tekst pored ikonice */
.contact-frame a span {
    font-size: 1rem;
}

/* Hover efekat */
.contact-frame a:hover {
    color: #0ff;
}

/* Mobile prilagođavanje */
@media (max-width: 500px) {
    .logo {
        width: 50%;
        max-width: 200px;
        margin-bottom: 10px;
    }

    .glitch {
        font-size: 1.5em;
    }

    .contact-frame {
        gap: 0.8rem;
        padding: 0.5rem 1rem;
    }

    .contact-frame a {
        gap: 0.3rem;
        font-size: 1rem;
    }

    .contact-frame a span {
        font-size: 0.85rem;
        white-space: nowrap;
    }
}

/* Još manji ekrani: ikonica i tekst vertikalno */
@media (max-width: 350px) {
    .contact-frame a {
        flex-direction: column;
        gap: 0.2rem;
    }
}
