* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6BCB77;
    --secondary-color: #4D96A9;
    --accent-color: #FFD93D;
    --text-dark: #2C3333;
    --text-light: #6C757D;
    --bg-light: #F8F9FA;
    --white: #FFFFFF;
    --border-radius: 12px;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.12);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: linear-gradient(135deg, #E8F5E9 0%, #FFF9C4 100%);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
    padding: 20px 0;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 15px;
}

header {
    text-align: center;
    margin-bottom: 30px;
    animation: fadeInDown 0.6s ease;
}

header h1 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.subtitle {
    color: var(--text-light);
    font-size: 0.95rem;
}

.tab-nav {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    background: var(--white);
    padding: 8px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.tab-btn {
    flex: 1;
    padding: 12px;
    border: none;
    background: transparent;
    color: var(--text-light);
    font-size: 0.95rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.tab-btn.active {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
}

.tab-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

.tab-content.active {
    display: block;
}

.category-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.category-btn {
    padding: 8px 16px;
    border: 2px solid var(--primary-color);
    background: var(--white);
    color: var(--primary-color);
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.category-btn.active {
    background: var(--primary-color);
    color: var(--white);
}

.dish-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.dish-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    cursor: pointer;
}

.dish-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.dish-card.expanded {
    border-left: 4px solid var(--primary-color);
}

.dish-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.dish-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
}

.dish-tag {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.tag-heated {
    background: #FFE5E5;
    color: #E74C3C;
}

.tag-unheated {
    background: #E3F2FD;
    color: #2196F3;
}

.dish-formula {
    background: var(--bg-light);
    padding: 12px;
    border-radius: 8px;
    margin: 10px 0;
    font-weight: 500;
    color: var(--secondary-color);
    line-height: 1.8;
    font-size: 1.05rem;
}

.dish-formula .pause {
    color: #E74C3C;
    font-weight: 700;
    margin: 0 3px;
    font-size: 1.2em;
}

.dish-details {
    display: none;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed #E0E0E0;
}

.dish-card.expanded .dish-details {
    display: block;
    animation: slideDown 0.3s ease;
}

.detail-item {
    margin: 8px 0;
    padding-left: 20px;
    position: relative;
}

.detail-item:before {
    content: "•";
    position: absolute;
    left: 8px;
    color: var(--primary-color);
    font-weight: bold;
}

.practice-card, .test-container {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--shadow);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.card-number {
    color: var(--text-light);
    font-size: 0.9rem;
}

.card-content {
    min-height: 200px;
    margin-bottom: 20px;
}

.card-content h3 {
    color: var(--text-dark);
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.answer {
    background: var(--bg-light);
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    border-left: 4px solid var(--primary-color);
}

.answer.hidden {
    display: none;
}

.card-actions {
    display: flex;
    gap: 10px;
    justify-content: space-between;
}

.btn-primary, .btn-secondary, .btn-nav {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background: #5AB968;
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--bg-light);
    color: var(--text-dark);
}

.btn-secondary:hover {
    background: #E0E0E0;
}

.btn-nav {
    flex: 1;
    background: var(--secondary-color);
    color: var(--white);
}

.btn-nav:hover {
    background: #3D7A8A;
}

.test-start {
    text-align: center;
    padding: 40px 20px;
}

.test-start h2 {
    margin-bottom: 15px;
    color: var(--text-dark);
}

.test-start p {
    color: var(--text-light);
    margin-bottom: 25px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-light);
    border-radius: 4px;
    margin-bottom: 20px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.question-number {
    color: var(--text-light);
    margin-bottom: 15px;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.option {
    padding: 15px;
    border: 2px solid #E0E0E0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--white);
}

.option:hover {
    border-color: var(--primary-color);
    background: var(--bg-light);
}

.option.selected {
    border-color: var(--primary-color);
    background: #E8F5E9;
}

.option.correct {
    border-color: var(--primary-color);
    background: #E8F5E9;
}

.option.wrong {
    border-color: #E74C3C;
    background: #FFE5E5;
}

.test-result {
    text-align: center;
    padding: 30px 20px;
}

.score-display {
    margin: 30px 0;
}

.score-circle {
    display: inline-flex;
    align-items: baseline;
    justify-content: center;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    font-size: 3rem;
    font-weight: bold;
    box-shadow: var(--shadow-hover);
}

.score-total {
    font-size: 1.5rem;
    margin-left: 5px;
}

#result-message {
    color: var(--text-light);
    margin: 20px 0;
    font-size: 1.1rem;
}

.test-result .btn-primary,
.test-result .btn-secondary {
    margin: 8px;
}

.test-navigation {
    display: flex;
    gap: 12px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px dashed #E0E0E0;
}

.test-navigation .btn-nav {
    flex: 1;
    padding: 14px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    background: var(--bg-light);
    color: var(--text-dark);
}

.test-navigation .btn-nav:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.test-navigation .btn-nav:not(:disabled):hover {
    background: #E0E0E0;
    transform: translateY(-2px);
}

.test-navigation .btn-nav-primary {
    background: var(--primary-color);
    color: var(--white);
}

.test-navigation .btn-nav-primary:not(:disabled):hover {
    background: #5AB968;
}

footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    color: var(--text-light);
    font-size: 0.9rem;
}

.hidden {
    display: none !important;
}

.formula-hint {
    background: linear-gradient(135deg, #FFF3E0 0%, #FFE0B2 100%);
    border-left: 4px solid #FF9800;
    border-radius: 8px;
    padding: 15px;
    margin-top: 20px;
    animation: slideIn 0.4s ease;
}

.hint-title {
    font-weight: 600;
    color: #E65100;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.hint-content {
    color: var(--text-dark);
    line-height: 1.8;
    font-size: 1rem;
    margin-bottom: 8px;
}

.hint-content .pause {
    color: #E74C3C;
    font-weight: 700;
    margin: 0 3px;
    font-size: 1.2em;
}

.hint-category {
    color: var(--text-light);
    font-size: 0.85rem;
    font-style: italic;
}

.keyword {
    color: #E74C3C;
    font-weight: 700;
    background: rgba(231, 76, 60, 0.1);
    padding: 2px 4px;
    border-radius: 3px;
}

.pause {
    color: #E74C3C;
    font-weight: 700;
    margin: 0 3px;
    font-size: 1.2em;
}

.review-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.review-content {
    background: var(--white);
    border-radius: var(--border-radius);
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 2px solid var(--bg-light);
}

.review-header h3 {
    margin: 0;
    color: var(--text-dark);
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-light);
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-modal:hover {
    background: var(--bg-light);
    color: var(--text-dark);
}

.review-list {
    overflow-y: auto;
    padding: 20px;
}

.review-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px dashed #E0E0E0;
}

.review-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.review-number {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.review-details {
    flex: 1;
}

.review-question {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.review-answer {
    padding: 8px 12px;
    border-radius: 6px;
    margin: 6px 0;
    font-size: 0.9rem;
}

.wrong-answer {
    background: #FFE5E5;
    color: #C62828;
    border-left: 3px solid #E74C3C;
}

.correct-answer {
    background: #E8F5E9;
    color: #2E7D32;
    border-left: 3px solid var(--primary-color);
}

.review-formula {
    background: linear-gradient(135deg, #FFF3E0 0%, #FFE0B2 100%);
    padding: 12px;
    border-radius: 6px;
    margin-top: 10px;
    border-left: 3px solid #FF9800;
    line-height: 1.6;
    font-size: 0.9rem;
}

.review-formula .pause {
    color: #E74C3C;
    font-weight: 700;
    margin: 0 3px;
    font-size: 1.2em;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 500px;
    }
}

@media (max-width: 600px) {
    header h1 {
        font-size: 1.5rem;
    }
    
    .tab-btn {
        font-size: 0.85rem;
        padding: 10px;
    }
    
    .dish-card {
        padding: 15px;
    }
    
    .practice-card, .test-container {
        padding: 20px 15px;
    }
    
    .score-circle {
        width: 120px;
        height: 120px;
        font-size: 2.5rem;
    }
}
