/* Styles pour le jeu 1 vs 100 - Étape 1 */

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

@font-face {
    font-family: 'dessin';
    src: url('./fonts/QuirkySunflowerRegular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #ff6d1d 0%, #db7c0e 100%);
    height: 100dvh;
    color: #333;
}

.logo-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100%;
    background: url("./img/logo-k3.png") repeat;
    background-size: 50px 50px;
    animation: scroll-bg 40s linear infinite;
    z-index: -1; /* reste en fond */
    opacity: 0.1;
  }
  
  @keyframes scroll-bg {
    from {
      background-position: 0 0;
    }
    to {
      background-position: -1000px -1000px;
    }
  }

  
.container {
    max-width: 500px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    position: relative;
}

header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
    display: flex;
    justify-content: center;
    width: 100%;
    left: 0;
}

header img {
    width: 100px;
    height: 100px;
    object-fit: cover;

}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
}

main {
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

@media (min-height: 700px) {
    header{
        position:absolute;
    }
    main {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

.screen {
    display: none;
    width: 100%;
    max-width: 400px;
}

.screen.active {
    display: block;
}

.form-container, .status-container {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.form-container h2, .status-container h2 {
    text-align: center;
    margin-bottom: 25px;
    color: #333;
    font-size: 1.8rem;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #ff6d1d;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 0.85rem;
}

button {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #ff6d1d 0%, #db7c0e 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.player-info {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 25px;
}

.player-info p {
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.player-info p:last-child {
    margin-bottom: 0;
}

.waiting-message {
    text-align: center;
}

.waiting-message p {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 20px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e1e5e9;
    border-top: 4px solid #ff6d1d;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error-message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #ff4757;
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(255, 71, 87, 0.3);
    z-index: 1000;
    max-width: 90%;
    text-align: center;
}

.error-message p {
    margin-bottom: 10px;
}

.error-message button {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    padding: 8px 15px;
    font-size: 0.9rem;
    width: auto;
    margin: 0 auto;
}

.error-message button:hover {
    background: rgba(255,255,255,0.3);
    transform: none;
    box-shadow: none;
}

.answer-button{
    color: #333;
}

/* Responsive */
@media (max-width: 600px) {
    .container {
        padding: 15px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .form-container, .status-container {
        padding: 20px;
    }
}

/* Animations */
.screen {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.refresh-button {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 15px;
    transition: background-color 0.3s;
}

.refresh-button:hover {
    background-color: #5a6268;
}

/* Styles pour les réponses */
.answer-btn.selected {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

.answer-btn.correct {
    background-color: #28a745;
    color: white;
    border-color: #28a745;
}

.answer-btn.wrong {
    background-color: #dc3545;
    color: white;
    border-color: #dc3545;
}

/* Styles pour les cœurs */
.hearts-container {
    display: flex;
    gap: 5px;
    justify-content: center;
    align-items: center;
}

.heart {
    width: 20px;
    height: 20px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.heart-full {
    background-image: url('./img/coeur-plein.png');
}

.heart-empty {
    background-image: url('./img/coeur-vide.png');
}

.hearts-container .heart {
    width: 25px;
    height: 25px;
}

