/* === GLOBAL === */
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
    background-color: #0d0d0d;
    color: white;
    font-family: 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* === CANVAS === */
#canvas-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

/* === OVERLAY TEKST === */
.overlay-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 10;
    opacity: 0;
    animation: fadeIn 1.5s ease-in-out forwards;
}

.overlay-text.no-pointer {
    pointer-events: none;
}

.overlay-text h1 {
    font-size: 4vw;
    margin: 0;
    color: #ffffff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.7),
    0 0 25px rgba(255, 255, 255, 0.4);
}

/* === CODENAME === */
.overlay-text .codename {
    font-size: 1.5vw;
    color: #ffffff;
    font-weight: 500;
    margin: 0.3em 0 0.6em;
    font-style: italic;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.05em;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.9),
    0 0 20px rgba(255, 255, 255, 0.6);
    animation: fenixGlow 4s ease-in-out infinite;
}

/* === OPIS/TEKST === */
.overlay-text p {
    font-size: 2vw;
    color: #00ffff;
    font-weight: bold;
    margin: 0;
    text-shadow: 0 0 6px rgba(0, 255, 255, 0.8),
    0 0 16px rgba(0, 255, 255, 0.6),
    0 0 24px rgba(0, 255, 255, 0.4);
    animation: glowPulse 3s infinite ease-in-out;
}

.overlay-text .info-text {
    margin-top: 1em;
    font-size: 1.5vw;
    color: #ccc;
    max-width: 60%;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .overlay-text h1 {
        font-size: 6vw;
    }

    .overlay-text .codename {
        font-size: 3.2vw;
    }

    .overlay-text p {
        font-size: 3.5vw;
    }

    .overlay-text .info-text {
        font-size: 3.5vw;
        max-width: 90%;
    }
}

/* === ANIMACIJE === */
@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

@keyframes glowPulse {
    0%, 100% {
        text-shadow: 0 0 6px rgba(0, 255, 255, 0.8),
        0 0 16px rgba(0, 255, 255, 0.6),
        0 0 24px rgba(0, 255, 255, 0.4);
    }
    50% {
        text-shadow: 0 0 12px rgba(0, 255, 255, 1),
        0 0 28px rgba(0, 255, 255, 0.8),
        0 0 36px rgba(0, 255, 255, 0.6);
    }
}

@keyframes fenixGlow {
    0%, 100% {
        text-shadow: 0 0 8px rgba(255, 255, 255, 0.9),
        0 0 20px rgba(255, 255, 255, 0.6);
    }
    50% {
        text-shadow: 0 0 14px rgba(255, 255, 255, 1),
        0 0 30px rgba(255, 255, 255, 0.9);
    }
}

/* === NAVIGACIJA === */
.main-nav {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
}

.main-nav ul {
    display: flex;
    gap: 2em;
    list-style: none;
    padding: 0;
    margin: 0;
}

.main-nav a {
    color: #00ffff;
    font-weight: bold;
    font-size: 1.1em;
    text-decoration: none;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.6);
    transition: color 0.3s;
}

.main-nav a:hover {
    color: #ffffff;
}

.main-nav a.active {
    color: #ffffff;
    border-bottom: 2px solid #ffffff;
}

.main-footer {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    font-size: 0.9em;
    color: #888;
    text-shadow: 0 0 6px rgba(255, 255, 255, 0.1);
    pointer-events: none;
}

/* === TOGGLER dugme === */
.menu-toggle {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1001;
    font-size: 2em;
    background: none;
    color: #00ffff;
    border: none;
    cursor: pointer;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.6);
}

/* === OVERLAY za zatamnjenu pozadinu === */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
}

.mobile-overlay.active {
    display: block;
}

/* === MOBILE ONLY === */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .main-nav {
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        height: 100%;
        background: rgba(13, 13, 13, 0.95);
        z-index: 1002;
        padding: 2em 1.5em;
        transition: left 0.3s ease;
        display: flex;
        flex-direction: column;
    }

    .main-nav.open {
        left: 40%;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 1em;
        align-items: flex-start;
    }

    .main-nav a {
        font-size: 1.2em;
    }

    .overlay-text {
        top: 50%;
        padding: 0 1em;
        width: 100%;
        transform: translate(-50%, -50%);
    }

    .overlay-text h1 {
        font-size: 6.5vw;
    }

    .overlay-text .codename {
        font-size: 4.5vw;
    }

    .overlay-text p,
    .overlay-text .info-text {
        font-size: 4.2vw;
        max-width: 95%;
        line-height: 1.4em;
    }

    .main-footer {
        font-size: 3.5vw;
        text-align: center;
        bottom: 10px;
    }
}

/* ===== LANGUAGE SELECTOR ===== */
.language-selector {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.language-dropdown {
    background-color: rgba(30, 30, 30, 0.95);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 0.5rem;
    padding: 0.5rem 2.5rem 0.5rem 2.5rem; /* Povećan desni padding za strelicu */
    color: #00ffff;
    font-size: 0.875rem;
    font-weight: bold;
    text-shadow: 0 0 4px rgba(0, 255, 255, 0.4);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    min-width: 140px;

    /* Ukloni default strelicu */
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

/* Srpska zastava + custom strelica */
.language-dropdown[data-selected="sr"] {
    background-image:
            url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2300ffff' stroke='%2300ffff' d='M1 1l5 5 5-5'/%3E%3C/svg%3E"),
            url('../assets/images/rs_flag.png');
    background-repeat: no-repeat, no-repeat;
    background-position: right 0.7rem center, 0.5rem center;
    background-size: 12px, 20px 20px;
}

.language-dropdown[data-selected="en"] {
    background-image:
            url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2300ffff' stroke='%2300ffff' d='M1 1l5 5 5-5'/%3E%3C/svg%3E"),
            url('../assets/images/en_flag.png');
    background-repeat: no-repeat, no-repeat;
    background-position: right 0.7rem center, 0.5rem center;
    background-size: 12px, 20px 20px;
}

.language-dropdown:focus {
    background-color: rgba(40, 40, 40, 0.95);
    border-color: #00ffff;
    color: #00ffff;
    box-shadow: 0 0 0 0.25rem rgba(0, 255, 255, 0.25),
    0 0 15px rgba(0, 255, 255, 0.4);
    outline: none;
}

.language-dropdown option {
    background-color: #2a2a2a;
    color: white;
    padding: 0.5rem;
}

.language-dropdown option:hover {
    background-color: rgba(0, 255, 255, 0.1);
}

@media (max-width: 768px) {
    .language-selector {
        top: 15px;
        right: 35px;
    }

    .language-dropdown {
        font-size: 0.85rem;
        padding: 0.6rem 0.9rem 0.6rem 2.4rem;
        min-width: 110px;
        background-size: 16px 16px;
        background-position: 0.6rem center;
        border-radius: 0.4rem;
    }
}

@media (max-width: 480px) {
    .language-selector {
        top: 10px;
        right: 35px;
    }

    .language-dropdown {
        font-size: 0.8rem;
        padding: 0.5rem 0.7rem 0.5rem 2.2rem;
        min-width: 100px;
        background-size: 14px 14px;
        background-position: 0.5rem center;
        border-radius: 0.4rem;
    }
}

/* FOOTER */
.main-footer p {
    text-align: center;
}
.footer-links {
    margin-top: 0.5rem;
    text-align: center !important;
    display: block !important;
    width: 100% !important;
}

.footer-links a {
    color: #00ffff;
    text-decoration: none;
    margin: 0 0.25rem;
    font-size: 0.85rem;
    transition: color 0.3s ease;
    pointer-events: auto;
    position: relative;
    z-index: 25;
}

.footer-links a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.separator {
    color: #888;
    margin: 0 0.25rem;
}

.footer {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    font-size: 0.9em;
    color: #888;
    text-shadow: 0 0 6px rgba(255, 255, 255, 0.1);
    text-align: center;
}

.footer .container-fluid,
.footer .row,
.footer .col-md-12 {
    all: unset;
    display: block;
}

.footer p {
    margin: 0.2em 0;
}

.footer a {
    color: #00ffff;
    text-shadow: 0 0 4px rgba(0, 255, 255, 0.4);
}