* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Minecraft', 'Press Start 2P', 'Courier New', monospace;
    color: #fff;
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    padding: 0;
    margin: 0;
    padding-top: 0;
    box-sizing: border-box;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('1623a72c-3c2d-4dd7-93bc-52c42d96209e.png') no-repeat center center fixed;
    background-size: cover;
    filter: blur(5px) brightness(0.7);
    z-index: -1;
}

.container {
    width: 100%;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 20px 20px 20px;
    margin: 0 auto;
    margin-top: -100px;
}

.title-container {
    margin: 5px 0 10px 0;
    text-align: center;
    padding: 0 10px;
    width: 80%;
    max-width: 800px;
}

.title-image {
    max-width: 80%;
    height: auto;
}

.levels-container {
    display: flex;
    justify-content: center;
    width: 100%;
    gap: 15px;
    margin: 0 0 20px 0;
    flex-wrap: wrap;
}

.level {
    background-color: rgba(0, 0, 0, 0.7);
    border: 4px solid #444;
    border-radius: 10px;
    width: 180px;
    height: 220px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: visible;
}

.level-content {
    text-align: center;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    z-index: 2;
    padding-bottom: 10px;
}

.level-image-container {
    width: 160px;
    height: 160px;
    margin-top: 15px;
    margin-bottom: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #000;
    border-radius: 5px;
    overflow: hidden;
}

.level-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center;
}

.level-number {
    font-family: 'Minecraft', 'Press Start 2P', monospace;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
    text-shadow: 2px 2px 4px #000;
    color: #fff;
    letter-spacing: 1px;
    padding: 4px 8px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 4px;
}

.level.active {
    transform: scale(1.2);
    border-color: #ffcc00;
    box-shadow: 0 0 20px rgba(255, 204, 0, 0.7);
    z-index: 10;
    position: relative;
    height: auto;
    min-height: 240px;
    padding-bottom: 10px;
    margin-bottom: 40px;
}

.level.active .level-image-container {
    border: 2px solid #ffcc00;
    box-shadow: 0 0 10px rgba(255, 204, 0, 0.5) inset;
}

.level.active .level-number {
    color: #ffcc00;
    text-shadow: 0 0 5px rgba(255, 204, 0, 0.7);
}

.controller-info {
    background-color: rgba(0, 0, 0, 0.7);
    padding: 15px 30px;
    border-radius: 10px;
    text-align: center;
    font-size: 14px;
    margin-top: 0;
}

/* Retro pixel styling for levels */
.level-1 { background-color: rgba(255, 100, 100, 0.3); }
.level-2 { background-color: rgba(100, 255, 100, 0.3); }
.level-3 { background-color: rgba(100, 100, 255, 0.3); }
.level-4 { background-color: rgba(255, 255, 100, 0.3); }
.level-5 { background-color: rgba(255, 100, 255, 0.3); }

/* Level authors */
.level-authors {
    display: none;
    width: 90%;
    font-family: 'Chakra Petch', sans-serif;
    font-size: 11px;
    line-height: 1.3;
    color: #fff;
    text-align: center;
    margin-top: 5px;
    padding: 0 5px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.level.active .level-authors {
    display: block;
    height: auto;
    overflow: visible;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 5px;
    padding: 5px;
    margin-bottom: 5px;
    border: 1px solid #ffcc00;
}

.level-authors ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.level-authors li {
    padding: 1px 0;
    text-shadow: 1px 1px 2px #000;
}

/* Rimossi stili scrollbar */

.popup-image-container {
    width: 100%;
    height: 150px;
    margin-bottom: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #000;
    border-radius: 5px;
    overflow: hidden;
    border: 2px solid #555;
}

.popup-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.authors-title {
    font-family: 'Minecraft', 'Press Start 2P', monospace;
    font-size: 10px;
    color: #ffcc00;
    margin: 2px 0;
    text-align: center;
    text-shadow: 1px 1px 2px #000;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 3px;
    padding: 1px 0;
}

.authors-list {
    max-height: 150px;
    overflow-y: auto;
    padding-right: 5px;
    font-family: 'Minecraft', sans-serif;
    font-size: 12px;
    color: #fff;
    text-shadow: 1px 1px 2px #000;
}

.authors-list ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.authors-list li {
    padding: 3px 0;
    text-align: center;
}

/* Custom scrollbar for authors list */
.authors-list::-webkit-scrollbar {
    width: 8px;
}

.authors-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.authors-list::-webkit-scrollbar-thumb {
    background: #ffcc00;
    border-radius: 4px;
}

.authors-list::-webkit-scrollbar-thumb:hover {
    background: #ffd633;
}

/* Responsive design */
@media (max-width: 1000px) {
    .logo {
        height: 40px;
    }
    
    .container {
        margin-top: -30px;
        transform: scale(0.75);
        transform-origin: top center;
    }
    
    .title-container {
        margin-bottom: 5px;
    }
    
    .title-image {
        max-width: 65%;
    }
    
    .levels-container {
        flex-wrap: wrap;
        gap: 8px;
        margin-bottom: 5px;
    }
    
    .level {
        width: 130px;
        max-width: 130px;
        height: 160px;
    }
    
    .level-image-container {
        width: 80%;
        height: 55%;
        margin: 8px auto 3px auto;
    }
    
    .level-number {
        font-size: 11px;
        margin: 2px 0;
    }
    
    .level.active {
        height: 190px;
        transform: scale(1.1);
    }
    
    .level-authors {
        font-size: 8px;
    }
    
    .controller-info {
        margin-top: 0;
        padding: 6px 12px;
        font-size: 11px;
    }
}

@media (max-width: 768px) {
    .logos-container {
        gap: 10px;
        padding: 15px 5px;
    }
    
    .logo {
        height: 50px;
        padding: 0 8px;
    }
    
    .logo img {
        max-width: 100px;
    }
    
    .title-container {
        margin: 20px 0;
    }
    
    .levels-container {
        margin-bottom: 20px;
    }
}

@media (max-width: 576px) {
    .logos-wrapper {
        padding: 5px 0;
    }
    
    .logo {
        height: 35px;
    }
    
    .container {
        margin-top: -40px;
        padding: 0 10px 10px 10px;
        transform: scale(0.8);
        transform-origin: top center;
    }
    
    .title-container {
        width: 90%;
        margin: 0 0 5px 0;
    }
    
    .title-image {
        max-width: 90%;
    }
    
    .levels-container {
        gap: 8px;
    }
    
    .level {
        width: calc(50% - 10px);
        max-width: 140px;
        height: 180px;
        border-width: 3px;
    }
    
    .level-image-container {
        width: 85%;
        height: 65%;
        margin: 8px auto 3px auto;
    }
    
    .level-number {
        font-size: 11px;
        margin: 3px 0;
        padding: 2px 5px;
    }
    
    .level.active {
        height: 220px;
    }
    
    .level-authors {
        font-size: 8px;
    }
    
    .authors-title {
        font-size: 9px;
    }
    
    .controller-info {
        font-size: 11px;
        padding: 8px 12px;
        margin-top: 5px;
    }
}

/* Fonts are now loaded via HTML link tags */

/* Logos section */
.logos-wrapper {
    width: 100%;
    background-color: #fff;
    padding: 8px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 100;
}

.logos-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.logo {
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    background-color: #ffffff;
    border-radius: 5px;
    transition: all 0.3s ease;
    border: 1px solid #eeeeee;
}

.logo:hover {
    background-color: #f9f9f9;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.logo img {
    max-height: 100%;
    max-width: 150px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: grayscale(0%) brightness(1);
    transition: all 0.3s ease;
}

.logo:hover img {
    filter: grayscale(0%) brightness(1);
}

@media (max-width: 768px) {
    .logos-container {
        gap: 10px;
        padding: 15px 5px;
    }
    
    .logo {
        height: 50px;
        padding: 0 8px;
    }
    
    .logo img {
        max-width: 100px;
    }
    
    .title-container {
        margin: 20px 0;
    }
    
    .levels-container {
        margin-bottom: 20px;
    }
}
