@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&family=Lato:wght@400;700&display=swap');
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Lato', sans-serif; background: #f0f0eb; color: #333; min-height: 100vh; }
.nav { background: #1a1a2e; display: flex; align-items: center; justify-content: space-between; padding: 0 2rem; height: 58px; position: sticky; top: 0; z-index: 100; }
.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.logo-icon { width: 30px; height: 30px; background: #4CAF50; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.logo-text { font-family: 'Nunito', sans-serif; font-weight: 800; font-size: 18px; color: #fff; }
.logo-text span { color: #4CAF50; }
.nav-links { display: flex; align-items: center; list-style: none; }
.nav-links a { color: #ccc; text-decoration: none; font-size: 14px; font-weight: 600; padding: 0 16px; height: 58px; display: flex; align-items: center; transition: color 0.2s; }
.nav-links a:hover { color: #fff; }
.nav-links a.active { color: #fff; border-bottom: 3px solid #1976d2; }
.nav-login { border: 1.5px solid #4CAF50 !important; color: #4CAF50 !important; border-radius: 4px; height: 34px !important; padding: 0 18px !important; font-weight: 700 !important; margin-left: 8px; }
.nav-login:hover { background: #4CAF50 !important; color: #fff !important; }
.banner { background: #1976d2; padding: 14px 2rem; text-align: center; }
.banner h1 { font-family: 'Nunito', sans-serif; font-weight: 800; font-size: 20px; color: #fff; text-transform: uppercase; letter-spacing: 0.5px; }
.breadcrumb { background: #fff; border-bottom: 1px solid #e0e0e0; padding: 9px 2rem; font-size: 13px; color: #888; }
.breadcrumb a { color: #1976d2; text-decoration: none; }
.breadcrumb span { margin: 0 5px; }
.layout { max-width: 1100px; margin: 0 auto; padding: 1.5rem 1.5rem 4rem; display: grid; grid-template-columns: 1fr 270px; gap: 2rem; align-items: start; }
.tab-bar { display: flex; }
.tab { padding: 11px 28px; font-size: 15px; font-weight: 700; cursor: pointer; border: none; background: #d0d0ca; color: #555; font-family: 'Lato', sans-serif; transition: background 0.2s; }
.tab:first-child { border-radius: 5px 0 0 0; }
.tab:last-child { border-radius: 0 5px 0 0; }
.tab.active { background: #1976d2; color: #fff; }
.tab:hover:not(.active) { background: #bbb; color: #333; }
.tab-content { background: #fff; border: 1px solid #ddd; border-radius: 0 5px 5px 5px; padding: 28px 28px 24px; }
.page-nav { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-bottom: 1.4rem; }
.page-label { font-size: 15px; font-weight: 700; color: #555; }
.page-btns { display: flex; gap: 5px; }
.page-btn { width: 34px; height: 34px; border-radius: 4px; border: 1.5px solid #bbb; background: #fff; font-size: 14px; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; color: #555; font-family: 'Lato', sans-serif; transition: background 0.2s; }
.page-btn.active { background: #1976d2; color: #fff; border-color: #1976d2; }
.page-btn:hover:not(.active) { background: #e3f0fb; color: #1976d2; border-color: #1976d2; }
.ex-heading { font-family: 'Nunito', sans-serif; font-weight: 800; font-size: 22px; color: #1976d2; margin-bottom: 0.3rem; }
.ex-subheading { font-family: 'Nunito', sans-serif; font-weight: 700; font-size: 18px; color: #1976d2; margin-bottom: 1rem; }
.ex-intro { font-size: 16px; color: #444; margin-bottom: 1.6rem; line-height: 1.6; background: #f5f5f5; border: 1px solid #ddd; padding: 12px 16px; border-radius: 5px; }
.ex-list { list-style: none; }
.ex-item { display: flex; align-items: flex-start; gap: 14px; padding: 16px 0; border-bottom: 1px solid #f0f0f0; }
.ex-item:last-child { border-bottom: none; }
.ex-num { min-width: 32px; height: 32px; border-radius: 50%; background: #1976d2; color: #fff; font-family: 'Nunito', sans-serif; font-weight: 800; font-size: 15px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 3px; }
.ex-body { flex: 1; }
.ex-sentence { font-size: 17px; line-height: 1.9; color: #333; display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.ex-sentence select { font-family: 'Lato', sans-serif; font-size: 15px; font-weight: 700; color: #1976d2; border: 2px solid #90caf9; border-radius: 4px; padding: 4px 10px; background: #e8f4fd; cursor: pointer; outline: none; }
.ex-sentence select.correct { border-color: #43a047; background: #e8f5e9; color: #2e7d32; }
.ex-sentence select.incorrect { border-color: #e53935; background: #ffebee; color: #c62828; }
.gap-wrap { display: inline-flex; align-items: center; gap: 5px; }
.gap-input { border: none; border-bottom: 2.5px solid #1976d2; background: transparent; font-size: 17px; font-family: 'Lato', sans-serif; font-weight: 700; color: #1976d2; outline: none; width: 110px; text-align: center; padding: 1px 4px; }
.gap-input.correct { border-bottom-color: #43a047; color: #2e7d32; }
.gap-input.incorrect { border-bottom-color: #e53935; color: #c62828; }
.gap-hint { font-size: 14px; color: #888; font-style: italic; }
.feedback { font-size: 14px; margin-top: 6px; font-weight: 700; display: none; }
.feedback.show-ok { display: block; color: #2e7d32; }
.feedback.show-bad { display: block; color: #c62828; }
.score-box { background: #fff; border: 1.5px solid #e0e0e0; border-radius: 8px; padding: 24px; text-align: center; margin-bottom: 2rem; display: none; }
.score-icon { font-size: 34px; margin-bottom: 8px; }
.score-title { font-family: 'Nunito', sans-serif; font-weight: 800; font-size: 21px; color: #1976d2; margin-bottom: 10px; }
.score-line { font-size: 16px; color: #444; margin-bottom: 4px; }
.score-line strong { color: #1976d2; }
.score-pct { font-family: 'Nunito', sans-serif; font-weight: 800; font-size: 26px; margin: 8px 0 4px; }
.score-pct.perfect { color: #2e7d32; }
.score-pct.good { color: #1976d2; }
.score-pct.ok { color: #e65100; }
.score-sub { font-size: 14px; color: #777; }
.btn-row { display: flex; justify-content: space-between; align-items: center; margin-top: 2rem; }
.check-btn { background: #1976d2; color: #fff; border: none; border-radius: 5px; padding: 12px 36px; font-size: 16px; font-weight: 700; cursor: pointer; font-family: 'Lato', sans-serif; transition: background 0.2s; }
.check-btn:hover { background: #1565C0; }
.reset-btn { background: transparent; color: #888; border: 1.5px solid #ccc; border-radius: 5px; padding: 11px 22px; font-size: 15px; font-weight: 700; cursor: pointer; font-family: 'Lato', sans-serif; }
.reset-btn:hover { color: #333; border-color: #888; }
.ans-item { margin-bottom: 1.6rem; }
.ans-row { display: flex; align-items: flex-start; gap: 13px; margin-bottom: 7px; }
.ans-num { min-width: 32px; height: 32px; border-radius: 50%; color: #fff; font-family: 'Nunito', sans-serif; font-weight: 800; font-size: 15px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 2px; }
.ans-num.ok { background: #2e7d32; }
.ans-num.bad { background: #c62828; }
.ans-sentence { font-size: 17px; line-height: 1.8; flex: 1; color: #333; }
.ans-word { display: inline-block; border-radius: 4px; font-weight: 700; padding: 1px 10px; font-size: 16px; margin: 0 2px; border: 1.5px solid; }
.ans-word.ok { background: #e8f5e9; color: #2e7d32; border-color: #a5d6a7; }
.ans-word.bad { background: #ffebee; color: #c62828; border-color: #ef9a9a; text-decoration: line-through; }
.ans-word.fix { background: #e8f5e9; color: #2e7d32; border-color: #a5d6a7; }
.ans-explanation { background: #f9f9f9; border: 1px solid #e8e8e8; border-left: 4px solid #1976d2; border-radius: 0 5px 5px 0; padding: 10px 16px; font-size: 15px; color: #444; line-height: 1.65; margin-left: 45px; }
.ans-explanation strong { color: #1565C0; }
.expl { font-size: 17px; line-height: 1.85; color: #333; }
.expl-main-title { font-family: 'Nunito', sans-serif; font-weight: 800; font-size: 23px; color: #1976d2; margin-bottom: 1.2rem; }
.expl h2 { font-family: 'Nunito', sans-serif; font-weight: 800; font-size: 20px; color: #1976d2; margin: 2rem 0 0.5rem; }
.expl h3 { font-family: 'Nunito', sans-serif; font-weight: 700; font-size: 17px; color: #e65100; margin: 1.2rem 0 0.4rem; }
.expl p { margin-bottom: 0.9rem; }
.expl .rule { background: #f0f7ff; border-left: 4px solid #1976d2; padding: 12px 16px; border-radius: 0 5px 5px 0; margin: 0.8rem 0 1rem; font-size: 16px; }
.expl .rule strong { color: #1976d2; }
.expl .examples { list-style: none; margin: 0.5rem 0 1.2rem; background: #f9f9f9; border-radius: 5px; padding: 10px 16px; }
.expl .examples li { padding: 6px 0 6px 22px; position: relative; font-size: 16px; border-bottom: 1px solid #eee; }
.expl .examples li:last-child { border-bottom: none; }
.expl .examples li::before { content: '✓'; position: absolute; left: 0; color: #1976d2; font-weight: 700; }
.expl em { font-style: italic; color: #1976d2; font-weight: 700; }
.time-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 0.8rem; }
.pill { background: #e3f0fb; color: #1565C0; font-size: 14px; font-weight: 700; padding: 5px 14px; border-radius: 20px; border: 1px solid #90caf9; }
.sidebar-card { background: #fff; border: 1px solid #ddd; border-radius: 6px; padding: 16px; margin-bottom: 1.2rem; }
.sidebar-card h4 { font-family: 'Nunito', sans-serif; font-weight: 800; font-size: 13px; color: #1a1a2e; margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.4px; }
.related-link { display: block; color: #1976d2; font-size: 14px; font-weight: 600; text-decoration: none; padding: 6px 0; border-bottom: 1px solid #f0f0f0; }
.related-link:last-child { border-bottom: none; }
.related-link:hover { text-decoration: underline; }
.redo-btn { display: block; width: 100%; background: #1976d2; color: #fff; border: none; border-radius: 5px; padding: 12px; font-size: 15px; font-weight: 700; cursor: pointer; font-family: 'Lato', sans-serif; margin-top: 0.5rem; transition: background 0.2s; text-align: center; }
.redo-btn:hover { background: #1565C0; }
.level-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; }
.level-btn { background: #f0f4ff; border: 1.5px solid #b3c6f0; border-radius: 4px; color: #aaa; font-size: 13px; font-weight: 700; padding: 6px 4px; text-align: center; }
.level-btn.active { background: #1976d2; border-color: #1976d2; color: #fff; }
.para-box { font-size: 17px; line-height: 2.4; color: #333; background: #fafafa; border: 1px solid #e0e0e0; border-radius: 6px; padding: 20px 22px; }
.para-gap-wrap { display: inline-flex; align-items: center; gap: 3px; vertical-align: middle; margin: 0 2px; }
.para-gap-input { border: none; border-bottom: 2px solid #1976d2; background: transparent; font-size: 16px; font-family: 'Lato', sans-serif; font-weight: 700; color: #1976d2; outline: none; width: 120px; text-align: center; padding: 1px 4px; }
.para-gap-input.correct { border-bottom-color: #43a047; color: #2e7d32; }
.para-gap-input.incorrect { border-bottom-color: #e53935; color: #c62828; }
.footer { background: #1a1a2e; color: #888; text-align: center; font-size: 13px; padding: 1.5rem 2rem; margin-top: 2rem; }
.footer a { color: #aaa; text-decoration: none; margin: 0 8px; }
.footer a:hover { color: #fff; }
.contact-form { max-width: 600px; }
.form-group { margin-bottom: 1.4rem; }
.form-group label { display: block; font-size: 15px; font-weight: 700; color: #333; margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select { width: 100%; border: 2px solid #ddd; border-radius: 5px; padding: 11px 14px; font-size: 16px; font-family: 'Lato', sans-serif; color: #333; outline: none; transition: border-color 0.2s; background: #fff; }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { border-color: #1976d2; }
.form-group textarea { min-height: 140px; resize: vertical; }
.submit-btn { background: #1976d2; color: #fff; border: none; border-radius: 5px; padding: 13px 40px; font-size: 16px; font-weight: 700; cursor: pointer; font-family: 'Lato', sans-serif; transition: background 0.2s; }
.submit-btn:hover { background: #1565C0; }
.form-success { display: none; background: #e8f5e9; border: 1.5px solid #a5d6a7; border-radius: 6px; padding: 16px 20px; color: #2e7d32; font-size: 16px; font-weight: 700; margin-top: 1rem; }
.hero { background: #1a1a2e; padding: 3rem 2rem 3.5rem; text-align: center; position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 60% 40%, rgba(76,175,80,0.12) 0%, transparent 70%); pointer-events: none; }
.hero h1 { font-family: 'Nunito', sans-serif; font-size: 32px; font-weight: 800; color: #fff; margin-bottom: 0.5rem; position: relative; }
.hero h1 span { color: #4CAF50; font-style: italic; }
.hero p { color: #aaa; font-size: 16px; position: relative; }
.cards-section { max-width: 1100px; margin: 0 auto; padding: 3rem 1.5rem 4rem; }
.cards-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 28px; }
.card { background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.08); cursor: pointer; text-decoration: none; display: block; transition: transform 0.2s, box-shadow 0.2s; }
.card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.13); }
.card-img { width: 100%; height: 190px; display: flex; align-items: flex-end; justify-content: flex-end; padding: 14px; position: relative; overflow: hidden; }
.card-emoji { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 72px; opacity: 0.18; }
.card-label { background: rgba(0,0,0,0.45); color: #fff; font-family: 'Nunito', sans-serif; font-weight: 800; font-size: 17px; padding: 6px 16px; border-radius: 4px; position: relative; z-index: 1; }
.card-grammar .card-img { background: linear-gradient(135deg,#1565C0,#1976D2); }
.card-vocab .card-img { background: linear-gradient(135deg,#AD1457,#E91E8C); }
.card-pronunciation .card-img { background: linear-gradient(135deg,#E65100,#F57C00); }
.card-reading .card-img { background: linear-gradient(135deg,#2E7D32,#43A047); }
.card-body { padding: 20px 22px 22px; }
.card-title { font-family: 'Nunito', sans-serif; font-weight: 800; font-size: 18px; margin-bottom: 8px; }
.card-grammar .card-title { color: #1565C0; }
.card-vocab .card-title { color: #AD1457; }
.card-pronunciation .card-title { color: #E65100; }
.card-reading .card-title { color: #2E7D32; }
.card-desc { color: #555; font-size: 14px; line-height: 1.6; margin-bottom: 16px; }
.card-btn { display: inline-block; border: 1.5px solid #ccc; color: #555; font-size: 13px; font-weight: 600; padding: 7px 18px; border-radius: 4px; }
.card-grammar:hover .card-btn { border-color: #1565C0; color: #1565C0; }
.card-vocab:hover .card-btn { border-color: #AD1457; color: #AD1457; }
.card-pronunciation:hover .card-btn { border-color: #E65100; color: #E65100; }
.card-reading:hover .card-btn { border-color: #2E7D32; color: #2E7D32; }
@media (max-width:700px) { .layout { grid-template-columns:1fr; } .cards-grid { grid-template-columns:1fr; } .nav-links { display:none; } }
