* {
    font-family: "Comic Sans MS", "Comic Sans", cursive;
}

body {
    background-image: url('images/backgrounds/BackgroundWall.png');
    background-repeat: repeat;
    background-size: auto; 
    background-color: #14261a;
    background-blend-mode: multiply;
    color: #ffffff;
    display: flex;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
    box-sizing: border-box;
}

body.centered-page {
    align-items: center;
    overflow: hidden;
}

body.scrolling-page {
    align-items: flex-start;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 40px 0;
}

img {
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

#transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    pointer-events: none;
    display: none;
    background-image: url('images/backgrounds/BackgroundWall.png');
    background-repeat: repeat;
    background-color: #14261a;
    background-blend-mode: multiply;
    -webkit-mask-repeat: repeat;
    mask-repeat: repeat;
    -webkit-mask-size: 16px;
    mask-size: 16px;
    image-rendering: pixelated;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.t-reveal {
    display: block !important;
    animation: ditherReveal 0.6s steps(1) forwards;
}

.t-cover {
    display: block !important;
    animation: ditherCover 0.6s steps(1) forwards;
}

@keyframes ditherReveal {
    0% { -webkit-mask-image: url('images/transition/Dither16.png'); mask-image: url('images/transition/Dither16.png'); }
    6.25% { -webkit-mask-image: url('images/transition/Dither15.png'); mask-image: url('images/transition/Dither15.png'); }
    12.5% { -webkit-mask-image: url('images/transition/Dither14.png'); mask-image: url('images/transition/Dither14.png'); }
    18.75% { -webkit-mask-image: url('images/transition/Dither13.png'); mask-image: url('images/transition/Dither13.png'); }
    25% { -webkit-mask-image: url('images/transition/Dither12.png'); mask-image: url('images/transition/Dither12.png'); }
    31.25% { -webkit-mask-image: url('images/transition/Dither11.png'); mask-image: url('images/transition/Dither11.png'); }
    37.5% { -webkit-mask-image: url('images/transition/Dither10.png'); mask-image: url('images/transition/Dither10.png'); }
    43.75% { -webkit-mask-image: url('images/transition/Dither9.png'); mask-image: url('images/transition/Dither9.png'); }
    50% { -webkit-mask-image: url('images/transition/Dither8.png'); mask-image: url('images/transition/Dither8.png'); }
    56.25% { -webkit-mask-image: url('images/transition/Dither7.png'); mask-image: url('images/transition/Dither7.png'); }
    62.5% { -webkit-mask-image: url('images/transition/Dither6.png'); mask-image: url('images/transition/Dither6.png'); }
    68.75% { -webkit-mask-image: url('images/transition/Dither5.png'); mask-image: url('images/transition/Dither5.png'); }
    75% { -webkit-mask-image: url('images/transition/Dither4.png'); mask-image: url('images/transition/Dither4.png'); }
    81.25% { -webkit-mask-image: url('images/transition/Dither3.png'); mask-image: url('images/transition/Dither3.png'); }
    87.5% { -webkit-mask-image: url('images/transition/Dither2.png'); mask-image: url('images/transition/Dither2.png'); }
    93.75% { -webkit-mask-image: url('images/transition/Dither1.png'); mask-image: url('images/transition/Dither1.png'); }
    100% { -webkit-mask-image: url('images/transition/Dither0.png'); mask-image: url('images/transition/Dither0.png'); }
}

@keyframes ditherCover {
    0% { -webkit-mask-image: url('images/transition/Dither0.png'); mask-image: url('images/transition/Dither0.png'); }
    6.25% { -webkit-mask-image: url('images/transition/Dither1.png'); mask-image: url('images/transition/Dither1.png'); }
    12.5% { -webkit-mask-image: url('images/transition/Dither2.png'); mask-image: url('images/transition/Dither2.png'); }
    18.75% { -webkit-mask-image: url('images/transition/Dither3.png'); mask-image: url('images/transition/Dither3.png'); }
    25% { -webkit-mask-image: url('images/transition/Dither4.png'); mask-image: url('images/transition/Dither4.png'); }
    31.25% { -webkit-mask-image: url('images/transition/Dither5.png'); mask-image: url('images/transition/Dither5.png'); }
    37.5% { -webkit-mask-image: url('images/transition/Dither6.png'); mask-image: url('images/transition/Dither6.png'); }
    43.75% { -webkit-mask-image: url('images/transition/Dither7.png'); mask-image: url('images/transition/Dither7.png'); }
    50% { -webkit-mask-image: url('images/transition/Dither8.png'); mask-image: url('images/transition/Dither8.png'); }
    56.25% { -webkit-mask-image: url('images/transition/Dither9.png'); mask-image: url('images/transition/Dither9.png'); }
    62.5% { -webkit-mask-image: url('images/transition/Dither10.png'); mask-image: url('images/transition/Dither10.png'); }
    68.75% { -webkit-mask-image: url('images/transition/Dither11.png'); mask-image: url('images/transition/Dither11.png'); }
    75% { -webkit-mask-image: url('images/transition/Dither12.png'); mask-image: url('images/transition/Dither12.png'); }
    81.25% { -webkit-mask-image: url('images/transition/Dither13.png'); mask-image: url('images/transition/Dither13.png'); }
    87.5% { -webkit-mask-image: url('images/transition/Dither14.png'); mask-image: url('images/transition/Dither14.png'); }
    93.75% { -webkit-mask-image: url('images/transition/Dither15.png'); mask-image: url('images/transition/Dither15.png'); }
    100% { -webkit-mask-image: url('images/transition/Dither16.png'); mask-image: url('images/transition/Dither16.png'); }
}

.plate {
    background-color: #0b1c10;
    padding: 30px;
    border-radius: 20px;
    border: 4px solid #2ecc71;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.main-container {
    width: 90%;
    max-width: 600px;
    text-align: center;
}

.mods-container {
    width: 95%;
    max-width: 1200px;
    text-align: center;
}

.mods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 360px));
    justify-content: center;
    gap: 25px;
    margin-top: 30px;
}

.mod-card {
    background: #07120a;
    border: 3px solid #2ecc71;
    border-radius: 15px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
    max-width: 360px;
    width: 100%;
    margin: 0 auto;
}

.mod-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 15px rgba(46, 204, 113, 0.3);
}

.mod-image-box {
    width: 100%;
    height: 200px;
    background: #1a1a1a;
    border-bottom: 3px solid #2ecc71;
    overflow: hidden;
}

.mod-image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mod-content {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.mod-content h3 {
    margin: 0 0 10px 0;
    color: #2ecc71;
}

.mod-content p {
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 15px;
    flex-grow: 1;
}

.download-area {
    margin-top: auto;
    width: 100%;
}

.dl-list {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 100%;
}

.dl-list.open {
    max-height: 400px;
    margin-top: 10px;
}

.btn {
    display: block;
    width: 100%;
    box-sizing: border-box;
    background: #2ecc71;
    color: #000;
    padding: 12px;
    margin: 8px 0;
    text-decoration: none;
    border: 3px solid #1a5c35;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.2s ease;
    text-align: center;
}

.btn:hover {
    transform: scale(1.02);
    background: #4ef08d;
    color: #ffffff;
    text-decoration: underline;
}

.dl-link {
    background: #1a5c35;
    color: white;
    font-size: 14px;
    border-color: #2ecc71;
}

.back-btn-container {
    margin-top: 30px;
    display: flex;
    justify-content: center;
}

.back-btn-container .btn {
    width: 250px;
}

h1 {
    color: #2ecc71;
    font-size: 2.5rem;
    text-shadow: 3px 3px 0px #1a5c35;
    margin-top: 0;
}

.about-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 95%;
    max-width: 1100px;
}

.about-wrapper {
    display: flex;
    gap: 20px;
    align-items: stretch;
    width: 100%;
}

.text-plate {
    flex: 2;
    text-align: left;
}

.gif-plate {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
}

.gif-plate img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 10px;
}

.description-text {
    line-height: 1.6;
    font-size: 18px;
}

.sub-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.sub-menu.open {
    max-height: 300px;
    padding: 20px 0;
}

.mod-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: white;
    width: 180px;
    transition: transform 0.3s ease;
}

.mod-link:hover {
    transform: scale(1.1);
}

.mod-link img {
    width: 100%;
    border: 3px solid #2ecc71;
    background: #1a1a1a;
    border-radius: 10px;
    margin-bottom: 10px;
    transition: box-shadow 0.3s ease;
}

.mod-link:hover img {
    box-shadow: 0 0 20px #2ecc71;
}

a {
    color: #2ecc71;
    text-decoration: none;
    display: inline-block;
    transition: transform 0.3s ease;
    font-weight: bold;
}

a:hover {
    color: #ffffff;
    text-decoration: underline;
}

@media (max-width: 850px) {
    .about-wrapper {
        flex-direction: column;
    }
    .sub-menu {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 600px) {
    .mods-grid {
        grid-template-columns: 1fr;
    }
}