/* 📊 PROGRESS TIMELINE STYLES */

.timeline-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.timeline-modal {
    background: linear-gradient(135deg, #1e1e2e 0%, #2a2a3e 100%);
    border-radius: 25px;
    width: 90vw;
    max-width: 1400px;
    height: 85vh;
    box-shadow: 
        0 30px 90px rgba(0, 0, 0, 0.6),
        0 0 100px rgba(102, 126, 234, 0.1),
        inset 0 0 0 1px rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: modalSlideUp 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalSlideUp {
    from {
        transform: translateY(100px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* Timeline Header */
.timeline-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 25px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    min-height: 100px;
}

.timeline-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(180deg); }
}

.timeline-title-section {
    display: flex;
    align-items: center;
    gap: 30px;
}

.timeline-title-section h2 {
    margin: 0;
    color: white;
    font-size: 28px;
    font-weight: 700;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    letter-spacing: -0.5px;
    white-space: nowrap;
}

.timeline-stats {
    display: flex;
    gap: 15px;
}

.stat-item {
    display: flex;
    align-items: baseline;
    gap: 6px;
    background: rgba(255, 255, 255, 0.15);
    padding: 6px 12px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.stat-number {
    font-size: 20px;
    font-weight: 700;
    color: white;
}

.stat-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

/* Timeline Controls */
.timeline-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
    z-index: 5;
}

.date-filter {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 25px;
    border-radius: 20px;
    backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    z-index: 10005;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    flex-direction: column;
    gap: 20px;
    min-width: 320px;
}

.date-filter.active {
    display: flex;
}

.date-filter-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10004;
}

.date-filter-overlay.active {
    display: block;
}

.date-filter-header {
    color: white;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.date-filter-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.date-filter-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 10px;
}

.filter-toggle-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.date-input {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.date-input::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
}

.date-input:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.date-filter span {
    color: white;
    font-weight: 600;
}

.filter-buttons {
    display: flex;
    gap: 12px;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    min-width: 32px;
    text-align: center;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.filter-btn.active {
    background: rgba(255, 255, 255, 0.3);
    border-color: white;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.close-timeline-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    margin-left: 10px;
}

.close-timeline-btn:hover {
    background: rgba(231, 76, 60, 0.3);
    transform: rotate(90deg);
}

/* View Toggles */
.timeline-view-toggles {
    background: rgba(42, 42, 62, 0.8);
    padding: 12px 30px;
    display: flex;
    gap: 15px;
    border-bottom: 1px solid rgba(102, 126, 234, 0.2);
    position: relative;
    z-index: 2;
    align-items: center;
}

.view-toggle {
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.3);
    color: #a0b0ff;
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.view-toggle:hover {
    background: rgba(102, 126, 234, 0.2);
    transform: translateY(-2px);
}

.view-toggle.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
    color: white;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

/* Timeline Container */
.timeline-container {
    flex: 1;
    overflow-y: auto;
    padding: 40px;
    background: linear-gradient(180deg, rgba(30, 30, 46, 0.5) 0%, rgba(42, 42, 62, 0.5) 100%);
}

.timeline-content {
    max-width: 1000px;
    margin: 0 auto;
}

/* Timeline Track */
.timeline-track {
    position: relative;
    padding-left: 120px;
}

.timeline-track::before {
    content: '';
    position: absolute;
    left: 60px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(
        180deg,
        #667eea 0%,
        #764ba2 25%,
        #667eea 50%,
        #764ba2 75%,
        #667eea 100%
    );
    background-size: 100% 400px;
    animation: timelineFlow 10s linear infinite;
}

@keyframes timelineFlow {
    0% { background-position: 0 0; }
    100% { background-position: 0 400px; }
}

/* Timeline Sections */
.timeline-section {
    position: relative;
    margin-bottom: 60px;
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.timeline-section.animate-in {
    opacity: 1;
}

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

/* Date Bubble */
.timeline-date {
    position: absolute;
    left: -60px;
    top: 0;
    width: 120px;
    text-align: center;
}

.date-bubble {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
    position: relative;
    transition: all 0.3s ease;
}

.date-bubble:hover {
    transform: scale(1.1) rotate(5deg);
}

.date-bubble.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
    }
    50% { 
        transform: scale(1.05);
        box-shadow: 0 15px 40px rgba(102, 126, 234, 0.6);
    }
}

.date-day {
    font-size: 28px;
    font-weight: 700;
}

.date-month {
    font-size: 14px;
    font-weight: 500;
    opacity: 0.9;
}

.today-label {
    background: rgba(255, 255, 255, 0.3);
    padding: 4px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
    margin-top: 8px;
    letter-spacing: 1px;
}

/* Event Cards */
.timeline-events {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.event-card {
    padding: 20px 25px;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.event-card:hover {
    transform: translateX(10px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.event-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.1) 50%, transparent 100%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.event-card:hover::before {
    transform: translateX(100%);
}

.event-icon {
    font-size: 32px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    animation: iconFloat 3s ease-in-out infinite;
}

@keyframes iconFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.event-content {
    flex: 1;
    color: white;
}

.event-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 5px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.event-time {
    font-size: 14px;
    opacity: 0.8;
}

.event-details {
    font-size: 14px;
    font-weight: 500;
    margin-top: 5px;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    display: inline-block;
}

.event-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.event-card:hover .event-glow {
    opacity: 1;
}

/* Heatmap View */
.heatmap-container {
    padding: 30px;
    text-align: center;
}

.heatmap-container h3 {
    color: #a0b0ff;
    font-size: 24px;
    margin-bottom: 30px;
}

.heatmap-legend {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    color: #a0b0ff;
    font-size: 14px;
}

.legend-blocks {
    display: flex;
    gap: 4px;
}

.heatmap-grid {
    display: flex;
    gap: 4px;
    justify-content: center;
    flex-direction: row-reverse;
}

.heatmap-week {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.heatmap-block {
    width: 15px;
    height: 15px;
    border-radius: 3px;
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.2);
    transition: all 0.3s ease;
    cursor: pointer;
}

.heatmap-block[data-level="0"] {
    background: rgba(102, 126, 234, 0.1);
}

.heatmap-block[data-level="1"] {
    background: rgba(102, 126, 234, 0.3);
}

.heatmap-block[data-level="2"] {
    background: rgba(102, 126, 234, 0.5);
}

.heatmap-block[data-level="3"] {
    background: rgba(102, 126, 234, 0.7);
}

.heatmap-block[data-level="4"] {
    background: #667eea;
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
}

.heatmap-block:hover {
    transform: scale(1.5);
    border-color: white;
    z-index: 10;
}

/* Scrollbar Styling */
.timeline-container::-webkit-scrollbar {
    width: 10px;
}

.timeline-container::-webkit-scrollbar-track {
    background: rgba(30, 30, 46, 0.5);
    border-radius: 10px;
}

.timeline-container::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

.timeline-container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #7c94ff 0%, #8a61b8 100%);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .timeline-modal {
        width: 95vw;
        height: 90vh;
        border-radius: 20px;
    }
    
    .timeline-header {
        flex-direction: column;
        padding: 20px;
        gap: 20px;
    }
    
    .timeline-controls {
        align-items: stretch;
        width: 100%;
    }
    
    .filter-buttons {
        flex-wrap: wrap;
    }
    
    .timeline-track {
        padding-left: 80px;
    }
    
    .timeline-track::before {
        left: 30px;
    }
    
    .timeline-date {
        left: -30px;
        width: 60px;
    }
    
    .date-bubble {
        padding: 10px;
    }
    
    .date-day {
        font-size: 20px;
    }
    
    .event-card {
        padding: 15px;
    }
}