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

:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #059669;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.7;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.hidden {
    display: none !important;
}

/* Header */
header {
    background: linear-gradient(135deg, var(--primary-color), #7c3aed);
    color: white;
    padding: 20px 0;
    text-align: center;
}

header h1 {
    font-size: 2rem;
    margin-bottom: 5px;
}

#sub-header {
    background: var(--text-primary);
    padding: 12px 0;
}

.sub-header-content {
    display: flex;
    align-items: center;
    gap: 15px;
    justify-content: space-between;
}

.sub-header-content .left {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

/* Intro Banner */
.intro-banner {
    background: linear-gradient(135deg, #fef3c7, #dbeafe);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 30px;
    text-align: center;
}

.intro-content h2 {
    color: var(--text-primary);
    font-size: 1.3rem;
    margin-bottom: 8px;
}

.intro-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.sub-header-content .back-btn {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.sub-header-content .back-btn:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.5);
}

/* Main */
main {
    padding: 30px 0;
    min-height: calc(100vh - 150px);
}

/* Article List */
.article-list h2 {
    margin-bottom: 20px;
    color: var(--text-primary);
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.article-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid var(--border-color);
}

.article-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.article-card h3 {
    color: var(--primary-color);
    margin-bottom: 5px;
    font-size: 1.2rem;
}

.article-card .zh-title {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.article-card .description {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 12px;
    line-height: 1.5;
}

.article-meta {
    display: flex;
    gap: 8px;
}

.level-badge, .type-badge {
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 500;
}

.level-badge {
    background: #dbeafe;
    color: var(--primary-color);
}

.type-badge {
    background: #d1fae5;
    color: var(--secondary-color);
}

/* Back Button */
.back-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    margin-bottom: 20px;
    transition: background 0.2s;
}

.back-btn:hover {
    background: var(--primary-hover);
}

/* Novel View */
.novel-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.novel-header h2 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 5px;
}

.novel-header p {
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.novel-header .article-meta {
    justify-content: center;
}

/* Novel Content - 小说式展示 */
.novel-content {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    line-height: 2;
    font-size: 1.15rem;
}

.novel-paragraph {
    margin-bottom: 1.5em;
    text-indent: 2em;
}

.novel-sentence-wrapper {
    margin-bottom: 12px;
}

.novel-sentence {
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 4px;
    transition: all 0.2s;
    display: inline;
}

.novel-sentence:hover {
    background: #dbeafe;
    color: var(--primary-color);
}

.novel-sentence.active {
    background: #fef3c7;
    color: #b45309;
    border-bottom: 2px solid #f59e0b;
}

/* Tooltip - 悬浮显示 */
.sentence-tooltip {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    margin: 8px 0 16px 0;
    box-shadow: var(--shadow-lg);
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tooltip-chinese {
    font-size: 1.05rem;
    color: var(--text-primary);
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 12px;
    line-height: 1.7;
}

.tooltip-audio-btn {
    background: var(--secondary-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    margin-bottom: 12px;
    transition: background 0.2s;
}

.tooltip-audio-btn:hover {
    background: #047857;
}

/* Grammar in Tooltip */
.tooltip-grammar {
    background: #f8fafc;
    border-radius: 6px;
    padding: 12px;
    margin-top: 8px;
}

.grammar-title {
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 8px;
}

.grammar-section {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
    line-height: 1.5;
}

.grammar-section .label {
    color: var(--text-primary);
    font-weight: 500;
}

.grammar-structure {
    background: #e0e7ff;
    color: var(--primary-color);
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 0.85rem;
    margin: 8px 0;
    display: inline-block;
}

.grammar-examples {
    margin-top: 8px;
    font-size: 0.85rem;
}

.grammar-examples .label {
    color: var(--text-primary);
    font-weight: 500;
}

.grammar-examples ul {
    margin-top: 4px;
    padding-left: 20px;
    color: var(--text-secondary);
}

.grammar-examples li {
    margin-bottom: 4px;
}

/* Footer */
footer {
    background: var(--text-primary);
    color: white;
    text-align: center;
    padding: 15px 0;
    font-size: 0.85rem;
    opacity: 0.8;
}

/* Responsive */
@media (max-width: 600px) {
    header h1 {
        font-size: 1.5rem;
    }
    
    .novel-content {
        padding: 20px;
        font-size: 1.05rem;
    }
    
    .article-card {
        padding: 16px;
    }
}

/* Card Actions */
.card-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.read-btn, .practice-btn {
    flex: 1;
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
}

.read-btn {
    background: var(--primary-color);
    color: white;
}

.read-btn:hover {
    background: var(--primary-hover);
}

.practice-btn {
    background: var(--secondary-color);
    color: white;
}

.practice-btn:hover {
    background: #047857;
}

/* Practice View */
.practice-view {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

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

.practice-header h2 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 10px;
}

#practice-progress {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.practice-container {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--shadow);
}

.practice-sentence-zh {
    font-size: 1.2rem;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: #f0f9ff;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.practice-answer-area {
    min-height: 60px;
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: center;
    background: #fafafa;
}

.practice-answer-area.drag-over {
    border-color: var(--primary-color);
    background: #eff6ff;
}

.practice-word {
    display: inline-block;
    padding: 8px 16px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: grab;
    font-size: 1rem;
    transition: all 0.2s;
    user-select: none;
}

.practice-word:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.practice-word.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

.practice-word.correct {
    background: #d1fae5;
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}

.practice-word.wrong {
    background: #fee2e2;
    border-color: #ef4444;
    color: #ef4444;
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.practice-word-placed {
    display: inline-block;
    padding: 8px 16px;
    background: var(--primary-color);
    color: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
}

.practice-word-placed:hover {
    background: var(--primary-hover);
}

.practice-word-placed.correct {
    background: var(--secondary-color);
}

.practice-word-placed.wrong {
    background: #ef4444;
}

.practice-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 30px;
}

.practice-options .practice-word {
    cursor: grab;
}

.practice-options .practice-word:active {
    cursor: grabbing;
}

.practice-feedback {
    text-align: center;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
    display: none;
}

.practice-feedback.show {
    display: block;
}

.practice-feedback.success {
    background: #d1fae5;
    color: var(--secondary-color);
}

.practice-feedback.error {
    background: #fee2e2;
    color: #ef4444;
}

.practice-feedback h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.practice-feedback p {
    margin-bottom: 15px;
    font-size: 1rem;
}

.practice-original-sentence {
    background: white;
    padding: 15px;
    border-radius: 6px;
    margin-top: 10px;
    font-size: 1.05rem;
    color: var(--text-primary);
    line-height: 1.6;
}

.practice-btn-group {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

.practice-next-btn, .practice-check-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.practice-check-btn {
    background: var(--primary-color);
    color: white;
}

.practice-check-btn:hover {
    background: var(--primary-hover);
}

.practice-check-btn:disabled {
    background: var(--border-color);
    cursor: not-allowed;
}

.practice-next-btn {
    background: var(--secondary-color);
    color: white;
}

.practice-next-btn:hover {
    background: #047857;
}

.practice-complete {
    text-align: center;
    padding: 40px;
}

.practice-complete h2 {
    color: var(--secondary-color);
    font-size: 2rem;
    margin-bottom: 20px;
}

.practice-complete-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin: 30px 0;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Practice Mode Select */
.practice-mode-select {
    text-align: center;
    padding: 40px 20px;
}

.practice-mode-select h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 30px;
}

.practice-mode-options {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.practice-mode-card {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
    width: 200px;
    cursor: pointer;
    transition: all 0.2s;
}

.practice-mode-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.mode-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.mode-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.mode-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Chunk Practice */
.practice-chunks-hint {
    margin-bottom: 20px;
}

.hint-label {
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 10px;
    display: block;
}

.chunks-flow {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 15px;
    background: #f0f9ff;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.chunk-placed {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: var(--primary-color);
    color: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.chunk-placed:hover {
    background: var(--primary-hover);
}

.chunk-placed.correct {
    background: var(--secondary-color);
}

.chunk-placed.wrong {
    background: #ef4444;
}

.chunk-num {
    background: rgba(255,255,255,0.3);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.chunk-text {
    font-size: 0.95rem;
}

.practice-chunks-options {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.practice-chunk-card {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 15px 20px;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 180px;
}

.practice-chunk-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}

.chunk-english {
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 5px;
}

.chunk-chinese {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Tooltip Chunks */
.tooltip-chunks {
    background: #f0f9ff;
    border-radius: 6px;
    padding: 12px;
    margin-top: 12px;
}

.chunks-label {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.chunks-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.chunk-item {
    background: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.9rem;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.chunk-arrow {
    color: var(--primary-color);
    font-weight: bold;
}

.practice-no-chunks {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
}

.practice-no-chunks p {
    margin-bottom: 20px;
}

/* Header Controls */
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.header-text {
    text-align: left;
}

.header-controls {
    display: flex;
    gap: 15px;
    align-items: center;
}

.toggle-switch {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.toggle-switch input {
    display: none;
}

.toggle-slider {
    width: 44px;
    height: 24px;
    background: var(--border-color);
    border-radius: 12px;
    position: relative;
    transition: background 0.3s;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: transform 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--secondary-color);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(20px);
}

.toggle-label {
    font-size: 0.9rem;
    color: white;
}

/* Small toggle for sub-header */
.toggle-switch.toggle-small {
    gap: 6px;
}

.toggle-switch.toggle-small .toggle-slider {
    width: 36px;
    height: 18px;
    border-radius: 9px;
}

.toggle-switch.toggle-small .toggle-slider::before {
    width: 14px;
    height: 14px;
    top: 2px;
    left: 2px;
}

.toggle-switch.toggle-small input:checked + .toggle-slider::before {
    transform: translateX(18px);
}

.toggle-switch.toggle-small .toggle-label {
    font-size: 0.8rem;
}

/* Sentence Chinese Display */
.sentence-chinese-inline {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 4px;
    padding-left: 4px;
    border-left: 2px solid var(--secondary-color);
    line-height: 1.5;
}

.sentence-chunks-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
    padding: 8px;
    background: #f0f9ff;
    border-radius: 6px;
}

.chunk-inline {
    background: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s;
}

.chunk-inline:hover {
    border-color: var(--primary-color);
    background: #eff6ff;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
}

.modal-large {
    max-width: 900px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    font-size: 1.3rem;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 5px 10px;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

/* Structure Comparison View */
.structure-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

@media (max-width: 700px) {
    .structure-comparison {
        grid-template-columns: 1fr;
    }
}

.structure-side {
    padding: 20px;
    border-radius: 8px;
}

.structure-side.chinese {
    background: #fef3c7;
}

.structure-side.english {
    background: #dbeafe;
}

.structure-side h3 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.structure-side.chinese h3 {
    color: #b45309;
}

.structure-side.english h3 {
    color: var(--primary-color);
}

.chunks-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-start;
}

.chunk-block {
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.chunk-block:hover {
    transform: scale(1.05);
}

.chunks-container.chinese-flow .chunk-block {
    background: #fcd34d;
    color: #78350f;
    border: 2px solid #f59e0b;
}

.chunks-container.english-tree .chunk-block {
    background: #bfdbfe;
    color: #1e40af;
    border: 2px solid #3b82f6;
}

.chunk-block.main-verb {
    font-weight: bold;
    font-size: 1.1rem;
    border-width: 3px;
}

.chunk-block.highlighted {
    box-shadow: 0 0 0 3px rgba(255, 255, 0, 0.8);
    transform: scale(1.1);
}

.chunk-arrow-connector {
    display: inline-flex;
    align-items: center;
    color: var(--text-secondary);
    font-size: 1.2rem;
}

.hook-indicator {
    display: inline-block;
    background: #f472b6;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    margin-left: 4px;
}

/* Grammar Focus View */
.grammar-focus-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
}

.grammar-tab {
    padding: 10px 20px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text-secondary);
    border-radius: 6px 6px 0 0;
    transition: all 0.2s;
}

.grammar-tab:hover {
    background: #f1f5f9;
}

.grammar-tab.active {
    color: var(--primary-color);
    background: #eff6ff;
    font-weight: 600;
}

.grammar-content {
    display: none;
}

.grammar-content.active {
    display: block;
}

/* Timeline for Tense */
.grammar-timeline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 20px;
    background: #f8fafc;
    border-radius: 8px;
    margin: 20px 0;
    position: relative;
}

.grammar-timeline::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 10%;
    right: 10%;
    height: 4px;
    background: linear-gradient(to right, #94a3b8, var(--primary-color));
    transform: translateY(-50%);
    z-index: 0;
}

.timeline-point {
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1;
}

.timeline-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    border: 3px solid var(--border-color);
    margin-bottom: 8px;
}

.timeline-point.past .timeline-dot {
    background: #94a3b8;
    border-color: #64748b;
}

.timeline-point.now .timeline-dot {
    background: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.3);
}

.timeline-point.future .timeline-dot {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
}

.timeline-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.timeline-point.now .timeline-label {
    color: var(--primary-color);
    font-weight: 600;
}

/* Hook Diagram */
.hook-diagram {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 30px;
    background: #f8fafc;
    border-radius: 8px;
    margin: 20px 0;
}

.hook-noun {
    padding: 15px 25px;
    background: #dbeafe;
    border: 2px solid #3b82f6;
    border-radius: 8px;
    font-weight: 600;
}

.hook-connector {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.hook-word {
    background: #fce7f3;
    color: #be185d;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 1.1rem;
}

.hook-arrow {
    font-size: 1.5rem;
    color: #64748b;
}

.hook-clause {
    padding: 15px 25px;
    background: #d1fae5;
    border: 2px solid #059669;
    border-radius: 8px;
    color: #065f46;
}

/* Culture Card */
.culture-card {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 2px solid #f59e0b;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
}

.culture-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.culture-icon {
    font-size: 1.5rem;
}

.culture-title {
    font-weight: 600;
    color: #78350f;
    font-size: 1.1rem;
}

.culture-content {
    color: #92400e;
    line-height: 1.7;
}

.culture-example {
    background: white;
    padding: 12px;
    border-radius: 6px;
    margin-top: 12px;
    font-style: italic;
}

/* Audio Practice */
.audio-practice-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
}

.audio-play-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    background: var(--primary-color);
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.audio-play-btn:hover {
    transform: scale(1.1);
    background: var(--primary-hover);
}

.audio-play-btn.playing {
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Structure Button */
.structure-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: #8b5cf6;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    margin-left: 10px;
    transition: all 0.2s;
}

.structure-btn:hover {
    background: #7c3aed;
}

/* Grammar Detail Button */
.grammar-detail-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: #ec4899;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.grammar-detail-btn:hover {
    background: #db2777;
}

/* Grammar Modal Styles */
.grammar-modal-title {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.grammar-modal-section {
    margin-bottom: 15px;
}

.grammar-modal-section strong {
    display: block;
    margin-bottom: 5px;
}

.grammar-modal-structure {
    background: #e0e7ff;
    padding: 12px;
    border-radius: 6px;
    margin: 15px 0;
}

.grammar-modal-examples {
    margin: 20px 0 10px;
}

.grammar-modal-examples ul {
    padding-left: 20px;
    line-height: 2;
}

.grammar-modal-hint {
    margin-top: 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Practice placeholder text */
.practice-placeholder {
    color: #94a3b8;
}

.practice-placeholder-error {
    color: #ef4444;
}

/* Results stat numbers */
.stat-number.success {
    color: var(--secondary-color);
}

.stat-number.error {
    color: #ef4444;
}

/* Grammar Examples */
.grammar-examples-list {
    list-style: none;
    padding: 0;
}

.grammar-example-item {
    background: #f8fafc;
    border-radius: 8px;
    padding: 12px 15px;
    margin-bottom: 10px;
    border-left: 3px solid var(--primary-color);
}

.example-english {
    color: var(--text-primary);
    font-size: 0.95rem;
    margin-bottom: 5px;
    line-height: 1.5;
}

.example-chinese {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Grammar Compare */
.grammar-compare {
    margin: 20px 0;
}

.compare-box {
    background: linear-gradient(135deg, #fef3c7, #dbeafe);
    border-radius: 8px;
    padding: 15px;
    font-size: 0.9rem;
    line-height: 1.8;
    color: var(--text-primary);
    border-left: 4px solid #f59e0b;
}
