/* Timeline Page Styles */

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 1rem;
}

.header-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
}

.back-link {
    color: #5a4fcf;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border: 2px solid #5a4fcf;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.back-link:hover {
    background: #5a4fcf;
    color: white;
}

.quiz-link-small {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8e53 100%);
    border-radius: 20px;
    transition: all 0.3s ease;
}

/* Intro Box */
.intro-box {
    background: white;
    border-radius: 16px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    text-align: center;
}

.intro-box h3 {
    color: #5a4fcf;
    margin-bottom: 0.5rem;
}

/* Timeline Section */
.timeline-section {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.timeline-container {
    position: relative;
}

/* Time Labels */
.time-labels {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    padding: 0 2rem;
}

.time-label {
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
}

.time-label.past {
    background: #ffebee;
    color: #c62828;
}

.time-label.now {
    background: #e8f5e9;
    color: #2e7d32;
}

.time-label.future {
    background: #e3f2fd;
    color: #1565c0;
}

/* Timeline Line */
.timeline-line {
    display: flex;
    align-items: center;
    height: 60px;
    margin: 1rem 0;
}

.timeline-past,
.timeline-future {
    flex: 1;
    height: 4px;
    background: #e0e0e0;
}

.timeline-past {
    background: linear-gradient(90deg, #ffcdd2 0%, #ef9a9a 100%);
    border-radius: 4px 0 0 4px;
}

.timeline-future {
    background: linear-gradient(90deg, #90caf9 0%, #bbdefb 100%);
    border-radius: 0 4px 4px 0;
}

.timeline-now {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #66bb6a 0%, #43a047 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.5rem;
    box-shadow: 0 4px 15px rgba(67, 160, 71, 0.4);
    position: relative;
    z-index: 2;
}

.now-marker {
    animation: pulse 2s ease infinite;
}

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

/* Tense Visualization */
.tense-visual {
    min-height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: #fafafa;
    border-radius: 12px;
    margin-top: 1rem;
}

.placeholder-text {
    color: #999;
    font-style: italic;
}

.visual-wrapper {
    display: flex;
    width: 100%;
    height: 80px;
    align-items: center;
}

.visual-section {
    flex: 1;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.past-section {
    background: rgba(244, 67, 54, 0.05);
    border-radius: 8px 0 0 8px;
}

.present-section {
    background: rgba(76, 175, 80, 0.05);
}

.future-section {
    background: rgba(33, 150, 243, 0.05);
    border-radius: 0 8px 8px 0;
}

/* Markers */
.marker {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.marker-point {
    font-size: 2rem;
    color: #5a4fcf;
    animation: fadeIn 0.5s ease;
}

.marker-duration {
    width: 80%;
}

.duration-bar {
    display: block;
    height: 12px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 6px;
    animation: expandWidth 0.5s ease;
}

@keyframes expandWidth {
    from { width: 0; }
    to { width: 100%; }
}

.marker-repeated {
    font-size: 1.5rem;
    color: #5a4fcf;
    letter-spacing: 0.5rem;
}

.marker-start {
    font-size: 1.5rem;
    color: #ff9800;
}

.marker-arrow-right {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    color: #5a4fcf;
}

.arrow-line {
    display: inline-block;
    width: 50px;
    height: 4px;
    background: linear-gradient(90deg, #ff9800, #5a4fcf);
    margin-right: 0.25rem;
}

.marker-duration-long {
    width: 90%;
}

.duration-bar-long {
    display: block;
    height: 12px;
    background: linear-gradient(90deg, #ff9800 0%, #5a4fcf 50%, #5a4fcf 100%);
    border-radius: 6px;
    animation: expandWidth 0.5s ease;
}

.marker-group {
    display: flex;
    gap: 2rem;
    align-items: flex-end;
}

.marker-label {
    font-size: 0.7rem;
    color: #666;
    white-space: nowrap;
}

.marker.earlier {
    color: #9c27b0;
}

.marker.later {
    color: #f44336;
}

.marker.completed {
    color: #4caf50;
    font-size: 1.5rem;
}

.marker.deadline {
    color: #2196f3;
}

.visual-description {
    text-align: center;
    margin-top: 1rem;
}

.tense-name-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.visual-description p {
    color: #666;
    margin: 0;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.5); }
    to { opacity: 1; transform: scale(1); }
}

/* Tense Selector */
.tense-selector-section {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.tense-selector-section h3 {
    color: #5a4fcf;
    margin-bottom: 1rem;
    text-align: center;
}

.tense-group {
    margin-bottom: 1rem;
}

.tense-group:last-child {
    margin-bottom: 0;
}

.tense-group h4 {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    padding-left: 0.5rem;
    border-left: 3px solid #5a4fcf;
}

.tense-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tense-btn {
    padding: 0.5rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 20px;
    background: white;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.tense-btn:hover {
    border-color: #5a4fcf;
    color: #5a4fcf;
}

.tense-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
}

/* Tense Info Panel */
.tense-info-panel {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #f0f0f0;
}

.info-header h3 {
    color: #5a4fcf;
    margin: 0;
}

.learn-more {
    color: #5a4fcf;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
}

.learn-more:hover {
    text-decoration: underline;
}

.info-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.info-item {
    flex: 1;
    background: #f8f9ff;
    padding: 1rem;
    border-radius: 10px;
}

.info-item.full {
    flex: 100%;
}

.info-item h4 {
    color: #5a4fcf;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.info-item p {
    margin: 0;
    color: #333;
}

.example-item {
    padding: 0.5rem;
    background: white;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    font-style: italic;
    color: #555;
}

.example-item:last-child {
    margin-bottom: 0;
}

/* Compare Section */
.compare-section {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.compare-section h3 {
    color: #5a4fcf;
    margin-bottom: 0.5rem;
}

.compare-section > p {
    color: #666;
    margin-bottom: 1rem;
}

.compare-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.compare-controls select {
    padding: 0.75rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 0.95rem;
    min-width: 200px;
    cursor: pointer;
}

.compare-controls select:focus {
    outline: none;
    border-color: #5a4fcf;
}

.vs {
    font-weight: 700;
    color: #ff6b6b;
    font-size: 1.1rem;
}

.compare-btn {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.compare-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* Compare Result */
.compare-result {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: #f8f9ff;
    border-radius: 12px;
    animation: slideUp 0.3s ease;
}

.compare-header h4 {
    color: #5a4fcf;
    text-align: center;
    margin-bottom: 1rem;
}

.compare-timelines {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.compare-item {
    flex: 1;
    min-width: 200px;
    text-align: center;
}

.compare-label {
    font-weight: 600;
    color: #5a4fcf;
    margin-bottom: 0.5rem;
}

.mini-timeline {
    display: flex;
    height: 40px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.mini-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: transparent;
}

.mini-section.past {
    background: #ffebee;
}

.mini-section.present {
    background: #e8f5e9;
}

.mini-section.future {
    background: #e3f2fd;
}

.mini-section.active {
    color: #5a4fcf;
}

.mini-section.past.active {
    background: #ffcdd2;
    color: #c62828;
}

.mini-section.present.active {
    background: #c8e6c9;
    color: #2e7d32;
}

.mini-section.future.active {
    background: #bbdefb;
    color: #1565c0;
}

.compare-desc {
    font-size: 0.85rem;
    color: #666;
}

.compare-vs {
    font-weight: 700;
    color: #ff6b6b;
    font-size: 1.5rem;
}

.compare-table {
    overflow-x: auto;
}

.compare-table table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
}

.compare-table th,
.compare-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.compare-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
}

.compare-table th:first-child {
    background: #f0f0f0;
    color: #666;
}

.compare-table td:first-child {
    font-weight: 600;
    color: #666;
    background: #fafafa;
}

/* Responsive */
@media (max-width: 768px) {
    .timeline-section {
        padding: 1rem;
    }
    
    .time-labels {
        padding: 0 0.5rem;
        font-size: 0.8rem;
    }
    
    .timeline-now {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    .tense-buttons {
        justify-content: center;
    }
    
    .tense-btn {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    .info-row {
        flex-direction: column;
    }
    
    .compare-controls {
        flex-direction: column;
    }
    
    .compare-controls select {
        width: 100%;
    }
    
    .compare-timelines {
        flex-direction: column;
    }
    
    .compare-vs {
        transform: rotate(90deg);
    }
}
