:root {
    --primary-color: #FFB3BA; /* Pastel Pink */
    --secondary-color: #BAFFC9; /* Pastel Green */
    --accent-color: #BAE1FF; /* Pastel Blue */
    --text-color: #333;
    --background-color: #FFFFF0; /* Ivory */
    --card-bg: #FFFFFF;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --font-family: 'Nunito', 'Noto Sans KR', sans-serif;
    --border-radius: 20px;
}

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

.container {
    width: 100%;
    max-width: 480px;
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
    color: #FF6B6B;
    margin-bottom: 0.2rem;
}

header p {
    font-size: 1.1rem;
    color: #777;
    margin-top: 0;
}

.ad-container {
    margin: 20px 0;
    border: 2px dashed #ddd;
    border-radius: 10px;
    background-color: #f9f9f9;
    padding: 10px;
}

.ad-placeholder {
    height: 90px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #bbb;
    font-size: 0.9rem;
}

.card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow);
    margin: 20px 0;
    transition: transform 0.2s ease;
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
}

.screen {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.screen.active {
    display: block;
    opacity: 1;
}

.screen.hidden {
    display: none;
}

.icon-display {
    font-size: 5rem;
    margin-bottom: 5px;
    animation: bounce 2s infinite;
    background-color: #fff5f5;
    width: 120px;
    height: 120px;
    line-height: 120px;
    border-radius: 50%;
    margin: 0 auto 15px auto;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.05);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-10px);}
    60% {transform: translateY(-5px);}
}

.example {
    font-style: italic;
    color: #666;
    margin-bottom: 20px;
    background-color: #f0f8ff;
    padding: 10px;
    border-radius: 10px;
    border-left: 5px solid var(--accent-color);
}

.hint-container {
    margin-bottom: 20px;
}

.hint-btn {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    font-size: 0.9rem;
    text-decoration: underline;
}

.hint-btn:hover {
    color: var(--primary-color);
}

#hint-text {
    margin-top: 5px;
    font-weight: bold;
    color: #555;
    font-size: 0.9rem;
}

label {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
}

input[type="number"], input[type="text"] {
    width: 100%;
    padding: 15px;
    margin-bottom: 20px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 1rem;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.3s;
}

input:focus {
    border-color: var(--primary-color);
}

.primary-btn, .secondary-btn {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.1s;
    margin-top: 10px;
}

.primary-btn {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px #E6A1A8;
}

.primary-btn:active {
    transform: translateY(4px);
    box-shadow: 0 0 #E6A1A8;
}

.secondary-btn {
    background-color: var(--accent-color);
    color: #444;
    box-shadow: 0 4px #9CCCEE;
}

.secondary-btn:active {
    transform: translateY(4px);
    box-shadow: 0 0 #9CCCEE;
}

.progress-header {
    text-align: right;
    margin-bottom: 5px;
    font-size: 0.9rem;
    color: #777;
    font-weight: bold;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background-color: #eee;
    border-radius: 6px;
    margin-bottom: 20px;
    overflow: hidden;
}

#progress-fill {
    height: 100%;
    width: 0%;
    background-color: var(--secondary-color);
    transition: width 0.3s ease;
    border-radius: 6px;
}

.feedback {
    font-weight: bold;
    margin: 15px 0;
    padding: 10px;
    border-radius: 10px;
}

.feedback.correct {
    background-color: var(--secondary-color);
    color: #006400;
}

.feedback.wrong {
    background-color: #FFB3BA;
    color: #8B0000;
}

#wrong-list {
    text-align: left;
    list-style: none;
    padding: 0;
}

#wrong-list li {
    padding: 10px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
}

#wrong-list li:last-child {
    border-bottom: none;
}

footer {
    margin-top: 40px;
    color: #999;
    font-size: 0.8rem;
}

/* Hidden Utility */
.hidden {
    display: none !important;
}
