/* Base Reset & Styling */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #0f0f12;
    color: #ffffff;
}

/* Header Layout */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    background-color: #1a1a24;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.logo {
    font-size: 22px;
    font-weight: bold;
    color: #ff3366;
    letter-spacing: 1px;
    cursor: pointer;
}

.search-container {
    display: flex;
    align-items: center;
    background: #2a2a38;
    border-radius: 20px;
    padding: 4px 12px;
}

.search-container input {
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    padding: 6px;
    font-size: 14px;
    width: 130px;
    transition: width 0.3s;
}

.search-container input:focus {
    width: 180px;
}

.search-btn {
    background: none;
    border: none;
    color: #ff3366;
    cursor: pointer;
    font-size: 16px;
}

/* Navigation Tabs */
.category-nav {
    display: flex;
    gap: 12px;
    padding: 15px 5%;
    background-color: #14141d;
    border-bottom: 1px solid #222230;
}

.tab-btn {
    background-color: #242433;
    color: #ccc;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    background-color: #323247;
    color: #fff;
}

.tab-btn.active {
    background-color: #ff3366;
    color: #ffffff;
}

/* Movie Grid */
.main-container {
    padding: 20px 5%;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 18px;
}

.movie-card {
    background-color: #1a1a24;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.movie-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(255, 51, 102, 0.3);
}

.poster-container {
    width: 100%;
    height: 220px;
    background-color: #2a2a38;
    position: relative;
}

.poster-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.movie-info {
    padding: 10px;
}

.movie-title {
    font-size: 13px;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
}

/* Load More Button */
.load-more-container {
    text-align: center;
    margin-top: 30px;
}

.load-more-btn {
    background-color: #ff3366;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 20px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
}

.load-more-btn:hover {
    background-color: #e62e5c;
}

.loading-text {
    text-align: center;
    font-size: 16px;
    color: #aaa;
    grid-column: 1 / -1;
    padding: 40px 0;
}

/* Video Player Modal (Full Screen with Back Button) */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    z-index: 1000;
    flex-direction: column;
}

.modal-header {
    width: 100%;
    padding: 15px;
    background-color: #1a1a24;
    display: flex;
    align-items: center;
}

.back-btn {
    background-color: #323247;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}

.back-btn:hover {
    background-color: #43435c;
}

.modal-content {
    width: 100%;
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.modal video {
    width: 100%;
    max-height: 80vh;
    display: block;
}

.player-status {
    color: #fff;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 15px;
}

@media (max-width: 600px) {
    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 10px;
    }
    .poster-container {
        height: 180px;
    }
}
