/* General Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    background-color: #121212;
    color: #ffffff;
    padding-bottom: 30px;
}

/* Spinner */
#spinner-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #121212;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #333;
    border-top: 5px solid #e50914;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-text {
    margin-top: 15px;
    font-size: 16px;
    color: #aaa;
}

/* Header */
header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px 20px;
    background-color: #000;
    border-bottom: 1px solid #333;
}

.logo img {
    max-height: 40px;
    width: auto;
}

/* VPN Notice */
.vpn-notice {
    background-color: #ffcc00;
    color: #000;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    font-weight: bold;
}

#close-notice {
    background: none;
    border: none;
    color: #000;
    font-size: 16px;
    cursor: pointer;
}

/* Category Navigation (Fixed for Small Screens) */
.category-nav {
    display: flex;
    gap: 10px;
    padding: 15px 20px;
    overflow-x: auto; /* ဘေးတိုက် ပွတ်ဆွဲ၍ရရန် */
    white-space: nowrap; /* ခလုတ်များ အောက်တစ်ကြောင်းသို့ မဆင်းစေရန် */
    -webkit-overflow-scrolling: touch; /* iOS တွင် ချောမွေ့စွာ ဆွဲနိုင်ရန် */
    scrollbar-width: none; /* Firefox တွင် Scrollbar ဖျောက်ရန် */
}

/* Chrome နှင့် Safari များတွင် Scrollbar ဖျောက်ရန် */
.category-nav::-webkit-scrollbar {
    display: none;
}

.cat-btn {
    flex-shrink: 0; /* Screen သေးသွားလျှင် ခလုတ်များ ပိမသွားစေရန် */
    background-color: #333;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.cat-btn.active, .cat-btn:hover {
    background-color: #e50914;
}

/* Movie Grid */
.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 15px;
    padding: 0 20px;
}

/* Skeleton Loader */
.skeleton-card {
    background-color: #333;
    height: 240px;
    border-radius: 8px;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}

/* Video Card (If generated dynamically by JS) */
.movie-card {
    background-color: #222;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s;
}

.movie-card:hover {
    transform: scale(1.05);
}

.movie-card img {
    width: 100%;
    height: 240px;
    object-fit: cover;
}

.movie-card h3 {
    font-size: 14px;
    padding: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 30px;
}

.page-btn {
    background-color: #333;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
}

.page-btn:hover {
    background-color: #555;
}

/* Video Player Section */
#video-player-section {
    padding: 20px;
}

.back-btn {
    background: none;
    border: none;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 16px;
    cursor: pointer;
    margin-bottom: 15px;
}

.video-wrapper {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    background-color: #000;
    border-radius: 8px;
    overflow: hidden;
}

video {
    width: 100%;
    height: auto;
    display: block;
}

#video-title {
    max-width: 800px;
    margin: 15px auto 0;
    font-size: 18px;
}
