/* Variabili di base del terminale */
:root {
    --bg-color: #080808;
    --text-color: #ffb000;
    --glow-color: rgba(255, 176, 0, 0.4);
    --scanline-color: rgba(0, 0, 0, 0.3);
}

/* Il body funge da "schermo" del monitor */
body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 16px;
    line-height: 1.6;
    margin: 0;
    padding: 40px 20px;
    display: flex;
    justify-content: center;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* --- EFFETTI CRT (Scanlines e Vignettatura) --- */
body::before {
    content: " ";
    display: block;
    position: fixed;
    top: 0; left: 0; bottom: 0; right: 0;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0) 50%, var(--scanline-color) 50%, var(--scanline-color));
    background-size: 100% 2px;
    z-index: 100;
    pointer-events: none;
}

body::after {
    content: " ";
    display: block;
    position: fixed;
    top: 0; left: 0; bottom: 0; right: 0;
    background: radial-gradient(circle, rgba(0,0,0,0) 60%, rgba(0,0,0,0.6) 100%);
    z-index: 101;
    pointer-events: none;
    animation: crt-flicker 0.15s infinite;
}

@keyframes crt-flicker {
    0% { opacity: 0.95; }
    50% { opacity: 1; }
    100% { opacity: 0.95; }
}

.container {
    max-width: 800px;
    width: 100%;
    text-shadow: 0 0 3px var(--glow-color); 
    z-index: 10;
    position: relative;
}

.glitch-active {
    animation: text-glitch 0.2s cubic-bezier(.25, .46, .45, .94) both infinite;
    color: #ffcc66;
    text-shadow: 2px 0 var(--glow-color), -2px 0 var(--text-color);
}

@keyframes text-glitch {
    0% { transform: translate(0); }
    20% { transform: translate(-2px, 1px); }
    40% { transform: translate(-1px, -1px); }
    60% { transform: translate(2px, 1px); }
    80% { transform: translate(1px, -1px); }
    100% { transform: translate(0); }
}

body[data-lang="en"] .lang-it { display: none; }
body[data-lang="it"] .lang-en { display: none; }

.lang-toggle-container {
    margin-bottom: 40px;
    font-family: 'IBM Plex Mono', monospace;
}

.flag-it-g { color: #009246; text-shadow: none; }
.flag-it-w { color: #ffffff; text-shadow: none; }
.flag-it-r { color: #ce2b37; text-shadow: none; }
.flag-en-star { color: #ffffff; background-color: #002868; text-shadow: none; padding: 0 1px; }
.flag-en-stripes { color: #bf0a30; background-color: #ffffff; text-shadow: none; padding: 0 1px; }

.profile-pic-wrapper {
    float: left;
    width: 231px;
    height: 322px;
    margin-right: 25px;
    margin-bottom: 15px;
    overflow: hidden;
    position: relative;
}

.profile-pic-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    margin: 0;
    border: none;
}

h1, h2, h3 {
    font-family: 'VT323', monospace;
    font-weight: normal;
    margin-bottom: 10px;
}

.boot-sequence {
    font-size: 1em;
    line-height: 1.2;
    margin-bottom: 5px;
    opacity: 0.9;
}

h1 {
    font-size: 3em;
    text-shadow: 0 0 8px var(--glow-color);
    border-bottom: 1px solid var(--text-color);
    padding-bottom: 10px;
    line-height: 1.1;
    margin-top: 0;
}

h2 {
    font-size: 2em;
    margin-top: 15px;
}

a {
    color: var(--text-color);
    text-decoration: none;
    border-bottom: 1px dashed var(--text-color);
    transition: all 0.2s ease;
    position: relative;
}

a:hover {
    background-color: var(--text-color);
    color: var(--bg-color);
    text-shadow: none;
}

nav {
    margin-bottom: 40px;
    padding: 15px;
    border: 1px solid var(--text-color);
    background: rgba(255, 176, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nav-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.nav-divider {
    border-top: 1px dashed var(--text-color);
    margin: 5px 0;
    opacity: 0.5;
}

.social-label {
    color: #ffdd66;
    font-weight: bold;
}

.prompt {
    margin-bottom: 5px;
}

.prompt::before {
    content: "guest@mellusodreamer-node:~$ ";
    color: #ffdd66;
    font-weight: bold;
}

.cursor {
    display: inline-block;
    width: 10px;
    height: 1.2em;
    background-color: var(--text-color);
    vertical-align: middle;
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.footer {
    margin-top: 60px;
    font-size: 0.9em;
    text-align: center;
    border-top: 1px dotted var(--text-color);
    padding-top: 20px;
    clear: both;
}

@media (max-width: 600px) {
    h1 { font-size: 2.2em; }
    .nav-row { flex-direction: column; gap: 10px; }
    body { padding: 20px 15px; }
    .profile-pic-wrapper {
        float: none;
        margin: 0 auto 20px auto;
    }
}