

@keyframes slideInFromLeft {
    0% {
        transform: translateX(-50px);
        opacity: 0;
    }

    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInFromRight {
    0% {
        transform: translateX(50px);
        opacity: 0;
    }

    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Status Colors */
.manga-status-ongoing {
    background: #28a745 !important;
}

.manga-status-completed {
    background: #17a2b8 !important;
}

.manga-status-hiatus {
    background: #ffc107 !important;
    color: #000 !important;
}

.manga-status-cancelled {
    background: #dc3545 !important;
}

/* Type Badge Styles */
.type-badge {
    font-size: 0.65rem !important;
    font-weight: 700 !important;
    padding: 0.25rem 0.5rem !important;
    border-radius: 4px !important;
    letter-spacing: 0.5px;
    text-shadow: none !important;
}

/* Type Colors */
.bg-primary.type-badge {
    background: linear-gradient(135deg, #007bff, #0056b3) !important;
}

.bg-success.type-badge {
    background: linear-gradient(135deg, #28a745, #1e7e34) !important;
}

.bg-danger.type-badge {
    background: linear-gradient(135deg, #dc3545, #bd2130) !important;
}

/* Manga Rank */
.manga-rank {
    width: 25px;
    height: 25px;
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.8rem;
    margin-right: 10px;
    flex-shrink: 0;
}

/* Hero Section Styles */
.hero-badge .badge {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.poster-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
}

.rating-badge {
    background: rgba(0, 0, 0, 0.8);
    color: #ffc107;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: 600;
    border: 2px solid rgba(255, 193, 7, 0.3);
}

.hero-section {
    margin-top: 0;
    padding-top: 100px;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    position: relative;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.5));
    z-index: 1;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-poster-img {
    transition: transform 0.3s ease;
    filter: brightness(1.1) contrast(1.1);
}

.hero-poster-img:hover {
    transform: scale(1.05);
}

.hero-content h1 {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.hero-content p {
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.6);
}

.category-nav {
    border-top: 1px solid #495057;
    border-bottom: 1px solid #495057;
}

.category-btn {
    border-radius: 20px;
    transition: all 0.3s ease;
}

.category-btn:hover {
    background-color: #000a51;
    border-color: #003b7b;
    transform: translateY(-2px);
    color: white;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

/* Popular Manga Horizontal Scroll Styles - รูปแบบที่ 2 */
.popular-manga-container {
    position: relative;
    overflow: hidden;
}

.popular-manga-scroll {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 10px 0;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: #007bff #f1f1f1;
}

.popular-manga-scroll::-webkit-scrollbar {
    height: 8px;
}

.popular-manga-scroll::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.popular-manga-scroll::-webkit-scrollbar-thumb {
    background: #007bff;
    border-radius: 10px;
}

.popular-manga-scroll::-webkit-scrollbar-thumb:hover {
    background: #0056b3;
}

.popular-manga-item {
    flex: 0 0 auto;
    width: 300px;
}

.popular-card-horizontal {
    display: flex;
    background: #2c3e50;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    height: 140px;
}

.popular-card-horizontal:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.popular-poster-horizontal {
    position: relative;
    width: 100px;
    height: 140px;
    overflow: hidden;
    flex-shrink: 0;
}

.popular-poster-horizontal img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.popular-card-horizontal:hover .popular-poster-horizontal img {
    transform: scale(1.05);
}

.popular-type-badge {
    position: absolute;
    top: 5px;
    left: 5px;
    z-index: 10;
}

.popular-type-text {
    font-size: 0.5rem !important;
    font-weight: 700 !important;
    padding: 0.15rem 0.3rem !important;
    border-radius: 3px !important;
    letter-spacing: 0.3px;
}

.popular-color-badge {
    position: absolute;
    bottom: 5px;
    left: 5px;
    z-index: 10;
}

.color-badge-text {
    font-size: 0.5rem !important;
    font-weight: 700 !important;
    padding: 0.15rem 0.3rem !important;
    border-radius: 3px !important;
}

.popular-info-horizontal {
    flex: 1;
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #2c3e50;
}

.popular-title-horizontal {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.3;
    color: white;
}

.popular-title-horizontal a {
    color: white;
    text-decoration: none;
}

.popular-title-horizontal a:hover {
    color: #ffc107;
}

.popular-rating-stars {
    display: flex;
    align-items: center;
    gap: 2px;
}

span.all-manga-artist {
    font-size: 0.7rem;
    color: #9f9f9f;
}

.popular-rating-stars .fas {
    font-size: 0.6rem;
}

.rating-number {
    color: #ffbf00;
    font-size: 0.7rem;
    margin-left: 5px;
    font-weight: 600;
}

/* All Manga Card Styles - รูปแบบที่ 1 */
.all-manga-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    height: 100%;
}

.all-manga-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.all-manga-poster-container {
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
}

.all-manga-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.all-manga-card:hover .all-manga-poster {
    transform: scale(1.05);
}

.all-manga-type-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 10;
}

.all-rating-type-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 10;
}

.all-rating-type-text {
    font-size: 0.6rem !important;
    font-weight: 700 !important;
    padding: 0.2rem 0.4rem !important;
    border-radius: 3px !important;
    letter-spacing: 0.3px;
}

.all-manga-type-text {
    font-size: 0.6rem !important;
    font-weight: 700 !important;
    padding: 0.2rem 0.4rem !important;
    border-radius: 3px !important;
    letter-spacing: 0.3px;
}

.all-manga-color-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 10;
}

.all-rating-color-badge {
    position: absolute;
    top: 30px;
    right: 8px;
    z-index: 10;
}

.all-manga-color-text {
    font-size: 0.6rem !important;
    font-weight: 700 !important;
    padding: 0.2rem 0.4rem !important;
    border-radius: 3px !important;
}

.all-manga-info {
    padding: 12px;
}

.all-manga-title {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.3;
    height: 2.6em;
    overflow: hidden;
}

.all-manga-title a {
    color: #333;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.all-manga-title a:hover {
    color: #007bff;
}

.all-manga-chapters {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.chapter-btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    color: #495057;
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.chapter-btn:hover {
    background: #007bff;
    color: white;
    border-color: #007bff;
    transform: translateX(3px);
}

.chapter-time {
    font-size: 0.65rem;
    opacity: 0.8;
}

.no-chapters {
    text-align: center;
    padding: 10px;
    color: #6c757d;
}

8px;
z-index: 10;
}

.popular-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
    padding: 15px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    display: flex;
    justify-content: center;
}

.popular-card:hover .popular-overlay {
    transform: translateY(0);
}

.popular-info {
    padding: 12px;
}

.popular-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 5px;
    line-height: 1.3;
}

.popular-title a {
    color: #333;
    text-decoration: none;
}

.popular-title a:hover {
    color: #007bff;
}

.popular-meta {
    font-size: 0.75rem;
}

/* Latest Manga Card Styles */
.latest-manga-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    height: 100%;
}

.latest-manga-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.latest-poster-container {
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
}

.latest-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.latest-manga-card:hover .latest-poster {
    transform: scale(1.05);
}

.latest-type-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 10;
}

.latest-type-badge-text {
    font-size: 0.6rem !important;
    font-weight: 700 !important;
    padding: 0.2rem 0.4rem !important;
    border-radius: 3px !important;
    letter-spacing: 0.3px;
}

.latest-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 10px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.6) 0%, transparent 100%);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.latest-rating {
    background: rgba(0, 0, 0, 0.8);
    color: #ffc107;
    padding: 0.2rem 0.4rem;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
}

.latest-genre {
    background: rgba(0, 123, 255, 0.9);
    color: white;
    padding: 0.2rem 0.4rem;
    border-radius: 10px;
    font-size: 0.65rem;
    font-weight: 500;
}

.latest-hover-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
    padding: 15px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    display: flex;
    justify-content: center;
}

.latest-manga-card:hover .latest-hover-overlay {
    transform: translateY(0);
}

.latest-info {
    padding: 12px;
}

.latest-title {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 5px;
    line-height: 1.3;
    height: 2.6em;
    overflow: hidden;
}

.latest-title a {
    color: #333;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.latest-title a:hover {
    color: #007bff;
}

.latest-meta {
    font-size: 0.72rem;
    margin-bottom: 3px;
}

.latest-chapters {
    font-size: 0.72rem;
}

/* Regular Manga Card (All Manga Section) */
.manga-card-modern {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.manga-card-modern:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.manga-poster-container {
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
}

.manga-poster-modern {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

.manga-card-modern:hover .manga-poster-modern {
    transform: scale(1.05);
}

.manga-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 0.75rem;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.6) 0%, transparent 100%);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.manga-rating {
    background: rgba(0, 0, 0, 0.8);
    color: #ffc107;
    padding: 0.25rem 0.5rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
}

.manga-genre {
    background: rgba(0, 123, 255, 0.9);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 15px;
    font-size: 0.7rem;
    font-weight: 500;
}

.manga-hover-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
    padding: 1rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    display: flex;
    justify-content: center;
}

.manga-card-modern:hover .manga-hover-overlay {
    transform: translateY(0);
}

.manga-info {
    padding: 0.75rem;
}

.manga-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    height: 2.6em;
    overflow: hidden;
}

.manga-title a {
    color: #333;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.manga-title a:hover {
    color: #007bff;
}

.manga-meta {
    font-size: 0.75rem;
}

/* Sidebar Styles */
.sidebar-section {
    background: #2c3e50;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
}

.sidebar-header {
    background: #34495e;
    padding: 15px;
    border-bottom: 1px solid #3a4f63;
}

.sidebar-title {
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    margin-bottom: 10px;
}

.sidebar-tabs {
    display: flex;
    gap: 5px;
}

.tab-btn {
    background: #3a4f63;
    color: #bdc3c7;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn.active,
.tab-btn:hover {
    background: #e74c3c;
    color: white;
}

.sidebar-content {
    max-height: 600px;
    overflow-y: auto;
}

.tab-content {
    display: none;
    padding: 0;
}

.tab-content.active {
    display: block;
}

.sidebar-manga-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #34495e;
    transition: background-color 0.3s ease;
}

.sidebar-manga-item:hover {
    background-color: #34495e;
}

.manga-poster-small {
    width: 50px;
    height: 70px;
    border-radius: 4px;
    overflow: hidden;
    margin-right: 12px;
    flex-shrink: 0;
}

.manga-poster-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.manga-details {
    flex: 1;
    min-width: 0;
}

.manga-name {
    font-size: 0.85rem;
    font-weight: 600;
    margin: 0 0 5px 0;
    line-height: 1.3;
}

.manga-name a {
    color: white;
    text-decoration: none;
}

.manga-name a:hover {
    color: #3498db;
}

.manga-meta-small {
    display: flex;
    gap: 8px;
    margin-bottom: 5px;
}

.manga-genre-tag {
    background: #3498db;
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.7rem;
}

.manga-status {
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.7rem;
}

.manga-rating-small {
    display: flex;
    align-items: center;
    gap: 1px;
}

.manga-rating-small .fas {
    font-size: 0.7rem;
}

.rating-score {
    color: #ffc107;
    font-size: 0.75rem;
    margin-left: 5px;
    font-weight: 600;
}

.categories-grid {
    padding: 15px;
}

.category-link {
    margin-bottom: 8px;
}

.category-link a {
    color: #bdc3c7;
    text-decoration: none;
    font-size: 0.85rem;
    padding: 4px 0;
    display: block;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.category-link a:hover {
    color: #3498db;
    border-bottom-color: #3498db;
}

.sidebar-content::-webkit-scrollbar {
    width: 6px;
}

.sidebar-content::-webkit-scrollbar-track {
    background: #2c3e50;
}

.sidebar-content::-webkit-scrollbar-thumb {
    background: #34495e;
    border-radius: 3px;
}

.sidebar-content::-webkit-scrollbar-thumb:hover {
    background: #4a5f7a;
}

/* Responsive Design - ปรับปรุงสำหรับ Mobile */
@media (max-width: 768px) {
    .hero-section {
        min-height: 400px !important;
        padding-top: 80px;
    }

    /* จัดเรียงใหม่สำหรับ Mobile: รูปซ้าย ข้อความขวา */
    .hero-row {
        flex-direction: row !important;
        align-items: flex-start !important;
    }

    .poster-column {
        order: 1 !important;
        margin-bottom: 0 !important;
        padding-right: 15px;
    }

    .content-column {
        order: 2 !important;
        padding-left: 10px;
    }

    /* ปรับขนาดรูปบน Mobile */
    /*.hero-poster-img {*/
    /*    max-height: 200px !important;*/
    /*    max-width: 120px !important;*/
    /*}*/

    /* ปรับขนาดข้อความ */
    .hero-content h1 {
        font-size: 1.4rem !important;
    }

    .hero-content .lead {
        font-size: 0.85rem !important;
        margin-bottom: 1rem !important;
    }

    /* ปรับ Stats */
    .hero-stats {
        font-size: 0.8rem;
        margin-bottom: 1rem !important;
    }

    .hero-stats>div {
        margin-right: 1rem !important;
        margin-bottom: 0.5rem !important;
    }

    /* ปรับปุ่มเป็นแนวนอน */
    .hero-buttons {
        display: flex !important;
        flex-direction: row !important;
        gap: 0.5rem !important;
        flex-wrap: wrap;
    }

    .hero-buttons .btn {
        font-size: 0.8rem !important;
        padding: 0.4rem 0.8rem !important;
        flex: 1;
        min-width: 120px;
    }

    .read-btn {
        margin-right: 0.5rem !important;
    }

    .hero-carousel .carousel-control-prev,
    .hero-carousel .carousel-control-next {
        width: 45px;
        height: 45px;
    }

    .hero-carousel .carousel-control-prev {
        left: 10px;
    }

    .hero-carousel .carousel-control-next {
        right: 10px;
    }

    .carousel-control-icon i {
        font-size: 16px;
    }

    .manga-poster-container {
        height: 240px;
    }

    .manga-title {
        font-size: 0.8rem;
        height: 2.4em;
    }

    .category-nav {
        text-align: center;
    }

    .category-btn {
        margin: 0.2rem;
    }

    /* Popular manga ใน mobile */
    .popular-manga-item {
        width: 280px;
    }

    .popular-card-horizontal {
        height: 120px;
    }

    .popular-poster-horizontal {
        width: 85px;
        height: 120px;
    }

    /* All manga ใน mobile */
    .all-manga-poster-container {
        height: 240px;
    }

    .all-manga-title {
        font-size: 0.8rem;
        height: 2.4em;
    }

    .chapter-btn {
        font-size: 0.7rem;
        padding: 5px 8px;
    }
}

@media (max-width: 576px) {
    .hero-section {
        min-height: 320px !important;
        padding-top: 60px;
    }

    /* Mobile ขนาดเล็ก: ยังคงรูปซ้าย ข้อความขวา */
    .hero-row {
        min-height: 300px !important;
        padding-top: 10px !important;
    }

    .poster-column {
        flex: 0 0 35% !important;
        max-width: 35% !important;
    }

    .content-column {
        flex: 0 0 65% !important;
        max-width: 65% !important;
    }

    /*.hero-poster-img {*/
    /*    max-height: 160px !important;*/
    /*    max-width: 100px !important;*/
    /*}*/

    .hero-content h1 {
        font-size: 1.1rem !important;
        margin-bottom: 0.5rem !important;
    }

    .hero-content .lead {
        font-size: 0.75rem !important;
        margin-bottom: 0.75rem !important;
        line-height: 1.3;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .hero-stats {
        font-size: 0.7rem !important;
        margin-bottom: 0.75rem !important;
    }

    .hero-stats>div {
        margin-right: 0.75rem !important;
        margin-bottom: 0.25rem !important;
    }

    .hero-buttons {
        flex-direction: column !important;
        gap: 0.25rem !important;
    }

    .hero-buttons .btn {
        font-size: 0.7rem !important;
        padding: 0.35rem 0.6rem !important;
        width: 100% !important;
        margin-right: 0 !important;
    }

    .hero-carousel .carousel-control-prev,
    .hero-carousel .carousel-control-next {
        display: none;
    }

    .manga-poster-container,
    .latest-poster-container {
        height: 220px;
    }

    .popular-manga-item {
        width: 250px;
    }

    .popular-card-horizontal {
        height: 100px;
    }

    .popular-poster-horizontal {
        width: 70px;
        height: 100px;
    }

    .popular-info-horizontal {
        padding: 10px;
    }

    .popular-title-horizontal {
        font-size: 0.8rem;
        margin-bottom: 5px;
    }

    .all-manga-poster-container {
        height: 220px;
    }
}


/* เพิ่ม Animation สำหรับ Mobile */
@media (max-width: 768px) {
    .hero-poster-img {
        animation: slideInFromLeft 0.8s ease-out;
    }

    .hero-title,
    .hero-description,
    .hero-stats,
    .hero-buttons {
        animation: slideInFromRight 0.8s ease-out;
    }
}


/* Container */
.bookmark-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    background: rgba(0, 0, 0, 0.85);
    border-radius: 15px;
    margin-top: 20px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Header */
.bookmark-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.bookmark-header h3 {
    font-size: 1.8rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* List Layout */
.bookmarks-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 15px;
    padding: 0;
}

/* Bookmark Item */
.bookmark-item {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    position: relative;
    height: fit-content;
}

.bookmark-item:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Item Content */
.bookmark-content {
    display: flex;
    padding: 12px;
    gap: 12px;
    align-items: flex-start;
}

/* Poster */
.bookmark-poster {
    width: 60px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.bookmark-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.bookmark-item:hover .bookmark-poster img {
    transform: scale(1.05);
}

/* Type Badge */
.type-badge {
    position: absolute;
    top: 2px;
    left: 2px;
    font-size: 0.55rem;
    font-weight: 700;
    padding: 2px 4px;
    border-radius: 3px;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.manga-badge {
    background: linear-gradient(135deg, #007bff, #0056b3);
}

.manhwa-badge {
    background: linear-gradient(135deg, #28a745, #20c997);
}

.manhua-badge {
    background: linear-gradient(135deg, #dc3545, #bd2130);
}

/* Color Indicator */
.color-indicator {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.7);
}

.color-poster {
    background: #28a745;
}

.bw-poster {
    background: #6c757d;
}

/* Info Section */
.bookmark-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    color: white;
}

.bookmark-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 4px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bookmark-title a {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
}

.bookmark-title a:hover {
    color: #ffc107;
}

.bookmark-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 8px;
}

.bookmark-author {
    font-size: 0.75rem;
    color: #adb5bd;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bookmark-stats {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.7rem;
    color: #adb5bd;
}

.bookmark-stats span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.bookmark-stats .fa-star {
    color: #ffc107;
}

/* Chapter Info */
.bookmark-chapters {
    margin-top: auto;
}

.chapter-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    padding: 4px 8px;
    margin-bottom: 3px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 3px solid #007bff;
    font-size: 0.75rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.chapter-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-left-color: #ffc107;
}

.chapter-title {
    color: #e9ecef;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    margin-right: 8px;
}

.chapter-time {
    color: #6c757d;
    font-size: 0.65rem;
    white-space: nowrap;
}

/* Remove Button */
.remove-bookmark {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    opacity: 0;
    transform: scale(0.8);
    backdrop-filter: blur(5px);
    font-size: 0.7rem;
}

.bookmark-item:hover .remove-bookmark {
    opacity: 1;
    transform: scale(1);
}

.remove-bookmark:hover {
    background: #dc3545;
    transform: scale(1.1);
}

/* States */
.loading-state,
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Sort Options */
.sort-option.active {
    background-color: #007bff;
    color: white;
}

.sort-option:hover {
    background-color: #f8f9fa;
}

/* Responsive Design */
@media (max-width: 768px) {
    .bookmark-container {
        margin: 10px;
        padding: 15px;
    }

    .bookmarks-list {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .bookmark-content {
        padding: 10px;
    }

    .bookmark-poster {
        width: 50px;
        height: 70px;
    }

    .bookmark-title {
        font-size: 0.85rem;
    }

    .bookmark-header h3 {
        font-size: 1.5rem;
    }

    .bookmark-header .d-flex {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .remove-bookmark {
        opacity: 1;
        transform: scale(1);
    }
}

@media (max-width: 576px) {
    .bookmark-content {
        padding: 8px;
        gap: 10px;
    }

    .bookmark-poster {
        width: 45px;
        height: 65px;
    }

    .bookmark-title {
        font-size: 0.8rem;
    }

    .bookmark-stats {
        gap: 8px;
        font-size: 0.65rem;
    }
}

.manga-card {
    transition: transform 0.2s ease;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.manga-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.rating-stars {
    color: #ffc107;
}

.manga-poster {
    height: 300px;
    object-fit: cover;
    border-radius: 8px 8px 0 0;
}


/* Dark mode styles */
body.dark-mode {
    background-color: #1a1a1a;
    color: #ffffff;
}

.dark-mode .navbar-light {
    background-color: #2d2d2d !important;
}

.dark-mode .bg-light {
    background-color: #2d2d2d !important;
    color: #ffffff !important;
}

.dark-mode .card {
    background-color: #2d2d2d;
    color: #ffffff;
}

.dark-mode .btn-outline-primary {
    color: #6ea8fe;
    border-color: #6ea8fe;
}

.dark-mode .btn-outline-secondary {
    color: #adb5bd;
    border-color: #6c757d;
}

/* Reading progress bar */
.reading-progress {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px;
    text-align: center;
    z-index: 1050;
    backdrop-filter: blur(10px);
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Loading animation */
.loading {
    opacity: 0.5;
    transition: opacity 0.3s ease;
}


/* CSS สำหรับให้รูปมังงะต่อเนื่องกันอย่างสมบูรณ์ */
.chapter-image {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    vertical-align: top !important;
    float: none !important;
    position: relative !important;
    outline: none !important;
    line-height: 0 !important;
}

/* Container สำหรับรูปมังงะ */
div#chapterImages {
    overflow: hidden !important;
    max-width: 1220px !important;
    margin: 0 auto !important;
    margin-top: 35px !important;
    position: relative !important;
    padding-bottom: 270px !important;
    line-height: 0 !important;
    font-size: 0 !important;
    /* ลบช่องว่างจากฟอนต์ */
}

/* ลบช่องว่างทั้งหมดในรูปภาพ */
div#chapterImages img {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    display: block !important;
    vertical-align: top !important;
    line-height: 0 !important;
    outline: none !important;
}

/* Reset box-sizing */
div#chapterImages * {
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* บังคับให้รูปที่อยู่ในคลาส chapter-image ติดกัน */
div#chapterImages .chapter-image {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    display: block !important;
    vertical-align: top !important;
    line-height: 0 !important;
}

/* ลบช่องว่างระหว่างรูปด้วยการใช้ negative margin */
.chapter-image+.chapter-image {
    margin-top: -1px !important;
}

/* ลบช่องว่างจากบรรทัดใหม่ */
div#chapterImages {
    white-space: nowrap !important;
}

div#chapterImages .chapter-image {
    white-space: normal !important;
}

/* สำหรับ Mobile */
@media (max-width: 768px) {
    div#chapterImages {
        max-width: 100% !important;
        margin-top: 20px !important;
        padding-bottom: 150px !important;
    }

    .chapter-image {
        width: 100% !important;
        height: auto !important;
    }
}

@media (max-width: 576px) {
    div#chapterImages {
        margin-top: 15px !important;
        padding-bottom: 100px !important;
    }
}

/* แก้ไขปัญหาเฉพาะของ Firefox */
@-moz-document url-prefix() {
    .chapter-image {
        margin-bottom: -4px !important;
    }
}

/* แก้ไขปัญหาใน Safari */
@supports (-webkit-appearance: none) {
    .chapter-image {
        margin-bottom: -1px !important;
    }
}



/* เพิ่มสไตล์สำหรับ dropdown หมวดหมู่ทั้งหมด */
.all-categories-dropdown .dropdown-menu {
    max-height: 300px;
    overflow-y: auto;
}

.all-categories-dropdown .dropdown-item {
    padding: 0.5rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.professional-footer {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%) !important;
    border-top: 1px solid #363636;
    position: relative;
    overflow: hidden;
}

.professional-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(0, 123, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(40, 167, 69, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.professional-footer .container {
    position: relative;
    z-index: 2;
}

.footer-brand img {
    filter: brightness(1.2);
}

.footer-link {
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-link:hover {
    color: #ffffff !important;
    transform: translateX(5px);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.professional-footer .card {
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.professional-footer .card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.professional-footer .btn-outline-light {
    border-width: 2px;
    transition: all 0.3s ease;
}

/* Social Media Hover Effects */
.professional-footer .btn-outline-light:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
}

.professional-footer .btn-outline-light:hover .fa-facebook-f {
    color: #1877f2;
}

.professional-footer .btn-outline-light:hover .fa-telegram-plane {
    color: #0088cc;
}

.professional-footer .btn-outline-light:hover .fa-twitter {
    color: #1da1f2;
}

.professional-footer .btn-outline-light:hover .fa-instagram {
    background: linear-gradient(45deg, #e1306c, #fd1d1d, #fcb045);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.professional-footer .btn-outline-light:hover .fa-discord {
    color: #5865f2;
}

.professional-footer .btn-outline-light:hover .fa-line {
    color: #00c300;
}

.professional-footer .btn-outline-light:hover .fa-youtube {
    color: #ff0000;
}

.professional-footer .btn-outline-light:hover .fa-tiktok {
    color: #fe2c55;
}

.professional-footer .badge {
    font-size: 0.7rem;
}

/* Dark Theme Support */
body[data-theme='dark'] .professional-footer {
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 50%, #2a2a2a 100%) !important;
}

body[data-theme='dark'] .professional-footer .card-body {
    background-color: rgba(0, 0, 0, 0.3) !important;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .professional-footer .footer-brand {
        text-align: center;
        margin-bottom: 1rem;
    }
    
    .professional-footer .footer-brand img {
        display: block;
        margin: 0 auto 0.5rem;
    }
    
    .professional-footer .footer-brand h5 {
        display: block;
    }
    
    .professional-footer .d-flex.gap-2 {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .professional-footer {
        padding: 2rem 0 !important;
    }
    
    .professional-footer h6 {
        font-size: 1rem;
        text-align: center;
        margin-bottom: 1rem;
    }
    
    .professional-footer .list-unstyled {
        text-align: center;
    }
    
    .professional-footer .row.g-2 {
        margin: 0 1rem;
    }
}

/* Hero Carousel */
.hero-carousel {
    position: relative;
    overflow: hidden;
}

.hero-carousel .carousel-item {
    transition: transform 0.8s ease-in-out;
}

.hero-carousel .carousel-indicators {
    bottom: 20px;
    margin-bottom: 0;
}

.hero-carousel .carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.5);
    background-color: transparent;
    margin: 0 5px;
    transition: all 0.3s ease;
}

.hero-carousel .carousel-indicators button.active {
    background-color: #fff;
    border-color: #fff;
    transform: scale(1.2);
}

.hero-carousel .carousel-control-prev,
.hero-carousel .carousel-control-next {
    width: 60px;
    height: 60px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    border: none;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.hero-carousel .carousel-control-prev:hover,
.hero-carousel .carousel-control-next:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.9);
    transform: translateY(-50%) scale(1.1);
}

.hero-carousel .carousel-control-prev {
    left: 20px;
}

.hero-carousel .carousel-control-next {
    right: 20px;
}

.carousel-control-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.carousel-control-icon i {
    font-size: 20px;
    color: white;
}

/* Hero Content Animations */
.hero-title {
    animation: slideInFromLeft 1s ease-out;
}

.hero-description {
    animation: slideInFromLeft 1.2s ease-out;
}

.hero-stats {
    animation: slideInFromLeft 1.4s ease-out;
}

.hero-buttons {
    animation: slideInFromLeft 1.6s ease-out;
}

.hero-poster-img {
    animation: slideInFromRight 1s ease-out;
}

@keyframes slideInFromLeft {
    0% {
        transform: translateX(-50px);
        opacity: 0;
    }

    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInFromRight {
    0% {
        transform: translateX(50px);
        opacity: 0;
    }

    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

/* All Manga Cards */
.all-manga-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.all-manga-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.all-manga-poster-container {
    position: relative;
    height: 280px;
    overflow: hidden;
}

.all-manga-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.all-manga-card:hover .all-manga-poster {
    transform: scale(1.05);
}

.all-manga-type-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 10;
}

.all-manga-color-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 10;
}

.all-rating-color-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    z-index: 10;
}

.all-manga-type-text,
.all-manga-color-text,
.all-rating-color-text {
    font-size: 0.65rem !important;
    font-weight: 700 !important;
    padding: 0.25rem 0.5rem !important;
    border-radius: 4px !important;
    letter-spacing: 0.5px;
}

.all-manga-info {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.all-manga-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.all-manga-title a {
    color: #333;
    text-decoration: none;
    display: block;
}

.all-manga-title a:hover {
    color: #007bff;
}

.all-manga-artist {
    display: block;
    font-size: 0.75rem;
    color: #666;
    font-weight: normal;
    margin-top: 0.25rem;
}

.all-manga-chapters {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.chapter-btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background: #f8f9fa;
    color: #333;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.7rem;
    transition: all 0.3s ease;
}

.chapter-btn:hover {
    background: #007bff;
    color: white;
    transform: translateX(3px);
}

.chapter-time {
    font-size: 0.7rem;
    opacity: 0.7;
}

.no-chapters {
    text-align: center;
    padding: 1rem;
    color: #999;
}

.popular-rating-stars {
    margin: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.rating-number {
    color: #ffc107;
    font-weight: 600;
    font-size: 0.8rem;
    margin-left: 0.25rem;
}

/* Status Colors */
.manga-status-ongoing {
    background: #28a745 !important;
}

.manga-status-completed {
    background: #17a2b8 !important;
}

.manga-status-hiatus {
    background: #ffc107 !important;
    color: #000 !important;
}

.manga-status-cancelled {
    background: #dc3545 !important;
}

/* Manga Rank */
.manga-rank {
    width: 25px;
    height: 25px;
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.8rem;
    margin-right: 10px;
    flex-shrink: 0;
}

/* Hero Section Styles */
.hero-badge .badge {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.poster-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
}

.rating-badge {
    background: rgba(0, 0, 0, 0.8);
    color: #ffc107;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: 600;
    border: 2px solid rgba(255, 193, 7, 0.3);
}

.hero-section {
    margin-top: 0;
    padding-top: 100px;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    position: relative;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.5));
    z-index: 1;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-poster-img {
    transition: transform 0.3s ease;
    filter: brightness(1.1) contrast(1.1);
}

.hero-poster-img:hover {
    transform: scale(1.05);
}

.hero-content h1 {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.hero-content p {
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.6);
}

.category-nav {
    border-top: 1px solid #495057;
    border-bottom: 1px solid #495057;
}

.category-btn {
    border-radius: 20px;
    transition: all 0.3s ease;
}

.category-btn:hover {
    background-color: #007bff;
    border-color: #007bff;
    transform: translateY(-2px);
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

/* Sidebar Styles */
.sidebar-section {
    background: #2c3e50;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
}

.sidebar-header {
    background: #34495e;
    padding: 15px;
    border-bottom: 1px solid #3a4f63;
}

.sidebar-title {
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    margin-bottom: 10px;
}

.sidebar-tabs {
    display: flex;
    gap: 5px;
}

.tab-btn {
    background: #3a4f63;
    color: #bdc3c7;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn.active,
.tab-btn:hover {
    background: #e74c3c;
    color: white;
}

.sidebar-content {
    max-height: 600px;
    overflow-y: auto;
}

.tab-content {
    display: none;
    padding: 0;
}

.tab-content.active {
    display: block;
}

.sidebar-manga-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #34495e;
    transition: background-color 0.3s ease;
}

.sidebar-manga-item:hover {
    background-color: #34495e;
}

.manga-poster-small {
    width: 50px;
    height: 70px;
    border-radius: 4px;
    overflow: hidden;
    margin-right: 12px;
    flex-shrink: 0;
}

.manga-poster-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.manga-details {
    flex: 1;
    min-width: 0;
}

.manga-name {
    font-size: 0.85rem;
    font-weight: 600;
    margin: 0 0 5px 0;
    line-height: 1.3;
}

.manga-name a {
    color: white;
    text-decoration: none;
}

.manga-name a:hover {
    color: #3498db;
}

.manga-meta-small {
    display: flex;
    gap: 8px;
    margin-bottom: 5px;
}

.manga-genre-tag {
    background: #3498db;
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.7rem;
}

.manga-status {
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.7rem;
}

.manga-rating-small {
    display: flex;
    align-items: center;
    gap: 1px;
}

.manga-rating-small .fas {
    font-size: 0.7rem;
}

.rating-score {
    color: #ffc107;
    font-size: 0.75rem;
    margin-left: 5px;
    font-weight: 600;
}

.categories-grid {
    padding: 15px;
}

.category-link {
    margin-bottom: 8px;
}

.category-link a {
    color: #bdc3c7;
    text-decoration: none;
    font-size: 0.85rem;
    padding: 4px 0;
    display: block;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.category-link a:hover {
    color: #3498db;
    border-bottom-color: #3498db;
}

.sidebar-content::-webkit-scrollbar {
    width: 6px;
}

.sidebar-content::-webkit-scrollbar-track {
    background: #2c3e50;
}

.sidebar-content::-webkit-scrollbar-thumb {
    background: #34495e;
    border-radius: 3px;
}

.sidebar-content::-webkit-scrollbar-thumb:hover {
    background: #4a5f7a;
}

/* เพิ่ม CSS สำหรับ Desktop ก่อน */
.hero-section {
    min-height: 350px !important; /* ลดจาก default */
    padding-top: 60px !important; /* ลดจาก default */
}

.hero-row {
    min-height: 350px !important;
    padding-top: 15px !important;
}

/*.hero-poster-img {*/
/*    max-height: 280px !important; */
/*}*/

.hero-title {
    font-size: 2rem !important;
    margin-bottom: 0.75rem !important;
    line-height: 1.2;
}

.hero-description {
    font-size: 1rem !important;
    margin-bottom: 1rem !important;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Responsive Design - ปรับปรุงใหม่ */
@media (max-width: 768px) {
    /* Hero Section - ลดขนาด carousel-item */
    .hero-section {
        min-height: 260px !important; /* ลดจาก 320px */
        padding-top: 50px !important; /* ลดจาก 80px */
    }

    .hero-row {
        min-height: 260px !important; /* ลดจาก 320px */
        flex-direction: row !important;
        align-items: center !important;
        padding-top: 10px !important; /* ลดจาก 15px */
    }

    /* ซ่อน poster column ทั้งหมด */
    .poster-column {
        display: none !important;
    }

    /* ขยาย content column ให้เต็มความกว้าง */
    .content-column {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        order: 1 !important;
        padding: 0 15px;
    }

    /* ปรับแต่งเนื้อหา */
    .hero-content {
        text-align: center;
        padding: 8px 5px; /* ลดจาก 15px 10px */
    }

    .hero-content h1,
    .hero-content .hero-title {
        font-size: 1.2rem !important; /* ลดจาก 1.4rem */
        margin-bottom: 0.5rem !important; /* ลดจาก 0.75rem */
    }

    .hero-content .lead,
    .hero-content .hero-description {
        font-size: 0.8rem !important; /* ลดจาก 0.85rem */
        margin-bottom: 0.75rem !important; /* ลดจาก 1rem */
        line-height: 1.3;
        display: -webkit-box;
        -webkit-line-clamp: 2; /* จำกัด 2 บรรทัด */
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .hero-stats {
        font-size: 0.7rem; /* ลดจาก 0.8rem */
        margin-bottom: 0.75rem !important; /* ลดจาก 1rem */
        justify-content: center;
        gap: 8px; /* ลดจาก 12px */
    }

    .hero-stats > div {
        margin-right: 0.5rem !important; /* ลดจาก 0.75rem */
        margin-bottom: 0.25rem !important; /* ลดจาก 0.5rem */
    }

    .hero-buttons {
        display: flex !important;
        flex-direction: row !important;
        gap: 0.4rem !important; /* ลดจาก 0.5rem */
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero-buttons .btn {
        font-size: 0.75rem !important; /* ลดจาก 0.8rem */
        padding: 0.35rem 0.7rem !important; /* ลดจาก 0.4rem 0.8rem */
        flex: 1;
        min-width: 100px; /* ลดจาก 120px */
    }

    /* Carousel Controls */
    .hero-carousel .carousel-control-prev,
    .hero-carousel .carousel-control-next {
        width: 40px; /* ลดจาก 45px */
        height: 40px; /* ลดจาก 45px */
    }

    .hero-carousel .carousel-control-prev {
        left: 8px; /* ลดจาก 10px */
    }

    .hero-carousel .carousel-control-next {
        right: 8px; /* ลดจาก 10px */
    }

    /* Other elements */
    .all-manga-poster-container {
        height: 240px;
    }

    .all-manga-title {
        font-size: 0.8rem;
    }

    .category-nav {
        text-align: center;
    }

    .category-btn {
        margin: 0.2rem;
    }

    /* Popular manga horizontal scroll */
    .horizontal-manga-item {
        width: 140px;
    }

    .horizontal-manga-poster-container {
        height: 200px;
    }

    .horizontal-manga-info {
        height: 100px;
        padding: 10px;
    }

    .horizontal-manga-title a {
        font-size: 0.8rem;
    }

    .horizontal-manga-artist {
        font-size: 0.7rem;
    }
}

@media (max-width: 576px) {
    /* Hero Section - ลดขนาดให้เล็กลงอีก */
    .hero-section {
        min-height: 200px !important; /* ลดจาก 250px */
        padding-top: 40px !important; /* ลดจาก 60px */
    }

    .hero-row {
        min-height: 200px !important; /* ลดจาก 250px */
        padding-top: 5px !important; /* ลดจาก 10px */
    }

    /* ซ่อน poster column (already hidden from 768px) */
    .poster-column {
        display: none !important;
    }

    .content-column {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        padding: 0 8px; /* ลดจาก 10px */
    }

    /* ปรับ content ให้อยู่กึ่งกลางและลดขนาด */
    .hero-content {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
        padding: 5px 3px; /* ลดจาก 10px 5px */
        height: 100%;
    }

    .hero-content h1,
    .hero-content .hero-title {
        font-size: 1rem !important; /* ลดจาก 1.2rem */
        margin-bottom: 0.3rem !important; /* ลดจาก 0.5rem */
        line-height: 1.2;
    }

    .hero-content .lead,
    .hero-content .hero-description {
        font-size: 0.75rem !important; /* ลดจาก 0.8rem */
        margin-bottom: 0.5rem !important; /* ลดจาก 0.75rem */
        line-height: 1.3;
        display: -webkit-box;
        -webkit-line-clamp: 2; /* ลดจาก 3 เป็น 2 บรรทัด */
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* ซ่อน stats ทั้งหมด เหลือเฉพาะชื่อและเรื่องย่อ */
    .hero-stats {
        display: none !important;
    }

    /* ซ่อน badge ยอดนิยม */
    .hero-badge {
        display: none !important;
    }

    /* ซ่อน buttons */
    .hero-buttons {
        display: none !important;
    }

    /* ซ่อน carousel controls ในหน้าจอเล็ก */
    .hero-carousel .carousel-control-prev,
    .hero-carousel .carousel-control-next {
        display: none !important;
    }

    /* ปรับ indicators */
    .hero-carousel .carousel-indicators {
        bottom: 5px; /* ลดจาก 8px */
        margin-bottom: 0;
    }

    .hero-carousel .carousel-indicators button {
        width: 6px; /* ลดจาก 8px */
        height: 6px; /* ลดจาก 8px */
        margin: 0 2px; /* ลดจาก 3px */
    }

    /* ปรับ container */
    .hero-carousel .container {
        padding: 0 5px; /* ลดจาก 8px */
    }

    /* Other elements */
    .all-manga-poster-container {
        height: 220px;
    }

    .all-manga-title {
        font-size: 0.75rem;
    }

    /* Popular manga horizontal scroll - mobile */
    .horizontal-manga-item {
        width: 120px;
    }

    .horizontal-manga-poster-container {
        height: 180px;
    }

    .horizontal-manga-info {
        height: 90px;
        padding: 8px;
    }

    .horizontal-manga-title a {
        font-size: 0.75rem;
    }

    .horizontal-manga-artist {
        font-size: 0.65rem;
    }

    .horizontal-rating-stars {
        font-size: 0.65rem;
    }

    .horizontal-chapter-btn {
        font-size: 0.7rem;
        padding: 4px 6px;
    }
}

/* Horizontal Manga Container - เก็บ CSS เดิมไว้ */
.horizontal-manga-container {
    position: relative;
    overflow: hidden;
}

.horizontal-manga-scroll {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    gap: 15px;
    padding: 10px 0;
    scrollbar-width: thin;
    scrollbar-color: rgb(84 84 84) transparent;
}

.horizontal-manga-scroll::-webkit-scrollbar {
    height: 8px;
}

.horizontal-manga-scroll::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

.horizontal-manga-scroll::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.horizontal-manga-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.5);
}

.horizontal-manga-item {
    flex: 0 0 auto;
    width: 180px;
}

.horizontal-manga-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    height: 100%;
}

.horizontal-manga-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.horizontal-manga-poster-container {
    position: relative;
    width: 100%;
    height: 240px;
    overflow: hidden;
}

.horizontal-manga-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.horizontal-manga-card:hover .horizontal-manga-poster {
    transform: scale(1.05);
}

.horizontal-manga-type-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
}

.horizontal-manga-type-text {
    font-size: 0.65rem;
    font-weight: bold;
    padding: 2px 6px;
}

.horizontal-manga-color-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
}

.horizontal-manga-color-text {
    font-size: 0.6rem;
    padding: 2px 5px;
}

.horizontal-rating-color-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    z-index: 2;
}

.horizontal-rating-color-text {
    font-size: 0.65rem;
    padding: 2px 5px;
}

.horizontal-manga-info {
    padding: 12px;
    height: 115px;
    display: flex;
    flex-direction: column;
}

.horizontal-manga-title {
    margin-bottom: 8px;
    line-height: 1.2;
}

.horizontal-manga-title a {
    color: #333;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    display: block;
    margin-bottom: 4px;
}

.horizontal-manga-title a:hover {
    color: #007bff;
}

.horizontal-manga-artist {
    color: #666;
    font-size: 0.75rem;
    font-weight: normal;
    display: block;
}

.horizontal-rating-stars {
    margin-bottom: 8px;
    font-size: 0.7rem;
}

.horizontal-rating-stars .fas.fa-star {
    font-size: 0.7rem;
    margin-right: 1px;
}

.horizontal-rating-stars .rating-number {
    margin-left: 4px;
    font-size: 0.7rem;
    color: #666;
}

.horizontal-manga-chapters {
    margin-top: -10px;
}

.horizontal-chapter-btn {
    display: block;
    background: #f8f9fa;
    color: #333;
    padding: 6px 8px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 500;
    transition: background-color 0.3s ease;
    text-align: center;
}

.horizontal-chapter-btn:hover {
    background: #e9ecef;
    color: #007bff;
}

.horizontal-chapter-time {
    display: block;
    font-size: 0.65rem;
    color: #999;
    margin-top: 2px;
}

.horizontal-no-chapters {
    text-align: center;
    padding: 8px;
}

            /* Dark theme support */
            @media (prefers-color-scheme: dark) {
                .horizontal-manga-card {
                    background: #ffffffff;
                    color: #000000ff;
                }

                .horizontal-manga-title a {
                    color: #000000ff;
                }

                .horizontal-manga-title a:hover {
                    color: #63b3ed;
                }

                .horizontal-manga-artist {
                    color: #777777ff;
                }

                .horizontal-chapter-btn {
                    background: #4a5568;
                    color: #a3a3a3ff;
                }

                .horizontal-chapter-btn:hover {
                    background: #2d3748;
                    color: #63b3ed;
                }
            }

            /* Mobile responsive */
            @media (max-width: 768px) {
                .horizontal-manga-item {
                    width: 140px;
                }

                .horizontal-manga-poster-container {
                    height: 200px;
                }

                .horizontal-manga-info {
                    height: 120px;
                    padding: 10px;
                }

                .horizontal-manga-title a {
                    font-size: 0.8rem;
                }

                .horizontal-manga-artist {
                    font-size: 0.7rem;
                }
            }

                span.badge.bg-primary.px-3.py-2 {
                background: linear-gradient(to right, #f12711, #f5af19);
                color: #fff;
                border-radius: 999px;
                font-weight: bold;
                box-shadow: 0 0 10px rgba(255, 153, 0, 0.6),
                    0 0 20px rgba(245, 175, 25, 0.4),
                    0 0 30px rgba(245, 175, 25, 0.3);
                transition: transform 0.2s ease, box-shadow 0.2s ease;
            }

            /* Speed Manga Custom Navbar */
    .custom-navbar {
        /* background: linear-gradient(135deg, #d4a017 0%, #f4d03f 50%, #d4a017 100%) !important; */
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        height: 60px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.3);
        padding: 0;
        overflow: visible;
    }

    .custom-nav-container {
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 20px;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        overflow: visible;
        position: relative;
    }

    .custom-logo {
        display: flex;
        align-items: center;
        font-size: 20px;
        font-weight: bold;
        color: #333;
        text-decoration: none;
        flex-shrink: 0;
    }

    .custom-logo img {
        height: 40px;
        margin-right: 8px;
    }

    .custom-nav-menu {
        display: flex;
        align-items: center;
        list-style: none;
        /* gap: 25px; */
        flex: 1;
        justify-content: center;
        min-width: 0;
        overflow: visible;
        margin: 0;
        padding: 0;
        position: relative;
    }

    .custom-nav-item {
        position: relative;
        overflow: visible;
    }

    .custom-nav-link {
        color: #ffffff !important;
        text-decoration: none;
        padding: 8px 15px;
        border-radius: 4px;
        transition: all 0.3s ease;
        font-weight: 500;
        font-size: 14px;
        white-space: nowrap;
        text-overflow: ellipsis;
        overflow: hidden;
        display: block;
    }

    /* .custom-nav-link.active {
        background-color: rgba(0,0,0,0.2);
        color: #fff !important;
    } */

    /* Enhanced Dropdown Styles */
    .custom-dropdown {
        position: relative;
    }

    .custom-dropdown-content {
        visibility: hidden;
        opacity: 0;
        position: absolute;
        top: 100%;
        left: 0;
        background-color: #3a3a3a;
        min-width: 250px;
        max-width: 350px;
        width: 300px;
        box-shadow: 0 8px 25px rgba(0,0,0,0.5);
        border-radius: 6px;
        padding: 10px 0;
        margin-top: 8px;
        border: 1px solid #555;
        z-index: 9999;
        max-height: 400px;
        overflow-y: auto;
        overflow-x: hidden;
        transition: all 0.3s ease;
        transform: translateY(-10px);
        pointer-events: none;
        white-space: nowrap;
    }

    /* Show dropdown on hover with enhanced timing */
    .custom-dropdown:hover .custom-dropdown-content,
    .custom-dropdown.active .custom-dropdown-content {
        visibility: visible;
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
        transition-delay: 0.1s;
    }

    /* Keep dropdown visible when hovering over the content */
    .custom-dropdown-content:hover {
        visibility: visible;
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }

    /* Enhanced hover area for better UX */
    .custom-dropdown::before {
        content: '';
        position: absolute;
        top: 100%;
        left: -10px;
        right: -10px;
        height: 15px;
        background: transparent;
        z-index: 9998;
    }

    /* Prevent dropdown from closing too quickly */
    .custom-dropdown {
        transition: all 0.2s ease;
    }

    .custom-dropdown-content a {
        color: #ddd !important;
        padding: 10px 20px;
        text-decoration: none;
        display: flex;
        justify-content: space-between;
        align-items: center;
        transition: all 0.3s ease;
        font-size: 13px;
        white-space: nowrap;
        border-bottom: 1px solid rgba(255,255,255,0.05);
        overflow: hidden;
        text-overflow: ellipsis;
        width: 100%;
        box-sizing: border-box;
    }

    .custom-dropdown-content a:last-child {
        border-bottom: none;
    }

    .custom-dropdown-content a:hover {
        background-color: #555;
        color: #fff !important;
        transform: translateX(3px);
        padding-left: 23px;
    }

    .custom-dropdown-content a i {
        margin-right: 8px;
        width: 14px;
        flex-shrink: 0;
        transition: all 0.3s ease;
    }

    .custom-dropdown-content a:hover i {
        color: #f4d03f;
        transform: scale(1.1);
    }

    .custom-dropdown-content a span:first-child {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        flex: 1;
        min-width: 0;
    }

    .custom-dropdown-content a span:last-child {
        font-size: 11px;
        color: #999;
        margin-left: 8px;
        transition: all 0.3s ease;
        flex-shrink: 0;
    }

    .custom-dropdown-content a:hover span:last-child {
        color: #ccc;
    }

    /* Scrollbar styling for dropdown */
    .custom-dropdown-content::-webkit-scrollbar {
        width: 6px;
    }

    .custom-dropdown-content::-webkit-scrollbar-track {
        background: #2a2a2a;
        border-radius: 3px;
    }

    .custom-dropdown-content::-webkit-scrollbar-thumb {
        background: #666;
        border-radius: 3px;
    }

    .custom-dropdown-content::-webkit-scrollbar-thumb:hover {
        background: #888;
    }

    /* Separator line in dropdown */
    .dropdown-separator {
        border-top: 1px solid #555;
        margin: 8px 0;
        height: 1px;
        background: transparent;
    }

    .custom-nav-right {
        display: flex;
        align-items: center;
        gap: 15px;
        flex-shrink: 0;
        min-width: 0;
    }

    .custom-theme-toggle {
        display: flex;
        align-items: center;
        gap: 8px;
        background: rgba(0,0,0,0.3);
        border: none;
        color: #ffffff;
        padding: 6px 12px;
        border-radius: 20px;
        cursor: pointer;
        font-size: 12px;
        font-weight: 500;
        transition: all 0.3s ease;
    }

    .custom-theme-toggle:hover {
        background: rgba(0,0,0,0.4);
    }

    .theme-switch {
        position: relative;
        width: 24px;
        height: 14px;
        background: rgba(0,0,0,0.4);
        border-radius: 7px;
        transition: all 0.3s ease;
    }

    .theme-switch::after {
        content: '';
        position: absolute;
        top: 2px;
        left: 2px;
        width: 10px;
        height: 10px;
        background: #fff;
        border-radius: 50%;
        transition: all 0.3s ease;
    }

    body[data-theme='dark'] .theme-switch {
        background: #555;
    }

    body[data-theme='dark'] .theme-switch::after {
        transform: translateX(10px);
        background: #f4d03f;
    }

    .custom-search-container {
        position: relative;
    }

    .custom-search-form {
        display: flex;
        align-items: center;
        background-color: rgba(0,0,0,0.4);
        border-radius: 25px;
        padding: 8px 20px;
        min-width: 200px;
        max-width: 300px;
        border: 1px solid rgba(0,0,0,0.2);
        flex-shrink: 1;
    }

    .custom-search-input {
        border: none;
        background: transparent;
        padding: 0;
        outline: none;
        width: 100%;
        font-size: 14px;
        color: #fff;
    }

    .custom-search-input::placeholder {
        color: rgba(255,255,255,0.7);
    }

    .custom-search-btn {
        background: none;
        border: none;
        color: #fff;
        cursor: pointer;
        padding: 4px;
        display: flex;
        align-items: center;
        border-radius: 50%;
        transition: all 0.3s ease;
        margin-left: 8px;
    }

    .custom-search-btn:hover {
        background-color: rgba(255,255,255,0.1);
    }

    .custom-mobile-search-toggle {
        display: none;
        background: rgba(0,0,0,0.3);
        border: none;
        color: #ffffff;
        padding: 8px;
        border-radius: 50%;
        cursor: pointer;
        transition: all 0.3s ease;
    }

    .custom-mobile-search-toggle:hover {
        background: rgba(0,0,0,0.4);
    }

    .custom-menu-toggle {
        display: none;
        flex-direction: column;
        cursor: pointer;
        padding: 8px;
        border-radius: 4px;
        background: rgba(0,0,0,0.2);
        transition: all 0.3s ease;
    }

    .custom-menu-toggle:hover {
        background: rgba(0,0,0,0.3);
    }

    .custom-menu-toggle span {
        width: 22px;
        height: 2px;
        background-color: #ffffff;
        margin: 2px 0;
        transition: 0.3s;
        border-radius: 2px;
    }

    .custom-menu-toggle.active span:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }

    .custom-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .custom-menu-toggle.active span:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }

    .mobile-search-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.8);
        z-index: 2000;
    }

    .mobile-search-container {
        /* background: linear-gradient(135deg, #d4a017 0%, #f4d03f 50%, #d4a017 100%); */
        padding: 5px;
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .mobile-search-form {
        flex: 1;
        display: flex;
        align-items: center;
        background: rgba(0,0,0,0.4);
        border-radius: 25px;
        padding: 12px 20px;
    }

    .mobile-search-input {
        border: none;
        background: transparent;
        padding: 0;
        outline: none;
        width: 100%;
        font-size: 16px;
        color: #fff;
    }

    .mobile-search-input::placeholder {
        color: rgba(255,255,255,0.7);
    }

    .mobile-search-close {
        background: none;
        border: none;
        color: #ffffff;
        font-size: 20px;
        cursor: pointer;
        padding: 8px;
        border-radius: 50%;
        transition: all 0.3s ease;
    }

    .mobile-search-close:hover {
        background: rgba(0,0,0,0.2);
    }

    /* Tablet/Notebook Responsive */
    @media (max-width: 1024px) {
        .custom-search-form {
            min-width: 160px;
        }
        
        .custom-nav-menu {
            gap: 12px;
        }
        
        .custom-nav-link {
            padding: 8px 8px;
            font-size: 12px;
        }
        
        .custom-theme-toggle {
            padding: 4px 8px;
            font-size: 10px;
        }
        
        .theme-switch {
            width: 20px;
            height: 12px;
        }
        
        .theme-switch::after {
            width: 8px;
            height: 8px;
        }
        
        body[data-theme='dark'] .theme-switch::after {
            transform: translateX(8px);
        }
    }

    @media (max-width: 900px) {
        .custom-search-form {
            min-width: 140px;
        }
        
        .custom-nav-menu {
            gap: 8px;
        }
        
        .custom-nav-link {
            padding: 8px 6px;
            font-size: 11px;
        }
    }

    /* Mobile Responsive */
    @media (max-width: 768px) {
        .custom-nav-container {
            padding: 0 15px;
        }

        .custom-nav-menu {
            position: fixed;
            top: 60px;
            left: -100%;
            width: 100%;
            height: calc(100vh - 60px);
            background-color: #3a3a3a;
            flex-direction: column;
            justify-content: flex-start;
            align-items: stretch;
            padding: 0px 10px;
            transition: left 0.3s ease;
            gap: 0;
            overflow-y: auto;
        }

        .custom-nav-menu.active {
            left: 0;
        }

        .custom-nav-item {
            border-bottom: 1px solid #555;
        }

        .custom-nav-link {
            color: #ddd !important;
            padding: 15px 20px;
            display: block;
            border-radius: 0;
        }

        .custom-nav-link:hover {
            background-color: #555;
        }

        .custom-dropdown-content {
            position: static;
            visibility: visible;
            opacity: 1;
            display: block;
            box-shadow: none;
            background-color: #4a4a4a;
            margin: 0;
            border-radius: 0;
            border: none;
            border-top: 1px solid #555;
            padding: 0;
            transform: none;
            pointer-events: auto;
        }

        .custom-dropdown-content a {
            padding: 12px 40px;
            background-color: #4a4a4a;
        }

        .custom-menu-toggle {
            display: flex;
        }

        .custom-search-form {
            display: none;
        }

        .custom-mobile-search-toggle {
            display: flex;
        }

        .custom-nav-right {
            gap: 10px;
        }

        .custom-theme-toggle {
            padding: 4px 6px;
            font-size: 9px;
        }
    }

    @media (max-width: 480px) {
        .custom-nav-container {
            padding: 0 10px;
        }

        .custom-logo {
            font-size: 18px;
        }

        /* .custom-theme-toggle {
            display: none;
        } */
    }