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

body {
    font-family: 'League Spartan', sans-serif;
    font-optical-sizing: auto;
    font-style: normal;
    text-align: center;
    margin-top: 0;
    margin-bottom: 22px;
    line-height: 1.1;

    background: #FFE0FA;
    min-height: 100vh;
    padding: 20px;
    color: #000000;
    text-align: left;
}

/* Empêche tout débordement au niveau global */
html, body {
    margin: 0;
    padding: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden; /* Empêche le scroll de la page */
    box-sizing: border-box;
}

/* Empêche les débordements sur tous les éléments */
* {
    box-sizing: border-box;
}

.container {
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    
    /* Prend tout l'espace de l'écran moins les marges */
    position: fixed;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    
    /* Force les dimensions exactes */
    width: calc(100vw - 20px);
    height: calc(100vh - 20px);
    max-width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
    
    overflow: auto; /* permet le scroll interne uniquement */
    border-radius: 8px;
    border: 3px solid black;
    box-shadow: 4px 4px 0px #141211;
    padding: 10px;
    box-sizing: border-box;
    
    /* Empêche tout débordement */
    contain: layout style size;
}

.center {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    /* Assure-vous que le contenu peut défiler si nécessaire */
    min-height: min-content;
}

h1 {
    text-align: center;
    color: rgb(0, 0, 0);
    margin-bottom: 40px;
    
    font-family: "League Spartan", sans-serif;
    font-optical-sizing: auto;
    font-weight: 700;
    font-style: normal;
    font-size: 60px;
    text-align: center;
    margin-top: 10px;
}

.emoji-icon {
    text-align: center;
    color: rgb(0, 0, 0);
    margin-bottom: 40px;

    font-family: "Noto Emoji", sans-serif;
    font-optical-sizing: auto;
    font-weight: 700;
    font-style: normal;
    font-size: 60px;
    text-align: center;
    margin-top: 0;
}

.emoji {
    text-align: center;
    color: rgb(0, 0, 0);
    margin-bottom: 40px;

    font-family: "Noto Emoji", sans-serif;
    font-optical-sizing: auto;
    font-weight: 700;
    font-style: normal;
    font-size: 18px;
    text-align: center;
    margin-top: 0;
}

.back-button {
    position: absolute;
    top: 30px;
    left: 30px;
    padding: 10px 15px;
    font-size: 18px;
    background-color:rgb(255, 255, 255);
    border-radius: 10px;
    cursor: pointer;
    border: 3px solid #000000;
    box-shadow: 4px 4px 0px #000000;

    font-weight: bold;
}

.back-button:hover {
    transform: scale(1.05);
}

.back-button:active {
    transform: scale(0.95);
}

.patch-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.patch-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;

    border: 3px solid #000000;
    box-shadow: 4px 4px 0px #000000;
}

.patch-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.patch-card:hover {
    background: #ffffff;
    transform: scale(1.05);
}

.patch-card:active {
    transform: scale(0.95);
}


.patch-header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.version-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
}

.version {
    font-size: 32px;
    font-weight: bold;
    color: #000000;
    margin-bottom: 0px;
    line-height: 1;
}

.type-badge {
    margin-top: 2px;
}

.date {
    color: #000000;
    font-size: 16px;
    padding: 5px 5px;
    border-radius: 12px;
    align-self: flex-start;
    margin-left: -8px;
    margin-top: 2px;
}

.version-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.patch-preview {
    color: #555;
    line-height: 1.6;
    font-size: 0.95em;
}

.click-hint {
    text-align: center;
    color: #000000;    
    font-family: "League Spartan", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: italic;
    font-size: 16px;
    text-align: center;
    margin-bottom: 22px;
    line-height: 1.1;
    margin-top: 15px;
    text-decoration: underline;
}

/* Modal/Popup styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.3s ease-out;

    border: 3px solid black;
    box-shadow: 4px 4px 0px #141211;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close {
    color: #000000;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover,
.close:focus {
    color: #FFE0FA;
}

.modal-header {
    border-bottom: 2px solid #000000;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.modal-version {
    font-size: 32px;
    color: #000000;
    margin-bottom: 5px;
    font-weight: bold;
}

.modal-date {
    color: #000000;
    font-size: 16px;
}

.modal-content h3 {
    color: #000000;
    margin: 20px 0 10px 0;
    font-size: 20px;
    border-left: 4px solid #FFE0FA;
    padding-left: 10px;
}

.modal-content .emoji-icon {
    font-family: "Noto Emoji", sans-serif;
    font-optical-sizing: auto;
    font-weight: bold;
    font-style: normal;
    font-size: 20px;
    text-align: center;
    margin-top: 0;
}



.modal-content ul {
    margin: 10px 0 10px 20px;
}

.modal-content li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.modal-content p {
    line-height: 1.7;
    margin-bottom: 15px;
}

.type-badge {
    padding: 8px 32px;
    font-size: 16px;
    border-radius: 12px;
    font-weight: bold;
    margin-top: 4px;
    text-align: center;
}

.major { background-color: #FFE0FA; color: #000000; border: 3px solid #000000; box-shadow: 4px 4px 0px #000000; }
.minor { background-color: #FFE0FA; color: #000000; border: 3px solid #000000; box-shadow: 4px 4px 0px #000000; }
.patch { background-color: #FFE0FA; color: #000000; border: 3px solid #000000; box-shadow: 4px 4px 0px #000000; }
.hotfix { background-color: #FFE0FA; color: #000000; border: 3px solid #000000; box-shadow: 4px 4px 0px #000000; }

@media (max-width: 768px) {
    .patch-grid {
        grid-template-columns: 1fr;
    }
    
    h1 {
        font-size: 2.5em;
    }
    
    .modal-content {
        margin: 10% auto;
        width: 95%;
        padding: 20px;
    }
}