:root {
    --bg-main: #0f0f1a;
    /* Darker, more 'cursed' background */
    --bg-secondary: #1a1a2e;
    --text-primary: #ffffff;
    --text-muted: #b3b3b3;
    --accent-pink: #9d4edd;
    /* Deep Violet Accent */
    --accent-pink-hover: #c77dff;
    /* Lighter Violet Hover */
    --hianime-pink: #9d4edd;
    /* Mapping variable used in components */
    --nav-height: 70px;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    padding-top: var(--nav-height);
}

/* Typography */
.text-pink {
    color: var(--accent-pink) !important;
}

.section-title {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--accent-pink);
}

/* Navbar */
.navbar {
    background-color: rgba(15, 15, 26, 0.95);
    height: var(--nav-height);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.search-container {
    max-width: 600px;
}

.search-container .input-group {
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
}

.search-container input:focus {
    box-shadow: none;
}

.btn-primary-custom {
    background-color: var(--accent-pink);
    color: #000;
    font-weight: 600;
    border: none;
    transition: all 0.2s;
}

.btn-primary-custom:hover {
    background-color: var(--accent-pink-hover);
    color: #000;
}

/* Hero Slider */
#heroCarousel {
    height: 450px;
    margin-top: -20px;
    /* Pull up to navbar */
}

.hero-slide {
    height: 450px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70%;
    background: linear-gradient(to top, var(--bg-main) 10%, transparent 100%);
    display: flex;
    align-items: flex-end;
    padding: 2rem 4rem;
}

.hero-content {
    max-width: 600px;
}

.hero-badges span {
    font-size: 0.8rem;
    padding: 2px 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.2);
    margin-right: 5px;
}

/* Simple Card */
.anime-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-secondary);
    transition: transform 0.2s;
    height: 100%;
}

.anime-card:hover {
    transform: translateY(-5px);
}

.anime-poster {
    aspect-ratio: 2/3;
    width: 100%;
    object-fit: cover;
}

.card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 10px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
}

.card-badges {
    position: absolute;
    top: 8px;
    left: 8px;
}

.badge-ep {
    font-size: 0.7rem;
    background: var(--text-primary);
    color: #000;
    padding: 2px 4px;
    border-radius: 2px;
    font-weight: bold;
}

.badge-type {
    font-size: 0.7rem;
    background: var(--accent-pink);
    color: #000;
    padding: 2px 4px;
    border-radius: 2px;
    font-weight: bold;
}

.anime-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #fff;
}

.anime-card:hover .anime-title {
    color: var(--accent-pink);
}

/* Sidebar */
.sidebar-card {
    background: var(--bg-secondary);
    padding: 1rem;
    border-radius: 8px;
}

.nav-pills .nav-link {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.nav-pills .nav-link.active {
    background-color: var(--bg-main);
    color: var(--accent-pink);
}

.top-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.rank-num {
    font-size: 1.5rem;
    font-weight: 700;
    width: 40px;
    text-align: center;
    border-bottom: 2px solid var(--accent-pink);
    margin-right: 15px;
    line-height: 1;
}

.top-thumb {
    width: 50px;
    height: 70px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 15px;
}

.top-info h6 {
    font-size: 0.9rem;
    margin-bottom: 2px;
}

.top-info span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Genre Cloud */
.genre-item {
    font-size: 0.8rem;
    padding: 5px 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.2s;
}

.genre-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent-pink);
}

/* Trending List */
.trending-item {
    min-width: 180px;
    position: relative;
}

.trending-rank {
    position: absolute;
    left: 0;
    bottom: 0;
    font-size: 4rem;
    font-weight: 900;
    line-height: 0.8;
    color: rgba(255, 255, 255, 0.2);
    z-index: 1;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-pink);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-secondary);
    border-radius: 3px;
}

::-webkit-scrollbar-track {
    background: var(--bg-main);
}

/* Compatibility Layer for MovieWalk Vue Components */
:root {
    --hianime-pink: 255, 175, 234;
    /* RGB for rgba usage if needed, or just hex */
    --hianime-pink: var(--accent-pink);
    --hianime-text-muted: var(--text-muted);
}

.anime-poster-wrapper {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 2/3;
}

.anime-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
    backdrop-filter: blur(2px);
}

.anime-card:hover .anime-overlay {
    opacity: 1;
}

.play-btn {
    width: 50px;
    height: 50px;
    background: var(--accent-pink);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    font-size: 20px;
    transform: scale(0);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.anime-card:hover .play-btn {
    transform: scale(1);
}

.episode-badge {
    position: absolute;
    top: 10px;
    left: 0;
    background: var(--accent-pink);
    color: #000;
    padding: 2px 8px;
    border-radius: 0 4px 4px 0;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 2;
}

/* Details Page Styles */
.episode-item-row:hover,
.episode-item-row.active-episode {
    background: #2d2b45 !important;
    border-left: 3px solid var(--accent-pink) !important;
}

.cursor-pointer {
    cursor: pointer;
}