/* Réinitialisation simple */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    height: 100%;
    font-family: 'Orbitron', Arial, sans-serif;
    color: #fff;
    overflow: hidden;
}

/* Fond d'écran avec effet de dézoom permanent */
.background {
    background: url('../assets/img/labmenu1.jpg') no-repeat center 80% / cover;
    background-size: 110%;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    filter: brightness(0.5);
    z-index: -2;
    opacity: 0;
    animation: fadeInBackground 3s forwards, breathingZoom 10s infinite alternate;
    
}

@keyframes fadeInBackground {
    to {
        opacity: 1;
    }
}

@keyframes breathingZoom {
    0% {
        background-size: 100%;
    }
    100% {
        background-size: 120%;
    }
}

/* Particules */
.particles {
    position: fixed;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(0,0,0,0.2);
    border-radius: 50%;
    animation: float 5s linear infinite;
}

@keyframes float {
    0% {
        transform: translateY(100vh) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateY(-10vh) scale(0.5);
        opacity: 0;
    }
}

/* Splash screen */
.splash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #fff;
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2em;
    z-index: 1;
    opacity: 1;
    transition: opacity 1s ease;
    cursor: pointer;
    overflow: hidden;
}

.splash p {
    opacity: 0;
    animation: fadeInText 2s forwards, pulseText 2s infinite alternate;
}

@keyframes fadeInText {
    to { opacity: 1; }
}

@keyframes pulseText {
    0% { transform: scale(1); }
    100% { transform: scale(1.1); }
}

/* Effet onde */
.ripple {
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.2);
    pointer-events: none;
    transform: scale(0);
    opacity: 1;
    transition: transform 0.8s ease-out, opacity 0.8s ease-out;
}

.ripple.active {
    transform: scale(50);
    opacity: 0;
}

/* Menu centré */
.menu {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    opacity: 0;
    animation: fadeInMenu 2.5s forwards;
    animation-delay: 1s;
    transition: opacity 0.6s cubic-bezier(.4,0,.2,1), transform 0.6s cubic-bezier(.4,0,.2,1);
}

@keyframes fadeInMenu {
    to {
        opacity: 1;
    }
}

.menu.menu-fadeout {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-40px) scale(0.98);
}

.menu h1 {
    font-size: 3em;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
}

.menu button {
    padding: 10px 20px;
    font-size: 1.2em;
    background-color: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: 2px solid #fff;
    border-radius: 5px;
    cursor: pointer;
    margin-bottom: 15px;
    transition: background-color 0.3s;
}

.menu button:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.menu select {
    padding: 8px;
    font-size: 1em;
    background-color: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: 2px solid #fff;
    border-radius: 5px;
    cursor: pointer;
}

.intro-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    color: #fff;
    font-family: 'Orbitron', Arial, sans-serif;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    overflow-y: auto;
    text-align: left;
    line-height: 1.5;
    opacity: 1;
    transition: opacity 1.5s ease;
}

.intro-text {
    max-width: 800px;
    font-size: 1.1em;
    white-space: pre-wrap;
}

.intro-text.final-text {
    text-align: center;
    font-size: 2.5em;
    font-weight: bold;
}

.intro-overlay.fade-out {
    opacity: 0;
}

.enter-hint {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.9em;
    opacity: 0.7;
    font-style: italic;
}

.hidden {
    display: none;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 20;
}

.modal-content {
    background: #222;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    color: #fff;
    width: 300px;
}

.modal-content input,
.modal-content select {
    width: 80%;
    padding: 8px;
    margin: 10px 0;
    border: none;
    border-radius: 4px;
}

#loadGameSection.modal {
    background: transparent;
    backdrop-filter: none;
    box-shadow: none;
    justify-content: flex-start;
    align-items: center;
    padding: 0;
    flex-direction: column;
    overflow-y: auto;
}

#loadGameSection.modal.loadgame-fadein {
    opacity: 1;
    transform: translateY(0) scale(1);
}

#loadGameSection h2 {
    position: static;
    transform: none;
    margin: 32px 0 18px 0;
    font-size: 2em;
    color: #fff;
    text-shadow: none;
    width: 100%;
    text-align: center;
    z-index: 1;
    pointer-events: auto;
}

.save-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 60px;
    width: 100%;
    max-width: 480px;
    padding: 0 0 18px 0;
    margin: 0 auto;
    overflow-y: auto;
    max-height: 85vh;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE 10+ */
}

.save-list::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.save-item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(0,0,0,0.55);
    border: 1px solid #fff;
    border-radius: 10px;
    padding: 32px 32px 32px 32px;
    width: 100%;
    color: #fff;
    text-align: center;
    box-shadow: none;
    transition: background 0.18s, border 0.18s;
    min-height: 170px;
    font-size: 1.15em;
    word-break: break-word;
}

.save-item:hover {
    background: rgba(30,30,30,0.65);
    border: 1px solid #fff;
}

.save-item h3 {
    margin-bottom: 12px;
    font-size: 1.25em;
    margin-top: 0;
}

.save-item p {
    margin: 6px 0 0 0;
    font-size: 1.08em;
}

#backToMenuFromLoadBtn {
    margin: 28px auto 32px auto;
    display: block;
    background: #222;
    color: #fff;
    border: 2px solid #fff;
    border-radius: 5px;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 1.2em;
    font-family: 'Orbitron', sans-serif;
    transition: background 0.3s, color 0.2s;
}

#backToMenuFromLoadBtn:hover {
    background: #fff;
    color: #000;
    border: 2px solid #000;
}

.splash.hidden {
    display: none;
}

.hidden {
    display: none;
}


.menu button,
.modal-content button,
#loadGameSection button {
    padding: 10px 20px;
    font-size: 1.2em;
    background-color: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: 2px solid #fff;
    border-radius: 5px;
    cursor: pointer;
    margin: 10px;
    overflow-y: auto;
    transition: background-color 0.3s, transform 0.2s;
}


.menu button:hover,
.modal-content button:hover,
#loadGameSection button:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.overlay-white {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    opacity: 0;
    z-index: 100;
    pointer-events: none;
}


body, html, * {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}


.skip-intro {
    position: fixed;
    top: 10px;
    right: 20px;
    font-size: 16px;
    font-family: 'Orbitron', sans-serif;
    color: #00f0ff;
    text-shadow: 0 0 5px #00f0ff;
    z-index: 200;
}

.delete-save-btn {
    margin-left: 16px;
    background: #a00;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 3px 10px;
    margin-top: 10px;
    cursor: pointer;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.85em;
    min-width: 70px;
}
.delete-save-btn:hover {
    background: #e74c3c;
}

input#playerName {
    width: 80%;
    padding: 8px;
    margin: 10px 0;
    border: none;
    border-radius: 4px;
    font-size: 1em;
    color: #000;
    background-color: rgba(255, 255, 255, 0.8);
}

button {
    appearance: button;
    -webkit-appearance: button;
    -moz-appearance: button;
    font-family: 'Orbitron', sans-serif;
}

.delete-save-btn, #backToMenuFromLoadBtn {
    overflow: visible !important;
    white-space: nowrap;
}

