body {
    margin: 0;
    min-height: 100vh;
    font-family: Arial, sans-serif;

    background:
        radial-gradient(
            circle at 20% 30%,
            rgba(37, 99, 235, 0.35),
            transparent 50%
        ),
        radial-gradient(
            circle at 80% 70%,
            rgba(249, 115, 22, 0.35),
            transparent 50%
        ),
        linear-gradient(
            135deg,
            #020617,
            #020617
        );

    color: white;
}

.menu{
    position:fixed;
    inset:0;
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;
    gap:40px;
    background:
        radial-gradient(
            circle at 20% 30%,
            rgba(37, 99, 235, 0.35),
            transparent 50%
        ),
        radial-gradient(
            circle at 80% 70%,
            rgba(249, 115, 22, 0.35),
            transparent 50%
        ),
        linear-gradient(
            135deg,
            #020617,
            #020617
        );
    z-index:100;
    transition:opacity .6s ease, transform .6s ease;
}

.menu.hidden{
    opacity:0;
    transform:scale(1.1);
    pointer-events:none;
}

.menu button{
    width:260px;
    padding:15px;
    background:#38bdf8;
    border:none;
    border-radius:10px;
    font-weight:bold;
    cursor:pointer;
}

.menu button:hover{
    background:#0ea5e9;
}

h1 {
    text-align: center;
}

.card {
    position: relative;
    z-index: 25;

    background: rgba(2, 6, 23, 0.75);
    border-radius: 22px;

    padding: 28px 26px;

    border: 2px solid rgba(56, 189, 248, 0.35);

    box-shadow:
        0 0 0 1px rgba(56, 189, 248, 0.15),
        0 20px 60px rgba(0, 0, 0, 0.6);

    backdrop-filter: blur(10px);
}



.subtitle {
    color: #38bdf8;
    text-transform: uppercase;
    text-align: center;
}

.teams-logos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  justify-items: center;
  margin: 20px 0;
}

.teams-logos img {
  width: 90px;
  height: 90px;
  background: #ffffff;
  padding: 8px;
  border-radius: 12px;
  object-fit: contain;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}


input {
    width: 100%;
    padding: 12px;
    margin-top: 10px;
    background: #020617;
    border: 1px solid #1e293b;
    color: white;
    border-radius: 8px;
}

button {
    width: 100%;
    padding: 12px;
    margin-top: 12px;
    background: #38bdf8;
    color: #020617;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
}

    button:hover {
        background: #0ea5e9;
    }

#message {
    margin-top: 15px;
    font-weight: bold;
}

/* ===== IMAGE GÉANTE DU JOUEUR (EN DEHORS DE LA CARTE) ===== */

.game-container {
  position: relative;
  display: flex;
  justify-content: center;
}


.team-name {
  width: 90px;
  height: 90px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: #ffffff;
  border-radius: 12px;
  margin: 4px;
  padding: 8px;

  color: #111;
  font-size: 16px;
  font-weight: 800;
  text-align: center;
  line-height: 1.1;

  position: relative;
  overflow: hidden;

  box-shadow: 0 0 6px rgba(0,0,0,0.2);
}

.team-name::before {
  content: "";
  position: absolute;
  inset: 0;

  background-image: url("images/rocket-league-logo.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 99%;

  opacity: 0.19; /* transparence stylée */
}

.team-name span,
.team-name {
  z-index: 1;
}

.controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
}

.controls input,
.controls button {
  width: 100%;
  box-sizing: border-box;
}

html, body {
  overflow-x: hidden;
  margin: 0;
  padding: 0;
}





/* ===== NOM DU JOUEUR ===== */

.player-name {
  position: fixed;
  right: 120px;
  bottom: 500px;

  font-size: 36px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 2px;

  color: white;
  text-shadow: 0 0 15px rgba(56, 189, 248, 0.6);

  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  z-index: 6;
}


/* ===== BOUTON JOUEUR SUIVANT (ZONE DROITE, NET) ===== */

#nextBtn {
  position: absolute;
  bottom: -90px; /* SOUS l'image */
  left: 50%;
  transform: translateX(-50%);

  width: 260px;
  padding: 14px 20px;

  background: linear-gradient(135deg, #38bdf8, #0ea5e9);
  color: #020617;

  border-radius: 14px;
  border: none;

  font-size: 16px;
  font-weight: 900;
  letter-spacing: 1px;

  cursor: pointer;

  box-shadow: 0 10px 30px rgba(56, 189, 248, 0.45);
  z-index: 30;

  transition: transform 0.25s ease, box-shadow 0.25s ease;

  z-index: 50;
  pointer-events: auto;
}

#nextBtn:hover {
  transform: translateX(-50%) translateY(-3px) scale(1.03);
}


/* ===== CONTENEUR IMAGE JOUEUR ===== */

.player-image-wrapper {
  position: fixed;
  right: 8vw;
  top: 50%;
  transform: translateY(-50%);

  width: 420px;
  height: 520px;          /* 🔥 TAILLE FIXE = PROBLÈMES RÉGLÉS */

  display: flex;
  align-items: center;
  justify-content: center;

  pointer-events: none;
  z-index: 20;
}

/* ===== IMAGE JOUEUR ===== */

#playerImgBig {
  max-width: 100%;
  max-height: 100%;

  object-fit: contain;   /* 🔥 NE DÉBORDE JAMAIS */
  object-position: center;

  opacity: 0;
  transform: scale(0.95);
  transition:
    opacity 0.4s ease,
    transform 0.6s cubic-bezier(.22,1,.36,1);
}

/* Visible */
#playerImgBig.show {
  opacity: 1;
  transform: scale(1);
}

/* Glow */
#playerImgBig.correct {
  box-shadow: 0 0 60px rgba(34, 197, 94, 0.6);
}

#playerImgBig.skip {
  box-shadow: 0 0 60px rgba(249, 115, 22, 0.6);
}

/* ===== OVERLAY FLOU ===== */

.player-overlay {
  position: fixed;
  inset: 0;

  background: rgba(2, 6, 23, 0.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;

  z-index: 15; /* sous image & bouton */
}

.player-overlay.show {
  opacity: 1;
  pointer-events: auto;
}
 
.info-card {
    transition: filter 0.3s ease, opacity 0.3s ease;
}

.answer {
    margin-top: 14px;
    font-size: 15px;
    font-weight: 700;
    color: #facc15;

    filter: none !important;
    opacity: 1 !important;
    z-index: 30;
    position: relative;
}

.guess-card {
  width: 360px;          /* largeur fixe */
  min-height: 520px;     /* hauteur minimale FIXE */
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.guess-card button {
  width: 100%;
  height: 44px;
}

.controls {
  margin-top: auto;
}

.country-flag {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
}

.country-flag img {
    width: 48px;
    height: 32px;
    border-radius: 6px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.4);
}

#backToMenuBtn {
    position: fixed;
    top: 20px;
    left: 20px;

    width: 120px;
    padding: 10px 14px;

    background: linear-gradient(135deg, #38bdf8, #0ea5e9);
    color: #020617;

    border: none;
    border-radius: 10px;

    font-weight: 800;
    cursor: pointer;

    z-index: 200;

    box-shadow: 0 8px 25px rgba(56,189,248,.4);

    transition: transform .2s ease, box-shadow .2s ease;
}

#backToMenuBtn:hover {
    transform: translateY(-2px);
}

/* ================= INFO CARD ================= */

.info-card {
    position: fixed;
    left: 6vw;
    top: 50%;
    transform: translateY(-50%);

    width: 360px;
    min-height: 420px;

    padding: 28px;

    background: rgba(2, 6, 23, 0.75);
    border-radius: 22px;

    border: 2px solid rgba(56, 189, 248, 0.35);

    box-shadow:
        0 0 0 1px rgba(56, 189, 248, 0.15),
        0 20px 60px rgba(0, 0, 0, 0.6);

    z-index: 20;
}

.info-card h2 {
    text-align: center;
    margin-bottom: 25px;
    color: #38bdf8;
    letter-spacing: 1px;
}

.info-section {
    margin-bottom: 25px;
}

.info-label {
    font-size: 13px;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 8px;
}

.info-nationality {
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-nationality img {
    width: 42px;
    height: 28px;
    border-radius: 6px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.4);
}

#infoAchievements {
    padding-left: 18px;
    color: #facc15;
    font-weight: 600;
}

#infoAchievements li {
    margin-bottom: 6px;
}

.timer-hud {
    position: fixed;
    top: 20px;
    right: 30px;

    display: flex;
    gap: 20px;

    font-size: 20px;
    font-weight: 800;

    background: rgba(2, 6, 23, 0.7);
    padding: 10px 16px;
    border-radius: 12px;

    border: 1px solid rgba(56, 189, 248, 0.3);

    box-shadow: 0 8px 25px rgba(0,0,0,0.4);

    z-index: 300;
}

#scoreDisplay {
    color: #22c55e;
}

#timerDisplay {
    color: #38bdf8;
}

.socials {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    gap: 12px;
    background: rgba(0, 0, 0, 0.4);
    padding: 10px 14px;
    border-radius: 30px;
    backdrop-filter: blur(10px);
    box-shadow: 0 0 15px rgba(0, 200, 255, 0.2);
    z-index: 9999;
}

.socials a {
    width: 40px;
    height: 40px;
    background: #FFD700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.socials img {
    width: 22px;
    height: 22px;
    z-index: 9999;
}

.socials a:hover {
    transform: scale(1.1);
    background: #fff;
    z-index: 9999;
}

.signature-container{
    position:fixed;
    bottom:20px;
    left:20px;
    z-index:999;
}

.signature{
    color:rgba(255,255,255,.7);
    font-style:italic;
    display:flex;
    align-items:center;
    gap:8px;
}

.info-btn{
    cursor:pointer;
    color:#ffd700;
    font-size:18px;

    transition:.3s;
}

.info-btn:hover{
    transform:scale(1.2) rotate(180deg);
}

.site-info{

    margin-top:10px;

    width:280px;

    max-height:0;

    overflow:hidden;

    padding:0;

    border-radius:12px;

    background:rgba(0,0,0,.55);

    backdrop-filter:blur(8px);

    color:rgba(255,255,255,.75);

    font-size:11px;

    line-height:1.5;

    transition:.4s;
}

.site-info.open{

    max-height:200px;

    padding:12px;
}

.end-screen{

    position:fixed;
    inset:0;

    display:none;
    justify-content:center;
    align-items:center;

    background:rgba(2,6,23,.85);
    backdrop-filter:blur(12px);

    z-index:500;
}

.end-card{

    width:500px;
    max-width:90%;

    padding:40px;

    text-align:center;

    background:rgba(2,6,23,.95);

    border:2px solid rgba(56,189,248,.35);

    border-radius:24px;

    box-shadow:
    0 0 0 1px rgba(56,189,248,.15),
    0 20px 60px rgba(0,0,0,.7);
}

.end-card h2{

    color:#38bdf8;
    margin-bottom:15px;
}

.end-score{

    margin-top:20px;

    font-size:30px;
    font-weight:900;

    color:#22c55e;
}

#finalTimeContainer{

    margin-top:15px;

    font-size:24px;

    color:#38bdf8;
}

.end-buttons{

    margin-top:30px;
    display:flex;
    gap:15px;
}

/* ================================= */
/* ========= MOBILE VERSION ======== */
/* ================================= */

@media (max-width: 768px) {

    h1{
        font-size:34px;
        margin-top: 80px;
        padding:0 60px;
    }

    /* MENU */

    .menu{
        gap:20px;
        padding:20px;
    }

    .menu button{
        width:100%;
        max-width:340px;
        padding:18px;
    }

    /* CONTENEUR GLOBAL */

    .game-container{
        display:flex;
        flex-direction:column;
        align-items:center;

        padding-top:80px;
        padding-bottom:250px;
        gap:20px;
    }

    /* CARD PRINCIPALE */

    .card{
        width:90%;
        max-width:420px;
        margin:0 auto;
    }

    .guess-card{
        width:auto;
        min-height:auto;
        padding:20px;
    }

    /* LOGOS */

    .teams-logos{
        grid-template-columns:repeat(3,1fr);
        gap:12px;
    }

    .teams-logos img,
    .team-name{
        width:80px;
        height:80px;
    }

    /* INFO CARD */

    .info-card{

    position:relative;

    left:auto;
    top:auto;

    transform:none;

    width:90%;
    max-width:420px;

    margin:25px auto 0 auto;

    min-height:auto;
}

    /* IMAGE JOUEUR */

    .player-image-wrapper{

        position:relative;

        right:auto;
        top:auto;

        transform:none;

        width:90%;
        height:auto;

        margin-top:30px;
    }

    #playerImgBig{

        width:95%;
        max-width:450x;

        margin:auto;
        display:block;
    }

    /* NOM JOUEUR */

    .player-name{

        position:fixed;

        left:50%;
        bottom:180px;

        transform:translateX(-50%);

        width:90%;

        text-align:center;

        font-size:34px;
    }

    /* BOUTON NEXT */

    #nextBtn{

        width:90%;
        max-width:300px;

        bottom:-70px;
    }

    /* MENU BTN */

    #backToMenuBtn{

        width:130px;
        height: 50px;
        top:5px;
        left:10px;
        font-size:17px;
    }

    /* SCORE */

    .timer-hud{

        top:20,5px;
        right:10px;

        font-size:16px;

        gap:12px;

        padding:8px 12px;
    }

    /* RESEAUX */

    .socials{

        left:50%;
        right:auto;

        transform:translateX(-50%);

        bottom:15px;

        gap:8px;

        padding:8px 12px;
    }

    .socials a{

        width:36px;
        height:36px;
    }

    .socials img{

        width:18px;
        height:18px;
    }

    /* SIGNATURE */

    .signature-container{

        left:50%;
        transform:translateX(-50%);

        bottom:80px;

        text-align:center;
    }

    .signature{

        justify-content:center;
    }

    .site-info{

        width:250px;
    }

    /* FIN DE PARTIE */

    .end-card{

        width:90%;

        padding:25px;
    }

    .end-buttons{

        flex-direction:column;
    }

    .game-active #mainTitle{
    display:none;
}
    
}