* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.5;
    padding: 2rem 1rem;
    background: white;
    color: black;
}

/* Flag system - con background-image */
.flag {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin-right: 0.2rem;
    min-width: fit-content;
    vertical-align: middle;
}

.flag-item {
    display: inline-block;
    width: 1.2rem;
    height: 1rem;
    border-radius: 2px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    /* box-shadow: 0 1px 2px rgba(0,0,0,0.1); */
    margin-top: -3px;
}
h1 svg {
    height: 0.722em;        /* Si adatta al font-size dell'h1 */
    width: auto;          /* Mantiene le proporzioni (32:24) */
    vertical-align: middle;
    margin-left: 0.4rem;  /* Stacca leggermente dalla parola GRIP */
    margin-top: -0.15em;  /* Correzione ottica per centrarlo sulla "x-height" del font */
    border-radius: 3px;   /* Un piccolo arrotondamento lo rende più moderno */
}
@media (prefers-color-scheme: dark) {
    /* ... tue regole esistenti ... */

    h1 svg {
        /* Se l'SVG nell'h1 è inline, invertiamo i colori */
        filter: invert(1); 
        /* In alternativa, se vuoi mantenere i neri neri, 
           assicurati che l'SVG usi 'currentColor' come fill */
    }
}
/* Flags per nazione */
.flag-item.us { background-image: url('flags/us.svg'); }
.flag-item.it { background-image: url('flags/it.svg'); }
.flag-item.de { background-image: url('flags/de.svg'); }
.flag-item.gb { background-image: url('flags/gb.svg'); }
.flag-item.fr { background-image: url('flags/fr.svg'); }
.flag-item.ua { background-image: url('flags/ua.svg'); }

/* Dark mode */
@media (prefers-color-scheme: dark) {
    .flag-item {
        box-shadow: 0 1px 3px rgba(255,255,255,0.1);
    }
}


.container {
    max-width: 680px;
    margin: 0 auto;
    text-align: center;
}

h1 {
    font-size: 2.2rem;
    font-weight: 500;
    letter-spacing: -0.02em;
    margin-bottom: 2rem;
}

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 2.5rem;
}





.pill.avatar {
    background-image: url('unnamed.jpg'); 
	 background-size: cover; 
	   padding: 0.5rem 1.1rem;
}

.pill {
    background: #f0f0f0;
    border: none;
    padding: 0.5rem 1.2rem;
    border-radius: 2rem;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
    color: #333;
}

.pill:hover {
    background: #e0e0e0;
}

.pill.active {
    background: black;
    color: white;
}


/* Avatar pill - come div */
.pill.avatar {
    background-image: url('unnamed.jpg');
    background-size: cover;
    background-position: center;
    width: 2.2rem;
    height: 2.2rem;
    padding: 0;
    border: none;
    border-radius: 2rem;
    cursor: pointer;
    display: inline-block;
    transition: transform 0.2s ease;
}

.pill.avatar:hover {
    transform: scale(1.05);
}

/* Avatar Popup */
.avatar-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(242, 242, 242, 0.8);
    backdrop-filter: blur(5px);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.avatar-popup.show {
    display: flex;
}

.avatar-popup img {
    max-width: 70%;
    max-height: 70%;
    width: auto;
    height: auto;
    border-radius: 999px;
    box-shadow: 0 10px 30px rgba(233, 233, 233, 0.5);
    cursor: default;
    width: 100%;
}

@media (min-width: 768px) {
    .avatar-popup img {
        max-width: 60%;
        max-height: 80%;
        max-width: 30rem;
    }
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
    .avatar-popup {
        background-color: rgba(0, 0, 0, 0.9);
    }
    
    .avatar-popup img {
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    }
}




.year-block {
    margin-bottom: 2.5rem;
    transition: opacity 0.3s ease;
}

.year {
    font-size: 1.25rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.15em;
    display: block;
    color: #444;
}

.item {
    margin-bottom: 0.6rem;
    font-size: 1.2rem;
    font-weight: 400;
    word-break: break-word;
}

.flag {
    font-size: 1.2rem;
    display: inline-flex;
    margin-right: 0.2rem;
    letter-spacing: 2.5px;
    min-width: fit-content;
    flex-grow: revert;
    align-items: center;
}

.item-tags {
    display: inline-flex;
    margin-left: 0.5rem;
    font-size: 0.9rem;
    color: #999;
    flex-wrap: wrap;
    gap: 3px 0;
    justify-content: center;
}

.item-tag {
    background: none;
    /*! border: 1px solid #ddd; */
    border-radius: 1rem;
    padding: 0.1rem 0.5rem;
    /*! font-size: 0.8rem; */
    /*! margin: 0 0.05rem; */
    cursor: pointer;
    transition: all 0.2s ease;
    color: #b3b3b3;
    font-family: 'Inter', sans-serif;
    text-decoration: none;
    white-space: nowrap;
}

.item-tag.external-link {

    transition: all 0.2s ease;
    text-decoration: none;
}

.item-tag.external-link:hover {
    text-decoration: none;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
    .item-tag.external-link {
    }
    
    .item-tag.external-link:hover {
        color: white;
    }
}

.item-tag:hover {
    background: #f0f0f0;
    border-color: #999;
}

.hidden {
    display: none;
}

@media (max-width: 480px) {
    body {
        padding: 1.5rem 1rem;
    }
    h1 {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
    }
    .item {
        font-size: 1rem;
    }
    .pill {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }
	
.pill.avatar {
    background-image: url('unnamed.jpg'); 
	 background-size: cover; 
	   padding: 0.6rem 1.15rem;
}
    .item-tag {
  padding: 0.1rem 0.35rem;
  /*! font-size: 0.9rem; */
  gap: 2px !important;
  /*! margin: 0 0.1rem; */
}
}

@media (prefers-color-scheme: dark) {
    body {
        background: black;
        color: white;
    }
    
    .year {
        color: #aaa;
    }
    
    .pill {
        background: #222;
        color: #eee;
        border: 1px solid #444;
    }
    
    .pill:hover {
        background: #333;
    }
    
    .pill.active {
        background: white;
        color: black;
    }
    
    .item-tags {
        color: #666;
    }
    
    .item-tag {
        border-color: #444;
        color: #aaa;
    }
    
    .item-tag:hover {
        background: #222;
        border-color: #666;
    }
}