/* Font Faces */
@font-face {
    font-family: "VT323-Regular";
    src: url("/fonts/vt323-latin-400-normal.woff2") format("woff2"),
    url("/fonts/vt323-latin-400-normal.woff") format("woff"),
    url("/fonts/VT323-Regular.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* @font-face - recomandat să incluzi woff2, woff și fallback ttf */
@font-face {
    font-family: "VT323-Regular";
    src: url("/fonts/VT323-Regular.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap; /* îmbunătățește UX când fontul întârzie */
}

/* Font Usage */
body {
    font-family: "VT323-Regular", "Helvetica Neue", Arial, sans-serif;
}

.vt-class {
    font-family: "VT323-Regular"
}

/* Neon Text Effects */
.neon-text-pulse {
    font-size: 3rem;
    color: #fff;
    letter-spacing: 2px;
    /* set a base color for the glow */
    --neon: #ff00cc;

    text-shadow:
            0 0 5px var(--neon),
            0 0 10px var(--neon),
            0 0 20px var(--neon),
            0 0 40px var(--neon),
            0 0 80px var(--neon);

    /* animate intensity + hue */
    animation: neonPulse 2s ease-in-out infinite alternate,
    hueCycle 8s linear infinite;
}

/* intensity pulse */
@keyframes neonPulse {
    0% {
        text-shadow:
                0 0 5px var(--neon),
                0 0 10px var(--neon),
                0 0 20px var(--neon),
                0 0 40px var(--neon),
                0 0 80px var(--neon);
        opacity: 1;
    }
    100% {
        text-shadow:
                0 0 2px var(--neon),
                0 0 4px var(--neon),
                0 0 8px var(--neon),
                0 0 20px var(--neon),
                0 0 40px var(--neon);
        opacity: 0.9;
    }
}

/* cross-browser color cycling */
@keyframes hueCycle {
    0%   { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

/* Typewriter Effects */
.typewriter {
    position: relative;
    white-space: normal;
    display: inline-block; /* Pentru poziționarea corectă a cursorului */
}

.typewriter.typing::after {
    content: "_";
    position: absolute;
    display: inline-block;
    color: currentColor;
    animation: tw-caret 1s steps(1) infinite;
    margin-left: 2px;
}

@keyframes tw-caret {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* După ce a terminat, ascundem cursorul */
.typewriter.typed::after {
    display: none;
}

/* Respectă preferința de "reduce motion" */
@media (prefers-reduced-motion: reduce) {
    .typewriter.typing::after {
        animation: none;
        opacity: 1;
    }
}

.retro-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 20px;
    font-family: 'VT323-Regular', monospace;
}

/* Base button */
.retro-btn {
    position: relative;
    font-size: 20px;
    padding: 8px 22px;
    border: 2px solid black;
    box-shadow: 4px 4px 0px #000;
    cursor: pointer;
    transition: all 0.1s ease;
    text-transform: none;
    font-weight: bold;
}

/* Variants */
.retro-btn.accept {
    background: #fffa6b;
    color: black;
}

.retro-btn.deny {
    background: #f5f5f5;
    color: black;
}

.retro-btn.manage {
    background: #d3f6ff;
    color: black;
}

/* Hover effect: move up slightly */
.retro-btn:hover {
    transform: translateY(-2px);
    box-shadow: 6px 6px 0px #000;
}

/* Active press */
.retro-btn:active {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0px #000;
}


/* === Retro Form Error Styles === */
input.is-invalid {
    border: 2px solid #ff4f7a !important;
    background-color: rgba(60, 0, 0, 0.8) !important;
    color: #ffbcbc !important;
    box-shadow: 0 0 12px rgba(255, 77, 109, 0.7);
    animation: flicker 0.2s ease-in-out 2;
}

label span {
    font-family: 'VT323-Regular', monospace;
    color: #ffd93d;
}

.error-text {
    display: none;
    color: #ff6b9d;
    font-family: 'VT323-Regular', monospace;
    font-size: 15px;
    margin-top: 5px;
    margin-left: 4px;
    text-shadow:
            0 0 5px rgba(255, 0, 50, 0.6),
            0 0 10px rgba(255, 50, 100, 0.4);
    letter-spacing: 0.5px;
}

/* Red alert box — glowing retro look */
#alertBox {
    border: 2px solid #ff4f7a;
    background: rgba(50, 0, 0, 0.9);
    box-shadow:
            0 0 20px rgba(255, 0, 50, 0.6),
            inset 0 0 10px rgba(255, 80, 120, 0.3);
    font-family: 'VT323-Regular', monospace;
    color: #ffbcbc;
    font-size: 16px;
    text-align: center;
    padding: 10px;
}

/* Subtle flicker for errors */
@keyframes flicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}
