/* ====================================
   VARIABLES & RESET
   ==================================== */
:root {
    --primary: #4361ee;
    --primary-light: #4895ef;
    --primary-dark: #3f37c9;
    --secondary: #f72585;
    --success: #4cc9f0;
    --warning: #f8961e;
    --danger: #f94144;
    --dark: #212529;
    --gray: #6c757d;
    --light: #f8f9fa;
    --white: #ffffff;
    --shadow: 0 10px 30px rgba(0,0,0,0.1);
    --shadow-hover: 0 15px 40px rgba(67,97,238,0.15);
    --border-radius: 16px;
    --transition: all 0.3s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
    min-height: 100vh;
    color: var(--dark);
}

.container { max-width: 1400px; margin: 0 auto; padding: 20px; }

/* ====================================
   HEADER & NAVIGATION
   ==================================== */
.header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: var(--border-radius);
    padding: 20px 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: -50%; right: -10%;
    width: 300px; height: 300px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1;
}

.logo {
    font-size: 28px;
    font-weight: 700;
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.logo i {
    font-size: 32px;
    background: rgba(255,255,255,0.2);
    padding: 10px;
    border-radius: 12px;
    backdrop-filter: blur(5px);
}

.header-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.admin-link {
    background: rgba(255,255,255,0.2);
    color: var(--white);
    padding: 10px 20px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 500;
    backdrop-filter: blur(5px);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255,255,255,0.3);
}

.admin-link:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* ====================================
   SEARCH BAR
   ==================================== */
.search-container {
    position: relative;
    width: 350px;
}

.search-icon {
    position: absolute;
    left: 15px; top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
    z-index: 2;
}

.search-input {
    width: 100%;
    padding: 14px 20px 14px 45px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 30px;
    font-size: 15px;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(5px);
    transition: var(--transition);
    color: var(--dark);
}

.search-input:focus {
    outline: none;
    border-color: var(--white);
    background: var(--white);
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

.search-clear {
    position: absolute;
    right: 15px; top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--gray);
    cursor: pointer;
    font-size: 16px;
    display: none;
    transition: var(--transition);
}

.search-clear:hover {
    color: var(--danger);
    transform: translateY(-50%) scale(1.2);
}

/* ====================================
   KATEGORI NAVIGATION (MOBILE FRIENDLY)
   ==================================== */
.kategori-wrapper {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.kategori-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding: 0 5px;
}

.kategori-label {
    color: white;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.kategori-scroll-btn {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    width: 36px; height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    margin-left: 5px;
}

.kategori-scroll-btn:active { transform: scale(0.95); }

.kategori-nav {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 5px 0 15px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.kategori-nav::-webkit-scrollbar { height: 4px; }
.kategori-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.3); border-radius: 4px; }

.kategori-btn {
    flex: 0 0 auto;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    padding: 12px 20px;
    border-radius: 40px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

/* Touch area lebih besar */
.kategori-btn::after {
    content: '';
    position: absolute;
    top: -8px; left: -8px; right: -8px; bottom: -8px;
}

.kategori-btn.active {
    background: white;
    color: var(--primary);
    border-color: white;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

.kategori-count {
    background: rgba(255,255,255,0.2);
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.kategori-btn.active .kategori-count {
    background: var(--primary);
    color: white;
}

/* ====================================
   LOADING & SKELETON
   ==================================== */
.loading { text-align: center; padding: 60px 20px; display: none; }

.spinner {
    width: 60px; height: 60px;
    border: 4px solid rgba(67,97,238,0.1);
    border-top-color: var(--primary);
    border-right-color: var(--primary-light);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin { 100% { transform: rotate(360deg); } }

@keyframes skeleton-loading {
    0% { background-position: -200px 0; }
    100% { background-position: calc(200px + 100%) 0; }
}

.skeleton-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.skeleton-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    pointer-events: none;
    min-height: 380px;
}

.skeleton-image, .skeleton-badge, .skeleton-title, .skeleton-text, .skeleton-button, .skeleton-date {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200px 100%;
    animation: skeleton-loading 1.5s infinite ease-in-out;
    border-radius: 4px;
}

.skeleton-image { width: 100%; height: 220px; border-radius: 20px 20px 0 0; }
.skeleton-badge { width: 100px; height: 24px; margin: 15px; }
.skeleton-title { width: 80%; height: 24px; margin: 5px 15px; }
.skeleton-text { width: 60%; height: 18px; margin: 5px 15px; }
.skeleton-button { width: 90%; height: 40px; margin: 10px 15px; border-radius: 30px; }
.skeleton-date { width: 50%; height: 16px; margin: 5px 15px 20px; }

/* ====================================
   PRODUCTS GRID
   ==================================== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.product-card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
    border: 1px solid rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    height: 100%;
    animation: fadeIn 0.5s ease;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.product-image-container {
    position: relative;
    width: 100%;
    padding-top: 100%;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
    border-bottom: 3px solid var(--primary);
}

.product-image {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image { transform: scale(1.08); }

.image-preview-badge {
    position: absolute;
    bottom: 10px; right: 10px;
    background: rgba(255,255,255,0.95);
    color: var(--primary);
    padding: 6px 12px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 600;
    backdrop-filter: blur(4px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    z-index: 2;
    opacity: 0;
    transform: translateY(5px);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.product-card:hover .image-preview-badge {
    opacity: 1;
    transform: translateY(0);
}

.product-info {
    padding: 18px 16px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    background: linear-gradient(to bottom, var(--white), #fafafa);
}

.product-title {
    color: var(--dark);
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-kategori-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 10px;
    background: rgba(67,97,238,0.1);
    color: var(--primary);
    border: 1px solid rgba(67,97,238,0.2);
    width: fit-content;
}

.product-videos {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
    flex: 1;
}

.video-link-btn {
    width: 100%;
    background: linear-gradient(135deg, #ff0050 0%, #ff3b5c 100%);
    color: var(--white);
    padding: 10px 16px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    border: none;
    box-shadow: 0 4px 10px rgba(255,0,80,0.3);
    cursor: pointer;
    transition: var(--transition);
}

.video-link-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 15px rgba(255,0,80,0.4);
}

.video-count {
    background: var(--light);
    color: var(--gray);
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: 1px solid #e0e0e0;
    width: fit-content;
}

.product-date {
    color: var(--gray);
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #e0e0e0;
}

/* ====================================
   EMPTY STATE
   ==================================== */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    display: none;
    animation: fadeIn 0.5s ease;
}

.empty-state i {
    font-size: 80px;
    color: #d0d0d0;
    margin-bottom: 25px;
    background: var(--light);
    padding: 30px;
    border-radius: 50%;
}

.empty-state h3 {
    color: var(--dark);
    font-size: 24px;
    margin-bottom: 15px;
}

/* ====================================
   MODAL GAMBAR
   ==================================== */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    inset: 0;
    background: rgba(0,0,0,0.95);
    backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    max-width: min(80vh, 80vw);
    max-height: min(80vh, 80vw);
    border-radius: 16px;
    box-shadow: 0 0 50px rgba(255,255,255,0.15);
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    border: 4px solid var(--white);
}

.modal-close {
    position: absolute;
    right: 30px; top: 30px;
    color: white;
    font-size: 50px;
    cursor: pointer;
    width: 60px; height: 60px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--danger);
    background: rgba(255,255,255,0.2);
    transform: rotate(90deg);
}

.modal-caption {
    position: absolute;
    bottom: 30px; left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 18px;
    text-align: center;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    padding: 20px 40px;
    border-radius: 50px;
    max-width: 80%;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

/* ====================================
   VIDEO POPUP - UI/UX PROFESSIONAL
   ==================================== */
.video-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 20px;
}

.video-popup.show {
    opacity: 1;
}

/* Card Utama - Lebih Proporsional */
.video-popup-content {
    background: white;
    border-radius: 28px;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

.video-popup.show .video-popup-content {
    transform: scale(1);
}

/* HEADER - Lebih Bersih */
.video-popup-header {
    background: linear-gradient(135deg, #4361ee, #3f37c9);
    padding: 24px 24px 28px;
    position: relative;
}

.video-popup-header h3 {
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.video-popup-header h3 i {
    font-size: 18px;
    opacity: 0.8;
}

/* Tombol Close - Lebih Elegan */
.video-popup-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.2s ease;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.video-popup-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* INFO PRODUK CARD - Yang Bener */
.product-info-card {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 18px;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Avatar/Icon Produk */
.product-avatar {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.product-details {
    flex: 1;
    min-width: 0; /* Penting untuk text ellipsis */
}

.product-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 4px;
}

.product-name {
    font-size: 16px;
    font-weight: 700;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}

/* Badge Video - Yang Bener */
.video-badge {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    padding: 6px 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: white;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}

.video-badge i {
    font-size: 12px;
    opacity: 0.8;
}

/* BODY POPUP */
.video-popup-body {
    padding: 24px;
}

/* OPSI VIDEO */
.video-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

/* DESAIN TOMBOL YANG BENAR */
.option-btn {
    display: flex;
    align-items: center;
    padding: 14px 18px;
    border-radius: 18px;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    width: 100%;
    text-align: left;
    position: relative;
    overflow: hidden;
}

/* Efek hover */
.option-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.option-btn:hover::after {
    opacity: 1;
}

.option-btn:active {
    transform: scale(0.98);
}

/* Ikon Tombol - Ukuran Pas */
.option-btn i {
    font-size: 24px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    margin-right: 16px;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.option-btn:hover i {
    transform: scale(1.05);
}

/* Konten Teks */
.option-content {
    flex: 1;
}

.option-title {
    font-size: 16px;
    font-weight: 700;
    display: block;
    margin-bottom: 2px;
}

.option-desc {
    font-size: 13px;
    opacity: 0.7;
    display: block;
}

/* Panah */
.option-arrow {
    font-size: 16px;
    margin-left: 12px;
    opacity: 0.5;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.option-btn:hover .option-arrow {
    opacity: 1;
    transform: translateX(4px);
}

/* TikTok Button */
.tiktok-btn {
    background: linear-gradient(135deg, #010101, #2d2d2d);
    color: white;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.tiktok-btn i {
    background: linear-gradient(135deg, #ff0050, #ff3b5c);
    color: white;
}

/* Download Button */
.download-btn {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.2);
}

.download-btn i {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* FOOTER */
.video-popup-footer {
    padding: 0 24px 24px;
}

/* Tombol Tutup - Lebih Baik */
.close-btn {
    width: 100%;
    padding: 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    font-size: 15px;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.close-btn i {
    font-size: 14px;
    transition: transform 0.2s ease;
}

.close-btn:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

.close-btn:hover i {
    transform: rotate(90deg);
}

/* ====================================
   RESPONSIVE
   ==================================== */
@media (max-width: 480px) {
    .video-popup-content {
        border-radius: 24px;
    }
    
    .video-popup-header {
        padding: 20px 20px 24px;
    }
    
    .product-info-card {
        padding: 12px 14px;
    }
    
    .product-avatar {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .product-name {
        font-size: 15px;
    }
    
    .video-badge {
        padding: 4px 10px;
        font-size: 13px;
    }
    
    .video-popup-body {
        padding: 20px;
    }
    
    .option-btn {
        padding: 12px 16px;
    }
    
    .option-btn i {
        font-size: 22px;
        width: 40px;
        height: 40px;
        margin-right: 14px;
    }
    
    .option-title {
        font-size: 15px;
    }
    
    .option-desc {
        font-size: 12px;
    }
    
    .video-popup-footer {
        padding: 0 20px 20px;
    }
    
    .close-btn {
        padding: 12px;
        font-size: 14px;
    }
}

/* ====================================
   DOWNLOAD MODAL
   ==================================== */
.download-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(10px);
    z-index: 200000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 15px;
}

.download-modal.show { opacity: 1; }

.download-modal-content {
    background: white;
    padding: 35px 30px;
    border-radius: 28px;
    max-width: 450px;
    width: 100%;
    text-align: center;
    box-shadow: 0 30px 60px rgba(0,0,0,0.4);
    transform: scale(0.95) translateY(10px);
    transition: all 0.4s cubic-bezier(0.175,0.885,0.32,1.275);
}

.download-modal.show .download-modal-content { transform: scale(1) translateY(0); }

.spinner-small {
    width: 60px; height: 60px;
    border: 4px solid rgba(67,97,238,0.1);
    border-top-color: #4361ee;
    border-right-color: #4895ef;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.pulse-icon {
    width: 80px; height: 80px;
    margin: 0 auto 20px;
    background: rgba(67,97,238,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 1.5s ease-in-out infinite;
}

.pulse-icon i { font-size: 40px; color: #4361ee; }

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes popIn {
    0% { transform: scale(0); }
    80% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.success-modal .modal-icon { animation: popIn 0.5s ease; }

.progress-bar-container {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 30px;
    margin: 20px 0;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4361ee, #4895ef, #4cc9f0);
    border-radius: 30px;
    transition: width 0.3s ease;
}

.progress-bar.active::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(90deg, rgba(255,255,255,0.1), rgba(255,255,255,0.3), rgba(255,255,255,0.1));
    animation: shimmer 1.5s infinite;
}

.filename {
    font-size: 13px;
    background: #f1f5f9;
    padding: 12px;
    border-radius: 30px;
    color: #475569;
    word-break: break-all;
    margin: 15px 0;
    border: 1px solid #e2e8f0;
    font-family: monospace;
}

.close-modal-btn {
    background: linear-gradient(135deg, #4361ee, #4895ef);
    color: white;
    border: none;
    padding: 14px 30px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    margin-top: 15px;
    transition: var(--transition);
}

.close-modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(67,97,238,0.4);
}

/* ====================================
   ADMIN COMPONENTS
   ==================================== */
.sku-badge {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
    font-family: monospace;
}

input[name="judul"] { text-transform: uppercase; }
input[name="judul"]::placeholder { text-transform: none; font-size: 13px; color: #999; }

/* Duplicate Check */
input.duplicate-warning {
    border-color: #f59e0b !important;
    background-color: #fffaf0 !important;
    box-shadow: 0 0 0 3px rgba(245,158,11,0.1) !important;
}

.duplicate-actions {
    animation: fadeIn 0.3s ease;
    background: white;
    border-radius: 20px;
    padding: 2px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.duplicate-delete-icon:hover {
    transform: scale(1.2);
    color: #dc2626 !important;
    background: #fee2e2;
    border-radius: 50%;
}

.duplicate-warning-icon:hover {
    transform: scale(1.2);
    color: #f59e0b !important;
    background: #fef3c7;
    border-radius: 50%;
}

input[name="video_links[]"] { padding-right: 80px !important; }

input[data-existing="true"] {
    border-left: 3px solid #10b981 !important;
    background-color: #f0fdf4 !important;
}

/* Preview Image */
.preview-image {
    max-width: 250px;
    margin-top: 15px;
    display: none;
    border-radius: 12px;
    overflow: hidden;
    border: 3px solid white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    position: relative;
}

.preview-image img { width: 100%; height: auto; display: block; }

.preview-image div {
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 8px;
    text-align: center;
    font-size: 12px;
    position: absolute;
    bottom: 0; left: 0; right: 0;
    backdrop-filter: blur(4px);
}

/* Kategori Badge */
.kategori-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.kategori-quran { background: linear-gradient(135deg, #10b981, #059669); color: white; }
.kategori-kitab { background: linear-gradient(135deg, #8b5cf6, #7c3aed); color: white; }
.kategori-bacaan { background: linear-gradient(135deg, #f59e0b, #d97706); color: white; }
.kategori-tafsir { background: linear-gradient(135deg, #3b82f6, #2563eb); color: white; }


/* ====================================
   UTILITIES
   ==================================== */
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

body.popup-open { overflow: hidden; position: fixed; width: 100%; }

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--light); }
::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, var(--primary), var(--primary-light));
    border-radius: 4px;
}

.submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* ====================================
   RESPONSIVE
   ==================================== */
@media (max-width: 768px) {
    .container { padding: 15px; }
    .header-content { flex-direction: column; gap: 15px; }
    .header-actions { width: 100%; flex-direction: column; }
    .search-container { width: 100%; }
    .admin-link { width: 100%; justify-content: center; }
    .products-grid, .skeleton-grid { grid-template-columns: 1fr; gap: 20px; }
    .modal-close { right: 20px; top: 20px; font-size: 40px; width: 50px; height: 50px; }
    .modal-caption { font-size: 16px; padding: 15px 25px; }
    .kategori-btn { padding: 10px 16px; font-size: 14px; }
}

@media (max-width: 480px) {
    .container { padding: 10px; }
    .logo { font-size: 20px; }
    .video-popup-header h3 { font-size: 20px; }
    .option-btn { padding: 14px; }
    .option-btn i { font-size: 28px; width: 42px; height: 42px; }
    .download-modal-content { padding: 25px 20px; }
    .kategori-btn { padding: 8px 14px; font-size: 13px; }
    .kategori-header { margin-bottom: 8px; }
    .kategori-label { font-size: 12px; }
}

/* Safe area untuk iPhone */
@supports (padding: max(0px)) {
    .video-popup {
        padding-left: max(10px, env(safe-area-inset-left));
        padding-right: max(10px, env(safe-area-inset-right));
        padding-top: max(10px, env(safe-area-inset-top));
        padding-bottom: max(10px, env(safe-area-inset-bottom));
    }
}