/* KC Learning Plugin - Public Styles */

/* Font Import */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@100..900&display=swap');

/* Box sizing reset */
* {
    box-sizing: border-box;
}

/* Korean translation styles */
.kc-korean-sub {
    display: block;
    font-size: 0.75em;
    color: #8b6f66;
    margin-top: 2px;
    font-weight: normal;
}

/* Full-screen body adjustments */
body.kc-learning-fullscreen .kc-learning-wrapper {
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(255, 192, 203, 0.15);
    max-width: 100%;
    overflow-x: hidden;
}

/* Main wrapper */
.kc-learning-wrapper {
    margin: 2rem 0;
    font-family: "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    max-width: 100%;
    overflow-x: hidden;
}

/* Current Learning Card */
.kc-current-learning-card {
    background: linear-gradient(135deg, #fff3b8 0%, #ffccd5 100%);
    border-radius: 16px;
    padding: 0;
    margin-bottom: 3rem;
    box-shadow: 0 12px 40px rgba(255, 192, 203, 0.25);
    overflow: hidden;
    font-family: "Noto Sans SC", sans-serif;
}

.kc-card-header {
    padding: 1.5rem 2rem 0 2rem;
    text-align: center;
}

.kc-card-header h3 {
    margin: 0;
    color: #5a3e36;
    font-size: 1.5rem;
    font-weight: 700;
    font-family: "Noto Sans SC", sans-serif;
}

.kc-card-content {
    display: flex;
    align-items: stretch;
    gap: 0;
    padding: 1.5rem 2rem 2rem 2rem;
}

.kc-card-image {
    flex: 0 0 200px;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 4px 16px rgba(255, 192, 203, 0.2);
    height:200px;
}

.kc-card-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.kc-level-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: linear-gradient(135deg, #ff7096 0%, #ffb3c1 100%);
    color: #fff;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    font-family: "Noto Sans SC", sans-serif;
}

/* Special styling for Lv.0 badge */
.kc-level-badge.lv-0 {
    background: linear-gradient(135deg, #4fc3f7 0%, #81c784 100%);
}

.kc-card-info {
    flex: 1;
    padding: 0 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.kc-lesson-title {
    font-size: 1.5rem;
    color: #5a3e36;
    margin: 0 0 0.5rem 0;
    font-weight: 700;
    line-height: 1.3;
    font-family: "Noto Sans SC", sans-serif;
}

.kc-lesson-translation {
    font-size: 1rem;
    color: #6b4740;
    margin: 0 0 1rem 0;
    font-style: italic;
    font-family: "Noto Sans SC", sans-serif;
}

.kc-lesson-meta {
    margin: 0 0 1rem 0;
}

.kc-meta-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.kc-meta-item:last-child {
    margin-bottom: 0;
}

.kc-meta-label {
    color: #8b6f66;
    font-weight: 600;
    margin-right: 0.5rem;
    min-width: 80px;
    font-family: "Noto Sans SC", sans-serif;
}

.kc-meta-value {
    color: #5a3e36;
    font-family: "Noto Sans SC", sans-serif;
}

.kc-difficulty-easy {
    color: #4caf50;
}

.kc-difficulty-medium {
    color: #ff9800;
}

.kc-difficulty-hard {
    color: #f44336;
}

.kc-lesson-excerpt {
    font-size: 0.9rem;
    color: #6b4740;
    line-height: 1.5;
    margin: 0;
    font-family: "Noto Sans SC", sans-serif;
}

.kc-card-action {
    flex: 0 0 160px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding-left: 1rem;
}

.kc-learn-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
    background: linear-gradient(135deg, #fff 0%, #fffefb 100%);
    border: 2px solid #ffb3c1;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    min-height: 120px;
    width: 100%;
    font-family: "Noto Sans SC", sans-serif;
    position: relative;
    overflow: hidden;
}

.kc-learn-button:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(255, 179, 193, 0.4);
    border-color: #ff7096;
}

.kc-learn-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 243, 184, 0.3), transparent);
    transition: left 0.5s ease;
}

.kc-learn-button:hover::before {
    left: 100%;
}

.kc-button-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
}

.kc-button-text {
    font-size: 1rem;
    font-weight: 600;
    color: #5a3e36;
    text-align: center;
    line-height: 1.3;
    font-family: "Noto Sans SC", sans-serif;
}

.kc-button-arrow {
    font-size: 1.2rem;
    color: #ff7096;
    margin-top: 0.5rem;
    transition: transform 0.3s ease;
}

.kc-learn-button:hover .kc-button-arrow {
    transform: translateX(4px);
}

.kc-progress-info {
    text-align: center;
    font-size: 0.85rem;
    color: #6b4740;
    font-family: "Noto Sans SC", sans-serif;
}

/* Template badge */
.kc-template-badge {
    background: linear-gradient(135deg, #4fc3f7 0%, #81c784 100%);
    color: #fff;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Template indicator in lesson list */
.kc-template-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #e8f4f8 0%, #f1f8e9 100%);
    color: #4caf50;
    padding: 2px 8px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 0.5rem;
    vertical-align: middle;
}

/* Template Learning Styles */
.kc-template-learning-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(255, 192, 203, 0.15);
    font-family: "Noto Sans SC", sans-serif;
}

.kc-template-header {
    margin-bottom: 2rem;
    border-bottom: 2px solid #ffe9ec;
    padding-bottom: 1.5rem;
}

.kc-template-breadcrumb {
    margin-bottom: 1rem;
}

.kc-template-breadcrumb a {
    color: #ff7096;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.kc-template-breadcrumb a:hover {
    color: #ff5277;
}

.kc-template-title {
    font-size: 2rem;
    color: #5a3e36;
    margin: 0 0 0.5rem 0;
    font-weight: 700;
    line-height: 1.3;
}

.kc-template-subtitle {
    font-size: 1.1rem;
    color: #8b6f66;
    margin: 0;
    font-style: italic;
}

.kc-template-container {
    min-height: 400px;
    margin-bottom: 2rem;
    position: relative;
}

.kc-template-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

.kc-loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #ffe9ec;
    border-top-color: #ff7096;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Phoneme Template Styles */
.kc-phoneme-template {
    text-align: center;
    padding: 2rem 0;
}

.kc-phoneme-main {
    margin-bottom: 2rem;
}

.kc-phoneme-char {
    font-size: 6rem;
    margin: 0 0 1rem 0;
    color: #ff7096;
    font-weight: 700;
    line-height: 1;
    text-shadow: 2px 2px 4px rgba(255, 112, 150, 0.2);
}

.kc-phoneme-sound {
    font-size: 2rem;
    color: #5a3e36;
    margin: 0;
    font-weight: 500;
}

.kc-phoneme-image {
    margin: 2rem 0;
}

.kc-phoneme-image img {
    max-width: 100%;
    height: auto;
    max-height: 300px;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.kc-phoneme-description {
    max-width: 700px;
    margin: 2rem auto 0;
    background: #fff9e6;
    border: 2px solid #ffccd5;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: left;
}

.kc-phoneme-description p {
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.8;
    color: #5a3e36;
}

/* Template Navigation */
.kc-template-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    border-top: 2px solid #ffe9ec;
}

.kc-template-nav-btn {
    background: linear-gradient(135deg, #fff3b8 0%, #ffb3c1 100%);
    color: #5a3e36;
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-family: "Noto Sans SC", sans-serif;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.kc-template-nav-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 179, 193, 0.4);
}

.kc-template-nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.kc-template-progress {
    font-size: 1.1rem;
    color: #5a3e36;
    font-weight: 600;
}

.kc-template-current,
.kc-template-total {
    color: #ff7096;
}

/* Template Completion */
.kc-template-completion {
    text-align: center;
    padding: 3rem 2rem;
}

.kc-completion-icon {
    font-size: 5rem;
    margin-bottom: 1rem;
    animation: bounce 2s infinite;
}

.kc-template-completion h2 {
    font-size: 2rem;
    color: #5a3e36;
    margin: 0 0 1rem 0;
}

.kc-template-completion p {
    font-size: 1.2rem;
    color: #6b4740;
    margin: 0 0 2rem 0;
}

.kc-completion-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.kc-btn {
    padding: 0.75rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
}

.kc-btn-primary {
    background: linear-gradient(135deg, #fff3b8 0%, #ffb3c1 100%);
    color: #5a3e36;
}

.kc-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 179, 193, 0.4);
}

.kc-btn-secondary {
    background: #fff;
    color: #6b4740;
    border: 2px solid #ffe9ec;
}

.kc-btn-secondary:hover {
    border-color: #ffb3c1;
    background: #ffe9ec;
}

/* Completion Card */
.kc-completion-card {
    background: linear-gradient(135deg, #fff3b8 0%, #ffccd5 100%);
}

.kc-completion-card .kc-card-image {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #fff 0%, #fffefb 100%);
}

.kc-completion-icon {
    font-size: 4rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.kc-completion-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 1rem 0;
}

.kc-stat-item {
    text-align: center;
}

.kc-stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #ff7096;
    font-family: "Noto Sans SC", sans-serif;
}

.kc-stat-label {
    font-size: 0.85rem;
    color: #8b6f66;
    font-family: "Noto Sans SC", sans-serif;
}

.kc-review-button {
    background: linear-gradient(135deg, #ffe9ec 0%, #fff9e6 100%);
}

/* Progress summary (legacy - now hidden) */
.kc-progress-summary {
    background: linear-gradient(135deg, #fff3b8 0%, #ffccd5 100%);
    color: #5a3e36;
    border: none;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 3rem;
    text-align: center;
    box-shadow: 0 10px 30px rgba(255, 204, 213, 0.3);
    font-family: "Noto Sans SC", sans-serif;
}

.kc-progress-summary h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: #5a3e36;
    font-size: 2rem;
    font-family: "Noto Sans SC", sans-serif;
}

.kc-progress-summary p {
    font-size: 1.25rem;
    margin: 0;
    color: #6b4740;
    font-family: "Noto Sans SC", sans-serif;
}

/* Level sections */
.kc-levels-container {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.kc-level-section {
    background: #fffbf7;
    border: 2px solid #ffe9ec;
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.3s ease;
    font-family: "Noto Sans SC", sans-serif;
}

/* Special styling for Lv.0 level section */
.kc-level-section[data-level="lv-0"] {
    background: linear-gradient(135deg, #e8f4f8 0%, #f1f8e9 100%);
    border-color: #81c784;
}

.kc-level-section[data-level="lv-0"]:hover {
    border-color: #66bb6a;
    box-shadow: 0 12px 24px rgba(129, 199, 132, 0.2);
}

.kc-level-section:hover {
    border-color: #ffb3c1;
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(255, 179, 193, 0.2);
}

/* Level title */
.kc-level-title {
    font-size: 1.75rem;
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: #5a3e36;
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    border-bottom: 2px solid #ffe9ec;
    padding-bottom: 0.75rem;
    font-family: "Noto Sans SC", sans-serif;
}

/* Special title styling for Lv.0 */
.kc-level-section[data-level="lv-0"] .kc-level-title {
    border-bottom-color: #81c784;
}

.kc-level-description {
    font-size: 0.875rem;
    color: #8b6f66;
    font-weight: normal;
    font-family: "Noto Sans SC", sans-serif;
}

/* Lesson list */
.kc-lesson-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
}

.kc-lesson-item {
    padding: 1rem;
    margin-bottom: 0.5rem;
    border-radius: 8px;
    background: #fff9e6;
    transition: all 0.2s ease;
    font-family: "Noto Sans SC", sans-serif;
}

/* Special lesson item styling for Lv.0 */
.kc-level-section[data-level="lv-0"] .kc-lesson-item {
    background: linear-gradient(135deg, #f3f9ff 0%, #f1f8e9 100%);
}

.kc-level-section[data-level="lv-0"] .kc-lesson-item:hover {
    background: linear-gradient(135deg, #e3f2fd 0%, #e8f5e8 100%);
}

.kc-lesson-item:hover {
    background: #ffe9ec;
    transform: translateX(4px);
}

.kc-lesson-item:last-child {
    margin-bottom: 0;
}

.kc-lesson-item a {
    text-decoration: none;
    color: #5a3e36;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-weight: 500;
    font-family: "Noto Sans SC", sans-serif;
}

.kc-lesson-item a:hover {
    color: #ff7096;
}

/* Completed lessons */
.kc-lesson-item.completed {
    background: linear-gradient(to right, #fff3b8, #ffe9ec);
}

/* Special completed styling for Lv.0 */
.kc-level-section[data-level="lv-0"] .kc-lesson-item.completed {
    background: linear-gradient(to right, #c8e6c9, #e1f5fe);
}

.kc-lesson-item.completed a {
    color: #5a3e36;
}

.kc-check-mark {
    color: #ff7096;
    font-weight: bold;
    font-size: 1.2em;
    flex-shrink: 0;
}

/* Special check mark color for Lv.0 */
.kc-level-section[data-level="lv-0"] .kc-check-mark {
    color: #4caf50;
}

/* Chinese translation */
.kc-cn-translation {
    display: block;
    font-size: 0.875rem;
    color: #8b6f66;
    margin-top: 0.25rem;
    padding-left: 1.75rem;
    font-style: italic;
    font-family: "Noto Sans SC", sans-serif;
}

/* Progress bar */
.kc-level-progress {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #ffe9ec;
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Special progress bar styling for Lv.0 */
.kc-level-section[data-level="lv-0"] .kc-level-progress {
    border-top-color: #c8e6c9;
}

.kc-progress-bar {
    flex: 1;
    height: 10px;
    background: #ffe9ec;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(255, 192, 203, 0.2);
}

/* Special progress bar background for Lv.0 */
.kc-level-section[data-level="lv-0"] .kc-progress-bar {
    background: #e1f5fe;
    box-shadow: inset 0 2px 4px rgba(129, 199, 132, 0.2);
}

.kc-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #fff3b8 0%, #ffb3c1 100%);
    transition: width 0.5s ease;
    box-shadow: 0 2px 4px rgba(255, 179, 193, 0.3);
}

/* Special progress fill for Lv.0 */
.kc-level-section[data-level="lv-0"] .kc-progress-fill {
    background: linear-gradient(90deg, #4fc3f7 0%, #81c784 100%);
    box-shadow: 0 2px 4px rgba(76, 175, 80, 0.3);
}

.kc-progress-text {
    font-size: 0.875rem;
    color: #8b6f66;
    white-space: nowrap;
    font-weight: 600;
    font-family: "Noto Sans SC", sans-serif;
}

/* Auth Container */
.kc-auth-container {
    max-width: 450px;
    margin: 0 auto;
    position: relative;
}

/* Auth Forms */
.kc-auth-form {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.kc-auth-form.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Login and Register forms */
.kc-login-wrapper,
.kc-register-wrapper {
    padding: 2rem 3rem 3rem 3rem;
    background: #fffbf7;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(255, 192, 203, 0.15);
    font-family: "Noto Sans SC", sans-serif;
}

.kc-login-wrapper h3,
.kc-register-wrapper h3 {
    margin-top: 0;
    margin-bottom: 2rem;
    text-align: center;
    color: #5a3e36;
    font-size: 1.5rem;
    font-family: "Noto Sans SC", sans-serif;
}

#kc-loginform,
#kc-registerform {
    margin-bottom: 1.5rem;
}

#kc-loginform p,
#kc-registerform p {
    margin: 1rem 0;
}

#kc-loginform label,
#kc-registerform label {
    display: block;
    margin-bottom: 0.1rem;
    font-weight: 600;
    color: #5a3e36;
    font-family: "Noto Sans SC", sans-serif;
}

#kc-loginform input[type="text"],
#kc-loginform input[type="password"],
#kc-registerform input[type="text"],
#kc-registerform input[type="email"],
#kc-registerform input[type="password"] {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #ffe9ec;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    background: #fffefb;
    font-family: "Noto Sans SC", sans-serif;
}

#kc-loginform input[type="text"]:focus,
#kc-loginform input[type="password"]:focus,
#kc-registerform input[type="text"]:focus,
#kc-registerform input[type="email"]:focus,
#kc-registerform input[type="password"]:focus {
    outline: none;
    border-color: #ffb3c1;
}

#kc-loginform .button-primary,
#kc-registerform .button-primary {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    background: linear-gradient(135deg, #fff3b8 0%, #ffb3c1 100%);
    border: none;
    border-radius: 8px;
    color: #5a3e36;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease;
    font-family: "Noto Sans SC", sans-serif;
}

#kc-loginform .button-primary:hover,
#kc-registerform .button-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 179, 193, 0.4);
}

/* Form descriptions */
#kc-registerform .description {
    display: block;
    font-size: 0.85rem;
    color: #8b6f66;
    margin-top: 0.25rem;
    font-style: italic;
}

/* Auth switch section */
.kc-auth-switch {
    text-align: center;
    border-top: 1px solid #ffe9ec;
    padding-top: 0.5rem;
}

#kc-loginform, #kc-registerform {
    margin-bottom: 0rem;
}

.kc-auth-switch p {
    margin-bottom: 0rem;
    color: #6b4740;
    margin-top:0.3rem;
}

.kc-switch-btn {
    background: none;
    border: 2px solid #ffb3c1;
    color: #ff7096;
    padding: 0.5rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: "Noto Sans SC", sans-serif;
}

.kc-switch-btn:hover {
    background: #ffe9ec;
    color: #ff5277;
    transform: translateY(-2px);
}

/* Registration message */
.kc-register-message {
    margin: 1rem 0;
    padding: 0.75rem;
    border-radius: 6px;
    display: none;
    font-size: 0.9rem;
}

.kc-register-message.success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #81c784;
    display: block;
}

.kc-register-message.error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ef5350;
    display: block;
}

/* Simple lesson list */
.kc-lesson-simple-list {
    list-style: none;
    padding: 0;
}

#kcLoginForm > div > p:nth-child(1){
    margin-top:0.5rem;
}

#kcLoginForm > div > p:nth-child(2){
    margin-bottom:0.5rem;
}

.kc-lesson-simple-list li {
    padding: 1rem;
    margin-bottom: 0.5rem;
    background: #fff9e6;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-family: "Noto Sans SC", sans-serif;
}

.kc-lesson-simple-list li:hover {
    background: #ffe9ec;
    transform: translateX(4px);
}

.kc-lesson-simple-list li:last-child {
    margin-bottom: 0;
}

.kc-lesson-simple-list a {
    color: #5a3e36;
    text-decoration: none;
    font-weight: 500;
    font-family: "Noto Sans SC", sans-serif;
}

.kc-lesson-simple-list a:hover {
    color: #ff7096;
}

.kc-lesson-excerpt {
    display: block;
    font-size: 0.875rem;
    color: #8b6f66;
    margin-top: 0.5rem;
    line-height: 1.5;
    font-family: "Noto Sans SC", sans-serif;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.kc-level-section {
    animation: fadeIn 0.6s ease forwards;
}

.kc-level-section:nth-child(1) { animation-delay: 0.1s; }
.kc-level-section:nth-child(2) { animation-delay: 0.2s; }
.kc-level-section:nth-child(3) { animation-delay: 0.3s; }
.kc-level-section:nth-child(4) { animation-delay: 0.4s; }
.kc-level-section:nth-child(5) { animation-delay: 0.5s; }
.kc-level-section:nth-child(6) { animation-delay: 0.6s; }

/* Mobile Responsive - 600px breakpoint */
@media (max-width: 600px) {
    /* Prevent horizontal scroll */
    body {
        overflow-x: hidden;
    }
    
    /* Reset body scroll when menu is open */
    body.kc-mobile-menu-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
    }
    .kc-mobile-menu{
        z-index:9999 !important;
    }
    /* Main wrapper adjustments */
    body.kc-learning-fullscreen .kc-learning-wrapper {
        padding: 1rem;
        margin: 0;
        border-radius: 8px;
        box-shadow: 0 2px 10px rgba(255, 192, 203, 0.1);
    }
    
    .kc-learning-wrapper {
        margin: 1rem 0;
    }
    
    /* Current Learning Card - Mobile */
    .kc-current-learning-card {
        margin-bottom: 2rem;
        border-radius: 12px;
    }
    
    .kc-card-header {
        padding: 1rem 1rem 0 1rem;
    }
    
    .kc-card-header h3 {
        font-size: 1.2rem;
    }
    
    .kc-card-content {
        flex-direction: column;
        padding: 1rem;
        gap: 1rem;
    }
    
    .kc-card-image {
        flex: none;
        width: 100%;
        height: 180px;
    }
    
    .kc-card-image img {
        height: 180px;
    }
    
    .kc-card-info {
        padding: 0;
    }
    
    .kc-lesson-title {
        font-size: 1.2rem;
    }
    
    .kc-lesson-translation {
        font-size: 0.9rem;
    }
    
    .kc-meta-item {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 0.75rem;
    }
    
    .kc-meta-label {
        margin-bottom: 0.25rem;
        margin-right: 0;
        min-width: auto;
        font-size: 0.8rem;
    }
    
    .kc-meta-value {
        font-size: 0.9rem;
    }
    
    .kc-card-action {
        flex: none;
        padding-left: 0;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .kc-learn-button {
        min-height: 80px;
        flex: 1;
        margin-right: 1rem;
    }
    
    .kc-button-icon {
        font-size: 1.5rem;
        margin-bottom: 0.25rem;
    }
    
    .kc-button-text {
        font-size: 0.9rem;
    }
    
    .kc-progress-info {
        flex: 0 0 80px;
        font-size: 0.75rem;
    }
    
    /* Template Learning - Mobile */
    .kc-template-learning-wrapper {
        padding: 1rem;
        margin: 0.5rem;
    }
    
    .kc-template-header {
        margin-bottom: 1.5rem;
        padding-bottom: 1rem;
    }
    
    .kc-template-title {
        font-size: 1.5rem;
    }
    
    .kc-template-subtitle {
        font-size: 1rem;
    }
    
    .kc-phoneme-char {
        font-size: 4rem;
    }
    
    .kc-phoneme-sound {
        font-size: 1.5rem;
    }
    
    .kc-phoneme-description {
        padding: 1rem;
        margin: 1rem auto 0;
    }
    
    .kc-phoneme-description p {
        font-size: 1rem;
    }
    
    .kc-template-navigation {
        flex-wrap: wrap;
        gap: 1rem;
        padding: 1rem 0;
    }
    
    .kc-template-nav-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
    
    .kc-template-progress {
        font-size: 1rem;
        width: 100%;
        text-align: center;
        order: -1;
        margin-bottom: 0.5rem;
    }
    
    /* Completion Card - Mobile */
    .kc-completion-card .kc-card-content {
        flex-direction: column;
        text-align: center;
    }
    
    .kc-completion-card .kc-card-image {
        height: 120px;
    }
    
    .kc-completion-icon {
        font-size: 3rem;
    }
    
    .kc-completion-stats {
        gap: 1rem;
    }
    
    .kc-stat-number {
        font-size: 1.5rem;
    }
    
    .kc-completion-card .kc-card-action {
        justify-content: center;
        align-items: center;
        flex-direction: column;
    }
    
    .kc-completion-card .kc-learn-button {
        margin-right: 0;
        flex: none;
        width: 80%;
        max-width: 200px;
        padding: 1rem 0rem;
    }
    
    /* Grid layout for mobile - single column */
    .kc-levels-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    /* Level sections */
    .kc-level-section {
        padding: 1rem;
        margin: 0;
    }
    
    .kc-level-section:hover {
        transform: none;
    }
    
    /* Level title - responsive flex */
    .kc-level-title {
        font-size: 1.3rem;
        flex-wrap: wrap;
        gap: 0.25rem;
        padding-bottom: 0.5rem;
        margin-bottom: 1rem;
    }
    
    .kc-level-description {
        font-size: 0.8rem;
        width: 100%;
    }
    
    /* Lesson items */
    .kc-lesson-item {
        padding: 0.75rem;
        margin-bottom: 0.4rem;
    }
    
    .kc-lesson-item:hover {
        transform: none;
    }
    
    .kc-lesson-item a {
        font-size: 0.9rem;
        flex-wrap: wrap;
    }
    
    /* Template indicator */
    .kc-template-indicator {
        font-size: 0.7rem;
        padding: 1px 6px;
        margin-left: 0.3rem;
    }
    
    /* Chinese translation */
    .kc-cn-translation {
        padding-left: 0;
        margin-left: 1.5rem;
        font-size: 0.8rem;
        margin-top: 0.5rem;
        width: 100%;
    }
    
    /* Progress summary */
    .kc-progress-summary {
        padding: 1.5rem 1rem;
        margin-bottom: 1.5rem;
        border-radius: 8px;
    }
    
    .kc-progress-summary h3 {
        font-size: 1.3rem;
        margin-bottom: 0.5rem;
    }
    
    .kc-progress-summary p {
        font-size: 1rem;
    }
    
    /* Progress bar - vertical on mobile */
    .kc-level-progress {
        flex-direction: column;
        gap: 0.5rem;
        margin-top: 1rem;
        padding-top: 1rem;
    }
    
    .kc-progress-bar {
        width: 100%;
        height: 8px;
    }
    
    .kc-progress-text {
        font-size: 0.8rem;
        text-align: center;
    }
    
    /* Auth forms */
    .kc-auth-container {
        width: 100%;
        padding: 0 1rem;
    }
    
    .kc-login-wrapper,
    .kc-register-wrapper {
        width: 100%;
        padding: 0rem;
        margin: 0;
        border-radius: 8px;
    }
    #kc-registerform p label span{
        font-size:0.6em !important;
    }
    .kc-login-wrapper h3,
    .kc-register-wrapper h3 {
        font-size: 1.3rem;
        margin-bottom: 0rem;
    }
    .kc-login-wrapper h3{
        margin-top:2rem;
        margin-bottom:2rem;
    }
    #kc-loginform p,
    #kc-registerform p {
        margin: 0.75rem 0;
    }
    #kc-loginform p {
        margin: 1rem 0; 
    }
    #kc-loginform input[type="text"],
    #kc-loginform input[type="password"],
    #kc-registerform input[type="text"],
    #kc-registerform input[type="email"],
    #kc-registerform input[type="password"] {
        padding: 0rem 0.5rem;
        font-size: 16px; /* Prevent zoom on iOS */
    }
    #kc-loginform input[type="text"],
    #kc-loginform input[type="password"]{
        padding: 0.4rem 0.5rem;
    }
    #kc-loginform .button-primary,
    #kc-registerform .button-primary {
        padding: 0.8rem;
        font-size: 1rem;
    }
    
    .kc-switch-btn {
        padding: 0.4rem 1.2rem;
        font-size: 0.9rem;
    }
    
    #kc-registerform .description {
        font-size: 0.75rem;
    }
    
    /* Completion button */
    .kc-completion-wrapper {
        margin-top: 1.5rem;
        padding-top: 1.5rem;
    }
    
    .kc-mark-complete-btn {
        padding: 10px 20px;
        font-size: 14px;
        width: 100%;
        max-width: 300px;
    }
    
    /* Notifications */
    .kc-notice {
        left: 10px;
        right: 10px;
        top: auto;
        bottom: 20px;
        padding: 12px 16px;
        font-size: 13px;
        transform: translateY(120%);
    }
    
    .kc-notice.show {
        transform: translateY(0);
    }
    
    /* Korean sub text adjustments */
    .kc-korean-sub {
        font-size: 0.7em;
    }
    
    /* Lesson list adjustments */
    .kc-lesson-simple-list li {
        padding: 0.75rem;
    }
    
    .kc-lesson-simple-list a {
        font-size: 0.9rem;
    }
    
    .kc-lesson-excerpt {
        font-size: 0.8rem;
    }
    
    /* Prevent overflow on small devices */
    .kc-lesson-item,
    .kc-level-section,
    .kc-progress-summary,
    .kc-login-wrapper,
    .kc-current-learning-card {
        max-width: 100%;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
}

/* Utility classes */
.kc-text-center {
    text-align: center;
}

.kc-mt-1 { margin-top: 0.5rem; }
.kc-mt-2 { margin-top: 1rem; }
.kc-mt-3 { margin-top: 1.5rem; }
.kc-mt-4 { margin-top: 2rem; }

.kc-mb-1 { margin-bottom: 0.5rem; }
.kc-mb-2 { margin-bottom: 1rem; }
.kc-mb-3 { margin-bottom: 1.5rem; }
.kc-mb-4 { margin-bottom: 2rem; }

/* Loading states */
.kc-loading {
    position: relative;
    overflow: hidden;
}

.kc-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 243, 184, 0.4), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Notification styles */
.kc-notice {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    color: #5a3e36;
    font-size: 14px;
    z-index: 9999;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(255, 192, 203, 0.3);
    font-family: "Noto Sans SC", sans-serif;
}

.kc-notice.show {
    opacity: 1;
    transform: translateX(0);
}

.kc-notice-success {
    background: linear-gradient(135deg, #fff3b8 0%, #ffccd5 100%);
}

.kc-notice-error {
    background: #ffe9ec;
    border: 1px solid #ffb3c1;
}

/* Completion wrapper */
.kc-completion-wrapper {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #ffe9ec;
    text-align: center;
}

.kc-mark-complete-btn {
    background: linear-gradient(135deg, #fff3b8 0%, #ffb3c1 100%);
    color: #5a3e36;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-family: "Noto Sans SC", sans-serif;
}

.kc-mark-complete-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 179, 193, 0.4);
}

.kc-mark-complete-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.kc-mark-complete-btn.completed {
    background: linear-gradient(135deg, #fff3b8 0%, #ffccd5 100%);
}

#kcMobileMenuOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4); /* 반투명 */
    z-index: 9998;
    pointer-events: none;
    opacity: 0;
    transition: all 0.3s ease;
}

/* Lesson Content Styles */
.kc-lesson-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(255, 192, 203, 0.15);
    font-family: "Noto Sans SC", sans-serif;
}

.kc-lesson-header {
    margin-bottom: 2rem;
    border-bottom: 2px solid #ffe9ec;
    padding-bottom: 1.5rem;
}

.kc-lesson-breadcrumb {
    margin-bottom: 1rem;
}

.kc-lesson-breadcrumb a {
    color: #ff7096;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.kc-lesson-breadcrumb a:hover {
    color: #ff5277;
}

.kc-lesson-main-title {
    font-size: 2rem;
    color: #5a3e36;
    margin: 0 0 0.5rem 0;
    font-weight: 700;
    line-height: 1.3;
}

.kc-lesson-subtitle {
    font-size: 1.1rem;
    color: #8b6f66;
    margin: 0 0 1rem 0;
    font-style: italic;
}

.kc-lesson-meta-info {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.kc-lesson-difficulty {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.kc-lesson-difficulty.kc-difficulty-easy {
    background: #e8f5e9;
    color: #2e7d32;
}

.kc-lesson-difficulty.kc-difficulty-medium {
    background: #fff3e0;
    color: #f57c00;
}

.kc-lesson-difficulty.kc-difficulty-hard {
    background: #ffebee;
    color: #c62828;
}

.kc-lesson-duration {
    font-size: 0.9rem;
    color: #6b4740;
    font-weight: 500;
}

.kc-lesson-body {
    line-height: 1.8;
}

.kc-lesson-main-content {
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.kc-lesson-main-content h2,
.kc-lesson-main-content h3,
.kc-lesson-main-content h4 {
    color: #5a3e36;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.kc-lesson-main-content p {
    margin-bottom: 1rem;
}

.kc-lesson-vocabulary {
    background: #fff9e6;
    border: 2px solid #ffccd5;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.kc-lesson-vocabulary h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: #5a3e36;
}

.kc-vocabulary-list {
    display: grid;
    gap: 0.5rem;
}

.kc-vocab-item {
    background: #fff;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border-left: 4px solid #ff7096;
    font-weight: 500;
}

.kc-lesson-audio,
.kc-lesson-video {
    margin-bottom: 2rem;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
}

.kc-lesson-audio h3,
.kc-lesson-video h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: #5a3e36;
}

.kc-lesson-audio audio {
    width: 100%;
    max-width: 400px;
}

.kc-video-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
}

.kc-video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 8px;
}

.kc-lesson-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #ffe9ec;
    flex-wrap: wrap;
}

.kc-mark-complete-btn {
    background: linear-gradient(135deg, #fff3b8 0%, #ffb3c1 100%);
    color: #5a3e36;
    border: none;
    padding: 1rem 2rem;
    font-size: 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-family: "Noto Sans SC", sans-serif;
    min-width: 200px;
}

.kc-mark-complete-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 179, 193, 0.4);
}

.kc-mark-complete-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.kc-mark-complete-btn.completed {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    color: #2e7d32;
}

.kc-back-button {
    background: #fff;
    color: #6b4740;
    border: 2px solid #ffe9ec;
    padding: 1rem 2rem;
    font-size: 1rem;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 600;
    font-family: "Noto Sans SC", sans-serif;
    display: inline-block;
}

.kc-back-button:hover {
    border-color: #ffb3c1;
    background: #ffe9ec;
    color: #5a3e36;
    transform: translateY(-2px);
}

/* Mobile responsive for lesson content */
@media (max-width: 600px) {
    .kc-lesson-content {
        padding: 1rem;
        margin: 0.5rem;
    }
    
    .kc-lesson-main-title {
        font-size: 1.5rem;
    }
    
    .kc-lesson-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .kc-mark-complete-btn,
    .kc-back-button {
        width: 100%;
        text-align: center;
    }
    
    .kc-video-container {
        padding-bottom: 75%; /* More square for mobile */
    }
}