/* --- RESET E BASICS --- */
* { box-sizing: border-box; margin: 0; padding: 0; }

html {
    height: 100%; /* Necessario per il layout a tutta altezza */
}

body {
    background: #1C1C1C;
    color: #EEE;
    padding: 1vw;
    font-family: Verdana, sans-serif;
    line-height: 1.4;

    /* MODIFICA FONDAMENTALE PER IL FOOTER */
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Assicura che il body sia alto almeno quanto lo schermo */
    /* RIMOSSO: padding-bottom: 80px; (Non serve più, il footer ora ha il suo spazio fisico) */
}

/* --- HEADER --- */
header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: nowrap;
    gap: 20px;
    margin-bottom: 5px;
    flex-shrink: 0; /* Impedisce all'header di schiacciarsi */
}

.logo-area {
    display: flex;
    align-items: baseline;
    gap: 15px;
}

.logo {
    font-family: Impact, sans-serif;
    color: rgb(0, 190, 0);
    transform: skewX(-14deg);
    font-size: clamp(1.5rem, 5vw, 3.5rem);
    line-height: 0.85;
    cursor: pointer;
    white-space: nowrap;
}

.tagline {
    font-family: "Courier New", Courier, monospace;
    font-size: clamp(10px, 1.5vw, 16px);
    font-weight: bold;
    color: #AAA;
    line-height: 1;
    white-space: nowrap;
}

.search-container {
    flex-grow: 1;
    display: flex;
    justify-content: flex-end;
}

.search {
    width: 100%;
    max-width: 300px;
    padding: 8px;
    font-family: Verdana;
    background: #2A2A2A;
    color: #FFF;
    border: 1px solid #444;
}

.search:focus { outline: none; border-color: rgb(0, 190, 0); }

.linea-verde {
    width: 100%;
    height: 4px;
    background: #4F7942;
    margin: 10px 0 10px 0;
    flex-shrink: 0;
}

/* --- MAIN CONTENT (Spinge il footer giù) --- */
main {
    flex: 1; /* Questo fa occupare al main tutto lo spazio disponibile spingendo il footer in basso */
    width: 100%;
    display: block; /* Assicura comportamento blocco */
}

/* --- FOOTER --- */
footer {
    /* MODIFICA: Il footer ora è parte del flusso, non è più fixed */
    position: relative; 
    width: 100%;
    margin-top: 40px; /* Distanza minima dal contenuto sopra */
    text-align: center;
    font-size: 11px;
    flex-shrink: 0; /* Impedisce al footer di schiacciarsi se manca spazio */
    z-index: 10;
}

.footer-link {
    color: white;
    text-decoration: underline;
    font-family: Verdana;
}

.footer-link:hover {
    color: #fff !important;
}

/* --- FILTRO GENERI --- */
.genre-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 25px;
}

.genre-btn {
    padding: 6px 12px;
    background: #2A2A2A;
    color: #AAA;
    border: 1px solid #444;
    font-size: 11px;
    cursor: pointer;
    font-family: Verdana;
    transition: all 0.2s ease;
    text-transform: uppercase;
}

.genre-btn:hover {
    border-color: #666;
}

.genre-btn.active {
    background: #DDD;
    color: #111;
    border-color: #DDD;
    font-weight: bold;
}

/* --- TABELLA --- */
.nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px 0;
}

.pagination-info { font-family: Verdana; font-size: 11px; color: #888; }

.table-wrapper { 
    width: 100%; 
    border-top: 1px solid #333; 
    overflow-x: hidden; 
}

table { 
    width: 100%; 
    border-collapse: collapse; 
    font-size: clamp(11px, 3vw, 13px); 
    table-layout: fixed; 
}

th, td { 
    padding: 10px 8px; 
    text-align: left; 
    word-wrap: break-word; 
    overflow-wrap: break-word; 
    word-break: break-word; 
}

th { 
    color: #666; 
    cursor: pointer; 
    user-select: none; 
    border-bottom: 2px solid #444; 
    font-size: 11px; 
}
th:hover { color: #4D94FF; }

.art { width: 25%; }
.trk { font-weight: bold; color: #DDD; width: 30%; }
.gen { color: #888; width: 25%; font-size: 0.9em; }
.dat { text-align: right; color: #666; width: 20%; }

.clickable-row { cursor: pointer; }
.clickable-row:hover { background: #252525; }

button { cursor: pointer; background: #333; color: #EEE; border: 1px solid #555; padding: 4px 10px; font-size: 10px; }
button:hover { background: #444; }

/* --- REVIEW PAGE STYLES --- */
.review-container {
    display: flex;
    gap: 40px;
    margin-top: 5px;
}

.review-left { flex: 1; }

.review-right {
    width: 45%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
}

.review-text {
    font-size: 16px;
    color: #CCC;
    line-height: 1.6;
    text-align: justify;
}

.genre-tag {
    display: inline-block;
    background: #333;
    color: #888;
    padding: 3px 8px;
    font-size: 10px;
    text-transform: uppercase;
    margin-right: 5px;
    border-radius: 2px;
}

.links-area {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.links-area a {
    color: #EEE;
    text-decoration: none;
    font-size: 12px;
    font-weight: bold;
    padding: 8px;
    background: #2A2A2A;
    border: 1px solid #444;
    text-align: center;
    transition: 0.2s;
}

.links-area a:hover {
    background: rgb(0, 150, 0);
    border-color: #000;
    color: #000;
}

/* --- VIDEO WRAPPER & PRIVACY --- */
.video-placeholder {
    background: #252525;
    border: 1px solid #333;
    padding: 40px 20px;
    text-align: center;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.placeholder-content p {
    font-size: 13px;
    color: #AAA;
    margin-bottom: 15px;
}

.placeholder-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

.video-btn {
    background: transparent;
    border: 1px solid rgb(0, 190, 0);
    color: rgb(0, 190, 0);
    padding: 12px 24px;
    font-family: Verdana, sans-serif;
    font-size: 14px;
    cursor: pointer;
    transition: 0.3s;
    min-width: 140px;
}

.video-btn:hover {
    background: rgb(0, 190, 0);
    color: #000;
}

.video-btn.prompt { margin-top: 15px; }

.yt-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    background: #000;
}

.yt-wrapper iframe {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    border: none;
}

/* TYPOGRAPHY OVERRIDES */
h1 { font-weight: bold; }
h2 { font-weight: normal; }

/* --- MOBILE FIX --- */
@media (max-width: 800px) {
    header { flex-direction: column; align-items: flex-start; gap: 10px; }
    .logo-area { flex-direction: column; align-items: flex-start; gap: 0; }
    .search-container { width: 100%; }
    .search { max-width: 100%; }
    
    .review-container { flex-direction: column; }
    .review-right { width: 100%; max-width: none; }

    @media (max-width: 500px) {
        .gen { display: none; }
        th:nth-child(3) { display: none; }
        .art { width: 45%; }
        .trk { width: 35%; }
        .dat { width: 20%; }
    }
}

@media (max-width: 480px) {
    .placeholder-actions {
        flex-direction: column;
        align-items: center;
    }
    .video-btn {
        width: 100%;
    }
}