/* ---- Reset & base ---- */
*, *::before, *::after {
    box-sizing: border-box;
}

:root {
    --ih-font-sans: 'Inter', sans-serif;
    --ih-font-serif: 'Merriweather', serif;
    --ih-navy: #1a1a2e;
    --ih-primary: #4f46e5; /* indigo */
    --ih-primary-h: #4338ca;
    --ih-xu: #d97706; /* amber */

    --ih-bg: #f8f7f4;
    --ih-surface: #ffffff;
    --ih-border: #e5e7eb;
    --ih-border-s: #d1d5db;
    --ih-text: #111827;
    --ih-text-2: #4b5563;
    --ih-text-3: #9ca3af;
    --ih-nav-h: 56px;
    --ih-sidebar-w: 220px;
    --ih-radius: 8px;
    --ih-radius-lg: 12px;
}

body {
    font-family: var(--ih-font-sans);
    font-size: 15px;
    color: var(--ih-text);
    background: var(--ih-bg);
    margin: 0;
}

html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* =========================================================
   NAVBAR
   ========================================================= */
.ih-navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--ih-nav-h);
    background: var(--ih-surface);
    border-bottom: 1px solid var(--ih-border);
    width: 100%;
}

.ih-navbar-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 32px;
}

/* Logo */
.ih-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 600;
    color: var(--ih-primary);
    white-space: nowrap;
    flex-shrink: 0;
}

/* Nav links */
.ih-nav-links {
    display: flex;
    gap: 4px;
    flex: 1;
}

    .ih-nav-links a {
        padding: 6px 12px;
        border-radius: var(--ih-radius);
        font-size: 14px;
        color: var(--ih-text-2);
        transition: background .15s, color .15s;
    }

        .ih-nav-links a:hover {
            background: #f3f4f6;
            color: var(--ih-text);
        }

        .ih-nav-links a.active {
            background: #eef2ff;
            color: var(--ih-primary);
            font-weight: 500;
        }

/* Right side */
.ih-nav-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* Auth buttons */
.ih-btn-outline {
    padding: 6px 14px;
    border: 1px solid var(--ih-border-s);
    border-radius: var(--ih-radius);
    font-size: 13px;
    font-weight: 500;
    color: var(--ih-text);
    background: transparent;
    transition: border-color .15s, background .15s;
}

    .ih-btn-outline:hover {
        border-color: var(--ih-primary);
        color: var(--ih-primary);
        background: #eef2ff;
    }

.ih-btn-filled {
    padding: 6px 14px;
    border: none;
    border-radius: var(--ih-radius);
    font-size: 13px;
    font-weight: 500;
    color: #fff;
    background: var(--ih-primary);
    transition: background .15s;
}

    .ih-btn-filled:hover {
        background: var(--ih-primary-h);
        color: #fff;
    }

/* User menu */
.ih-user-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px 4px 4px;
    border: 1px solid var(--ih-border);
    border-radius: 20px;
    background: transparent;
    cursor: pointer;
    font-size: 13px;
    transition: border-color .15s;
}

    .ih-user-btn:hover {
        border-color: var(--ih-border-s);
    }

    .ih-user-btn::after {
        display: none;
    }
/* bỏ caret bootstrap */

.ih-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--ih-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
}

.ih-xu-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 500;
    color: var(--ih-xu);
}

    .ih-xu-badge i {
        font-size: 14px;
    }

/* Dropdown */
.ih-dropdown {
    min-width: 210px;
    border: 1px solid var(--ih-border);
    border-radius: var(--ih-radius-lg);
    box-shadow: 0 8px 24px rgba(0,0,0,.08);
    padding: 6px;
    margin-top: 6px !important;
}

.ih-dropdown-header {
    padding: 8px 12px 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ih-dropdown-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--ih-text);
}

.ih-dropdown-role {
    font-size: 12px;
    color: var(--ih-text-3);
}

.ih-dropdown .dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--ih-text-2);
    border-radius: var(--ih-radius);
    padding: 7px 10px;
    transition: background .12s, color .12s;
}

    .ih-dropdown .dropdown-item i {
        font-size: 15px;
        width: 18px;
        text-align: center;
    }

    .ih-dropdown .dropdown-item:hover {
        background: #f3f4f6;
        color: var(--ih-text);
    }

    .ih-dropdown .dropdown-item.ih-logout {
        color: #dc2626;
    }

        .ih-dropdown .dropdown-item.ih-logout:hover {
            background: #fef2f2;
            color: #dc2626;
        }

.ih-dropdown .dropdown-divider {
    margin: 4px 0;
    border-color: var(--ih-border);
}

/* Mobile toggle */
.ih-mobile-toggle {
    margin-left: auto;
    background: none;
    border: 1px solid var(--ih-border);
    border-radius: var(--ih-radius);
    padding: 6px 10px;
    font-size: 18px;
    color: var(--ih-text-2);
    cursor: pointer;
}

/* Mobile menu */
.ih-mobile-menu {
    display: none;
    flex-direction: column;
    padding: 8px 16px 12px;
    border-top: 1px solid var(--ih-border);
    background: var(--ih-surface);
    gap: 2px;
}

    .ih-mobile-menu.open {
        display: flex;
    }

    .ih-mobile-menu a {
        padding: 9px 12px;
        border-radius: var(--ih-radius);
        font-size: 14px;
        color: var(--ih-text-2);
    }

        .ih-mobile-menu a:hover {
            background: #f3f4f6;
            color: var(--ih-text);
        }

/* =========================================================
   BODY WRAPPER
   ========================================================= */
.ih-body {
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    gap: 24px;
    min-height: calc(100vh - var(--ih-nav-h) - 180px);
    padding-top: 28px;
    padding-bottom: 40px;
}

/* =========================================================
   SIDEBAR
   ========================================================= */
.ih-sidebar {
    width: var(--ih-sidebar-w);
    flex-shrink: 0;
    position: sticky;
    top: calc(var(--ih-nav-h) + 16px);
    height: fit-content;
}

.ih-sidebar-section {
    margin-bottom: 20px;
}

.ih-sidebar-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--ih-text-3);
    padding: 0 12px;
    margin-bottom: 6px;
}

.ih-sidebar ul {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ih-sidebar a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: var(--ih-radius);
    font-size: 14px;
    color: var(--ih-text-2);
    transition: background .12s, color .12s;
}

    .ih-sidebar a i {
        font-size: 16px;
        width: 18px;
        text-align: center;
        flex-shrink: 0;
    }

    .ih-sidebar a span {
        flex: 1;
    }

    .ih-sidebar a:hover {
        background: #f3f4f6;
        color: var(--ih-text);
    }

    .ih-sidebar a.active {
        background: #eef2ff;
        color: var(--ih-primary);
        font-weight: 500;
    }

        .ih-sidebar a.active i {
            color: var(--ih-primary);
        }

/* Badge số */
.ih-badge {
    background: var(--ih-primary);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 1px 7px;
    border-radius: 20px;
    min-width: 20px;
    text-align: center;
}

/* =========================================================
   MAIN CONTENT
   ========================================================= */
.ih-main {
    flex: 1;
    min-width: 0;
}

/* =========================================================
   TOAST THÔNG BÁO
   ========================================================= */
.ih-toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--ih-radius);
    font-size: 14px;
    margin-bottom: 20px;
    animation: ih-toast-in .2s ease;
}

.ih-toast--success {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.ih-toast--error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.ih-toast i {
    font-size: 16px;
}

@keyframes ih-toast-in {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================================
   FOOTER
   ========================================================= */
.ih-footer {
    background: var(--ih-navy);
    color: #9ca3af;
    margin-top: auto;
}

.ih-footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 40px 24px 32px;
    display: flex;
    gap: 48px;
    flex-wrap: wrap;
}

.ih-footer-brand {
    flex: 1;
    min-width: 200px;
}

    .ih-footer-brand .ih-logo {
        color: #fff;
        margin-bottom: 10px;
        font-size: 17px;
    }

    .ih-footer-brand p {
        font-size: 13px;
        line-height: 1.7;
        color: #6b7280;
    }

.ih-footer-links {
    display: flex;
    gap: 48px;
    flex-wrap: wrap;
}

    .ih-footer-links h6 {
        font-size: 13px;
        font-weight: 600;
        color: #e5e7eb;
        text-transform: uppercase;
        letter-spacing: .05em;
        margin-bottom: 12px;
    }

    .ih-footer-links ul {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .ih-footer-links a {
        font-size: 13px;
        color: #6b7280;
        transition: color .15s;
    }

        .ih-footer-links a:hover {
            color: #e5e7eb;
        }

.ih-footer-bottom {
    border-top: 1px solid #1f2937;
    padding: 16px 24px;
    text-align: center;
    font-size: 12px;
    color: #4b5563;
    max-width: 1280px;
    margin: 0 auto;
}

.ih-navbar {
    background: #080812 !important;
    border-bottom: 1px solid rgba(255,255,255,.2);
}



.ih-nav-links a {
    color: #c084fc !important;
    border: 1px solid transparent;
    border-radius: 10px;
    transition: .3s;
}




    /* hover navbar */


    .ih-nav-links a:hover {
        background: #000 !important;
        border: 1px solid white;
        color: #e9d5ff !important;
        box-shadow: 0 0 15px rgba(168,85,247,.8);
    }






    /* active navbar */


    .ih-nav-links a.active {
        background: #000 !important;
        border: 1px solid white;
        font-weight: 600;
        color: #d8b4fe !important;
        box-shadow: 0 0 18px rgba(168,85,247,.8);
    }





/* ================= LOGO ================= */


.ih-logo {
    color: #c084fc !important;
    filter: drop-shadow(0 0 8px rgba(168,85,247,.8));
}






/* ================= SIDEBAR DỌC ================= */



.ih-sidebar {
    background: #080812 !important;
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 16px;
    padding: 15px;
}





.ih-sidebar-label {
    color: #a855f7 !important;
}





.ih-sidebar a {
    color: #c084fc !important;
    border: 1px solid transparent;
    border-radius: 10px;
    transition: .3s;
}






    /* hover sidebar */


    .ih-sidebar a:hover {
        background: #000 !important;
        border: 1px solid white;
        color: #f3e8ff !important;
        box-shadow: 0 0 15px rgba(168,85,247,.7);
    }






    /* active sidebar */


    .ih-sidebar a.active {
        background: #000 !important;
        border: 1px solid white;
        color: #e9d5ff !important;
        font-weight: 600;
        box-shadow: 0 0 18px rgba(168,85,247,.9);
    }





        .ih-sidebar a.active i {
            color: #d8b4fe !important;
        }







/* ================= DROPDOWN USER ================= */



.ih-dropdown {
    background: #080812 !important;
    border: 1px solid white;
}




.ih-dropdown-name {
    color: #f3e8ff !important;
}




.ih-dropdown-role {
    color: #c084fc !important;
}




.ih-dropdown .dropdown-item {
    color: #c084fc !important;
}





    .ih-dropdown .dropdown-item:hover {
        background: #000 !important;
        border: 1px solid white;
        color: #f5d0fe !important;
    }






/* ================= MOBILE MENU ================= */


.ih-mobile-menu {
    background: #080812 !important;
    border-color: white;
}



    .ih-mobile-menu a {
        color: #c084fc !important;
    }





        .ih-mobile-menu a:hover {
            background: #000;
            border: 1px solid white;
            color: #f5d0fe !important;
        }






/* ================= NÚT ĐĂNG NHẬP ================= */



.ih-btn-outline {
    color: #c084fc !important;
    border: 1px solid #c084fc !important;
    background: #000 !important;
}



    .ih-btn-outline:hover {
        color: white !important;
        border-color: white !important;
        box-shadow: 0 0 15px rgba(168,85,247,.8);
    }






.ih-btn-filled {
    background: #9333ea !important;
    color: white !important;
    border: 1px solid transparent;
}





    .ih-btn-filled:hover {
        background: #000 !important;
        border: 1px solid white;
        color: #e9d5ff !important;
        box-shadow: 0 0 15px rgba(168,85,247,.8);
    }






/* ================= ICON ================= */



.ih-sidebar i,
.ih-nav-links i {
    color: #c084fc;
}

/* ================= BODY DARK NHẸ ================= */


.ih-body {
    background: #0b0b14;
}

/* ================= Mobile thể loại ================= */

.ih-mobile-theloai-btn {
    width: 100%;
    background: none;
    border: none;
    color: #c084fc;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    font-size: 15px;
}

.ih-mobile-theloai-btn a {
    color: #c084fc !important;
}

    .ih-mobile-theloai-btn a:hover {
        background: #000;
        border: 1px solid white;
        color: #f5d0fe !important;
    }

    .ih-mobile-theloai-btn i {
        transition: .3s;
    }

    .ih-mobile-theloai-btn.active i {
        transform: rotate(180deg);
    }

.ih-mobile-theloai-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    display: none;
    align-items: flex-start;
    justify-content: center;
    z-index: 9999;
    padding-top: 70px;
}

    .ih-mobile-theloai-overlay.show {
        display: flex;
    }


/* popup */

.ih-mobile-theloai-popup {
    width: 92%;
    max-width: 420px;
    background: #090912;
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 18px;
    padding: 18px;
    display: grid;
    gap: 10px;
    /* quan trọng */

    grid-template-columns: repeat(auto-fit,minmax(120px,max-content));
    justify-content: center;
}

.ih-mobile-theloai-item {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 44px;
    padding: 0 18px;
    white-space: nowrap;
    border-radius: 12px;
    background: #171727;
    color: #c084fc;
    border: 1px solid rgba(255,255,255,.08);
    transition: .25s;
}

    .ih-mobile-theloai-item:hover {
        border-color: #fff;
        background: #000;
    }

.ih-footer {
    position: relative;
    overflow: hidden;
    background: linear-gradient( 180deg, #080014, #140024 );
    padding: 70px 30px 25px;
    color: white;
}



/* ánh sáng tím trôi */

.ih-footer-glow {
    position: absolute;
    width: 350px;
    height: 350px;
    background: #9333ea;
    border-radius: 50%;
    filter: blur(120px);
    opacity: .25;
    top: -100px;
    left: 50%;
    animation: footerGlowMove 8s ease-in-out infinite alternate;
}



@keyframes footerGlowMove {


    from {
        transform: translateX(-60%);
    }


    to {
        transform: translateX(-40%) translateY(60px);
    }
}






/* particles */


.ih-footer-particles span {
    position: absolute;
    width: 6px;
    height: 6px;
    background: #c084fc;
    border-radius: 50%;
    box-shadow: 0 0 15px #a855f7;
    bottom: -20px;
    animation: footerParticle 10s linear infinite;
}




    .ih-footer-particles span:nth-child(1) {
        left: 10%;
        animation-duration: 8s;
    }


    .ih-footer-particles span:nth-child(2) {
        left: 25%;
        animation-duration: 12s;
    }


    .ih-footer-particles span:nth-child(3) {
        left: 40%;
        animation-duration: 9s;
    }


    .ih-footer-particles span:nth-child(4) {
        left: 55%;
        animation-duration: 14s;
    }


    .ih-footer-particles span:nth-child(5) {
        left: 70%;
        animation-duration: 11s;
    }


    .ih-footer-particles span:nth-child(6) {
        left: 80%;
        animation-duration: 13s;
    }


    .ih-footer-particles span:nth-child(7) {
        left: 35%;
        animation-duration: 15s;
    }


    .ih-footer-particles span:nth-child(8) {
        left: 90%;
        animation-duration: 10s;
    }




@keyframes footerParticle {


    0% {
        transform: translateY(0) scale(.4);
        opacity: 0;
    }


    20% {
        opacity: 1;
    }


    100% {
        transform: translateY(-400px) scale(1.5);
        opacity: 0;
    }
}





/* nội dung */


.ih-footer-inner {
    position: relative;
    max-width: 1200px;
    margin: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}




/* logo bay nhẹ */


.ih-footer-brand img {
    height: 100px;
    border-radius: 50%;
    animation: logoFloat 4s ease-in-out infinite;
    filter: drop-shadow( 0 0 20px rgba(168,85,247,.6) );
}



@keyframes logoFloat {


    0%,100% {
        transform: translateY(0);
    }


    50% {
        transform: translateY(-10px);
    }
}




.ih-footer-brand p {
    color: rgba(255,255,255,.55);
    margin-top: 15px;
    font-size: 14px;
}




/* link */


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




    .ih-footer-links h6 {
        color: #d8b4fe;
        font-size: 15px;
        margin-bottom: 15px;
    }




    .ih-footer-links ul {
        padding: 0;
        list-style: none;
    }




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




    .ih-footer-links a {
        color: rgba(255,255,255,.55);
        text-decoration: none;
        transition: .3s;
    }



        .ih-footer-links a:hover {
            color: #c084fc;
            text-shadow: 0 0 15px #a855f7;
            transform: translateX(5px);
            display: inline-block;
        }





.ih-footer-bottom {
    position: relative;
    margin-top: 45px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,.1);
    text-align: center;
    color: rgba(255,255,255,.4);
    font-size: 13px;
}




@media(max-width:700px) {


    .ih-footer-inner {
        flex-direction: column;
        gap: 35px;
        text-align: center;
    }



    .ih-footer-links {
        gap: 40px;
    }
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 991.98px) {
    .ih-navbar {
        height: auto;
        min-height: var(--ih-nav-h);
    }

    .ih-navbar-inner {
        padding: 0 16px;
        gap: 12px;
    }

    .ih-nav-left {
        display: flex;
        align-items: center;
        gap: 10px;
        flex-shrink: 0;
    }

    .ih-sidebar {
        display: none;
    }

    .ih-main--with-sidebar {
        margin-left: 0;
    }

    .ih-nav-links {
        display: none !important;
    }

    .ih-mobile-menu {
        padding-left: 16px;
        padding-right: 16px;
    }
}

@media (max-width:575.98px) {

    .ih-navbar-inner {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 12px;
    }

    .ih-nav-left {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .ih-mobile-toggle {
        order: 0;
        margin: 0;
        width: 42px;
        height: 42px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .ih-logo img {
        height: 36px !important;
    }

    .ih-nav-right {
        display: flex;
        align-items: center;
        margin-left: auto;
    }

    .ih-user-btn {
        padding: 3px;
        border: none;
        background: none;
    }

    .ih-avatar {
        width: 38px;
        height: 38px;
    }

    .ih-xu-badge {
        margin-right: 8px;
        display: flex;
    }
}

@media (max-width: 768px) {
    .ih-search-form {
        display: none;
    }

    .ih-body {
        padding: 16px;
        padding-top: 20px;
        padding-bottom: 28px;
    }

    .ih-footer-inner {
        flex-direction: column;
        gap: 28px;
    }

    .ih-footer-links {
        gap: 28px;
    }
}

@media (max-width: 575.98px) {
    body { font-size: 14px; }

    .ih-navbar-inner { padding: 0 12px; }
    .ih-logo img { height: 40px !important; }
    .ih-nav-right { gap: 6px; }
    .ih-btn-outline, .ih-btn-filled { padding: 6px 9px; font-size: 12px; }
    .ih-user-btn { padding-right: 6px; }
    .ih-xu-badge {
        display: flex;
        align-items: center;
        margin-right: 8px;
    }
    .ih-mobile-toggle { padding: 5px 8px; }

    .ih-mobile-menu { padding: 8px 12px 12px; }
    .ih-body { padding-left: 12px; padding-right: 12px; width: 100%; }
    .ih-toast { padding: 10px 12px; font-size: 13px; }

    .ih-footer-inner { padding: 28px 20px 24px; }
    .ih-footer-links { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
    .ih-footer-bottom { padding: 14px 20px; }
}
