@import url('https://fonts.googleapis.com/css2?family=M+PLUS+Rounded+1c:wght@400;700;800&display=swap');

:root {
    --bg-color: #f4f4f4;
    --main-color: #c83c32;
    --accent-color: #d9534f;
    --text-color: #333333;
    --white-color: #ffffff;
    --gray-color: #cccccc;
    --light-gray-color: #f9f9f9;
    --correct-color: #c83c32;
    --incorrect-color: #555555;
    --font-family: 'M PLUS Rounded 1c', sans-serif;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    --border-radius: 8px;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    box-sizing: border-box;
    user-select: none;
}

#game-container {
    width: 100%;
    max-width: 800px;
    background: var(--white-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 30px 40px;
    overflow: hidden;
    position: relative;
}

.screen {
    display: none;
    flex-direction: column;
    align-items: center;
    text-align: center;
    animation: fadeIn 0.5s ease-in-out;
}

.screen.active {
    display: flex;
}

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

h1 {
    font-size: 2.5rem;
    color: var(--main-color);
    margin-bottom: 10px;
    font-weight: 800;
}

h2 {
    font-size: 1.8rem;
    color: var(--text-color);
    margin-bottom: 20px;
    font-weight: 700;
}

p {
    font-size: 1.1rem;
    line-height: 1.7;
    max-width: 600px;
}

.btn {
    background-color: var(--main-color);
    color: var(--white-color);
    border: none;
    padding: 15px 40px;
    font-size: 1.2rem;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    margin-top: 20px;
}

.btn:hover {
    background-color: #a5312b;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn:disabled {
    background: var(--gray-color);
    cursor: not-allowed;
    transform: translateY(0);
    box-shadow: none;
}

#name-entry-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
    width: 100%;
    max-width: 400px;
}

#name-input {
    width: 100%;
    padding: 15px;
    font-size: 1.2rem;
    text-align: center;
    border: 2px solid var(--gray-color);
    border-radius: var(--border-radius);
    box-sizing: border-box;
}

#name-input:focus {
    border-color: var(--main-color);
    outline: none;
}

#quiz-progress {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 15px;
}

#question {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 30px;
    min-height: 80px;
}

#options-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    width: 100%;
}

.option-btn {
    background-color: var(--white-color);
    border: 2px solid var(--gray-color);
    color: var(--text-color);
    padding: 20px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.2s ease;
}

.option-btn:hover:not(:disabled) {
    border-color: var(--main-color);
    color: var(--main-color);
    transform: scale(1.03);
}

.option-btn:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.option-btn.correct {
    background-color: var(--correct-color);
    border-color: var(--correct-color);
    color: white;
}

.option-btn.incorrect {
    background-color: var(--incorrect-color);
    border-color: var(--incorrect-color);
    color: white;
}

#answer-feedback {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.5);
    z-index: 100;
    display: none;
}

.feedback-stamp {
    max-width: 80%;
    max-height: 80%;
    width: 300px;
    animation: pop-in 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

@keyframes pop-in {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

#answer-screen {
    animation: none;
}

#commentary {
    background-color: var(--light-gray-color);
    border-left: 5px solid var(--main-color);
    padding: 20px;
    margin: 10px 0 20px 0;
    text-align: left;
    border-radius: 0 8px 8px 0;
}

#likability-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--main-color);
    margin-bottom: 10px;
}

#score-display {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 20px;
}

#likability-comment {
    background-color: var(--light-gray-color);
    border-radius: var(--border-radius);
    padding: 20px;
    font-size: 1.1rem;
    font-weight: bold;
    white-space: pre-wrap;
}

#player-name-display {
    color: var(--main-color);
    font-weight: 800;
}

@media (max-width: 600px) {
    body {
        padding: 10px;
    }
    #game-container {
        padding: 20px;
    }
    h1 {
        font-size: 2rem;
    }
    h2 {
        font-size: 1.5rem;
    }
    #options-container {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .btn {
        padding: 12px 24px;
        font-size: 1rem;
    }
    .option-btn {
        padding: 15px;
    }
}