/* =========================================
   STILE RETRO ARCHIVE (ANNI 90)
   ========================================= */

body {
    background-color: #000000;
    /* Sfondo Matrix originale */
    background-image: url('https://media.giphy.com/media/U3qYN8S0j3bpK/giphy.gif'); 
    background-size: cover; 
    background-attachment: fixed;
    color: #00FF00; /* Verde Terminale */
    font-family: 'Courier New', Courier, monospace;
    text-align: center;
    margin: 0;
    padding: 20px;
}

.retro-container {
    width: 800px;
    max-width: 95%;
    margin: 0 auto;
    background-color: #050505;
    border: 3px double #00FF00;
    padding: 15px;
    box-shadow: 0 0 10px #00FF00;
}

a {
    color: #00FF00;
    text-decoration: underline;
}

a:hover {
    color: black;
    background-color: #00FF00;
    text-decoration: none;
    cursor: help;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 5px;
    border: 1px dashed #00FF00;
}

td {
    border: 1px dotted #00FF00;
    padding: 10px;
    vertical-align: top;
}

h1 {
    font-size: 30px;
    text-transform: uppercase;
    border-bottom: 2px solid #00FF00;
    padding-bottom: 10px;
    letter-spacing: 5px;
}

h3 {
    background: #003300;
    padding: 5px;
    margin-top: 20px;
}

img {
    border: 2px solid #00FF00;
    max-width: 100%;
}

/* Le gif decorative non devono avere il bordo verde */
.deco-gif {
    border: none !important; 
    vertical-align: middle;
    background: transparent;
}

.back-btn {
    border: 2px outset #cccccc;
    background: #c0c0c0;
    color: black;
    padding: 5px 15px;
    text-decoration: none;
    font-family: Arial, sans-serif;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    display: inline-block;
    margin-bottom: 20px;
}

.back-btn:active {
    border: 2px inset #cccccc;
}

.scrolling-text {
    background-color: #003300;
    color: white;
    border: 1px solid #00FF00;
    padding: 5px;
    font-weight: bold;
    font-size: 14px;
}

.system-info {
    text-align: left;
    background: #001100;
    padding: 10px;
    border: 1px dotted lime;
    font-size: 12px;
    margin-bottom: 20px;
}

.blink {
    animation: blinker 1s linear infinite;
    color: red;
    font-weight: bold;
}

@keyframes blinker {
    50% { opacity: 0; }
}

.archive-post {
    background: #111;
    border: 1px solid #333;
    padding: 10px;
    margin-bottom: 15px;
}

.archive-post:hover {
    border-color: #00FF00;
}

/* --- OROLOGIO RETRO --- */
#retro-clock {
    font-family: 'Courier New', Courier, monospace;
    font-size: 16px;
    font-weight: bold;
    color: #00FF00;
    background-color: #002200;
    border: 2px inset #00FF00;
    padding: 10px 20px;
    display: inline-block;
    margin-top: 10px;
    letter-spacing: 2px;
    box-shadow: 0 0 5px #00FF00;
}

/* --- CAROSELLO PUBBLICITÀ --- */
.ad-wrapper {
    background-color: #000000;
    border: 2px ridge #00FF00;
    padding: 10px;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.retro-ad {
    display: none; /* Nascosti di default */
    animation: glitch-ad 0.2s infinite;
}

.retro-ad.active {
    display: block; /* Mostra solo quello attivo */
}

.retro-ad img {
    border: 2px solid white;
    box-shadow: 0 0 10px blue;
}

.retro-ad small {
    color: cyan;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: Arial, sans-serif;
    font-weight: bold;
    text-decoration: blink;
}

@keyframes glitch-ad {
    0% { transform: translate(0, 0); }
    20% { transform: translate(-1px, 1px); }
    40% { transform: translate(1px, -1px); }
    60% { transform: translate(-1px, 0); }
    80% { transform: translate(1px, 0); }
    100% { transform: translate(0, 0); }
}