/* Historical Timeline Website Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styles */
.header {
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.header h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.header p {
    font-size: 1.2rem;
    color: #7f8c8d;
    margin-bottom: 30px;
}

/* Navigation Link */
.main-nav {
    margin-bottom: 30px;
}

.main-nav a {
    display: inline-block;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.main-nav a:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* Flags Container */
.flags-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.flag-item {
    text-align: center;
    transition: transform 0.3s ease;
}

.flag-item:hover {
    transform: scale(1.05);
}

.flag-item img {
    width: 120px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border: 3px solid #fff;
}

.flag-item h3 {
    margin-top: 10px;
    font-size: 1.1rem;
    color: #2c3e50;
    font-weight: 600;
}

/* Timeline Container */
.timeline-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.timeline-title {
    text-align: center;
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 40px;
    position: relative;
}

.timeline-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, #239f40, #ce1126, #0099cc);
    border-radius: 2px;
}

/* Timeline Styles */
.timeline {
    position: relative;
    padding: 20px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, #239f40, #ce1126, #0099cc);
    transform: translateX(-50%);
    border-radius: 2px;
}

.timeline-event {
    position: relative;
    margin: 40px 0;
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.timeline-event:nth-child(odd) {
    animation-delay: 0.1s;
}

.timeline-event:nth-child(even) {
    animation-delay: 0.2s;
}

.timeline-event.left {
    padding-right: 60%;
}

.timeline-event.right {
    padding-left: 60%;
    text-align: right;
}

.event-content {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    position: relative;
    transition: all 0.3s ease;
    border-left: 5px solid;
}

.event-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.event-content.iran {
    border-left-color: #239f40;
}

.event-content.iraq {
    border-left-color: #ce1126;
}

.event-content.turan {
    border-left-color: #0099cc;
}

.event-year {
    font-size: 1.4rem;
    font-weight: bold;
    margin-bottom: 10px;
    color: #2c3e50;
}

.event-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: #34495e;
}

.event-description {
    font-size: 1rem;
    color: #7f8c8d;
    line-height: 1.7;
}

.country-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    color: white;
    margin-bottom: 10px;
}

.country-badge.iran {
    background: #239f40;
}

.country-badge.iraq {
    background: #ce1126;
}

.country-badge.turan {
    background: #0099cc;
}

/* Timeline Dots */
.timeline-event::before {
    content: '';
    position: absolute;
    top: 30px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    border: 4px solid;
    z-index: 2;
}

.timeline-event.left::before {
    right: -8px;
}

.timeline-event.right::before {
    left: -8px;
}

.timeline-event.iran::before {
    border-color: #239f40;
}

.timeline-event.iraq::before {
    border-color: #ce1126;
}

.timeline-event.turan::before {
    border-color: #0099cc;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .header p {
        font-size: 1rem;
    }
    
    .flags-container {
        gap: 20px;
    }
    
    .flag-item img {
        width: 100px;
        height: 65px;
    }
    
    .timeline::before,
    .live-timeline::before {
        left: 30px;
    }
    
    .timeline-event.left,
    .timeline-event.right {
        padding-left: 70px;
        padding-right: 20px;
        text-align: left;
    }
    
    .timeline-event::before {
        left: 22px !important;
    }
    
    .timeline-container,
    .live-updates-container {
        padding: 20px;
    }
    
    .event-content {
        padding: 20px;
    }
    
    .event-year {
        font-size: 1.2rem;
    }
    
    .event-title {
        font-size: 1.1rem;
    }
    
    .live-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .timeline-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .timeline-controls {
        width: 100%;
        justify-content: center;
    }
    
    .toggle-btn,
    .refresh-btn {
        flex: 1;
        justify-content: center;
        min-width: 120px;
    }
    
    .live-badge {
        top: 5px;
        right: 5px;
        font-size: 0.6rem;
        padding: 3px 6px;
    }
    
    .event-meta {
        gap: 8px;
    }
    
    .category-tag,
    .source-tag {
        font-size: 0.7rem;
        padding: 3px 8px;
    }
    
    .update-notification {
        top: 10px;
        right: 10px;
        left: 10px;
        padding: 12px 15px;
    }
    
    .notification-content {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 20px;
    }
    
    .header h1 {
        font-size: 1.8rem;
    }
    
    .flags-container {
        gap: 15px;
    }
    
    .flag-item img {
        width: 80px;
        height: 50px;
    }
    
    .timeline-title,
    .live-title {
        font-size: 1.5rem;
    }
    
    .event-content {
        padding: 15px;
    }
    
    .live-updates-container {
        padding: 15px;
    }
    
    .timeline-controls {
        flex-direction: column;
        width: 100%;
    }
    
    .toggle-btn,
    .refresh-btn {
        width: 100%;
        justify-content: center;
    }
    
    .load-more-btn {
        width: 100%;
        padding: 15px;
    }
}

/* Live Updates Section */
.live-updates-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 2px solid #e74c3c;
    position: relative;
    overflow: hidden;
}

.live-updates-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #e74c3c, #f39c12, #e74c3c);
    animation: liveGradient 3s ease-in-out infinite;
}

@keyframes liveGradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.live-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.live-title {
    font-size: 1.8rem;
    color: #e74c3c;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.live-indicator {
    width: 12px;
    height: 12px;
    background: #e74c3c;
    border-radius: 50%;
    animation: livePulse 2s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(231, 76, 60, 0.5);
}

@keyframes livePulse {
    0%, 100% { 
        transform: scale(1);
        opacity: 1;
    }
    50% { 
        transform: scale(1.2);
        opacity: 0.7;
    }
}

.live-status {
    font-size: 0.9rem;
    color: #7f8c8d;
    background: rgba(231, 76, 60, 0.1);
    padding: 8px 15px;
    border-radius: 20px;
    border: 1px solid rgba(231, 76, 60, 0.2);
}

.live-timeline {
    position: relative;
}

.live-timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, #e74c3c, #f39c12);
    transform: translateX(-50%);
    border-radius: 2px;
    animation: liveTimelinePulse 3s ease-in-out infinite;
}

@keyframes liveTimelinePulse {
    0%, 100% { box-shadow: 0 0 10px rgba(231, 76, 60, 0.3); }
    50% { box-shadow: 0 0 20px rgba(231, 76, 60, 0.6); }
}

.live-event {
    position: relative;
    animation: slideInLive 0.8s ease-out forwards;
}

@keyframes slideInLive {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.live-event .event-content {
    border: 2px solid #e74c3c;
    background: linear-gradient(135deg, #fff 0%, #fef9f9 100%);
    position: relative;
    overflow: hidden;
}

.live-event .event-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #e74c3c, #f39c12, #e74c3c);
    background-size: 200% 100%;
    animation: liveShimmer 2s linear infinite;
}

@keyframes liveShimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.live-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #e74c3c;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    animation: liveBadgePulse 2s ease-in-out infinite;
    z-index: 10;
}

@keyframes liveBadgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.event-meta {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.category-tag, .source-tag {
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: capitalize;
}

.category-tag.political {
    background: rgba(52, 152, 219, 0.1);
    color: #3498db;
    border: 1px solid rgba(52, 152, 219, 0.3);
}

.category-tag.economic {
    background: rgba(46, 204, 113, 0.1);
    color: #2ecc71;
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.category-tag.strategic {
    background: rgba(243, 156, 18, 0.1);
    color: #f39c12;
    border: 1px solid rgba(243, 156, 18, 0.3);
}

.category-tag.warfare {
    background: rgba(192, 57, 43, 0.1);
    color: #c0392b;
    border: 1px solid rgba(192, 57, 43, 0.3);
}

.category-tag.regional {
    background: rgba(155, 89, 182, 0.1);
    color: #9b59b6;
    border: 1px solid rgba(155, 89, 182, 0.3);
}

.source-tag {
    background: rgba(149, 165, 166, 0.1);
    color: #95a5a6;
    border: 1px solid rgba(149, 165, 166, 0.3);
}

.view-more-live {
    text-align: center;
    margin-top: 25px;
}

.load-more-btn {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.load-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(231, 76, 60, 0.4);
}

/* Timeline Controls */
.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.timeline-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.toggle-btn, .refresh-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.toggle-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.toggle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.refresh-btn {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: white;
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
}

.refresh-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(46, 204, 113, 0.4);
}

.refresh-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.refresh-icon {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.refresh-icon.spinning {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Update Notification */
.update-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(231, 76, 60, 0.3);
    z-index: 1000;
    animation: slideInNotification 0.5s ease-out;
}

@keyframes slideInNotification {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.notification-content button {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 5px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s ease;
}

.notification-content button:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Loading Animation */
.loading {
    text-align: center;
    padding: 50px;
    color: #7f8c8d;
    font-size: 1.2rem;
}

.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

/* Footer */
.footer {
    text-align: center;
    padding: 30px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    margin-top: 40px;
}

.footer a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* Content Page Styles */
.content-page {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: left;
}

.content-section {
    margin-bottom: 30px;
}

.content-section h2 {
    font-size: 1.8rem;
    color: #2c3e50;
    margin-bottom: 15px;
    border-bottom: 2px solid #764ba2;
    padding-bottom: 5px;
}
