:root {
    --bg-color: #f0f8ff;
    --primary-color: #4a90e2;
    --secondary-color: #f5a623;
    --correct-color: #7ed321;
    --incorrect-color: #d0021b;
    --text-color: #333;
    --card-bg: #ffffff;
    --font-family: 'Nunito', sans-serif;
}

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;
    text-align: center;
}

#app {
    width: 100%;
    max-width: 800px;
    background: var(--card-bg);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

header h1 {
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 20px;
}

#level-selection h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.level-btn {
    display: block;
    width: 80%;
    margin: 15px auto;
    padding: 20px;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    background-color: var(--primary-color);
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: transform 0.2s, background-color 0.2s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.level-btn:hover:not(:disabled) {
    transform: scale(1.05);
    background-color: #357abd;
}

.level-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

#game-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#back-btn {
    padding: 10px 15px;
    font-size: 1rem;
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.2s;
}

#back-btn:hover {
    background: #e09311;
}

#score {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

#question-area {
    background: #e3f2fd;
    border-radius: 15px;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 150px;
}

#question-area .letter {
    font-size: 8rem;
    font-weight: 700;
    color: var(--primary-color);
    cursor: pointer;
    transition: transform 0.2s;
}

#question-area .letter:hover {
    transform: scale(1.1);
}

#question-area .word-image {
    max-width: 150px;
    max-height: 150px;
}


#options-area {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 20px;
}

.option-card {
    background: var(--card-bg);
    border: 2px solid #ddd;
    border-radius: 15px;
    padding: 10px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    aspect-ratio: 1 / 1;
}

.option-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.option-card img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

#feedback-message {
    font-size: 1.5rem;
    font-weight: 700;
    min-height: 30px;
    margin-top: 10px;
}

.correct {
    color: var(--correct-color);
}

.incorrect {
    color: var(--incorrect-color);
}

.hidden {
    display: none !important;
}


/* Level 2 styles */
#drop-zone {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
    background: #e3f2fd;
    padding: 20px;
    border-radius: 15px;
    min-height: 100px;
}

.letter-box {
    width: 60px;
    height: 60px;
    border: 2px dashed #aaa;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.letter-tile {
    width: 60px;
    height: 60px;
    background: var(--secondary-color);
    color: white;
    font-size: 2.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 10px;
    cursor: grab;
    user-select: none;
}

.letter-tile:active {
    cursor: grabbing;
}

.drag-over {
    background-color: #cde7f8;
    border-style: solid;
}

.correct-word .letter-box {
    border-color: var(--correct-color);
}
.correct-word .letter-tile {
    background-color: var(--correct-color);
}

/* Level 3 styles */
.blend-option {
    background: var(--primary-color);
    color: white;
    font-size: 2.5rem;
    padding: 20px;
    border-radius: 15px;
    cursor: pointer;
    transition: transform 0.2s, background-color 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 700;
}

.blend-option:hover {
    transform: scale(1.05);
    background-color: #357abd;
}