:root {
    --mainFont: 'Myriad Pro Bold Italic', sans-serif;
    --dummiesFont: 'Dummies', sans-serif;
    --dummiesYellow: #FFD700;
    --mainColor: #333;
    --accentColor: #FF4500;
    --correctColor: #4CAF50;
    --incorrectColor: #f44336;
    --bookBackground: #f5f5f5;
}

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

body {
    font-family: var(--mainFont);
    background-color: var(--mainColor);
    color: var(--accentColor);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

#maincontainer {
    max-width: 800px;
    width: 100%;
    padding: 2rem;
    text-align: center;
}

#gameHeader {
    margin-bottom: 2rem;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-family: var(--mainFont);
    color: var(--dummiesYellow);
}

#scoreBoard {
    display: flex;
    justify-content: center;
    gap: 2rem;
    font-size: 1.2rem;
    color: white;
}

#booksContainer {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin: 2rem 0;
}

.book {
    width: 200px;
    height: 300px;
    perspective: 1000px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.book:hover {
    transform: scale(1.05);
    animation: shine 1s  linear;
}

@keyframes shine {
    0% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(1.2);
    }
    100% {
        filter: brightness(1);
    }
    
}

.bookCover {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--dummiesYellow) 0%, #FFB347 100%);
    border: 3px solid #333;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.5rem 1rem;
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
    position: relative;
}

.bookTitle {
    font-size: 1.2rem;
    font-weight: bold;
    color: #333;
    text-align: center;
    line-height: 1.2;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    word-wrap: break-word;
    transform: rotate(-2deg);
}

.dummiesText {
    font-size: 1.5rem;
    font-family: var(--dummiesFont);
    color: #333;
    text-align: center;
    margin-top: auto;
}

.book.correct {
    animation: correctPulse 0.6s ease;
}

.book.incorrect {
    animation: incorrectShake 0.6s ease;
}

.book.disabled {
    pointer-events: none;
    opacity: 0.7;
}

@keyframes correctPulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 var(--correctColor); }
    50% { transform: scale(1.1); box-shadow: 0 0 0 20px rgba(76, 175, 80, 0.3); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(76, 175, 80, 0); }
}

@keyframes incorrectShake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}
#feedback {
    position: fixed;
    left: 50%;
    bottom: 2rem;
    transform: translateX(-50%);
    min-width: 250px;
    max-width: 90vw;
    margin: 0;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1.3rem;
    font-weight: bold;
    z-index: 1000;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

#feedback.correct {
    background-color: var(--correctColor);
    color: white;
}

#feedback.incorrect {
    background-color: var(--incorrectColor);
    color: white;
}

.hidden {
    display: none;
}

#nextRound {
    background-color: var(--dummiesYellow);
    color: #333;
    border: none;
    padding: 0.8rem 2rem;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 25px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 1rem;
}

#nextRound:hover {
    background-color: #FFB347;
}

#instructions {
    margin-top: 2rem;
    font-size: 1.1rem;
    color: white;
    font-style: italic;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}
@keyframes big {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); } 
}

@font-face {
    font-family: 'Dummies';
    src: url('../fonts/dummies.ttf') format('truetype');
}

@font-face {
    font-family: 'Myriad Pro Bold Italic';
    src: url('../fonts/myriadprobolditalic.ttf') format('truetype');
}

#gameOverOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    animation: fadeIn 0.5s ease-in-out;
}

#gameOverContent {
    background-color: var(--mainColor);
    border: 3px solid var(--dummiesYellow);
    border-radius: 15px;
    padding: 3rem 2rem;
    text-align: center;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

#gameOverContent h2 {
    color: var(--dummiesYellow);
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-family: var(--dummiesFont);
}

#finalScore {
    font-size: 1.5rem;
    color: var(--accentColor);
    margin: 1rem 0;
    font-weight: bold;
    transform: scale(1);
    transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#finalScore.score-animate {
    transform: scale(3);
    color: var(--dummiesYellow);
    text-shadow: 0 0 20px var(--dummiesYellow);
}

#gameOverContent p {
    color: white;
    font-size: 1.1rem;
    margin: 1rem 0;
    line-height: 1.4;
}

.real-book-image {
    width: 200px;
    height: 300px;
    object-fit: cover;
    object-position: center;
    border-radius: 8px;
    margin: 1.5rem auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
    display: block;
}

.real-book-image:hover {
    transform: scale(1.05);
}

#restartButton {
    background-color: var(--dummiesYellow);
    color: #333;
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1.5rem;
    font-family: var(--mainFont);
}

#restartButton:hover {
    background-color: #FFB347;
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@media (max-width: 600px) {
    #booksContainer {
        flex-direction: column;
        align-items: center;
        gap: 2rem;
    }
    
    .book {
        width: 180px;
        height: 270px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    #scoreBoard {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    #gameOverContent {
        padding: 2rem 1.5rem;
    }
    
    #gameOverContent h2 {
        font-size: 2rem;
    }
    
    #finalScore.score-animate {
        transform: scale(2.5);
    }
}