/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.4;
    color: #ffffff;
    background-color: #1a1a1a;
    overflow-x: hidden;
}

/* App Container */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar styles removed */

/* Main Content */
.main-content {
    flex: 1;
    width: 100%;
    background-color: #1a1a1a;
}

/* Top Header */
.top-header {
    background-color: #0f0f0f;
    padding: 15px 30px;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-logo h1 {
    font-size: 1.5rem;
    font-weight: bold;
    color: #4285f4;
    letter-spacing: -0.5px;
    margin: 0;
}

.back-button {
    margin-left: auto;
}

.back-link {
    color: #888;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.back-link:hover {
    color: #ffffff;
}

.search-container {
    display: flex;
    align-items: center;
    background-color: #222;
    border-radius: 20px;
    overflow: hidden;
    max-width: 400px;
}

.search-input {
    background: transparent;
    border: none;
    padding: 8px 15px;
    color: #ffffff;
    font-size: 0.9rem;
    width: 300px;
    outline: none;
}

.search-input::placeholder {
    color: #888;
}

.search-btn {
    background: transparent;
    border: none;
    padding: 8px 15px;
    color: #888;
    cursor: pointer;
    font-size: 1rem;
}

.search-btn:hover {
    color: #ffffff;
}

/* Video Grid */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    padding: 30px;
    max-width: none;
}

/* Video Card */
.video-card {
    background-color: #222;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

.video-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.video-thumbnail {
    position: relative;
    width: 100%;
    height: 200px;
    background-color: #333;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Age rating styles removed */

.video-info {
    padding: 15px;
}

.video-title {
    font-size: 0.9rem;
    font-weight: 500;
    color: #ffffff;
    margin-bottom: 5px;
    line-height: 1.3;
}

.video-meta {
    font-size: 0.8rem;
    color: #888;
    display: flex;
    gap: 10px;
}

.placeholder-thumbnail {
    font-size: 3rem;
    color: #666;
}

.thumbnail-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 0;
    transition: transform 0.2s ease;
}

.video-card:hover .thumbnail-image {
    transform: scale(1.05);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 18px;
        padding: 25px;
    }
}

@media (max-width: 1024px) {
    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px;
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .video-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
        padding: 15px 10px;
    }
    
    .video-thumbnail {
        height: 140px;
    }
    
    .video-info {
        padding: 10px 8px;
    }
    
    .video-title {
        font-size: 0.8rem;
        line-height: 1.2;
    }
    
    .video-meta {
        font-size: 0.7rem;
        gap: 6px;
    }
    
    .search-input {
        width: 180px;
        font-size: 0.85rem;
    }
    
    .top-header {
        padding: 12px 15px;
    }
    
    .header-logo h1 {
        font-size: 1.3rem;
    }
}

/* Mobile phones - 2 videos per row */
@media (max-width: 480px) {
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        padding: 10px 8px;
    }
    
    .video-card {
        border-radius: 6px;
    }
    
    .video-thumbnail {
        height: 120px;
    }
    
    .video-info {
        padding: 8px 6px;
    }
    
    .video-title {
        font-size: 0.75rem;
        line-height: 1.1;
        margin-bottom: 3px;
    }
    
    .video-meta {
        font-size: 0.65rem;
        gap: 4px;
        flex-wrap: wrap;
    }
    
    .video-duration {
        font-size: 0.65rem;
        padding: 1px 4px;
        bottom: 6px;
        right: 6px;
    }
    
    .search-container {
        max-width: 200px;
    }
    
    .search-input {
        width: 140px;
        font-size: 0.8rem;
        padding: 6px 12px;
    }
    
    .search-btn {
        padding: 6px 12px;
        font-size: 0.9rem;
    }
    
    .top-header {
        padding: 10px 12px;
    }
    
    .header-logo h1 {
        font-size: 1.1rem;
    }
    
    .back-link {
        font-size: 0.8rem;
    }
}

/* Very small phones - ensure 2 videos per row always */
@media (max-width: 360px) {
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
        padding: 8px 6px;
    }
    
    .video-thumbnail {
        height: 100px;
    }
    
    .video-info {
        padding: 6px 4px;
    }
    
    .video-title {
        font-size: 0.7rem;
    }
    
    .video-meta {
        font-size: 0.6rem;
    }
    
    .search-input {
        width: 120px;
    }
}
