@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;700&display=swap');

body {
    font-family: 'Noto Sans KR', sans-serif;
    background-color: #f0f2f5;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
}

.container {
    background-color: #ffffff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 700px;
    text-align: center;
}

h1 {
    color: #4a4a4a;
    font-size: 2em;
    margin-bottom: 10px;
}

p {
    color: #666;
    margin-bottom: 30px;
    line-height: 1.6;
}

.controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
}

#grade-select {
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-size: 1em;
}

#generate-btn {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

#generate-btn:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}

.hidden {
    display: none;
}

#loading {
    margin: 30px 0;
    text-align: center;
}

.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border-left-color: #007bff;
    margin: 0 auto 10px;
    animation: spin 1s ease infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

#results-container, #error-container {
    margin-top: 30px;
    padding: 20px;
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    text-align: left;
}

h2 {
    margin-top: 0;
    color: #333;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

#results {
    white-space: pre-wrap; /* Allows text to wrap */
    line-height: 1.8;
    font-size: 1.1em;
    color: #555;
}

#error-container {
    background-color: #fff0f0;
    border-color: #ffbaba;
}

#error-message {
    color: #d8000c;
    margin: 0;
}
