/* Custom styles on top of Bootstrap dark theme */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: var(--bs-dark);
}

main {
    flex: 1;
}

/* Anime Detail Page */
.anime-header {
    min-height: 400px;
    margin: -1.5rem -15px 2rem;
    overflow: hidden;
}

.anime-banner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: blur(5px);
    transform: scale(1.1);
}

.overlay-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.9) 100%);
}

.anime-cover {
    width: 100%;
    border-radius: 8px;
    aspect-ratio: 2/3;
    object-fit: cover;
}

.episode-card {
    background: var(--bs-dark);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.2s;
}

.episode-card:hover {
    transform: translateY(-5px);
}

.episode-card .card-img-wrapper {
    position: relative;
    padding-top: 56.25%;
    overflow: hidden;
}

.episode-card .card-img-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Anime Card Styling */
.anime-card {
    background: var(--bs-dark);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.2s, border-color 0.2s;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex: 0 0 auto;
    width: 300px;
    flex-direction: column;
    position: relative;
}

.anime-card:hover {
    transform: translateY(-5px);
    border-color: var(--bs-primary);
}

.anime-card img {
    height: 250px;
    object-fit: cover;
}

.anime-card .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.anime-card .card-footer {
    background: transparent;
    border-top: none;
}

.anime-card .card-title {
    font-size: 1rem;
    font-weight: bold;
}

.anime-card .card-text {
    font-size: 0.875rem;
    color: var(--bs-light);
}

.anime-hover-details {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 1rem;
}

.anime-card:hover .anime-hover-details {
    opacity: 1;
}

.anime-hover-details h5 {
    margin-bottom: 0.5rem;
}

.anime-hover-details p {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem;
    border-radius: 0.25rem;
    margin-bottom: 1rem;
}

.card-img-wrapper {
    position: relative;
    padding-top: 150%;
    overflow: hidden;
}

.card-img-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-body {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-title {
    margin-bottom: 0.5rem;
    font-size: 1rem;
    font-weight: bold;
}

.card-text {
    flex-grow: 1;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: var(--bs-light);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.card-footer {
    background: transparent;
    border-top: 0;
    padding-top: 0.5rem;
}

.card-img-overlay {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

/* Section styling */
.section-title {
    position: relative;
    color: var(--bs-light);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

.section-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 3px;
    background-color: var(--bs-primary);
}

/* Navbar customization */
.navbar {
    backdrop-filter: blur(10px);
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

/* Search bar */
.input-group {
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--bs-border-radius);
}

.input-group .form-control {
    background: transparent;
    border: none;
    color: var(--bs-light);
}

.input-group .form-control:focus {
    box-shadow: none;
    background: rgba(255, 255, 255, 0.05);
}

/* List group customization */
.list-group-item {
    background: var(--bs-dark);
    border-color: rgba(255, 255, 255, 0.1);
}

.list-group-item:hover {
    background: var(--bs-dark-rgb);
}

/* Badge customization */
.badge {
    font-weight: normal;
    padding: 0.5em 0.8em;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    padding: 0.5em 0.75em;
}

/* Footer customization */
.footer {
    background-color: var(--bs-dark);
}


.vjs-theme-dark {
    --vjs-theme-primary: var(--bs-primary);
}

/* Genre buttons */
.btn-outline-secondary {
    border-color: rgba(255, 255, 255, 0.1);
}

.btn-outline-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Video.js custom theme */
.video-js {
    background-color: var(--bs-dark);
}

.vjs-theme-dark {
    --vjs-theme-primary: var(--bs-primary);
}

.error-container {
    padding: 5rem 0;
}

/* Adding new styles for the watch page */
.episode-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
    max-height: 600px;
    overflow-y: auto;
}

.episode-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--bs-light);
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s;
}

.episode-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--bs-light);
}

.episode-btn.active {
    background: var(--bs-primary);
    color: white;
}

.current-episode-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.quality-selector .btn {
    padding: 0.25rem 1rem;
}

.comments-list {
    max-height: 500px;
    overflow-y: auto;
}

/* Horizontal Scroll */
.horizontal-scroll {
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 1rem;
}

.horizontal-scroll .container-fluid {
    padding-left: 0;
    padding-right: 0;
}

.horizontal-scroll .row {
    display: flex;
    flex-wrap: nowrap;
}

.server-btn .feather-sm {
    width: 14px;
    height: 14px;
    vertical-align: -2px;
}

.custom-grid {
    gap: 25px;
    /* Atur jarak antar card */
}

/* Dashboard Styles */
.card {
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.table-dark {
    background-color: #343a40;
}

.table-hover tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.075);
}

.btn-group-sm .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.alert {
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

/* Interactive Elements */
.btn-outline-primary:hover,
.btn-outline-info:hover,
.btn-outline-danger:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.table-dark th,
.table-dark td {
    vertical-align: middle;
}

.table-dark .btn-group-sm .btn {
    transition: background-color 0.2s, border-color 0.2s;
}

.horizontal-scroll {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    gap: 16px;
    padding-bottom: 10px;
    scrollbar-width: none;
    /* Hide scrollbar for Firefox */
    -ms-overflow-style: none;
    /* Hide scrollbar for IE/Edge */
}

/* Hide scrollbar for WebKit-based browsers */
.horizontal-scroll::-webkit-scrollbar {
    display: none;
}

.scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    z-index: 10;
    border-radius: 50%;
    font-size: 20px;
}

.scroll-btn.left {
    left: 0;
}

.scroll-btn.right {
    right: 0;
}

.scroll-btn:hover {
    background-color: rgba(0, 0, 0, 0.9);
}

.text-truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.progress-bar {
    height: 8px;
    background-color: #596066;
}

.row-cols-custom > * {
    flex: 0 0 auto;
    width: calc(100% /2);
}


@media (min-width: 576px) {
    .row-cols-custom > * {
        width: calc(100% / 3);
    }
}

@media (min-width: 900px) {
  .row-cols-custom > * {
    width: calc(100% / 4);
  }
}

@media (min-width: 1400px) {
  .row-cols-custom > * {
    width: calc(100% / 6);
  }
}