/* Custom scrollbar */
.custom-scrollbar::-webkit-scrollbar {
    width: 8px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #0B0B0B;
    border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #8B0000;
    border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #6F0000;
}

/* Custom Plyr styling untuk konsisten dengan tema - transparent controls */
.plyr {
    --plyr-color-main: #8B0000;
    --plyr-video-controls-background: transparent;
    --plyr-video-control-color: #FFFFFF;
    --plyr-menu-background: rgba(11, 11, 11, 0.95);
    --plyr-menu-color: #FFFFFF;
    --plyr-control-icon-size: 18px;
    --plyr-control-spacing: 10px;
}

/* Transparent Plyr controls */
.plyr__controls {
    background: transparent !important;
}

.plyr__control--overlaid {
    background: rgba(139, 0, 0, 0.8) !important;
}

.plyr__control--overlaid:hover {
    background: rgba(139, 0, 0, 1) !important;
}

/* Player container styling */
.plyr-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    margin: 0 auto;
}

/* Ensure Plyr maintains aspect ratio and fills container */
.plyr-container .plyr {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    background: #000;
}

.plyr-container .plyr__video-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.plyr-container .plyr__video-embed {
    width: 100%;
    height: 100%;
    position: relative;
}

/* Hide YouTube branding and elements */
.plyr__video-embed {
    position: relative !important;
    overflow: hidden !important;
    width: 100% !important;
    height: 100% !important;
}

.plyr__video-embed iframe {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    border: none !important;
}

/* Custom styling untuk Plyr controls agar konsisten dengan tema */
.plyr__control--overlaid {
    background: rgba(139, 0, 0, 0.9) !important;
}

.plyr__control--overlaid:hover {
    background: rgba(139, 0, 0, 1) !important;
}

.plyr__control.plyr__tab-focus,
.plyr__control:hover {
    background: rgba(139, 0, 0, 0.2) !important;
}

.plyr__progress__played {
    background: #8B0000 !important;
}

.plyr__volume__progress {
    background: #8B0000 !important;
}

/* Screen management */
.screen {
    display: block;
}

.screen.hidden {
    display: none !important;
}

/* Responsive utilities */
@media (max-width: 640px) {
    .plyr-container {
        padding: 0;
    }
}

/* Animation utilities */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: .5;
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Modal overlay */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(11, 11, 11, 0.95);
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Loading spinner */
.loading-spinner {
    border: 4px solid rgba(154, 154, 154, 0.3);
    border-top-color: #8B0000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Lineup grid responsive */
.lineup-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 0.75rem;
    justify-items: center;
    align-items: start;
    width: 100%;
}

@media (min-width: 480px) {
    .lineup-grid {
        grid-template-columns: repeat(auto-fill, minmax(85px, 1fr));
        gap: 1rem;
    }
}

@media (min-width: 640px) {
    .lineup-grid {
        grid-template-columns: repeat(auto-fill, minmax(95px, 1fr));
        gap: 1.125rem;
    }
}

@media (min-width: 768px) {
    .lineup-grid {
        grid-template-columns: repeat(auto-fill, minmax(105px, 1fr));
        gap: 1.25rem;
    }
}

@media (min-width: 1024px) {
    .lineup-grid {
        grid-template-columns: repeat(auto-fill, minmax(115px, 1fr));
        gap: 1.5rem;
    }
}

@media (min-width: 1280px) {
    .lineup-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 1.75rem;
    }
}

/* Aspect ratio utilities */
.aspect-video {
    aspect-ratio: 16 / 9;
}

/* Smooth transitions */
.transition-all {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

/* Video watermark logo animations */
.video-watermark-logo {
    transition: all 0.3s ease;
}

.video-watermark-logo.slide-in {
    animation: slideInLeft 0.5s ease-out forwards;
}

.video-watermark-logo.slide-out {
    animation: slideOutLeft 0.5s ease-in forwards;
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 0.8;
    }
}

@keyframes slideOutLeft {
    from {
        transform: translateX(0);
        opacity: 0.8;
    }
    to {
        transform: translateX(-100%);
        opacity: 0;
    }
}

/* Status badge styles */
.status {
    transition: all 0.2s ease;
}

.status.loading {
    color: #9A9A9A;
}

.status.success {
    color: #10B981;
}

.status.error {
    color: #EF4444;
}

.status.warning {
    color: #F59E0B;
}

.status.info {
    color: #3B82F6;
}

/* Select dropdown styling */
select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%239A9A9A' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

select:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(139, 0, 0, 0.5);
}

/* Custom scrollbar for select dropdown */
select::-webkit-scrollbar {
    width: 6px;
}

select::-webkit-scrollbar-track {
    background: #1C1C1C;
    border-radius: 3px;
}

select::-webkit-scrollbar-thumb {
    background: #8B0000;
    border-radius: 3px;
}

select::-webkit-scrollbar-thumb:hover {
    background: #6F0000;
}

/* Show Info Section Styles */
#show-info-section {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#show-banner {
    position: relative;
}

#show-banner-img {
    transition: transform 0.3s ease;
}

#show-banner:hover #show-banner-img {
    transform: scale(1.05);
}

/* Lineup member card */
.lineup-member-card {
    position: relative;
    width: 100%;
    max-width: 120px;
    aspect-ratio: 3/4;
    border-radius: 0.75rem;
    overflow: hidden;
    background: #1C1C1C;
    border: 2px solid rgba(42, 42, 42, 0.5);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.lineup-member-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 12px 24px rgba(139, 0, 0, 0.4);
    border-color: rgba(139, 0, 0, 0.5);
}

.lineup-member-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
}

.lineup-member-card:hover img {
    transform: scale(1.08);
}

.lineup-member-card .member-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.85) 50%, transparent 100%);
    padding: 0.625rem 0.5rem 0.5rem;
    text-align: center;
    font-size: 0.6875rem;
    font-weight: 600;
    color: #FFFFFF;
    opacity: 1;
    transition: opacity 0.3s ease, padding 0.3s ease;
    line-height: 1.2;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.lineup-member-card:hover .member-name {
    padding: 0.75rem 0.5rem 0.625rem;
    font-size: 0.75rem;
}

/* Loading state for images */
.lineup-member-card img {
    background: #1C1C1C;
}

.lineup-member-card img:not([src]),
.lineup-member-card img[src=""] {
    background: linear-gradient(90deg, #1C1C1C 0%, #2A2A2A 50%, #1C1C1C 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Special member badge */
.special-member-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: linear-gradient(135deg, rgba(139, 0, 0, 0.95), rgba(111, 0, 0, 0.95));
    color: #FFFFFF;
    padding: 0.375rem 0.625rem;
    border-radius: 0.375rem;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    letter-spacing: 0.5px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Price styling */
.price-original {
    text-decoration: line-through;
    color: #9A9A9A;
    font-size: 0.875rem;
    margin-right: 0.5rem;
}

.price-promo {
    color: #10B981;
    font-weight: 700;
}

/* YouTube Live Chat Styling */
#chat-container {
    background: #000;
    border-radius: 0 0 0.75rem 0.75rem;
}

#youtube-live-chat {
    background: #000;
    border-radius: 0 0 0.75rem 0.75rem;
}

/* Desktop: Chat height matches video player height */
@media (min-width: 1280px) {
    #chat-container {
        height: calc((100vw - 2rem) * 9 / 32);
        min-height: 500px;
        max-height: 800px;
    }
}

/* Tablet: Fixed height for chat */
@media (min-width: 768px) and (max-width: 1279px) {
    #chat-container {
        height: 500px;
        min-height: 400px;
    }
}

/* Mobile: Fixed height for chat */
@media (max-width: 767px) {
    #chat-container {
        height: 450px;
        min-height: 350px;
    }
}

/* Small mobile: Smaller chat height */
@media (max-width: 480px) {
    #chat-container {
        height: 400px;
        min-height: 300px;
    }
}