/* Reading Passages Specific Styles */

.reading-passages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.reading-passage-card {
    background: white;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 3px solid transparent;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.reading-passage-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    border-color: #4CAF50;
}

/* Passage color variations */
.passage-color-1 {
    border-left: 6px solid #667eea;
}
.passage-color-2 {
    border-left: 6px solid #4CAF50;
}
.passage-color-3 {
    border-left: 6px solid #ff9800;
}
.passage-color-4 {
    border-left: 6px solid #e91e63;
}
.passage-color-5 {
    border-left: 6px solid #9c27b0;
}

.passage-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.difficulty-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.difficulty-badge.easy {
    background: #e8f5e9;
    color: #2e7d32;
}

.difficulty-badge.medium {
    background: #fff3e0;
    color: #f57c00;
}

.difficulty-badge.hard {
    background: #ffebee;
    color: #c62828;
}

.content-type-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    background: #f3e5f5;
    color: #7b1fa2;
    display: flex;
    align-items: center;
    gap: 5px;
}

.passage-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 15px;
    line-height: 1.4;
    font-family: 'Comic Neue', cursive;
}

.passage-preview {
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
    font-size: 1rem;
}

.passage-meta {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
}

.meta-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    font-size: 0.9rem;
    color: #718096;
}

.meta-item .emoji {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.passage-actions {
    display: flex;
    gap: 10px;
}

.read-btn, .practice-btn {
    flex: 1;
    padding: 12px 0;
    border: none;
    border-radius: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.read-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.practice-btn {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
}

.read-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

.practice-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.3);
}

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

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 30px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideIn 0.3s ease;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.modal-header h2 {
    font-size: 2rem;
    color: #2d3748;
    margin: 0;
    font-family: 'Comic Neue', cursive;
    flex: 1;
    padding-right: 20px;
}

.modal-body {
    padding: 10px 0;
}

.passage-metadata {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 15px;
}

.metadata-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    color: #4a5568;
}

.metadata-item .emoji {
    font-size: 1.5rem;
}

.passage-content {
    margin-bottom: 30px;
}

.passage-content h3 {
    font-size: 1.5rem;
    color: #667eea;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e2e8f0;
}

.content-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #2d3748;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    max-height: 400px;
    overflow-y: auto;
}

.detail-section {
    margin-bottom: 30px;
}

.detail-section h3 {
    font-size: 1.4rem;
    color: #4CAF50;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.questions-preview {
    display: grid;
    gap: 15px;
}

.question-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: white;
    border-radius: 10px;
    border-left: 4px solid #667eea;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.question-number {
    background: #667eea;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

.question-text {
    flex: 1;
    color: #4a5568;
    font-size: 0.95rem;
}

.question-type {
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 600;
    background: #e8f5e9;
    color: #2e7d32;
}

.words-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.word-tag {
    padding: 8px 16px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.more-tag {
    padding: 8px 16px;
    background: #e2e8f0;
    color: #4a5568;
    border-radius: 20px;
    font-size: 0.9rem;
}

.passage-actions-detail {
    display: flex;
    gap: 20px;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #f0f0f0;
}

.passage-actions-detail button {
    flex: 1;
    padding: 16px 0;
    border: none;
    border-radius: 15px;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.4);
    background: linear-gradient(135deg, #45a049, #4CAF50);
}

.btn-secondary {
    background: #f8f9fa;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-secondary:hover {
    background: #667eea;
    color: white;
}

/* 在 reading-styles.css 中添加 */

.passage-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 10px;
}

.tag {
    padding: 4px 8px;
    background: #e3f2fd;
    color: #1976d2;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.more-tag {
    padding: 4px 8px;
    background: #f5f5f5;
    color: #757575;
    border-radius: 12px;
    font-size: 0.8rem;
}

.passage-meta {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
}

@media (max-width: 768px) {
    .passage-meta {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .passage-meta {
        grid-template-columns: 1fr;
    }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .reading-passages-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    }
}

@media (max-width: 768px) {
    .reading-passages-grid {
        grid-template-columns: 1fr;
    }
    
    .passage-meta {
        grid-template-columns: repeat(3, 1fr);
        font-size: 0.85rem;
    }
    
    .modal-content {
        padding: 20px;
        margin: 10px;
    }
    
    .modal-header h2 {
        font-size: 1.5rem;
    }
    
    .passage-metadata {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .passage-actions-detail {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .passage-meta {
        grid-template-columns: 1fr;
    }
    
    .passage-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .passage-actions {
        flex-direction: column;
    }
}