* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #f8fafc;
    color: #1a202c;
    line-height: 1.6;
    min-height: 100vh;
}

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

/* Header */
header {
    text-align: center;
    padding: 3rem 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    margin: -2rem -2rem 2rem -2rem;
    border-radius: 0 0 20px 20px;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

header p {
    font-size: 1.125rem;
    opacity: 0.9;
}

/* Navigation */
nav {
    background: white;
    padding: 1rem 0;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 2rem;
    border-radius: 8px;
}

nav a {
    color: #4a5568;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-weight: 500;
}

nav a:hover {
    background: #f3f4f6;
    color: #667eea;
}

/* Video Gallery */
.video-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.video-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.video-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.video-thumbnail {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background: #000;
}

.video-thumbnail iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-info {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.video-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    overflow: hidden;
}

.video-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    color: #718096;
    font-size: 0.875rem;
}

/* Loading States */
.loading {
    text-align: center;
    padding: 3rem;
    color: #718096;
}

.loading-spinner {
    border: 3px solid #f3f4f6;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

.loading-text {
    font-size: 1rem;
    color: #718096;
}

/* End of Feed */
.end-of-feed {
    text-align: center;
    padding: 2rem;
    color: #718096;
    font-style: italic;
}

/* Error State */
.error {
    text-align: center;
    padding: 3rem;
    color: #dc2626;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    header {
        margin: -1rem -1rem 1rem -1rem;
        padding: 2rem 1rem;
    }

    header h1 {
        font-size: 2rem;
    }

    .video-gallery {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Scroll Indicator */
.scroll-indicator {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #667eea;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 100;
}

.scroll-indicator.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-indicator:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}
