@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

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

:root {
    --dark-primary: hsl(0, 0%, 3.9%);
    --dark-secondary: hsl(0, 0%, 10.2%);
    --pink-primary: hsl(340, 82.4%, 52.4%);
    --purple-primary: hsl(291, 64%, 42.4%);
    --hover-pink: hsl(340, 100%, 55.7%);
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --gradient-primary: linear-gradient(135deg, var(--pink-primary), var(--purple-primary));
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, var(--dark-primary) 0%, var(--dark-secondary) 100%);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header Styles */
.header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(10px);
    background: rgba(26, 26, 26, 0.8);
    border-bottom: 1px solid rgba(233, 30, 99, 0.2);
}

.nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 4rem;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logo-text:hover {
    transform: scale(1.05);
}

.nav-menu {
    display: none;
    gap: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
}

.nav-link:hover,
.nav-link.active {
    color: var(--pink-primary);
}

@media (min-width: 768px) {
    .nav-menu {
        display: flex;
    }
}

/* Hero Section */
.hero {
    padding: 3rem 0;
    margin-bottom: 3rem;
}

.hero-content {
    background: var(--gradient-primary);
    padding: 3rem 2rem;
    border-radius: 1rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-content::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

.hero-button {
    background: white;
    color: var(--purple-primary);
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 2rem;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    z-index: 1;
}

.hero-button:hover {
    background: #f3f4f6;
    transform: translateY(-2px);
}

@media (min-width: 768px) {
    .hero-title {
        font-size: 3.5rem;
    }
    .hero-subtitle {
        font-size: 1.5rem;
    }
}

/* Content Section */
.content {
    margin-bottom: 3rem;
}

.content-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.content-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.sort-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sort-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.sort-select {
    background: var(--dark-secondary);
    border: 1px solid #374151;
    border-radius: 0.5rem;
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
    color: var(--text-primary);
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s ease;
}

.sort-select:focus {
    border-color: var(--pink-primary);
}

/* Grid Layouts */
.videos-grid,
.loading-grid,
.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.related-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
}

/* Video Cards */
.video-card {
    background: var(--dark-secondary);
    border-radius: 0.75rem;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.video-card:hover {
    transform: scale(1.05);
    box-shadow: 0 20px 40px rgba(233, 30, 99, 0.3);
}

.video-thumbnail {
    position: relative;
    overflow: hidden;
}

.video-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.video-card.related .video-image {
    height: 140px;
}

.video-card:hover .video-image {
    transform: scale(1.1);
}

.play-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.8) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-card:hover .play-overlay {
    opacity: 1;
}

.play-button {
    background: var(--pink-primary);
    border-radius: 50%;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.play-icon {
    width: 1.5rem;
    height: 1.5rem;
    margin-left: 2px;
}

.video-details {
    padding: 1rem;
}

.video-card.related .video-details {
    padding: 0.75rem;
}

.video-name {
    font-weight: 600;
    font-size: 0.875rem;
    line-height: 1.4;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-card.related .video-name {
    font-size: 0.8rem;
    -webkit-line-clamp: 2;
}

.video-date {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Loading States */
.loading-card {
    background: linear-gradient(90deg, var(--dark-secondary) 25%, #2a2a2a 50%, var(--dark-secondary) 75%);
    background-size: 200% 100%;
    animation: loading-shimmer 1.5s infinite;
    border-radius: 0.75rem;
    height: 320px;
}

.loading-card.large {
    height: 400px;
    margin-bottom: 2rem;
}

@keyframes loading-shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Video Player Styles */
.back-nav {
    margin-bottom: 1.5rem;
}

.back-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    color: var(--pink-primary);
    font-size: 1rem;
    cursor: pointer;
    transition: color 0.2s ease;
    padding: 0.5rem;
    border-radius: 0.375rem;
}

.back-button:hover {
    color: var(--hover-pink);
    background: rgba(233, 30, 99, 0.1);
}

.back-icon {
    width: 1.25rem;
    height: 1.25rem;
}

.video-container {
    background: var(--dark-secondary);
    border-radius: 1rem;
    overflow: hidden;
    margin-bottom: 2rem;
}

.video-player {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.video-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.video-info {
    padding: 1.5rem;
}

.video-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.video-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.video-date {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.video-actions {
    display: flex;
    gap: 0.5rem;
}

.action-button {
    background: var(--pink-primary);
    border: none;
    padding: 0.5rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-button:hover {
    background: var(--hover-pink);
    transform: translateY(-1px);
}

.action-button.share {
    background: var(--purple-primary);
}

.action-button.share:hover {
    background: #7c3aed;
}

.action-button svg {
    width: 1.25rem;
    height: 1.25rem;
    color: white;
}

/* Related Section */
.related-section {
    margin-top: 2rem;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

/* Error States */
.error-state {
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.error-content {
    text-align: center;
}

.error-message {
    font-size: 1.25rem;
    color: #ef4444;
    margin-bottom: 1rem;
}

.retry-button {
    background: var(--pink-primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.retry-button:hover {
    background: var(--hover-pink);
    transform: translateY(-1px);
}

/* Responsive Design */
@media (max-width: 640px) {
    .container {
        padding: 0 0.75rem;
    }
    
    .hero {
        padding: 2rem 0;
        margin-bottom: 2rem;
    }
    
    .hero-content {
        padding: 2rem 1rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .videos-grid,
    .loading-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 1rem;
    }
    
    .related-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .content-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .video-info {
        padding: 1rem;
    }
    
    .video-title {
        font-size: 1.25rem;
    }
    
    .video-meta {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Utilities */
.hidden {
    display: none !important;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}
