/* Importazione dei Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@700&family=Cinzel&family=Exo+2:ital,wght@1,800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Genos:wght@100..900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&display=swap');



body {
    font-family: Genos, monospace;
    background-color: #222;
    padding: 50px;
    font-size: 12px;
    weight: 400;
}

h1 {
	font-family: Orbitron, monospace;
	color: #ffcc99;
	text-shadow: 0 1px 20px rgba(255, 169, 93, 0.8), 2px 0 40px rgba(255, 169, 93, 0.4);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

tr:hover {
    background-color: #f1f1f1;
}

/* Rendi il contenitore leggibile */
pre {
    background: #333;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    font-family: "JetBrains Mono", monospace;
    font-optical-sizing: auto;
    font-weight: 400;
    font-size: 1.6rem;
    letter-spacing: 0.5px;
    text-shadow: 0 0 7px rgba(93, 169, 255, 0.8), 0 0 10px rgba(93, 169, 255, 0.4), 1px 1px 0 #000;
    text-align: left;
}

/* Stilizza i link (i tuoi file) */
pre a {
    display: inline-block;
    padding: 5px 10px;
    text-decoration: none;
    color: #00bcff;
    border-radius: 4px;
    transition: background 0.2s;
}

/* Colpisce le intestazioni della tabella testuale */
pre a[href^="?C="] {
    color: #00bcff;
    text-shadow: 1px 1px 10px rgba(0, 188, 255, 0.8);
    font-weight: bold;
}

pre a:hover {
    background-color: #e9ecef;
    color: #0056b3;
}

/* Nascondi gli HR brutti di Apache */
hr {
    border: 0;
    border-top: 1px solid #eee;
    margin: 20px 0;
}


/* --- 1. NASCONDI ICONE ORIGINALI --- */
pre img {
    display: none !important;
}

/* --- 2. PREPARA I LINK --- */
pre a {
    text-decoration: none;
    position: relative;
    padding-left: 28px; /* Leggermente più spazio per non incollare l'icona */
    display: inline-block;
}

/* --- 3. REGOLA BASE PER LE ICONE (FA) --- */
/* Invece di content:none, definiamo lo stile comune qui */
pre a::before {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    left: 0;
    width: 20px;
    text-align: center;
    content: ""; /* Di base vuoto, così i titoli non mostrano nulla */
}

/* --- 4. ASSEGNAZIONE CONTENUTI SPECIFICI --- */

/* CARTELLE (link che finiscono con /) */
pre a[href$="/"]::before {
    content: "\f07b";
    color: #ffcc99;
}

/* PARENT DIRECTORY (link che torna indietro) */
pre a[href*=".."]::before {
    content: "\f062"; /* Freccia su */
    color: #ffffff;
    text-shadow: 0 0 8px #fff;
}

/* FILE COMPRESSI (.gz) */
pre a[href$=".gz"]::before {
    content: "\f1c6";
    color: #00bcff;
    text-shadow: 0 0 8px rgba(0, 188, 255, 0.6);
}

/* FILE GENERICI (TODO, copyright, ecc) */
/* Colpiamo solo i link che NON hanno slash, NON hanno punti di domanda e NON hanno due punti */
pre a:not([href$="/"]):not([href*="?"]):not([href*=".."]):not([href$=".gz"])::before {
    content: "\f15b";
    color: #ffcc99;
}

/* --- 5. IL COLPO DI GRAZIA PER I TITOLI --- */
/* Se il link contiene un punto di domanda (ordinamento), forziamo il vuoto */
pre a[href*="?"]::before {
    content: none !important;
}

/* 2. Regola speciale per il link "Parent Directory" */
/* Lo intercettiamo perché è il primo link dopo i titoli che NON ha il punto di domanda */
pre a:not([href*="?"]):first-of-type::before {
    content: "\f062" !important; /* Freccia Su */
    color: #ffffff !important;
    text-shadow: 0 0 10px #fff;
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
}



