/* Festival di Tumba Korsou - Vibrant Festival Theme */

/* CSS Variables */
:root {
    --primary-color: #FF6B35;
    --secondary-color: #F7931E;
    --accent-color: #FFD23F;
    --dark-color: #2C3E50;
    --light-color: #ECF0F1;
    --success-color: #27AE60;
    --gradient-primary: linear-gradient(135deg, #FF6B35, #F7931E);
    --gradient-accent: linear-gradient(135deg, #FFD23F, #FF6B35);
    --shadow-light: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 4px 20px rgba(0, 0, 0, 0.15);
    --shadow-heavy: 0 8px 30px rgba(0, 0, 0, 0.2);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.festival-header {
    background: var(--gradient-primary);
    padding: 20px 0;
    box-shadow: var(--shadow-medium);
    position: relative;
    overflow: hidden;
}

.festival-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="80" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="1" fill="rgba(255,255,255,0.1)"/></svg>');
    animation: float 20s infinite linear;
}

@keyframes float {
    0% { transform: translateX(0) translateY(0); }
    50% { transform: translateX(-20px) translateY(-10px); }
    100% { transform: translateX(0) translateY(0); }
}

.festival-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1;
}

.festival-title {
    font-size: 2rem;
    font-weight: bold;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    animation: pulse 2s infinite;
}

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

.live-indicator, .day-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 25px;
    backdrop-filter: blur(10px);
}

.live-dot {
    width: 12px;
    height: 12px;
    background: #FF0000;
    border-radius: 50%;
    animation: blink 1.5s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.live-text, .day-text {
    color: white;
    font-weight: bold;
    font-size: 0.9rem;
}

.day-number {
    background: var(--accent-color);
    color: var(--dark-color);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
}

/* Tab Navigation Styles */
.main-nav {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-light);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 10px 0;
}

.tab-navigation {
    display: flex;
    justify-content: center;
    gap: 5px;
    flex-wrap: wrap;
}

.tab-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid transparent;
    border-radius: 25px;
    color: var(--dark-color);
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tab-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    transition: left 0.3s ease;
    z-index: 0;
    border-radius: 23px;
}

.tab-button .tab-icon,
.tab-button .tab-text {
    position: relative;
    z-index: 1;
}

.tab-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-light);
}

.tab-button:hover::before {
    left: 0;
}

.tab-button:hover {
    color: white;
    border-color: var(--primary-color);
}

.tab-button.active {
    background: var(--gradient-primary);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.tab-button.active::before {
    left: 0;
}

.tab-icon {
    font-size: 1rem;
    animation: iconPulse 2s infinite;
}

.tab-button.active .tab-icon {
    animation: iconBounce 1s ease-in-out;
}

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

@keyframes iconBounce {
    0%, 100% { transform: scale(1) translateY(0); }
    50% { transform: scale(1.2) translateY(-3px); }
}

/* Main Content */
.main-content {
    padding: 40px 0;
    min-height: calc(100vh - 200px);
}

.video-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--shadow-heavy);
    backdrop-filter: blur(10px);
}

.video-container {
    position: relative;
    width: 100%;
    background: #000;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-medium);
    margin-bottom: 30px;
}

.video-player {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 16/9;
    background: #000;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    transition: opacity 0.3s ease;
}

.video-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    font-size: 1.1rem;
    font-weight: 500;
}

.stream-info {
    text-align: center;
}

.stream-title {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    font-weight: bold;
}

.stream-description {
    font-size: 1.1rem;
    color: var(--dark-color);
    margin-bottom: 20px;
    opacity: 0.8;
}

.stream-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.status-indicator.online {
    background: var(--success-color);
}

.status-text {
    font-weight: 500;
    color: var(--success-color);
}

/* Footer */
.festival-footer {
    background: var(--dark-color);
    color: white;
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
}

.footer-text {
    opacity: 0.8;
    font-size: 0.9rem;
}

/* Responsive Design */

/* Mobile Devices (< 768px) */
@media (max-width: 767px) {
    .container {
        padding: 0 15px;
    }
    
    .festival-header .container {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .festival-title {
        font-size: 1.5rem;
    }
    
    .tab-navigation {
        gap: 3px;
    }
    
    .tab-button {
        padding: 10px 15px;
        font-size: 0.85rem;
        gap: 6px;
    }
    
    .tab-icon {
        font-size: 0.9rem;
    }
    
    .main-content {
        padding: 20px 0;
    }
    
    .video-section {
        padding: 20px;
        border-radius: 15px;
    }
    
    .stream-title {
        font-size: 1.5rem;
    }
    
    .stream-description {
        font-size: 1rem;
    }
}

/* Tablet Devices (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1023px) {
    .festival-title {
        font-size: 1.8rem;
    }
    
    .tab-button {
        padding: 11px 18px;
        font-size: 0.9rem;
    }
    
    .video-section {
        padding: 25px;
    }
    
    .stream-title {
        font-size: 1.8rem;
    }
}

/* Desktop Devices (> 1024px) */
@media (min-width: 1024px) {
    .festival-title {
        font-size: 2.5rem;
    }
    
    .tab-button {
        padding: 12px 22px;
        font-size: 1rem;
    }
    
    .video-section {
        padding: 35px;
    }
    
    .stream-title {
        font-size: 2.2rem;
    }
    
    .stream-description {
        font-size: 1.2rem;
    }
}

/* Large Desktop (> 1440px) */
@media (min-width: 1440px) {
    .container {
        max-width: 1400px;
    }
    
    .festival-title {
        font-size: 2.8rem;
    }
    
    .stream-title {
        font-size: 2.5rem;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .nav-link:hover {
        transform: none;
    }
    
    .video-player {
        touch-action: manipulation;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}