/* ============================================================
   JAGOAN ANIME - Custom Styles
   Extends Tailwind CSS with premium anime-themed aesthetics
   ============================================================ */

/* ---- Scrollbar ---- */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #0a0a0f;
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #8b5cf6, #ec4899);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #7c3aed, #db2777);
}

/* ---- Selection Color ---- */
::selection {
    background: rgba(139, 92, 246, 0.3);
    color: #fff;
}

/* ---- Glassmorphism Card ---- */
.glass-card {
    background: rgba(26, 26, 46, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.glass-card:hover {
    background: rgba(26, 26, 46, 0.8);
    border-color: rgba(139, 92, 246, 0.3);
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(139, 92, 246, 0.15);
}

/* ---- Anime Card ---- */
.anime-card {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.anime-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 25px 50px rgba(139, 92, 246, 0.2);
}
.anime-card .anime-cover {
    width: 100%;
    height: 280px;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.anime-card:hover .anime-cover {
    transform: scale(1.1);
}
.anime-card .anime-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10, 10, 15, 0.95) 0%, rgba(10, 10, 15, 0.4) 50%, transparent 100%);
    opacity: 0.8;
    transition: opacity 0.3s;
}
.anime-card:hover .anime-overlay {
    opacity: 1;
}
.anime-card .anime-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.25rem;
    transform: translateY(10px);
    transition: transform 0.3s;
}
.anime-card:hover .anime-info {
    transform: translateY(0);
}
.anime-card .anime-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.4);
}
.anime-card:hover .anime-play {
    transform: translate(-50%, -50%) scale(1);
}

/* ---- Badge/Tag ---- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.badge-purple {
    background: rgba(139, 92, 246, 0.2);
    color: #a78bfa;
    border: 1px solid rgba(139, 92, 246, 0.3);
}
.badge-pink {
    background: rgba(236, 72, 153, 0.2);
    color: #f472b6;
    border: 1px solid rgba(236, 72, 153, 0.3);
}
.badge-blue {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}
.badge-green {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}
.badge-yellow {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

/* ---- Hero Slider ---- */
.hero-slider .swiper-slide {
    position: relative;
    height: 500px;
    overflow: hidden;
}
@media (max-width: 768px) {
    .hero-slider .swiper-slide {
        height: 350px;
    }
}
.hero-slider .slide-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: blur(2px);
    transform: scale(1.05);
}
.hero-slider .slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(10, 10, 15, 0.95) 0%, rgba(10, 10, 15, 0.6) 50%, rgba(10, 10, 15, 0.3) 100%);
}
.hero-slider .swiper-pagination-bullet {
    width: 30px;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.3);
    opacity: 1;
    transition: all 0.3s;
}
.hero-slider .swiper-pagination-bullet-active {
    background: linear-gradient(90deg, #8b5cf6, #ec4899);
    width: 50px;
}

/* ---- Star Rating ---- */
.star-rating {
    display: inline-flex;
    gap: 4px;
    font-size: 1.2rem;
}
.star-rating .star {
    cursor: pointer;
    color: #4a4a5a;
    transition: all 0.2s;
}
.star-rating .star:hover,
.star-rating .star.active {
    color: #fbbf24;
    text-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
    transform: scale(1.15);
}

/* ---- Video Player Container ---- */
.video-player-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    background: #000;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}
.video-player-container iframe,
.video-player-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* ---- Gradient Text ---- */
.gradient-text {
    background: linear-gradient(135deg, #8b5cf6, #ec4899, #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ---- Pulse Dot (for "Airing" status) ---- */
.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #34d399;
    animation: pulse-ring 1.5s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}
@keyframes pulse-ring {
    0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.5); }
    70% { box-shadow: 0 0 0 10px rgba(52, 211, 153, 0); }
    100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

/* ---- Episode Grid ---- */
.episode-grid .episode-item {
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.3s;
    text-align: center;
    font-weight: 600;
    font-size: 0.875rem;
}
.episode-grid .episode-item:hover {
    background: rgba(139, 92, 246, 0.15);
    border-color: rgba(139, 92, 246, 0.4);
    color: #a78bfa;
    transform: scale(1.05);
}
.episode-grid .episode-item.active {
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    border-color: transparent;
    color: white;
    box-shadow: 0 5px 20px rgba(139, 92, 246, 0.4);
}

/* ---- Skeleton Loading ---- */
.skeleton {
    background: linear-gradient(90deg, #1a1a2e 25%, #242438 50%, #1a1a2e 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    border-radius: 0.5rem;
}
@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ---- Form Inputs ---- */
.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(26, 26, 46, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    color: #fff;
    font-size: 0.875rem;
    transition: all 0.3s;
    outline: none;
}
.form-input:focus {
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}
.form-input::placeholder {
    color: #6b7280;
}

/* ---- Button Styles ---- */
.btn-primary {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    color: #fff;
    font-weight: 600;
    border-radius: 0.75rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.3);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(139, 92, 246, 0.4);
}
.btn-secondary {
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    color: #d1d5db;
    font-weight: 600;
    border-radius: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.3s;
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

/* ---- Section Title ---- */
.section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}
.section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.3), transparent);
}
.section-title h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
}

/* ---- Smooth Page Transitions ---- */
.animate-fade-in {
    animation: fadeIn 0.5s ease-out;
}
.animate-slide-up {
    animation: slideUp 0.5s ease-out;
}

/* ---- Responsive Adjustments ---- */
@media (max-width: 640px) {
    .anime-card .anime-cover {
        height: 200px;
    }
    .section-title h2 {
        font-size: 1.1rem;
    }
}
