:root {
    --primary-color: #139edf;
    --secondary-color: #808688;
    --secondary2-color: #ffeaa7;

    --accent-color: #ff6b81;

    --background-start: #d6a7d0;
    --background-end: #6a6ad3;
    --background: #e3e3e6;

    --text-color: #585858;
    --text-color-btn: #ffffff;

    --card-bg-color: rgba(255, 255, 255, 1);

    --title-color: #139edf;

    --input-text-color: #00ffcc;

    --gray-color: #95a5a6;
    --gray-color-bordure: 1px solid #95a5a6;

    --error-background: #e84118;

    --player1-color: #e17055;
    --player2-color: #00cec9;
}


body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--background-start), var(--background-end));
    color: var(--text-color);
    display: flex;
    flex-direction: column;
}

/* container ---------------------------------------*/

.game-container {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;

}

.container {
    text-align: center;
    background-color: var(--card-bg-color);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    width: 90%;
    max-width: 800px;
}

/* titre  ---------------------------------------*/

h1 {
    font-size: 32px;
    margin-bottom: 20px;
    font-weight: 700;
    color: var(--title-color);
    letter-spacing: 1px;
    position: relative;
    display: block;
    padding: 5px 15px;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

h1::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    transform: skew(-5deg);
    z-index: -1;
    border-radius: 5px;
}


/* bouton ------------------------------------------------------*/
button,
select {
    font-size: 18px;
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    margin: 0px;
    background-color: var(--primary-color);
    color: var(--text-color-btn);
    transition: all 0.3s ease;
}

button:hover,
select:hover {
    background-color: var(--secondary-color);
}

select {
    appearance: none;
    padding-right: 30px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

.btn-custom {
    background-color: var(--primary-color);
    color: var(--text-color-btn);
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.btn-custom-secondary {
    background-color: var(--secondary-color);
    color: var(--text-color-btn);
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.btn-custom:hover {
    background-color: var(--secondary-color);
    transform: scale(1.05);
}

/* card  ------------------------------------------------------*/

.game-card {
    background-color: var(--card-bg-color);
    border: var(--gray-color-bordure);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.game-card h2 {
    font-size: 24px;
    color: var(--title-color);
    font-weight: 700;
    margin-bottom: 15px;
    letter-spacing: 1px;
    position: relative;
    display: inline-block;
    padding: 5px 15px;
    word-wrap: break-word;
}

.game-card h2::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    transform: skew(-5deg);
    z-index: -1;
    border-radius: 5px;
}


/* shearch -------------------------------------------- */ 

.search-container {
    margin-bottom: 20px;
}

#searchInput {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 0.2);
    color: var(--text-color);
    font-size: 16px;
}

#searchInput::placeholder {
    color: rgba(255, 255, 255, 0.7);
}


/* shearch -------------------------------------------- */ 



#instruction {
    color: var(--text-color);
    font-size: 24px;
    margin: 20px 0;
    font-weight: 300;
}

#question {
    font-size: 24px;
    margin-bottom: 20px;
    color: var(--text-color);
    font-weight: bold;
    background-color: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 10px;
}

#reset {
    margin-left: auto;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    border: none;
    cursor: pointer;
    font-size: 20px;
    padding: 5px 10px;
    border-radius: 5px;
}

#submit {
    width: 100px;
    background-color: var(--secondary-color);
    color: var(--text-color);
    border: none;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
}

/* game info ------------------------------------------------------- */
.game-info-container {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    background-color: var(--background);
    padding: 10px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.game-info {
    display: flex;
    align-items: center;
    font-size: 20px;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 5px 10px;
    border-radius: 5px;
    margin-right: 15px;
}

.game-info i {
    margin-right: 5px;
}

.game-info-value {
    font-weight: bold;
    color: var(--primary-color);
}


/* jauge cohérence cardiaque  -------------------------------------------- */ 
.gauge-container {
    position: relative;
    width: 250px;
    height: 250px;
    margin: 30px auto;
}

.gauge {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: var(--primary-color);
    overflow: hidden;
    position: absolute;
}

.fill {
    position: absolute;
    bottom: 0;
    width: 100%;
    background-color: var(--secondary-color);
    transition: height 0.1s linear;
}

.timer-display {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 36px;
    font-weight: bold;
    color: var(--text-color-btn);

}



/* Media queries pour la responsivité */
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }

    .game-card h2 {
        font-size: 20px;
    }

    h1 {
        font-size: 28px;
    }

}

@media (max-width: 576px) {
    .container {
        padding: 15px;
    }

    .game-card h2 {
        font-size: 18px;
    }

    h1 {
        font-size: 24px;
    }


}