:root {
    --primary: #FF7E5F;
    --secondary: #FEB47B;
    --accent: #FFD200;
    --background: linear-gradient(135deg, #fdfcfb 0%, #e2d1c3 100%);
    --card-bg: rgba(255, 255, 255, 0.85);
    --text: #2C3E50;
    --success: #27AE60;
    --error: #E74C3C;
    --radius: 24px;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Gowun Dodum', sans-serif;
    background: var(--background);
    min-height: 100vh;
    color: var(--text);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    line-height: 1.6;
}

.app-container {
    max-width: 800px;
    width: 100%;
    position: relative;
}

/* Progress bar style */
.progress-container {
    width: 100%;
    height: 12px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 6px;
    margin-bottom: 20px;
    overflow: hidden;
}

.progress-bar {
    width: 20%;
    height: 100%;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    transition: width 0.5s ease;
}

.header {
    text-align: center;
    margin-bottom: 30px;
}

h1 {
    font-size: 2.5rem;
    color: #4A4A4A;
    margin-bottom: 5px;
}

.subtitle {
    font-size: 1.2rem;
    color: #777;
}

/* Card systems */
.lesson-card {
    background: var(--card-bg);
    backdrop-filter: blur(15px);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.3);
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: none;
    opacity: 0;
    transform: translateY(20px);
}

.lesson-card.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.emoji-hero {
    font-size: 4rem;
    margin-bottom: 15px;
}

h2 {
    font-size: 2rem;
    margin-bottom: 25px;
    color: var(--primary);
}

.teacher-speech {
    font-size: 1.3rem;
    background: rgba(255, 126, 95, 0.1);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 30px;
    border-left: 5px solid var(--primary);
    transition: all 0.3s ease;
}

.teacher-speech:hover {
    background: rgba(255, 126, 95, 0.15);
    transform: scale(1.01);
    box-shadow: 0 5px 15px rgba(255, 126, 95, 0.1);
}

.teacher-speech strong {
    color: var(--primary);
}

.card-body {
    text-align: left;
}

.example-box {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: white;
    padding: 25px;
    border-radius: 20px;
    margin-bottom: 20px;
    gap: 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.example-box:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    border: 2px solid var(--primary);
}

.example {
    flex: 1;
    text-align: center;
}

.vs {
    font-weight: bold;
    color: #999;
}

.label {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.active-label { background: #E1F5FE; color: #0288D1; }
.passive-label { background: #FFF9C4; color: #FBC02D; }

.example p {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.subtext {
    font-size: 0.9rem;
    color: #888;
}

strong {
    color: var(--primary);
    font-weight: 700;
}

/* Formula styles */
.formula-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.magic-card {
    background: #fff;
    padding: 20px;
    border-radius: 20px;
    border: 2px dashed #EBC;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.magic-card:hover {
    transform: translateY(-5px);
    background: #fffdf9;
    border-style: solid;
    border-color: var(--primary);
    box-shadow: 0 10px 20px rgba(255, 126, 95, 0.15);
}

.magic-word {
    font-size: 1.8rem;
    color: #FF5E62;
    display: block;
    margin-bottom: 10px;
}

/* Navigation button */
.next-btn {
    margin-top: 40px;
    padding: 15px 40px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1.3rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(255, 126, 95, 0.4);
    transition: all 0.3s;
}

.next-btn:hover {
    transform: scale(1.05);
    background: #FF6A46;
}

/* Back button styles */
.nav-header {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 15px;
}

.back-btn {
    background: white;
    border: 2px solid #FFE4E4;
    color: var(--primary);
    padding: 10px 18px;
    border-radius: 15px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    font-size: 1rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.back-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateX(-5px);
    box-shadow: 0 6px 15px rgba(255, 126, 95, 0.2);
}

.back-btn i {
    width: 20px;
    height: 20px;
}

/* Quiz system */
.quiz-options {
    display: grid;
    gap: 15px;
    margin-top:30px;
}

.quiz-option {
    padding: 18px;
    background: #f8f9fa;
    border: 2px solid #edeff0;
    border-radius: 15px;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s;
    font-size: 1.15rem;
}

.quiz-option:hover {
    background: #fff;
    border-color: var(--primary);
}

.quiz-option.correct {
    background: #ebfaf0;
    border-color: var(--success);
}

.quiz-option.wrong {
    background: #fef0f0;
    border-color: var(--error);
}

.feedback {
    margin-top: 20px;
    padding: 15px;
    border-radius: 15px;
    font-size: 1.1rem;
}

.feedback.correct { background: #d4edda; color: #155724; }
.feedback.wrong { background: #f8d7da; color: #721c24; }

/* Magic Lab Styles */
.magic-lab {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #fdfdfd;
    padding: 20px;
    border-radius: 20px;
    border: 1px solid #eee;
}

.lab-row {
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.magic-btn {
    padding: 5px 15px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s;
}

.magic-btn:hover {
    transform: scale(1.1);
}

.result-vb {
    font-weight: bold;
    color: #ccc;
    min-width: 100px;
}

.result-vb.active-result {
    color: var(--primary);
    animation: pop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes pop {
    0% { transform: scale(0.5); }
    100% { transform: scale(1); }
}

/* Repair Lab Styles */
.repair-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #FFF9F9;
    padding: 15px 20px;
    border-radius: 15px;
    margin-bottom: 15px;
    border: 1px solid #FFE4E4;
}

.bad-text {
    font-size: 1.3rem;
    font-weight: bold;
    color: #E74C3C;
    transition: all 0.4s ease;
}

.good-text {
    color: #27AE60 !important;
    transform: scale(1.1);
}

/* Why Battle Styles */
.why-battle {
    margin-bottom: 25px;
}

.battle-title {
    font-weight: bold;
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--text);
}

.battle-box {
    display: flex;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
    border: 1px solid #eee;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.battle-box:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 12px 25px rgba(0,0,0,0.1);
    border-color: var(--primary);
}

.side {
    flex: 1;
    padding: 15px;
    font-size: 1.1rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.active-side { background: #E3F2FD; }
.passive-side { background: #FFF3E0; }

.vs-side {
    flex: 0 0 40px;
    background: #eee;
    font-weight: bold;
    color: #999;
    align-items: center;
    padding: 15px 0;
}

.side strong { color: #333; margin-bottom: 5px; }

@media (max-width: 600px) {
    .example-box {
        flex-direction: column;
    }
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }
}

/* 추가된 인터랙티브 효과 */
.info-card, .bad-good-box > div {
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.info-card:hover, .bad-good-box > div:hover {
    transform: translateX(10px) scale(1.01);
    background-color: #fff !important;
    border-color: var(--primary);
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}
