body {
    background-color: #f8f9fa;
    color: #333;
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
}

.container {
    text-align: center;
    padding: 30px;
    border-radius: 24px;
    background-color: #ffffff;
    box-shadow: 0 8px 32px rgba(0,0,0,0.05);
    width: 90%;
    max-width: 480px;
}

h1 {
    font-size: 1.8em;
    margin-bottom: 25px;
    color: #2c3e50;
}

/* 언어 선택 화면 */
.language-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.lang-btn {
    padding: 15px;
    font-size: 1.1em;
    background-color: #e9ecef;
    color: #495057;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
}

.lang-btn:hover {
    background-color: #28a745;
    color: white;
}

/* 레벨 선택 화면 */
.mode-buttons,
.level-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.mode-btn,
.level-btn {
    padding: 15px;
    font-size: 1.1em;
    background-color: #f1f3f5;
    color: #495057;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
}

.mode-btn:hover,
.level-btn:hover {
    background-color: #007bff;
    color: white;
}

.grammar-title {
    font-size: 1.2em;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 16px;
}

.grammar-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: left;
    max-height: 360px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.grammar-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 14px;
}

.grammar-card h3 {
    margin: 0 0 8px;
    font-size: 1em;
    color: #007bff;
}

.grammar-card p {
    margin: 0;
    line-height: 1.5;
    color: #495057;
    font-size: 0.95em;
}

/* 광고 배너 */
.ad-banner {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.ad-banner a {
    text-decoration: none;
}

.ad-content {
    background: linear-gradient(135deg, #6e8efb, #a777e3);
    padding: 15px;
    border-radius: 12px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: transform 0.2s;
}

.ad-content:hover {
    transform: translateY(-2px);
}

.ad-label {
    background-color: rgba(255,255,255,0.2);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7em;
    font-weight: bold;
    text-transform: uppercase;
}

.ad-text {
    font-weight: 600;
    font-size: 0.95em;
}

/* 시험 화면 */
.word-display {
    font-size: 2.8em;
    font-weight: 700;
    margin-bottom: 20px;
    color: #007bff;
}

.gender-selection {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.gender-btn {
    padding: 8px 20px;
    background-color: #e9ecef;
    color: #495057;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

.gender-btn.selected {
    background-color: #007bff;
    color: white;
    border-color: #0056b3;
}

input[type="text"] {
    width: calc(100% - 44px);
    padding: 12px 20px;
    font-size: 1.1em;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    margin-bottom: 15px;
    outline: none;
}

#submit-btn {
    width: 100%;
    background-color: #007bff;
    padding: 15px;
    font-size: 1.1em;
}

.feedback {
    min-height: 1.5em;
    margin: 15px 0;
    font-weight: 600;
}

.correct { color: #28a745; }
.incorrect { color: #dc3545; }

.score-board {
    margin: 20px 0;
    font-size: 1.1em;
    color: #666;
}

.nav-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.secondary-btn {
    background-color: #6c757d;
    font-size: 0.9em;
    padding: 8px 16px;
    border-radius: 8px;
}

.secondary-btn:hover {
    background-color: #5a6268;
}

button {
    color: white;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
    border-radius: 12px;
}
