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

:root {
    --primary: #ff6b35;
    --primary-dark: #e55a2b;
    --secondary: #4ecdc4;
    --accent: #ffe66d;
    --purple: #a55eea;
    --text: #1a1a2e;
    --text-light: #636e72;
    --bg: #f8f9fa;
    --card-bg: #ffffff;
    --border: #e1e5e9;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.15);
    --radius: 16px;
    --radius-sm: 10px;
}

body {
    font-family: 'Noto Sans SC', 'Roboto', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 50%, #f0f2f5 100%);
    min-height: 100vh;
    color: var(--text);
    position: relative;
}

.app-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

.app-header {
    text-align: center;
    padding: 30px 0 24px;
}

.app-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.app-logo-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 8px 20px rgba(255, 107, 53, 0.35);
}

.app-title {
    font-size: 1.8rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--text), #4a5568);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.app-subtitle {
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 400;
    letter-spacing: 2px;
}

.content-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--text);
}

.section-title-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1rem;
}

.stage-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.stage-card {
    background: linear-gradient(180deg, #fafbfc, #f3f5f7);
    border: 2px solid transparent;
    border-radius: var(--radius);
    padding: 28px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.stage-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transform: scaleX(0);
    transition: transform 0.3s;
}

.stage-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary);
}

.stage-card:hover::before {
    transform: scaleX(1);
}

.stage-card.active {
    border-color: var(--primary);
    background: linear-gradient(180deg, #fff5f2, #fff0eb);
}

.stage-card.active::before {
    transform: scaleX(1);
}

.stage-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
    display: block;
}

.stage-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
}

.stage-desc {
    font-size: 0.8rem;
    color: var(--text-light);
}

.stage-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, #ff6b6b, #e74c3c);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.4);
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #f8f9fa;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 24px;
    font-family: inherit;
}

.back-button:hover {
    background: var(--primary);
    color: #fff;
}

.material-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.material-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    background: linear-gradient(180deg, #fafbfc, #f3f5f7);
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.3s;
}

.material-item:hover {
    border-color: var(--primary);
    background: #fff;
    transform: translateX(4px);
    box-shadow: var(--shadow);
}

.material-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.material-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.2rem;
}

.material-name {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 2px;
}

.material-meta {
    font-size: 0.8rem;
    color: var(--text-light);
}

.material-arrow {
    color: var(--text-light);
    transition: transform 0.3s;
}

.material-item:hover .material-arrow {
    color: var(--primary);
    transform: translateX(4px);
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 16px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 3px;
    transition: width 0.5s;
}

.progress-text {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 24px;
    font-weight: 500;
}

.word-card {
    text-align: center;
    padding: 40px 32px;
}

.word-main {
    margin-bottom: 32px;
}

.word-text {
    font-size: 3rem;
    font-weight: 900;
    color: var(--text);
    margin-bottom: 12px;
    letter-spacing: 2px;
}

.word-phonetic {
    font-size: 1.2rem;
    color: var(--primary);
    font-weight: 500;
}

.word-meanings {
    text-align: left;
    margin-bottom: 32px;
}

.meaning-item {
    padding: 20px;
    background: #f8f9fa;
    border-radius: var(--radius-sm);
    margin-bottom: 14px;
}

.meaning-pos {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.meaning-def {
    font-size: 1.05rem;
    color: var(--text);
    font-weight: 500;
    line-height: 1.6;
}

.meaning-example {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed var(--border);
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.6;
}

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

.nav-btn {
    padding: 14px 32px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
}

.nav-btn.primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.35);
}

.nav-btn.primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.45);
}

.nav-btn.secondary {
    background: #f8f9fa;
    color: var(--text-light);
    border: 2px solid var(--border);
}

.nav-btn.secondary:hover {
    background: var(--secondary);
    color: #fff;
    border-color: var(--secondary);
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.hidden { display: none !important; }

.footer-nav {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 20px 0;
}

.footer-link {
    padding: 10px 20px;
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s;
}

.footer-link:hover {
    color: var(--primary);
}

@media (max-width: 768px) {
    .app-container { padding: 16px; }
    .stage-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .stage-card { padding: 20px 16px; }
    .content-card { padding: 24px 20px; }
    .word-text { font-size: 2.2rem; }
}

.listening-content, .reading-content {
    padding: 20px 0;
}

.dialogue-item {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: var(--radius-sm);
}

.dialogue-speaker {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.dialogue-speaker.M {
    background: linear-gradient(135deg, var(--secondary), #26a69a);
    color: #fff;
}

.dialogue-speaker.W {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
}

.dialogue-text {
    flex: 1;
    color: var(--text);
    line-height: 1.6;
}

.question-box {
    margin-top: 24px;
    padding: 24px;
    background: linear-gradient(180deg, #fafbfc, #f3f5f7);
    border-radius: var(--radius-sm);
}

.question-text {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 16px;
}

.option-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.option-item {
    padding: 14px 18px;
    background: #fff;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.option-item:hover {
    border-color: var(--primary);
}

.option-item.selected {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-color: var(--primary);
    color: #fff;
}

.option-item.correct {
    background: linear-gradient(135deg, var(--secondary), #26a69a);
    border-color: var(--secondary);
    color: #fff;
}

.option-item.wrong {
    background: linear-gradient(135deg, #ff6b6b, #e74c3c);
    border-color: #ff6b6b;
    color: #fff;
}

.answer-box {
    margin-top: 20px;
    padding: 16px;
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.15), rgba(78, 205, 196, 0.05));
    border: 2px solid var(--secondary);
    border-radius: var(--radius-sm);
    text-align: center;
    font-weight: 600;
    color: var(--secondary);
}

.reading-passage {
    padding: 24px;
    background: #f8f9fa;
    border-radius: var(--radius-sm);
    line-height: 1.8;
    color: var(--text);
    margin-bottom: 24px;
}

.reading-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border);
}

.floating-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.3), rgba(255, 107, 53, 0.1));
    top: -100px;
    right: -100px;
}

.shape-2 {
    width: 350px;
    height: 350px;
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.2), rgba(78, 205, 196, 0.08));
    bottom: -80px;
    left: -80px;
}

.shape-3 {
    width: 250px;
    height: 250px;
    background: linear-gradient(135deg, rgba(165, 94, 234, 0.2), rgba(165, 94, 234, 0.08));
    top: 40%;
    left: 10%;
}
