/* Discover Page Styles */

/* Video Section Container */
.video-section {
    padding: 2rem 0;
}

/* Video Categories */
.video-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.category-btn {
    background-color: #f0f0f0;
    border: none;
    border-radius: 20px;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-btn:hover {
    background-color: #e0e0e0;
}

.category-btn.active {
    background-color: #00bcd4;
    color: white;
}

body.dark-theme .category-btn {
    background-color: #444;
    color: #f0f0f0;
}

body.dark-theme .category-btn:hover {
    background-color: #555;
}

body.dark-theme .category-btn.active {
    background-color: #00bcd4;
}

/* Video Filter */
.video-filter {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.search-container {
    display: flex;
    flex: 1;
    max-width: 400px;
}

.search-container input {
    flex: 1;
    padding: 0.6rem;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    outline: none;
}

.search-container button {
    padding: 0.6rem 1rem;
    background-color: #00bcd4;
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

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

.sort-container select {
    padding: 0.6rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
    outline: none;
}

body.dark-theme .search-container input,
body.dark-theme .sort-container select {
    background-color: #333;
    color: #f0f0f0;
    border-color: #555;
}

body.dark-theme .search-container button:hover {
    background-color: #0097a7;
}

/* Featured Video */
.featured-video {
    margin-bottom: 2rem;
}

.video-player-container {
    position: relative;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.video-player-container video {
    width: 100%;
    height: auto;
    display: block;
}

.video-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    display: flex;
    align-items: center;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 1rem;
    color: white;
}

.play-pause-btn {
    background-color: rgba(255, 255, 255, 0.2);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    margin-right: 1rem;
    transition: all 0.3s ease;
}

.play-pause-btn:hover {
    background-color: rgba(255, 255, 255, 0.4);
}

.video-info {
    flex: 1;
}

.video-title {
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
}

.video-description {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    opacity: 0.9;
}

.video-details {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    margin: 0;
}

.video-details .video-duration {
    position: static;
    background-color: rgba(255, 255, 255, 0.2);
    padding: 2px 6px;
}

.video-details .video-views {
    opacity: 0.9;
}

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

.video-item {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

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

.video-thumbnail {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 aspect ratio */
    overflow: hidden;
}

.video-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.video-duration {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    z-index: 2;
}

.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 188, 212, 0.8);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-item:hover .play-icon {
    opacity: 1;
}

.video-item-info {
    padding: 1rem;
}

.video-item-title {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
}

.video-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #777;
}

body.dark-theme .video-item {
    background-color: #333;
    color: #f0f0f0;
}

body.dark-theme .video-meta {
    color: #aaa;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 2rem;
    gap: 0.5rem;
}

.pagination-btn {
    border: none;
    background-color: #f0f0f0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagination-btn:hover {
    background-color: #e0e0e0;
}

.page-numbers {
    display: flex;
    gap: 0.5rem;
}

.page-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.page-number.active,
.page-number:hover {
    background-color: #00bcd4;
    color: white;
}

body.dark-theme .pagination-btn,
body.dark-theme .page-number {
    background-color: #444;
    color: #f0f0f0;
}

body.dark-theme .pagination-btn:hover,
body.dark-theme .page-number:hover {
    background-color: #555;
}

body.dark-theme .page-number.active {
    background-color: #00bcd4;
}

/* Modal */
.video-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1500;
    overflow-y: auto;
}

.modal-content {
    position: relative;
    width: 90%;
    max-width: 1000px;
    margin: 5% auto;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    animation: modalOpen 0.4s ease-out;
}

@keyframes modalOpen {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    color: white;
    cursor: pointer;
    z-index: 10;
    text-shadow: 0px 0px 5px rgba(0, 0, 0, 0.5);
}

#modal-video {
    width: 100%;
    display: block;
}

.modal-info {
    padding: 1.5rem;
}

.modal-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #777;
}

body.dark-theme .modal-content {
    background-color: #333;
    color: #f0f0f0;
}

body.dark-theme .modal-meta {
    color: #aaa;
}

/* Responsive */
@media screen and (max-width: 768px) {
    .video-controls {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .play-pause-btn {
        margin-bottom: 0.5rem;
    }
    
    .video-filter {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-container {
        max-width: 100%;
    }
    
    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
} 