* {
    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;
}

header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 2rem 1rem;
    text-align: center;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: #e10600;
}

header p {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 1rem;
}

.embed-info {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 6px;
    padding: 0.5rem 1rem;
    margin: 1rem 0;
    color: #856404;
}

.last-updated {
    font-size: 0.9rem;
    color: #888;
}

main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.loading {
    text-align: center;
    padding: 4rem 1rem;
    color: white;
}

.spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 4px solid white;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

.video-container {
    padding: 1rem 0;
}

.grandprix-section {
    margin-bottom: 3rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.grandprix-section.current-weekend {
    background: rgba(225, 6, 0, 0.1);
    border: 1px solid rgba(225, 6, 0, 0.3);
    box-shadow: 0 0 30px rgba(225, 6, 0, 0.2);
}

.grandprix-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.grandprix-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
    margin: 0;
    flex: 1;
}

.status-badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.current {
    background: #e10600;
    color: white;
    animation: pulse 2s infinite;
}

.status-badge.recent {
    background: #ff9800;
    color: white;
}

.status-badge.past {
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.video-count {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    font-weight: 500;
}

.grandprix-videos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.video-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.video-thumbnail-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
}

.video-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.video-thumbnail-container:hover .video-thumbnail {
    transform: scale(1.05);
}

.play-overlay {
    background: rgba(0, 0, 0, 0.8);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    color: white;
    text-align: center;
    transition: all 0.3s ease;
    z-index: 2;
}

.video-thumbnail-container:hover .play-overlay {
    background: rgba(255, 0, 0, 0.9);
    transform: scale(1.1);
}

.play-button {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}





.video-info {
    padding: 1.5rem;
}

.video-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
    line-height: 1.4;
}

.video-date {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.video-type {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
}

.video-type.fp1 {
    background: #e8f5e8;
    color: #2e7d32;
}

.video-type.fp2 {
    background: #e3f2fd;
    color: #1976d2;
}

.video-type.qualifying {
    background: #fff3e0;
    color: #f57c00;
}

.video-type.sprint {
    background: #fce4ec;
    color: #c2185b;
}

.video-type.race {
    background: #ffebee;
    color: #d32f2f;
}

.video-type.other {
    background: #f5f5f5;
    color: #666;
}

.video-type.sprint-quali {
    background: #f3e5f5;
    color: #7b1fa2;
}

.video-type.race-quali {
    background: #fff8e1;
    color: #f9a825;
}

.video-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
}

.watch-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #ff0000;
    color: white;
    text-decoration: none;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 2px 8px rgba(255, 0, 0, 0.2);
}

.watch-button:hover {
    background: #cc0000;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 0, 0, 0.4);
}

.watch-button svg {
    width: 20px;
    height: 20px;
}

.error {
    text-align: center;
    padding: 4rem 1rem;
    color: white;
    background: rgba(255, 0, 0, 0.1);
    border-radius: 12px;
    margin: 2rem 0;
}

footer {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    margin-top: 4rem;
    padding: 3rem 1rem 1rem;
    color: rgba(255, 255, 255, 0.9);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: white;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.footer-section p {
    line-height: 1.6;
    font-size: 0.9rem;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section li {
    padding: 0.25rem 0;
    font-size: 0.9rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }
    
    main {
        margin: 1rem auto;
    }
    
    .grandprix-section {
        margin-bottom: 2rem;
        padding: 1.5rem;
    }
    
    .grandprix-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .grandprix-title {
        font-size: 1.5rem;
    }
    
    .grandprix-videos {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .status-badge {
        align-self: flex-start;
    }
}