/* Base Styles and Reset */
:root {
    --primary-color: #FF4D6B;
    --primary-dark: #E0304F;
    --secondary-color: #2BBCFF;
    --background-dark: #0A0E1A;
    --background-light: #131A2F;
    --text-color: #FFFFFF;
    --text-muted: #8C92A6;
    --border-color: #222A45;
    --card-bg: #1A213A;
    --nav-height: 70px;
    --transition-speed: 0.3s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--background-dark);
    color: var(--text-color);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 15px;
}

a {
    text-decoration: none;
    color: var(--text-color);
    transition: color var(--transition-speed) ease;
}

a:hover {
    color: var(--primary-color);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.9rem;
}

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

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 7px 14px rgba(255, 77, 107, 0.3);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 7px 14px rgba(43, 188, 255, 0.3);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Header & Navigation */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    background-color: rgba(10, 14, 26, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.site-header.scrolled {
    height: 60px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.header-left, .header-right {
    display: flex;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.8rem;
    font-weight: 700;
    margin-right: 30px;
    text-decoration: none;
}

.logo-img {
    height: 40px;
    width: auto;
    margin-right: 10px;
}

.logo-text {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    white-space: nowrap;
    max-width: none;
    overflow: visible;
    text-overflow: clip;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
    margin-right: 15px;
}

.main-nav ul {
    display: flex;
}

.main-nav ul li {
    margin-right: 25px;
}

.main-nav ul li a {
    font-weight: 500;
    position: relative;
}

.main-nav ul li a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.main-nav ul li a:hover::after,
.main-nav ul li a.active::after {
    width: 100%;
}

/* Search container */
.search-container {
    position: relative;
    margin-right: 20px;
}

.search-container form {
    display: flex;
    align-items: center;
}

.search-container input {
    background-color: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 20px;
    padding: 8px 15px 8px 35px;
    width: 200px;
    color: var(--text-color);
    transition: all 0.3s ease;
}

.search-container input:focus {
    width: 300px;
    outline: none;
    background-color: rgba(255, 255, 255, 0.15);
}

.search-container button {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
}

/* User Menu */
.user-menu {
    display: flex;
    align-items: center;
}

.dropdown {
    position: relative;
}

.dropdown-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.profile-pic {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
    transition: all 0.3s ease;
}

.dropdown-toggle:hover .profile-pic {
    transform: scale(1.1);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: #212121;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    padding: 10px 0;
    min-width: 200px;
    z-index: 1000;
    display: none;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-menu a {
    display: block;
    padding: 8px 15px;
    color: #fff;
    text-decoration: none;
    transition: background-color 0.2s;
}

.dropdown-menu a:hover {
    background-color: #333;
}

.dropdown-menu i {
    margin-right: 8px;
    width: 16px;
    text-align: center;
}

/* Mobile Navigation */
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    display: flex;
    justify-content: flex-end;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-nav-content {
    width: 300px;
    height: 100%;
    background-color: var(--background-light);
    padding: 30px;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.77, 0, 0.175, 1);
}

.mobile-nav-overlay.active .mobile-nav-content {
    transform: translateX(0);
}

.mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background-color: var(--background-dark);
    position: sticky;
    top: 0;
    z-index: 1;
}

.mobile-logo-container {
    display: flex;
    align-items: center;
}

.mobile-nav-header .logo {
    font-size: 1.3rem;
    margin-right: 0;
    color: var(--text-color);
    display: flex;
    align-items: center;
}

.mobile-nav-header .logo-img {
    height: 30px;
    width: auto;
    margin-right: 8px;
}

.mobile-user-profile {
    display: flex;
    align-items: center;
    margin-right: 15px;
    margin-left: 15px;
}

.mobile-profile-pic {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.close-menu-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    position: relative;
    transition: all 0.3s ease;
}

.close-menu-btn:hover {
    color: var(--primary-color);
    transform: rotate(90deg);
}

.close-menu-btn i {
    font-size: 24px;
    color: #fff;
    text-shadow: 0 0 3px rgba(0, 0, 0, 0.5);
}

.mobile-nav-menu ul li {
    margin-bottom: 15px;
}

.mobile-nav-menu ul li a {
    display: flex;
    align-items: center;
    font-size: 1.1rem;
}

.mobile-nav-menu ul li a i {
    margin-right: 10px;
    color: var(--primary-color);
}

/* Main content area */
main {
    padding-top: calc(var(--nav-height) + 20px);
    min-height: calc(100vh - 300px);
}

/* Hero section */
.hero-section {
    position: relative;
    height: 600px;
    overflow: hidden;
    margin-bottom: 50px;
}

.hero-slide {
    position: relative;
    height: 100%;
}

.hero-img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(10, 14, 26, 0.2), var(--background-dark));
    display: flex;
    align-items: center;
}

.hero-content {
    max-width: 600px;
    padding: 0 20px;
    animation: fadeInUp 1s ease;
}

.hero-content h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.hero-content p {
    margin-bottom: 20px;
    color: var(--text-muted);
}

.hero-buttons {
    display: flex;
    gap: 15px;
}

/* Sections */
.section {
    margin-bottom: 50px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    position: relative;
}

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

.see-all {
    font-weight: 500;
    display: flex;
    align-items: center;
}

.see-all i {
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.see-all:hover i {
    transform: translateX(5px);
}

/* Anime Cards */
.anime-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

/* Horizontal Scrolling */
.anime-scroll-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding: 10px 0;
    touch-action: pan-x pan-y;
}

.anime-scroll-container::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 60px;
    height: 100%;
    background: linear-gradient(to right, transparent, var(--body-bg));
    pointer-events: none;
}

.anime-scroll {
    display: flex;
    overflow-x: auto;
    padding: 10px 0;
    gap: 20px;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) rgba(0, 0, 0, 0.2);
    -webkit-overflow-scrolling: touch;
    cursor: grab;
    /* Enhanced mobile scrolling */
    scroll-behavior: auto;
    scroll-snap-type: none; 
    touch-action: pan-x pan-y;
    overscroll-behavior-x: contain;
}

.anime-scroll:active {
    cursor: grabbing;
}

.anime-scroll::-webkit-scrollbar {
    height: 6px;
}

.anime-scroll::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.anime-scroll::-webkit-scrollbar-thumb {
    background-color: var(--primary-color);
    border-radius: 10px;
}

.anime-scroll::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 77, 107, 0.8);
}

.anime-scroll .anime-card {
    flex: 0 0 auto;
    width: 200px;
    margin-bottom: 0;
}

.anime-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background-color: rgba(26, 33, 58, 0.8);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s ease;
    height: 100%;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    touch-action: pan-x pan-y;
    -webkit-tap-highlight-color: transparent;
}

.anime-card:hover,
.anime-card:active {
    transform: scale(0.97);
}

.anime-card-img {
    position: relative;
    height: 280px;
    border-radius: 16px 16px 0 0;
    overflow: hidden;
}

.anime-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.01);
    transition: transform 0.5s ease;
}

.anime-card:hover .anime-card-img img,
.anime-card:active .anime-card-img img {
    transform: scale(1.05);
}

/* Modern gradient overlay */
.anime-card-overlay {
    opacity: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.2) 0%,
        rgba(0, 0, 0, 0.6) 100%
    );
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    transition: opacity 0.2s ease;
}

/* Show overlay on hover/touch */
.anime-card:hover .anime-card-overlay,
.anime-card:active .anime-card-overlay,
.anime-card.touched .anime-card-overlay {
    opacity: 1;
    background-color: rgba(0, 0, 0, 0.5);
}

/* Improved play button */
.anime-card-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, rgba(255, 77, 107, 0.95), rgba(255, 77, 107, 0.85));
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Show play button on hover/touch */
.anime-card:hover .anime-card-play,
.anime-card:active .anime-card-play,
.anime-card.touched .anime-card-play {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.anime-card-play:active {
    transform: translate(-50%, -50%) scale(0.9);
}

.anime-card-play i {
    font-size: 1.5rem;
    margin-left: 3px;
    color: #fff;
}

/* Enhanced status badge */
.anime-card-status {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 12px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border-radius: 50px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.anime-card-status.ongoing {
    background: linear-gradient(to right, #FF416C, #FF4B2B);
    color: white;
}

.anime-card-status.finished {
    background: linear-gradient(to right, #11998e, #38ef7d);
    color: white;
}

.anime-card-status.upcoming {
    background: linear-gradient(to right, #8E2DE2, #4A00E0);
    color: white;
}

/* Improved rating badge */
.anime-card-rating {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 215, 0, 0.9);
    color: #000;
    padding: 4px 10px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.anime-card-rating i {
    margin-right: 4px;
    color: #000;
}

/* Refined card body */
.anime-card-body {
    padding: 14px;
    background: transparent;
}

.anime-card-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #fff;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.anime-card-info span {
    display: flex;
    align-items: center;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
}

.anime-card-info span:first-child::before {
    content: '\f073';
    font-family: 'Font Awesome 5 Free';
    margin-right: 5px;
    font-size: 0.75rem;
    opacity: 0.8;
}

.anime-card-info span:last-child::before {
    content: '\f03d';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    margin-right: 5px;
    font-size: 0.75rem;
    opacity: 0.8;
}

/* Prevent ghost clicks */
.anime-card a {
    -webkit-tap-highlight-color: transparent;
}

/* Featured Anime Slider */
.featured-anime-slider {
    margin-bottom: 50px;
}

.swiper-slide {
    height: 400px;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.slide-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 30px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
}

.slide-title {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.slide-info {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.slide-info span {
    margin-right: 15px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}

.slide-info span i {
    margin-right: 5px;
    color: var(--primary-color);
}

.slide-description {
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Footer */
.site-footer {
    background-color: var(--background-light);
    padding: 50px 0 20px;
    margin-top: 50px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 2fr 1.5fr;
    gap: 30px;
    margin-bottom: 30px;
}

.footer-logo h2 {
    margin-bottom: 15px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.footer-logo p {
    margin-bottom: 20px;
    color: var(--text-muted);
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.social-links a:hover {
    background-color: var(--primary-color);
    transform: translateY(-5px);
}

.footer-links {
    display: flex;
    gap: 30px;
}

.footer-links-column h3 {
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-links-column ul li {
    margin-bottom: 10px;
}

.footer-links-column ul li a {
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.footer-links-column ul li a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.footer-newsletter h3 {
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.footer-newsletter p {
    margin-bottom: 15px;
    color: var(--text-muted);
}

.newsletter-form {
    display: flex;
}

.newsletter-form input {
    flex: 1;
    padding: 10px 15px;
    border: none;
    border-radius: 5px 0 0 5px;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
}

.newsletter-form input:focus {
    outline: none;
    background-color: rgba(255, 255, 255, 0.15);
}

.newsletter-form button {
    border-radius: 0 5px 5px 0;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-bottom i {
    color: var(--primary-color);
}

/* Scroll to top button */
.scroll-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 900;
}

.scroll-top-btn.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top-btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-5px);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.fade-in {
    animation: fadeIn 1s ease;
}

.fade-in-up {
    animation: fadeInUp 1s ease;
}

.pulse {
    animation: pulse 2s infinite;
}

/* Media Queries for Responsive Design */
@media (max-width: 1200px) {
    .anime-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
    
    .anime-scroll .anime-card {
        min-width: 180px;
    }
}

@media (max-width: 992px) {
    /* Hide navigation items on tablet and mobile */
    .main-nav {
        display: none;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .mobile-nav {
        display: block;
    }
    
    .logo-text {
        font-size: 1.6rem;
        max-width: none;
        overflow: visible;
        text-overflow: clip;
    }
    
    .footer-content {
        flex-direction: column;
    }
    
    .footer-logo {
        text-align: center;
    }
    
    .anime-scroll .anime-card {
        min-width: 160px;
    }
}

@media (max-width: 768px) {
    /* Hide all navigation options in header, only show logo */
    .header-right {
        display: none !important;
    }
    
    .header {
        padding: 0.8rem 0;
    }
    
    .logo-img {
        height: 35px;
    }
    
    .logo-text {
        font-size: 1.4rem;
        max-width: none;
        overflow: visible;
        text-overflow: clip;
    }
    
    /* Hide the search container in header */
    .header-right .search-container {
        display: none;
    }
    
    .hero-section {
        height: 450px;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .footer-content {
        gap: 30px;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 30px;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .subscription-cta {
        padding: 30px 15px;
    }
    
    .cta-content h2 {
        font-size: 1.8rem;
    }
    
    .anime-scroll {
        -webkit-overflow-scrolling: touch;
        scroll-behavior: auto !important;
        padding: 10px 0 15px;
        /* Remove all scroll constraints for mobile */
        scroll-snap-align: none;
        scroll-snap-type: none;
        scroll-snap-stop: normal;
        scrollbar-width: none; /* Hide scrollbar on mobile for more space */
        touch-action: pan-x pan-y !important;
    }
    
    /* Hide webkit scrollbars on mobile */
    .anime-scroll::-webkit-scrollbar {
        display: none;
        height: 0;
        width: 0;
    }
    
    .anime-scroll .anime-card {
        min-width: 150px;
    }
    
    /* Enhanced Mobile Anime Card Design */
    .anime-card {
        position: relative;
        border-radius: 16px;
        overflow: hidden;
        background-color: rgba(26, 33, 58, 0.8);
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
        transition: transform 0.2s ease;
        height: 100%;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.05);
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }
    
    .anime-card:active {
        transform: scale(0.97);
    }
    
    .anime-card-img {
        position: relative;
        height: 220px;
        border-radius: 16px 16px 0 0;
        overflow: hidden;
    }
    
    .anime-card-img img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transform: scale(1.01);
        transition: transform 0.5s ease;
    }
    
    .anime-card:active .anime-card-img img {
        transform: scale(1.05);
    }
    
    /* Modern gradient overlay */
    .anime-card-overlay {
        opacity: 0; 
        background: linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0.2) 0%,
            rgba(0, 0, 0, 0.6) 100%
        );
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 15px;
        transition: opacity 0.2s ease;
    }
    
    /* Show overlay on touch */
    .anime-card:active .anime-card-overlay,
    .anime-card.touched .anime-card-overlay {
        opacity: 1;
        background-color: rgba(0, 0, 0, 0.5);
    }
    
    /* Improved play button */
    .anime-card-play {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) scale(0.9);
        width: 56px;
        height: 56px;
        background: linear-gradient(135deg, rgba(255, 77, 107, 0.95), rgba(255, 77, 107, 0.85));
        border-radius: 50%;
        display: flex;
        justify-content: center;
        align-items: center;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
        opacity: 0;
        transition: transform 0.2s ease, opacity 0.2s ease;
    }
    
    /* Show play button on touch */
    .anime-card:active .anime-card-play,
    .anime-card.touched .anime-card-play {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    
    .anime-card-play:active {
        transform: translate(-50%, -50%) scale(0.9);
    }
    
    .anime-card-play i {
        font-size: 1.5rem;
        margin-left: 3px;
        color: #fff;
    }
    
    /* Enhanced status badge */
    .anime-card-status {
        position: absolute;
        top: 12px;
        left: 12px;
        padding: 6px 12px;
        font-size: 0.7rem;
        font-weight: 700;
        letter-spacing: 0.5px;
        text-transform: uppercase;
        border-radius: 50px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
        z-index: 10;
    }
    
    .anime-card-status.ongoing {
        background: linear-gradient(to right, #FF416C, #FF4B2B);
        color: white;
    }
    
    .anime-card-status.finished {
        background: linear-gradient(to right, #11998e, #38ef7d);
        color: white;
    }
    
    .anime-card-status.upcoming {
        background: linear-gradient(to right, #8E2DE2, #4A00E0);
        color: white;
    }
    
    /* Improved rating badge */
    .anime-card-rating {
        position: absolute;
        top: 12px;
        right: 12px;
        background: rgba(255, 215, 0, 0.9);
        color: #000;
        padding: 4px 10px;
        border-radius: 50px;
        font-weight: 700;
        font-size: 0.8rem;
        display: flex;
        align-items: center;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
        z-index: 10;
    }
    
    .anime-card-rating i {
        margin-right: 4px;
        color: #000;
    }
    
    /* Refined card body */
    .anime-card-body {
        padding: 14px;
        background: transparent;
    }
    
    .anime-card-title {
        font-size: 1rem;
        font-weight: 700;
        margin-bottom: 8px;
        color: #fff;
        line-height: 1.3;
        display: -webkit-box;
        -webkit-line-clamp: 1;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    .anime-card-info {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .anime-card-info span {
        display: flex;
        align-items: center;
        font-size: 0.8rem;
        color: rgba(255, 255, 255, 0.7);
    }
    
    .anime-card-info span:first-child::before {
        content: '\f073';
        font-family: 'Font Awesome 5 Free';
        margin-right: 5px;
        font-size: 0.75rem;
        opacity: 0.8;
    }
    
    .anime-card-info span:last-child::before {
        content: '\f03d';
        font-family: 'Font Awesome 5 Free';
        font-weight: 900;
        margin-right: 5px;
        font-size: 0.75rem;
        opacity: 0.8;
    }
    
    .anime-scroll-container::after {
        display: none;
    }
    
    /* Prevent ghost clicks */
    .anime-card a {
        -webkit-tap-highlight-color: transparent;
    }
}

@media (max-width: 576px) {
    /* Keep only the hamburger menu and logo visible */
    .header-right {
        display: none;
    }
    
    .logo-img {
        height: 30px;
    }
    
    .logo-text {
        font-size: 1.2rem;
        max-width: none;
        overflow: visible;
        text-overflow: clip;
    }
    
    .mobile-logo-container .logo-text {
        max-width: none;
        overflow: visible;
        text-overflow: clip;
    }
    
    .anime-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .anime-scroll .anime-card {
        min-width: 140px;
    }
    
    .anime-card-img {
        height: 180px;
    }

    .hero-section {
        height: 400px;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .search-container {
        display: none;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .hero-buttons .btn {
        width: 100%;
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .scroll-top-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        right: 15px;
        bottom: 15px;
    }
    
    .mobile-nav-header .logo-img {
        height: 25px;
    }
}

/* Video Player Styles */
.video-section {
    margin-bottom: 30px;
}

.video-player-container {
    position: relative;
    width: 100%;
    background-color: #000;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.video-player {
    width: 100%;
    aspect-ratio: 16 / 9;
    display: block;
}

/* Custom Video Controls */
.video-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-player-container:hover .video-controls,
.video-controls:hover {
    opacity: 1;
}

.video-progress {
    margin-bottom: 10px;
}

#seekBar {
    width: 100%;
    height: 5px;
    -webkit-appearance: none;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    outline: none;
    margin-bottom: 5px;
}

#seekBar::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 15px;
    height: 15px;
    background-color: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
}

.video-time {
    display: flex;
    justify-content: space-between;
    color: white;
    font-size: 0.9rem;
}

.video-buttons {
    display: flex;
    align-items: center;
}

.video-control-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    margin-right: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.video-control-btn:hover {
    color: var(--primary-color);
}

.volume-control {
    position: relative;
    width: 80px;
    margin-right: 15px;
}

#volumeBar {
    width: 100%;
    height: 5px;
    -webkit-appearance: none;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    outline: none;
}

#volumeBar::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background-color: white;
    border-radius: 50%;
    cursor: pointer;
}

/* Episode info bar */
.episode-info-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--card-bg);
    padding: 15px;
    border-radius: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.episode-title h1 {
    font-size: 1.5rem;
    margin: 0;
}

.anime-status {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 5px;
    margin-left: 10px;
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.anime-status.ongoing {
    background: maroon;
}

.anime-status.finished {
    background: green;
}

.anime-status.upcoming {
    background: deeppink;
}

.episode-navigation {
    display: flex;
    gap: 10px;
}

.episode-card.current {
    border: 2px solid var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.episode-card.current .episode-thumbnail::after {
    content: 'Now Playing';
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: var(--primary-color);
    color: white;
    padding: 3px 8px;
    border-radius: 5px;
    font-size: 0.7rem;
    font-weight: 600;
}

@media (max-width: 768px) {
    .episode-info-bar {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .episode-title h1 {
        font-size: 1.2rem;
        margin-bottom: 10px;
    }
    
    .episode-navigation, .episode-actions {
        width: 100%;
    }
    
    .episode-navigation {
        justify-content: space-between;
    }
}

/* Login & Register Forms */
.auth-container {
    max-width: 400px;
    margin: 50px auto;
    background-color: var(--card-bg);
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header h1 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.auth-header p {
    color: var(--text-muted);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-color);
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(255, 77, 107, 0.2);
}

.form-footer {
    text-align: center;
    margin-top: 20px;
    color: var(--text-muted);
}

.form-footer a {
    color: var(--primary-color);
}

.btn-auth {
    width: 100%;
    padding: 12px;
    font-size: 1rem;
}

/* Profile Page */
.profile-header {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-bottom: 30px;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--primary-color);
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-info h1 {
    font-size: 1.8rem;
    margin-bottom: 5px;
}

.profile-info p {
    color: var(--text-muted);
    margin-bottom: 15px;
}

.profile-stats {
    display: flex;
    gap: 20px;
}

.profile-stat {
    text-align: center;
}

.profile-stat-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

.profile-stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.profile-tabs {
    margin-bottom: 30px;
}

.profile-tabs-nav {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.profile-tab-btn {
    padding: 10px 20px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.profile-tab-btn.active {
    color: var(--primary-color);
}

.profile-tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
}

/* Loading Animation */
.loading-spinner {
    display: inline-block;
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
}

.toast {
    display: flex;
    align-items: center;
    background-color: var(--card-bg);
    border-left: 5px solid var(--primary-color);
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    margin-bottom: 10px;
    animation: slideInRight 0.3s ease, fadeOut 0.3s ease 3s forwards;
    max-width: 300px;
}

.toast-icon {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-right: 10px;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    margin-bottom: 3px;
}

.toast-message {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
    margin-left: 10px;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* Page Transitions */
.page-transition {
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background-color: var(--background-dark);
}

::-webkit-scrollbar-thumb {
    background-color: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background-color: var(--primary-dark);
}

/* Subscription CTA Section */
.subscription-cta {
    background-image: linear-gradient(to right, rgba(255, 77, 107, 0.9), rgba(43, 188, 255, 0.9)), url('../images/subscription-bg.jpg');
    background-size: cover;
    background-position: center;
    padding: 80px 0;
    margin: 50px 0;
    border-radius: 15px;
    overflow: hidden;
}

.cta-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.cta-content h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.cta-content p {
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.cta-content .btn {
    padding: 14px 30px;
    font-size: 1.1rem;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

/* Anime Banner Section */
.anime-banner {
    position: relative;
    min-height: 500px;
    background-size: cover;
    background-position: center;
    margin-bottom: 0;
    padding-bottom: 50px;
}

.anime-banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(10, 14, 26, 0.8), var(--background-dark));
    display: flex;
    align-items: center;
    padding: 50px 0;
}

.anime-banner-content {
    display: flex;
    gap: 30px;
    position: relative;
    margin-bottom: 30px;
}

.anime-poster {
    flex-shrink: 0;
    width: 250px;
    height: 350px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    position: relative;
}

.anime-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.anime-rating {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: rgba(255, 215, 0, 0.9);
    border-radius: 5px;
    padding: 4px 8px;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    color: #000;
}

.anime-rating i {
    margin-right: 5px;
}

.anime-info {
    flex: 1;
}

.anime-info h1 {
    font-size: 2.5rem;
    margin-bottom: 5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.anime-alt-title {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--text-muted);
    font-style: italic;
}

.anime-meta-details {
    margin-bottom: 20px;
}

.anime-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 15px;
}

.anime-meta-item {
    display: flex;
    flex-direction: column;
    min-width: 100px;
}

.meta-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.meta-value {
    font-size: 1rem;
    font-weight: 500;
}

.status-releasing,
.status-ongoing {
    color: #F43F5E;
}

.status-finished,
.status-completed {
    color: #10B981;
}

.status-upcoming {
    color: #3B82F6;
}

.anime-genres {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.genre-tag {
    display: inline-block;
    padding: 6px 15px;
    background-color: rgba(255, 77, 107, 0.2);
    color: var(--primary-color);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.genre-tag:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.anime-actions {
    display: flex;
    gap: 15px;
}

.btn-watch {
    padding: 12px 25px;
    font-size: 1rem;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.anime-trailer-preview {
    width: 100%;
    max-width: 650px;
    margin: 0 auto;
}

/* Anime Details Tabs */
.anime-details-section {
    background-color: var(--background-dark);
    padding: 30px 0 50px;
}

.anime-details-tabs {
    background-color: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Tab Navigation */
.nav-tabs {
    display: flex;
    overflow-x: auto;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--background-light);
    padding: 0;
    margin: 0;
    list-style: none;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.nav-tabs::-webkit-scrollbar {
    height: 3px;
}

.nav-tabs::-webkit-scrollbar-thumb {
    background-color: var(--primary-color);
    border-radius: 3px;
}

.nav-item {
    flex: 0 0 auto;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 15px 30px;
    color: var(--text-color);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    position: relative;
    font-weight: 500;
    font-size: 1rem;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link.active {
    color: var(--primary-color);
    background-color: var(--card-bg);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
}

/* Tab Content */
.tab-content {
    padding: 30px;
}

.tab-pane {
    display: none;
}

.tab-pane.show.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Info Tab */
.anime-info-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
}

.anime-info-main {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.anime-synopsis h3,
.anime-tags h3,
.anime-production h3,
.anime-stats-card h3,
.anime-details-card h3 {
    font-size: 1.25rem;
    margin-bottom: 15px;
    color: var(--text-color);
    font-weight: 600;
    position: relative;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.anime-synopsis p {
    color: var(--text-muted);
    line-height: 1.7;
    font-size: 1rem;
}

.anime-production .production-item {
    margin-bottom: 10px;
}

.production-label {
    font-weight: 500;
    margin-right: 5px;
    color: var(--text-color);
}

.production-value {
    color: var(--text-muted);
}

/* Sidebar Cards */
.anime-info-sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.anime-stats-card,
.anime-details-card {
    background-color: var(--background-light);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.stat-item,
.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-item:last-child,
.detail-item:last-child {
    border-bottom: none;
}

.stat-label,
.detail-label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.stat-value,
.detail-value {
    font-weight: 500;
    font-size: 1rem;
}

.stat-value span {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-left: 2px;
}

/* Characters and Related Grids */
.characters-grid,
.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 20px;
}

.character-card,
.related-card {
    background-color: var(--background-light);
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.character-card:hover,
.related-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.character-image,
.related-image {
    height: 200px;
    overflow: hidden;
}

.character-image img,
.related-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.character-card:hover .character-image img,
.related-card:hover .related-image img {
    transform: scale(1.05);
}

.character-info,
.related-info {
    padding: 15px;
}

.character-info h4,
.related-info h4 {
    font-size: 1rem;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.character-role,
.related-type,
.relation-type,
.voice-actor {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Episodes Grid */
.episodes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.episode-card {
    background-color: var(--background-light);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.episode-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.episode-thumbnail {
    position: relative;
    height: 150px;
    overflow: hidden;
}

.episode-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.episode-number {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: var(--primary-color);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.episode-duration {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.episode-info {
    padding: 15px;
}

.episode-title {
    font-size: 1rem;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.episode-date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Mobile Responsive Design */
@media screen and (max-width: 1200px) {
    .anime-banner-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .anime-poster {
        margin-bottom: 20px;
    }
    
    .anime-meta-row {
        justify-content: center;
    }
    
    .anime-genres {
        justify-content: center;
    }
    
    .anime-actions {
        justify-content: center;
    }
}

@media screen and (max-width: 992px) {
    .anime-info-grid {
        grid-template-columns: 1fr;
    }
    
    .anime-info-sidebar {
        margin-top: 30px;
    }
    
    .anime-info h1 {
        font-size: 2rem;
    }
    
    .characters-grid,
    .related-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .anime-trailer-preview {
        margin-top: 30px;
    }
}

@media screen and (max-width: 768px) {
    .anime-banner {
        padding-bottom: 20px;
    }
    
    .episodes-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .anime-poster {
        width: 200px;
        height: 280px;
    }
    
    .anime-meta-row {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .anime-meta-item {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .meta-label {
        margin-bottom: 0;
    }
    
    .episode-list-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .nav-link {
        padding: 12px 20px;
    }
    
    .tab-content {
        padding: 20px;
    }
    
    .anime-card.touched .anime-card-overlay {
        opacity: 1;
        background-color: rgba(0, 0, 0, 0.5);
    }
    
    .anime-card.touched .anime-card-play {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@media screen and (max-width: 576px) {
    .anime-banner {
        min-height: auto;
        padding: 30px 0;
    }
    
    .anime-banner-overlay {
        position: relative;
        padding: 20px 0;
    }
    
    .anime-details-tabs {
        border-radius: 0;
        margin: 0 -15px;
    }
    
    .anime-info h1 {
        font-size: 1.6rem;
    }
    
    .anime-alt-title {
        font-size: 1rem;
    }
    
    .anime-actions {
        flex-direction: column;
    }
    
    .anime-actions .btn {
        width: 100%;
    }
    
    .characters-grid,
    .related-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    }
    
    .episodes-grid {
        grid-template-columns: 1fr;
    }
    
    .nav-tabs {
        flex-wrap: nowrap;
    }
    
    .nav-link {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
}

/* Mobile Search Styles */
.mobile-search {
    padding: 15px;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.mobile-search-input {
    display: flex;
    position: relative;
    border-radius: 50px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.1);
    margin-bottom: 10px;
}

.mobile-search-input input {
    flex: 1;
    padding: 12px 15px;
    background: transparent;
    border: none;
    color: var(--text-color);
    font-size: 1rem;
    width: 100%;
}

.mobile-search-input button {
    background: var(--primary-color);
    border: none;
    color: white;
    padding: 0 20px;
    cursor: pointer;
}

.mobile-search-input input:focus {
    outline: none;
}

.mobile-search .search-results-dropdown {
    position: relative;
    top: 0;
    max-height: 300px;
    margin-top: 5px;
    width: 100%;
}

/* Notification System Styles */
.notifications-wrapper {
    position: relative;
    display: inline-block;
    margin-right: 20px;
}

.notifications-icon {
    position: relative;
    cursor: pointer;
    font-size: 1.2rem;
    color: #fff;
    padding: 5px;
}

.notifications-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #ff5757;
    color: white;
    border-radius: 50%;
    min-width: 18px;
    height: 18px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 2px;
    font-weight: bold;
}

.notification-dot {
    position: absolute;
    top: -3px;
    right: -3px;
    width: 10px;
    height: 10px;
    background-color: #ff5757;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(255, 87, 87, 0.8);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 87, 87, 0.8);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(255, 87, 87, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 87, 87, 0);
    }
}

.notifications-panel {
    position: absolute;
    top: 100%;
    right: -10px;
    width: 350px;
    max-height: 500px;
    background-color: #212121;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
    overflow: hidden;
    transition: all 0.3s ease;
}

.notifications-panel.show {
    display: block;
}

.notifications-header {
    padding: 15px;
    border-bottom: 1px solid #323232;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notifications-header h3 {
    margin: 0;
    font-size: 1rem;
    color: #fff;
}

.btn-mark-read {
    background: none;
    border: none;
    color: #6c5ce7;
    font-size: 0.8rem;
    cursor: pointer;
    padding: 5px;
}

.btn-mark-read:hover {
    text-decoration: underline;
}

.notifications-list {
    max-height: 400px;
    overflow-y: auto;
}

.notification-item {
    padding: 12px 15px;
    border-bottom: 1px solid #323232;
    display: flex;
    align-items: flex-start;
    position: relative;
    transition: background-color 0.2s;
    cursor: pointer;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item:hover {
    background-color: #2a2a2a;
}

.notification-item.unread {
    background-color: rgba(108, 92, 231, 0.05);
}

.notification-item.unread:hover {
    background-color: rgba(108, 92, 231, 0.1);
}

.notification-icon {
    margin-right: 12px;
    color: #6c5ce7;
    font-size: 1.2rem;
    padding-top: 3px;
}

.notification-content {
    flex: 1;
}

.notification-title {
    margin: 0 0 5px 0;
    font-size: 0.9rem;
    color: #fff;
}

.notification-message {
    margin: 0 0 5px 0;
    font-size: 0.8rem;
    color: #aaa;
    line-height: 1.4;
}

.notification-time {
    font-size: 0.7rem;
    color: #777;
    display: block;
}

.notification-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.notifications-footer {
    padding: 10px 15px;
    text-align: center;
    border-top: 1px solid #323232;
}

.notifications-footer a {
    color: #6c5ce7;
    font-size: 0.8rem;
    text-decoration: none;
}

.notifications-footer a:hover {
    text-decoration: underline;
}

.no-notifications {
    padding: 20px;
    text-align: center;
    color: #777;
    font-size: 0.9rem;
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
    .notifications-panel {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        width: 100%;
        max-height: calc(100vh - 60px);
        border-radius: 0;
        z-index: 1001;
    }
    
    .notifications-list {
        max-height: calc(100vh - 130px);
    }
}

/* Skeleton Loading Animation */
@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

.skeleton-loading {
  position: relative;
  background: linear-gradient(90deg, var(--card-bg) 8%, #293860 18%, var(--card-bg) 33%);
  background-size: 1000px 100%;
  animation: shimmer 1.5s infinite linear;
  border-radius: 8px;
}

.skeleton-card {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  overflow: hidden;
}

.skeleton-img {
  width: 100%;
  height: 265px;
  margin-bottom: 10px;
}

.skeleton-title {
  height: 20px;
  width: 90%;
  margin-bottom: 8px;
}

.skeleton-info {
  height: 15px;
  width: 60%;
}

.section-with-skeleton {
  position: relative;
}

.skeleton-section {
  display: none;
}

.skeleton-section.loading {
  display: block;
}

.skeleton-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 15px;
  width: 100%;
  padding: 0 15px;
}

.anime-section {
  display: none;
}

.anime-section.loaded {
  display: block;
}

@media (max-width: 768px) {
  .skeleton-img {
    height: 220px;
  }
  
  .skeleton-container {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
  }
}

@media (max-width: 576px) {
  .skeleton-img {
    height: 180px;
  }
  
  .skeleton-container {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
}

/* Skeleton Loading Animation */
@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

.skeleton-loading {
  position: relative;
  background: linear-gradient(90deg, var(--card-bg) 8%, #293860 18%, var(--card-bg) 33%);
  background-size: 1000px 100%;
  animation: shimmer 1.5s infinite linear;
  border-radius: 8px;
}

.skeleton-section {
  display: none;
}

.skeleton-section.loading {
  display: block;
}

.skeleton-scroll {
  display: flex;
  gap: 16px;
  padding: 10px 0;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.skeleton-scroll::-webkit-scrollbar {
  display: none;
}

.skeleton-card {
  flex: 0 0 auto;
  width: 160px;
  border-radius: 8px;
  overflow: hidden;
  background-color: var(--card-bg);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  scroll-snap-align: start;
}

.skeleton-img {
  width: 100%;
  height: 240px;
  border-radius: 8px 8px 0 0;
}

.skeleton-body {
  padding: 10px;
}

.skeleton-title {
  height: 18px;
  width: 90%;
  margin-bottom: 8px;
}

.skeleton-info {
  height: 14px;
  width: 60%;
}

/* For mobile devices */
@media (max-width: 768px) {
  .skeleton-card {
    width: 140px;
  }
  
  .skeleton-img {
    height: 210px;
  }
}

@media (max-width: 480px) {
  .skeleton-card {
    width: 120px;
  }
  
  .skeleton-img {
    height: 180px;
  }
}