/* ===================================================================
   STYLE.CSS LENGKAP & BERSIH - PROYEK PORNSHORTS.XYZ
   =================================================================== */

/*
 * 1. General Body & Dark Mode Base
 * ----------------------------------------------------------------*/
body.dark-mode {
    background-color: #121212 !important;
    color: #e0e0e0;
}

/*
 * 2. Homepage & General Video Card Styles
 * ----------------------------------------------------------------*/
.video-card img {
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.video-card .card-title a {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 2.5em; /* Approx 2 lines */
    text-decoration: none;
}
.video-card .card-title a:hover {
    text-decoration: underline;
}

/*
 * 3. Watch Page Styles
 * ----------------------------------------------------------------*/
.player-wrapper {
    padding: 0;
    margin: 0;
    line-height: 0;
}

.star-rating i {
    font-size: 1.1em;
}

.related-video-card {
    border: 1px solid #333;
    transition: transform 0.2s ease-in-out;
}
.related-video-card:hover {
    transform: scale(1.03);
    border-color: #dc3545;
}
.related-video-card .video-title-clamp {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/*
 * 4. Favorite Button Style
 * ----------------------------------------------------------------*/
.favorite-btn.is-favorite {
    background-color: #dc3545;
    border-color: #dc3545;
    color: #fff;
}
.favorite-btn.is-favorite i::before {
    content: "\f415";
}

/*
 * 5. Dark Mode Component Overrides
 * ----------------------------------------------------------------*/
.dark-mode .card,
.dark-mode .navbar,
.dark-mode footer,
.dark-mode .modal-content,
.dark-mode .list-group-item {
    background-color: #1e1e1e !important;
    color: #e0e0e0;
    border-color: #3a3a3a;
}
.dark-mode .card-header,
.dark-mode .modal-header,
.dark-mode .modal-footer {
     border-color: #3a3a3a;
}
.dark-mode .form-control {
    background-color: #333;
    color: #fff;
    border-color: #555;
}
.dark-mode .form-control:focus {
    background-color: #333;
    color: #fff;
    border-color: #dc3545;
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
}
.dark-mode .text-dark {
    color: #e0e0e0 !important;
}
.dark-mode .bg-light {
    background-color: #1e1e1e !important;
}
.dark-mode a {
    color: #bb86fc;
}
.dark-mode a:hover {
    color: #cfa6ff;
}
.dark-mode .page-link {
    background-color: #333;
    border-color: #555;
    color: #bb86fc;
}
.dark-mode .page-item.active .page-link {
    background-color: #bb86fc;
    border-color: #bb86fc;
    color: #000;
}
.dark-mode .page-item.disabled .page-link {
    background-color: #2a2a2a;
    border-color: #555;
}
.dark-mode .accordion-button::after {
    filter: invert(1) grayscale(100%) brightness(200%);
}
.dark-mode .accordion-button,
.dark-mode .accordion-item {
    background-color: #212529 !important;
    color: #fff !important;
    border-color: rgba(255,255,255,0.1);
}
.dark-mode .accordion-button:not(.collapsed) {
    box-shadow: none;
}

/*
 * 6. FINAL FIX: Tombol Deskripsi
 * ----------------------------------------------------------------*/
/* Mengatur warna border tombol di kedua mode */
a[data-bs-toggle="collapse"][href="#videoDescription"] {
    border-color: #6c757d;
}
.dark-mode a[data-bs-toggle="collapse"][href="#videoDescription"] {
    border-color: #555;
}

/* Mengatur warna TEKS dan IKON di dalam tombol (Light Mode) */
a[data-bs-toggle="collapse"][href="#videoDescription"] .btn-text,
a[data-bs-toggle="collapse"][href="#videoDescription"] i {
    color: #212529 !important; /* Paksa warna jadi hitam pekat */
}

/* Mengatur warna TEKS dan IKON di dalam tombol (Dark Mode) */
.dark-mode a[data-bs-toggle="collapse"][href="#videoDescription"] .btn-text,
.dark-mode a[data-bs-toggle="collapse"][href="#videoDescription"] i {
    color: #dee2e6 !important; /* Paksa warna jadi putih keabuan yang jelas */
}
/* Style untuk memotong deskripsi di halaman admin */
.video-description-truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}
/* ===================================================================
   Video Hover Trailer Styles
   =================================================================== */

/* Pastikan video dan gambar poster memiliki rasio dan ukuran yang sama */
.video-poster,
.video-preview {
    aspect-ratio: 16 / 9;
    object-fit: cover;
}
/* ===================================================================
   Shorts Page Styles
   =================================================================== */

.shorts-body {
    background-color: #000;
    overflow: hidden; /* Mencegah scroll bar horizontal */
}

#shorts-container {
    height: 100vh;
    width: 100vw;
    overflow-y: scroll;
    scroll-snap-type: y mandatory; /* Membuat scroll "snap" ke video berikutnya */
}

.short-slide {
    height: 100vh;
    width: 100%;
    position: relative;
    scroll-snap-align: start; /* Titik snap */
    background-color: #000;
}

.short-video-player {
    width: 100%;
    height: 100%;
    object-fit: contain; /* 'contain' agar video tidak terpotong, 'cover' untuk mengisi penuh */
}

.short-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    color: #fff;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 100%);
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.short-info {
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
}
.short-title {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}
.short-models {
    font-size: 0.9rem;
    opacity: 0.8;
}

.short-actions .mute-btn {
    border: 2px solid #fff;
    background-color: rgba(0,0,0,0.3);
}

#loader {
    height: 100px;
}
/* ===================================================================
   Shorts Page V2 Styles (Immersive Glass UI)
   =================================================================== */

.shorts-body { background-color: #000; overflow: hidden; }
#shorts-container { height: 100vh; width: 100vw; overflow-y: scroll; scroll-snap-type: y mandatory; }

.short-slide-v2 {
    height: 100vh;
    width: 100%;
    position: relative;
    scroll-snap-align: start;
    background-color: #000;
    overflow: hidden;
}

.short-video-player-v2 {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Gunakan 'cover' untuk mengisi layar penuh */
}

.short-overlay-v2 {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.mute-btn-v2 {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 20;
}

.btn-icon {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    font-size: 1.2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.btn-icon:hover {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}

.glass-panel {
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 0.75rem 1rem;
    margin: 1rem;
    border-radius: 1.25rem;
    z-index: 10;
}

.panel-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.video-info .video-title {
    font-size: 1.1rem;
    font-weight: bold;
    margin: 0;
    text-shadow: 1px 1px 2px #000;
}
.video-info .video-models {
    font-size: 0.9rem;
    margin: 0;
    opacity: 0.8;
}

.video-actions {
    display: flex;
    gap: 0.5rem;
}
.video-actions .btn-icon {
    width: 44px;
    height: 44px;
    font-size: 1rem;
}
.video-actions .favorite-btn.is-favorite {
    background-color: #dc3545;
    color: #fff;
}
.video-actions .favorite-btn.is-favorite i::before {
    content: "\f415";
}


.details-handle {
    width: 100%;
    padding: 0.25rem 0 0 0;
    margin: 0.25rem 0 0 0;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    font-size: 0.8rem;
}
.details-handle i {
    transition: transform 0.3s ease;
}

.details-sheet {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    max-height: 60%;
    background: #111;
    color: #fff;
    border-top-left-radius: 1.5rem;
    border-top-right-radius: 1.5rem;
    transform: translateY(100%);
    transition: transform 0.4s ease-in-out;
    z-index: 5;
    padding: 1.5rem;
    overflow-y: auto;
}

.details-sheet.is-open {
    transform: translateY(0);
}

.details-sheet hr {
    border-color: rgba(255,255,255,0.2);
}
/* Biar gambar cover rapi */
.object-fit-cover {
  object-fit: cover;
}
/* Style untuk indikator play/pause di Shorts */
.video-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}
.play-pause-overlay {
    position: absolute;
    font-size: 5rem;
    color: rgba(255, 255, 255, 0.7);
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
    pointer-events: none; /* Agar tidak mengganggu klik */
}
