:root {
    --bg-color: #1a1a1a;
    --card-bg: #2d2d2d;
    --text-color: #e0e0e0;
    --accent-color: #ff5252;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.navbar {
    background-color: var(--card-bg);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.navbar-brand {
    font-weight: bold;
    color: var(--accent-color) !important;
}

.manga-card {
    background-color: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s;
    height: 100%;
}

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

.manga-cover {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
}

.manga-info {
    padding: 15px;
}

.manga-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.chapter-item {
    background-color: var(--card-bg);
    border-bottom: 1px solid #404040;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-decoration: none;
    color: var(--text-color);
}

.chapter-item:hover {
    background-color: #404040;
    color: var(--accent-color);
}

.reader-container {
    max-width: 800px;
    margin: 0 auto;
}

.reader-image {
    width: 100%;
    display: block;
    margin: 0 auto;
}

.footer {
    background-color: var(--card-bg);
    padding: 2rem 0;
    margin-top: 3rem;
    text-align: center;
}

/* Dark mode fix for Bootstrap list group */
.chapter-item-custom {
    background-color: var(--card-bg) !important;
    color: var(--text-color) !important;
    border-color: #404040 !important;
}

.chapter-item-custom:hover,
.chapter-item-custom:focus {
    background-color: #3d3d3d !important;
    color: var(--accent-color) !important;
}

.chapter-item-custom .text-muted {
    color: #a0a0a0 !important;
}

.chapter-number {
    color: var(--text-color) !important;
}

/* Hero Slider Redesign - Reference Match */
.hero-slider-container {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 30px;
    background: #0f0f0f;
}

.hero-slide-item {
    height: 400px;
    position: relative;
    overflow: hidden;
    background-color: #111;
    display: flex;
    align-items: center;
}

/* Background Effect */
.hero-bg-blur {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: blur(60px) brightness(0.3);
    opacity: 1;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #111 0%, rgba(17, 17, 17, 0.9) 50%, rgba(17, 17, 17, 0.4) 100%);
    z-index: 1;
}

/* Right Image */
.hero-card-image-wrapper {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 60%;
    z-index: 2;
    mask-image: linear-gradient(to right, transparent, black 20%);
    -webkit-mask-image: linear-gradient(to right, transparent, black 20%);
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.hero-card-image {
    height: 100%;
    width: auto;
    object-fit: cover;
    /* Optional: Rotate slightly if desired, but user image looks straight/clean */
}

/* Content */
.hero-content {
    position: relative;
    z-index: 3;
    padding-left: 20px;
}

.hero-chapter-badge {
    display: block;
    font-size: 1rem;
    color: #ccc;
    margin-bottom: 5px;
    font-weight: 500;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 15px;
    line-height: 1.1;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hero-desc {
    color: #bbb;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 25px;
    max-width: 600px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hero-genres {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.hero-genre-tag {
    background: transparent;
    border: 1px solid #666;
    border-radius: 20px;
    padding: 6px 16px;
    color: #ddd;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
}

.hero-genre-tag:hover {
    border-color: #fff;
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.hero-btn-action {
    background-color: #00dac6;
    /* Cyan/Teal color */
    color: #000;
    border: none;
    padding: 12px 30px;
    border-radius: 6px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: transform 0.2s, box-shadow 0.2s;
    display: inline-flex;
    align-items: center;
}

.hero-btn-action:hover {
    background-color: #00b5a4;
    color: #000;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 218, 198, 0.3);
}

/* Sidebar Widgets */
.sidebar-widget {
    background: var(--card-bg);
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

/* Popular Tabs */
.popular-tabs {
    display: flex;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid var(--border-color);
}

.popular-tab {
    background: transparent;
    border: none;
    color: #888;
    padding: 15px 0;
    font-weight: 700;
    font-size: 0.85rem;
    position: relative;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.3s;
}

.popular-tab:hover {
    color: #fff;
}

.popular-tab.active {
    color: #fff;
}

.popular-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--accent-color);
    box-shadow: 0 -2px 10px rgba(229, 9, 20, 0.5);
}

/* Popular List Items */
.popular-content {
    padding: 0;
}

.popular-item {
    padding: 15px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.2s;
}

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

.popular-item:hover {
    background: rgba(255, 255, 255, 0.02);
}

.popular-rank {
    font-size: 1.8rem;
    font-weight: 800;
    font-style: italic;
    width: 40px;
    text-align: center;
    color: #444;
    line-height: 1;
    margin-right: 15px;
    font-family: 'Segoe UI', sans-serif;
    /* Or a more stylized font if available */
}

.popular-rank.top-rank {
    color: var(--accent-color);
    text-shadow: 0 0 10px rgba(229, 9, 20, 0.3);
}

.popular-thumb {
    width: 55px;
    height: 80px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
    margin-right: 15px;
}

.popular-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.popular-item:hover .popular-thumb img {
    transform: scale(1.1);
}

.popular-info {
    flex-grow: 1;
    overflow: hidden;
}

.popular-title {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 6px;
}

.popular-title a {
    color: #fff;
    text-decoration: none;
    transition: color 0.2s;
}

.popular-title a:hover {
    color: var(--accent-color) !important;
}

.popular-meta {
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.popular-genres {
    color: #ccc;
    background: #333;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.popular-rating {
    color: #ffc107;
    font-weight: 600;
    font-size: 0.8rem;
}

/* Sidebar Title (for Genres) */
.sidebar-title {
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #fff;
    padding: 15px 20px;
    border-bottom: 2px solid var(--accent-color);
    margin-bottom: 0;
    background: rgba(0, 0, 0, 0.1);
}

/* Genres Cloud */
.genre-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 20px;
}

.genre-tag {
    display: inline-block;
    background: rgba(0, 0, 0, 0.3);
    color: #00d2ff;
    /* Cyan color from image */
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
    border: 1px solid rgba(0, 210, 255, 0.2);
}

.genre-tag:hover {
    background: rgba(0, 210, 255, 0.1);
    color: #00d2ff;
    border-color: #00d2ff;
    text-decoration: none;
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.1);
}

.hero-btn-action {
    background-color: var(--accent-color);
    color: #fff;
    border: none;
    padding: 10px 25px;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.hero-btn-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.4);
    /* Red glow */
    color: #fff;
}

.hero-genre-tag {
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-right: 5px;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .hero-slide-item {
        height: auto;
        min-height: 500px;
    }

    .hero-image-wrapper {
        display: none;
    }

    .hero-text-content {
        padding-right: 0;
        text-align: center;
        padding-top: 40px;
        padding-bottom: 40px;
        margin: 0 auto;
    }

    .hero-manga-title {
        font-size: 2.2rem;
    }

    .hero-slide-overlay {
        background: rgba(0, 0, 0, 0.7);
    }
}

/* Latest Updates Section - Atemporal Style */
.update-card {
    transition: transform 0.2s;
}

.update-card:hover {
    transform: translateY(-2px);
}

.chapter-btn {
    background-color: #222;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.chapter-btn:hover {
    background-color: #333;
    transform: translateX(2px);
    border-color: rgba(255, 255, 255, 0.1);
}

/* Manga Detail Mobile Cover Adjustment */
@media (max-width: 768px) {
    .manga-detail-cover {
        max-width: 180px;
        margin: 0 auto;
        display: block;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    }

    .manga-cover-card {
        background: transparent !important;
        box-shadow: none !important;
        border: none !important;
    }

    .manga-cover-card .card-body {
        text-align: center;
    }
}