@font-face {
  font-family: 'Beaufort for LOL';
  src: url('fonts/BeaufortforLOL-Bold.otf') format('opentype');
  font-weight: bold;
  font-style: normal;
}

@font-face {
  font-family: 'Beaufort for LOL';
  src: url('fonts/BeaufortforLOL-Regular.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
}

body {
    background-image: url('https://i.imgur.com/xRyIeIV.png');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    background-attachment: fixed;
    font-family: 'Beaufort for LOL', Arial, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 90%;
    max-width: 600px;
    padding: 20px;
    box-sizing: border-box;
}

h1 {
    color: #f2d47e;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    margin-bottom: 20px;
    text-align: center;
    font-family: 'Beaufort for LOL', Arial, sans-serif;
    font-weight: bold;
    font-size: clamp(1.5rem, 5vw, 2.5rem);
}

h2 {
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    margin-bottom: 20px;
    text-align: center;
    font-size: clamp(1.2rem, 4vw, 1.8rem);
}

p {
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    margin-bottom: 20px;
    text-align: center;
    font-size: clamp(1rem, 3vw, 1.2rem);
}

.swiper-container {
    width: 50vw; /* Réduisez de 70vw à 50vw */
    max-width: 300px; /* Réduisez de 400px à 300px */
    height: 50vh; /* Réduisez de 62vh à 50vh */
    max-height: 450px; /* Réduisez de 600px à 450px */
}

.swiper-slide {
    background-color: #ffffff;
    background-image: url('');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 15px;
    box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.3);
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    text-align: center;
    height: 100%;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    cursor: default;
    border: 5px solid #c9a66b;
    box-shadow: 0 0 0 3px #8c6239, 0 0 0 5px #e0c9a6;
    transition: transform 0.3s ease;
}

.swiper-slide * {
    pointer-events: none;
}

.swiper-slide:hover {
    transform: scale(1.05);
}

.swiper-slide-active {
    transition: transform 0.5s ease;
}

.card-3d-effect {
    transition: transform 0.2s ease-out;
}

.character-image {
    width: 100%;
    height: auto;
    max-height: 50%;
    object-fit: cover;
    border-radius: 0.5em;
    margin-bottom: 0.3em;
    box-shadow: inset 0 0 50px rgba(0,0,0,0.5);
}

.character-name {
    font-size: clamp(2rem, 4vw, 2rem); /* Réduisez la taille de la police */
    font-weight: bold;
    color: #85201f;
    margin-bottom: 0em;
}

.character-class {
    font-size: clamp(2rem, 3vw, 1.2rem); 
    color: #777;
    margin-bottom: 1em;
}

.glow-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.glow-overlay.smash {
    background: linear-gradient(to left, rgba(0, 255, 0, 0.3), transparent);
}

.glow-overlay.pass {
    background: linear-gradient(to right, rgba(255, 0, 0, 0.3), transparent);
}

.popup-icon {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    z-index: 1000;
    pointer-events: none;
    width: 20vmin;
    height: 20vmin;
}

.popup-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

@keyframes popupAnimation {
    0% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
    30% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(2); opacity: 0; }
}

.screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    padding: 20px;
    box-sizing: border-box;
}

.screen h1 {
    font-size: clamp(1.5rem, 5vw, 2.5rem);
    margin-bottom: 20px;
}

.screen p {
    font-size: clamp(1rem, 3vw, 1.2rem);
    margin-bottom: 20px;
    text-align: center;
}

.screen button, .start-button, .restart-button, #endGame {
    padding: clamp(10px, 3vw, 18px) clamp(20px, 5vw, 36px);
    font-size: clamp(1rem, 3vw, 1.4rem);
    margin: 20px auto;
    font-weight: bold;
    cursor: pointer;
    border: none;
    border-radius: 50px;
    background: linear-gradient(45deg, #ff6b6b, #feca57);
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    position: relative;
    font-family: 'Beaufort for LOL', Arial, sans-serif;
}
#endGame {
    display: block;
    margin: 1em auto; /* Ajout d'une marge en haut et en bas */
    padding: 0.5em 1.5em;
    font-size: 1.5em;
    cursor: pointer;
    border: none;
    border-radius: 1.5em;
    background-color: #4CAF50;
    color: white;
    transition: background-color 0.3s, transform 0.3s;
    position: relative; /* Ajout de cette ligne */
    z-index: 1001; /* Ajout de cette ligne pour s'assurer qu'il est au-dessus du swiper */
}
.start-button:hover, .restart-button:hover, #endGame:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.start-button:active, .restart-button:active, #endGame:active {
    transform: translateY(1px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.start-button::before, .restart-button::before, #endGame::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 23%);
    transform: scale(0);
    transition: transform 0.5s;
}

.start-button:hover::before, .restart-button:hover::before, #endGame:hover::before {
    transform: scale(1);
}

#smashCount {
    font-size: clamp(1.2rem, 4vw, 1.5rem);
    font-weight: bold;
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    margin-top: 3em;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative; /* Ajout de cette ligne */
    z-index: 1001; /* Ajout de cette ligne pour s'assurer qu'il est au-dessus du swiper */
}
.return-button {
    position: fixed;
    top: 20px;
    left: 20px;
    padding: 10px 20px;
    background-color: #f2d47e;
    color: #000;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    z-index: 10002;
}

.return-button:hover {
    background-color: #e0c9a6;
}
@media screen and (max-width: 768px) {
    .swiper-container {
        width: 80vw; /* Réduisez de 95vw à 80vw */
        height: 60vh; /* Réduisez de 70vh à 60vh */
    }

    .swiper-slide {
        padding: 15px;
    }
}

@media screen and (max-height: 600px) and (orientation: landscape) {
    .swiper-container {
        width: 50vw; /* Réduisez de 60vw à 50vw */
        height: 70vh; /* Réduisez de 80vh à 70vh */
    }

    .character-image {
        max-height: 50%;
    }
}