:root {
    --primary: #4a90e2;
    --success: #48bb78;
    --error: #f56565;
    --bg: #f0f4f8;
    --text: #2d3748;
    --white: #ffffff;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Fredoka', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    height: 100vh;
    height: 100dvh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

#app {
    width: 100%;
    max-width: 500px;
    height: 100%;
    position: relative;
    background: var(--white);
    display: flex;
    flex-direction: column;
}

.screen {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.hidden {
    display: none !important;
}

/* Progress Bar */
#progress-container {
    width: 100%;
    height: 10px;
    background: #e2e8f0;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10;
}

#progress-bar {
    height: 100%;
    width: 0%;
    background: var(--primary);
    transition: width 0.3s ease;
}

/* Start Screen */
h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: var(--primary);
}

.input-group {
    margin-top: 30px;
    width: 100%;
}

input[type="text"] {
    width: 80%;
    padding: 15px;
    border: 2px solid #cbd5e0;
    border-radius: 12px;
    font-size: 1.1rem;
    margin-bottom: 15px;
    outline: none;
    font-family: inherit;
}

input[type="text"]:focus {
    border-color: var(--primary);
}

button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.1s;
    width: 80%;
    font-family: inherit;
}

button:active {
    transform: scale(0.95);
}

/* Game Screen */
.quiz-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding-top: 20px;
}

#image-frame {
    width: 100%;
    flex: 1;
    min-height: 200px;
    max-height: 350px;
    background: #edf2f7;
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    margin-bottom: 15px;
}

#idiom-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.options-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 15px;
}

.option-btn {
    background: #ffffff;
    color: var(--text);
    text-align: center;
    padding: 12px 15px;
    border-radius: 12px;
    font-size: 1rem;
    border: 2px solid #e2e8f0;
    width: 100%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.2s;
}

.option-btn:hover {
    background: #f7fafc;
    border-color: var(--primary);
}

.option-btn:hover {
    background: #e2e8f0;
}

.option-btn.correct {
    background: var(--success) !important;
    color: white;
}

.option-btn.wrong {
    background: var(--error) !important;
    color: white;
}

.feedback-msg {
    height: 24px;
    font-weight: 600;
    font-size: 1.1rem;
}

/* Result Screen */
.trophy-img {
    width: 120px;
    margin-bottom: 20px;
    animation: bounce 2s infinite ease-in-out;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.score-display {
    font-size: 3rem;
    font-weight: 600;
    margin: 10px 0;
    color: var(--primary);
}

#personalized-feedback {
    margin-bottom: 30px;
    font-size: 1.2rem;
    line-height: 1.4;
}

#restart-btn {
    background: #718096;
}