* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #0f0f0f;
    color: #ffffff;
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========== NAVBAR ========== */
.navbar {
    background: #1a1a1a;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid #333;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: bold;
    color: #e50914;
    text-decoration: none;
    white-space: nowrap;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #e50914;
}

.navbar-search {
    display: flex;
    flex: 1;
    max-width: 300px;
}

.navbar-search-input {
    flex: 1;
    padding: 0.4rem 0.8rem;
    border: none;
    border-radius: 4px 0 0 4px;
    background: #2a2a2a;
    color: #fff;
}

.navbar-search-input:focus {
    outline: none;
}

.navbar-search-btn {
    padding: 0.4rem 0.8rem;
    background: #e50914;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    color: white;
}

/* ========== HERO SECTION ========== */
.hero {
    text-align: center;
    padding: 3rem 0;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 12px;
    margin: 2rem 0;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

/* ========== CATEGORY BAR (TANPA SCROLL - WRAP KE BAWAH) ========== */
.category-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 0;
    margin-bottom: 2rem;
}

.category-btn {
    padding: 0.4rem 1rem;
    background: #2a2a2a;
    color: #fff;
    text-decoration: none;
    border-radius: 25px;
    white-space: nowrap;
    transition: all 0.3s;
    font-size: 0.8rem;
}

.category-btn:hover,
.category-btn.active {
    background: #e50914;
    color: #fff;
}

/* ========== VIDEO GRID ========== */
.video-grid {
    display: grid;
    gap: 20px;
    margin: 20px 0;
}

/* Desktop: 4 kolom */
@media (min-width: 1024px) {
    .video-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Tablet: 3 kolom */
@media (min-width: 768px) and (max-width: 1023px) {
    .video-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Mobile: 4 kolom */
@media (max-width: 767px) {
    .video-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
    }
}

/* HP kecil: 3 kolom */
@media (max-width: 480px) {
    .video-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
}

/* Video Card */
.video-card {
    background: #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

/* Video Thumbnail */
.video-thumbnail {
    position: relative;
    overflow: hidden;
    height: 180px;
    background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Responsif thumbnail */
@media (max-width: 767px) {
    .video-thumbnail {
        height: 120px;
    }
}

@media (max-width: 480px) {
    .video-thumbnail {
        height: 100px;
    }
}

/* Play Icon */
.play-icon {
    font-size: 48px;
    color: rgba(255,255,255,0.8);
    transition: all 0.3s;
}

.video-card:hover .play-icon {
    transform: scale(1.1);
    color: #e50914;
}

@media (max-width: 767px) {
    .play-icon {
        font-size: 32px;
    }
}

/* Video Info */
.video-info {
    padding: 0.75rem;
}

.video-title {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

@media (max-width: 767px) {
    .video-title {
        font-size: 0.7rem;
    }
}

@media (max-width: 480px) {
    .video-title {
        font-size: 0.65rem;
    }
}

.video-desc {
    font-size: 0.75rem;
    color: #aaa;
    margin-bottom: 0.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Sembunyikan deskripsi di mobile */
@media (max-width: 767px) {
    .video-desc {
        display: none;
    }
}

/* Video Meta */
.video-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.category-badge {
    background: #e50914;
    padding: 0.2rem 0.4rem;
    border-radius: 12px;
    font-size: 0.65rem;
    text-transform: uppercase;
}

@media (max-width: 767px) {
    .category-badge {
        font-size: 0.55rem;
        padding: 0.15rem 0.3rem;
    }
}

.views {
    font-size: 0.65rem;
    color: #aaa;
}

@media (max-width: 767px) {
    .views {
        font-size: 0.55rem;
    }
}

/* ========== BUTTONS ========== */
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.3s;
}

.btn-primary {
    background: #e50914;
    color: white;
}

.btn-primary:hover {
    background: #b80710;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.7rem;
}

/* Sembunyikan tombol Watch Now di mobile (cukup klik card) */
@media (max-width: 767px) {
    .btn-sm {
        display: none;
    }
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-info {
    background: #17a2b8;
    color: white;
}

.btn-info:hover {
    background: #138496;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.w-100 {
    width: 100%;
}

/* ========== WATCH PAGE ========== */
.watch-container {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
    margin: 2rem 0;
}

@media (max-width: 768px) {
    .watch-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

.video-player {
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

.player {
    width: 100%;
    max-height: 500px;
    background: #000;
}

.video-details {
    padding: 1.5rem;
    background: #1a1a1a;
}

.video-details h1 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    .video-details {
        padding: 1rem;
    }
    .video-details h1 {
        font-size: 1.2rem;
    }
}

.meta-info {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.description {
    color: #ccc;
    line-height: 1.6;
}

/* ========== SIDEBAR ========== */
.sidebar h3 {
    margin-bottom: 1rem;
}

.related-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.related-item {
    display: flex;
    gap: 1rem;
    background: #1a1a1a;
    padding: 0.75rem;
    border-radius: 8px;
    text-decoration: none;
    color: #fff;
    transition: background 0.3s;
}

.related-item:hover {
    background: #2a2a2a;
}

.related-thumbnail {
    width: 80px;
    height: 60px;
    background: #2a2a2a;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.small-play {
    font-size: 20px;
}

.related-info h4 {
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

/* ========== PAGINATION ========== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 40px 0;
    flex-wrap: wrap;
}

.page-btn {
    padding: 8px 14px;
    background: #1a1a1a;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s;
    border: 1px solid #333;
}

.page-btn:hover {
    background: #e50914;
    border-color: #e50914;
}

.page-btn.active {
    background: #e50914;
    border-color: #e50914;
    cursor: default;
}

.page-dots {
    padding: 8px 5px;
    color: #888;
}

@media (max-width: 768px) {
    .pagination {
        gap: 5px;
        margin: 20px 0;
    }
    .page-btn {
        padding: 5px 10px;
        font-size: 12px;
    }
}

.video-info {
    text-align: center;
    margin: 20px 0;
    color: #aaa;
    font-size: 14px;
}

/* ========== NOTIFICATION ========== */
.seek-notification {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 14px;
    z-index: 9999;
    pointer-events: none;
    backdrop-filter: blur(5px);
    animation: fadeInOut 1s ease-in-out;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateX(-50%) translateY(10px); }
    20% { opacity: 1; transform: translateX(-50%) translateY(0); }
    80% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(-10px); }
}

@media (max-width: 768px) {
    .seek-notification {
        bottom: 80px;
        padding: 6px 12px;
        font-size: 11px;
    }
}

/* ========== THUMBNAIL PREVIEW ========== */
.video-thumbnail-preview {
    margin: 1rem 0;
    border-radius: 12px;
    overflow: hidden;
    max-width: 400px;
}

.preview-img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

/* ========== ADMIN PANEL ========== */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 2rem 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    padding: 1.5rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    font-size: 2.5rem;
}

.stat-info h3 {
    font-size: 0.85rem;
    color: #aaa;
    margin-bottom: 0.25rem;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
}

.data-table {
    width: 100%;
    background: #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #333;
}

.data-table th {
    background: #2a2a2a;
}

/* ========== NAVBAR MOBILE ========== */
@media (max-width: 768px) {
    .navbar .container {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .nav-links {
        order: 2;
        width: 100%;
        justify-content: center;
        gap: 20px;
    }
    
    .navbar-search {
        order: 1;
        width: 100%;
        max-width: 100%;
        margin-bottom: 5px;
    }
}

/* ========== MOBILE CATEGORY BAR (TAMBAHAN UNTUK KONSISTENSI) ========== */
@media (max-width: 768px) {
    .category-bar {
        gap: 0.4rem;
        justify-content: center;
    }
    
    .category-btn {
        padding: 0.3rem 0.8rem;
        font-size: 0.7rem;
    }
}