/* 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: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo i {
    font-size: 2rem;
    color: #667eea;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: #666;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: #667eea;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Hero Section */
.hero {
    padding: 4rem 0;
    text-align: center;
    color: white;
}

.hero h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.search-bar {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
    background: white;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.search-bar input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    outline: none;
    font-size: 1rem;
}

.search-bar button {
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    color: white;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.search-bar button:hover {
    transform: scale(1.05);
}

/* Filters */
.filters {
    background: rgba(255, 255, 255, 0.9);
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.filters .container {
    display: flex;
    gap: 2rem;
    align-items: center;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: 600;
    color: #555;
    font-size: 0.9rem;
}

.filter-group select {
    padding: 0.5rem 1rem;
    border: 2px solid #e1e1e1;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.filter-group select:focus {
    outline: none;
    border-color: #667eea;
}

.clear-btn {
    padding: 0.5rem 1rem;
    background: #ff4757;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.3s ease;
    margin-top: 1.5rem;
}

.clear-btn:hover {
    background: #ff3742;
}

/* Events Section */
.events {
    padding: 2rem 0;
    background: rgba(255, 255, 255, 0.95);
    min-height: 60vh;
}

.events-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.events-header h3 {
    font-size: 2rem;
    color: #333;
}

.loading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #667eea;
    font-weight: 500;
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.event-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    border-left: 4px solid #667eea;
}

.event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.event-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.event-sport {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.event-time {
    color: #666;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.event-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
}

.event-tournament {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.event-channels {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.channel-tag {
    background: #f8f9fa;
    color: #667eea;
    padding: 0.3rem 0.6rem;
    border-radius: 15px;
    font-size: 0.8rem;
    border: 1px solid #e1e1e1;
}

.no-events {
    text-align: center;
    padding: 3rem;
    color: #666;
}

.no-events i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    margin: 2% auto;
    padding: 0;
    border-radius: 12px;
    width: 95%;
    max-width: 900px;
    max-height: 95vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 2rem;
    cursor: pointer;
    color: #666;
    z-index: 2001;
}

.close:hover {
    color: #333;
}

.modal-header {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 2rem;
    border-radius: 12px 12px 0 0;
}

.modal-header h2 {
    margin-bottom: 0.5rem;
}

.modal-body {
    padding: 2rem;
}

.event-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.info-item i {
    color: #667eea;
    width: 20px;
}

.channels-section h3 {
    margin-bottom: 1rem;
    color: #333;
}

.channels-list {
    display: grid;
    gap: 1rem;
}

.channel-item {
    margin-bottom: 1.5rem;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e1e1e1;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.channel-item:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.channel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: white;
    border-bottom: 1px solid #e1e1e1;
}

.channel-name {
    font-weight: 600;
    color: #333;
    font-size: 1rem;
}

.toggle-stream-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.toggle-stream-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.toggle-stream-btn.active {
    background: linear-gradient(135deg, #ff4757, #ff3742);
}

.toggle-stream-btn.active:hover {
    box-shadow: 0 5px 15px rgba(255, 71, 87, 0.4);
}

.iframe-container {
    padding: 1rem;
    background: #000;
    border-radius: 0 0 12px 12px;
    position: relative;
    min-height: 400px;
}

.iframe-container iframe {
    width: 100%;
    height: 400px;
    border: none;
    border-radius: 8px;
    background: #000;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.iframe-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 49%, rgba(255,255,255,0.1) 50%, transparent 51%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.iframe-container:hover::before {
    opacity: 1;
}

.stream-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.stream-loading i {
    font-size: 2rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Footer */
.footer {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 2rem;
}

.footer a {
    color: #667eea;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav {
        gap: 1rem;
    }

    .hero h2 {
        font-size: 2rem;
    }

    .filters .container {
        flex-direction: column;
        align-items: stretch;
    }

    .events-grid {
        grid-template-columns: 1fr;
    }

    .event-header {
        flex-direction: column;
        gap: 0.5rem;
    }

    .modal-content {
        width: 98%;
        margin: 1% auto;
        max-height: 98vh;
    }
    
    .iframe-container {
        padding: 0.5rem;
        min-height: 300px;
    }
    
    .iframe-container iframe {
        height: 300px;
    }
    
    .channel-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .toggle-stream-btn {
        width: 100%;
        justify-content: center;
    }

    .event-info {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero {
        padding: 2rem 0;
    }

    .hero h2 {
        font-size: 1.5rem;
    }

    .search-bar {
        flex-direction: column;
        border-radius: 8px;
    }

    .search-bar input,
    .search-bar button {
        border-radius: 0;
    }

    .search-bar input {
        border-bottom: 1px solid #e1e1e1;
    }
}
