:root { 
    --primary: #007bff; 
    --bg: #ffffff; 
    --orange: #ff7000; 
    --sub-bg: #f8f8f8; 
}
body { margin:0; font-family: sans-serif; background: var(--bg); padding-top: 70px; }
a { text-decoration: none; color: #333; }
* { box-sizing: border-box; }
@media (max-width: 768px) {
    .mobile-title {
        transition: none !important;
        transform: none !important;
        left: 0 !important;
    }
    .navbar > div {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        width: 100% !important;
        height: 100% !important;
    }
}
* {
    -webkit-tap-highlight-color: transparent;
    tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    user-select: none;
}

@keyframes clickRipple {
    0% { transform: scale(0); opacity: 0.6; }
    100% { transform: scale(2); opacity: 0; }
}

.ripple-effect { position: relative; overflow: hidden; }
.ripple-effect .ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(0, 123, 255, 0.4);
    transform: scale(0);
    animation: clickRipple 0.6s ease-out;
    pointer-events: none;
}

@media (max-width: 768px) {
    .card, .mobile-menu-btn, .cat-c-item, .cat-p-item, .download-btn, .download-app-btn {
        position: relative;
        overflow: hidden;
    }
}

.navbar { 
    position: fixed; top: 0; left: 0; width: 100%; height: 70px; 
    background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,0.05); z-index: 1000; 
    display: flex; align-items: center; justify-content: center; padding: 0; 
}
.navbar > div {
    width: 100%; max-width: 95vw; min-width: 1200px; display: flex;
    align-items: center; justify-content: space-between; padding: 0 15px; box-sizing: border-box;
}

@media (min-width: 769px) {
  .navbar > div,
  .carousel-wrap,
  .notice-bar,
  .container {
    max-width: 90% !important;
    min-width: unset !important;
    width: 90% !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}
@media (max-width: 768px) {
    .navbar > div { min-width: unset !important; max-width: 100% !important; padding: 0 10px !important; }
}

.mobile-menu-btn, .mobile-title { display: none; }
.nav-logo img { height: 90px; }
.nav-center { flex: 1; display: flex; justify-content: center; align-items: center; gap: 20px; }
.nav-menu { display: flex; gap: 25px; list-style: none; margin: 0; padding: 0; align-items: center; }
.nav-item { position: relative; font-size: 15px; font-weight: 500; cursor: pointer; }
.nav-item > a > i.fa-chevron-down { font-size: 12px; margin-left: 5px; transition: transform 0.3s ease; transform-origin: center; }
.nav-item:hover > a > i.fa-chevron-down { transform: rotate(180deg); }

@media (max-width: 768px) {
    .nav-item > a > i.fa-chevron-down { transition: none; transform: none !important; }
}
@media (min-width: 2560px) {
    .nav-item { font-size: 18px; }
    .sub-menu a { font-size: 16px; padding: 12px 20px; }
}
@media (min-width: 3840px) {
    .nav-item { font-size: 20px; }
    .sub-menu a { font-size: 18px; padding: 14px 20px; }
}

.nav-item a { color: #555; display: block; padding: 10px 0; }
.nav-item:hover > a { color: var(--primary); }

.sub-menu { 
    display: none; position: absolute; top: 100%; left: -15px; background: #fff; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.1); border-radius: 4px; min-width: 140px; 
    max-width: 300px; padding: 5px 0; list-style: none; z-index: 1001; 
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; 
}
.nav-item:hover .sub-menu { display: block; }
.sub-menu a { padding: 10px 20px; white-space: nowrap; display: block; overflow: hidden; text-overflow: ellipsis; }
.sub-menu a:hover { background: #f5f5f5; color: var(--primary); }

.nav-search-pc form { display: flex; }
.nav-search-pc input { padding: 8px 15px; border-radius: 20px 0 0 20px; border: 1px solid #ddd; border-right: none; outline: none; width: 200px; background: #f9f9f9; font-size: 14px; }
.nav-search-pc button { padding: 8px 15px; border-radius: 0 20px 20px 0; border: 1px solid #ddd; background: var(--primary); color: #fff; cursor: pointer; font-size: 14px; }

@media (min-width: 2560px) {
    .nav-search-pc input { width: 280px; padding: 10px 20px; font-size: 16px; }
    .nav-search-pc button { padding: 10px 20px; font-size: 16px; }
}
@media (min-width: 3840px) {
    .nav-search-pc input { width: 350px; padding: 12px 25px; font-size: 18px; }
    .nav-search-pc button { padding: 12px 25px; font-size: 18px; }
}

.nav-right { display: flex; align-items: center; gap: 15px; }
.user-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; cursor: pointer; border: 1px solid #eee; z-index: 9999 !important; position: relative !important; }

@media (max-width: 768px) {
    .user-avatar { width: 45px !important; height: 45px !important; margin-right: 5px !important; z-index: 9999 !important; position: relative !important; pointer-events: auto !important; }
}
.user-dropdown { position: absolute; top: 60px; right: 20px; background: #fff; width: auto; min-width: 140px; box-shadow: 0 5px 15px rgba(0,0,0,0.1); border-radius: 12px; display: none; flex-direction: column; overflow: hidden; z-index: 9999 !important; }

@media (max-width: 768px) {
    .user-dropdown { right: 10px !important; top: 70px !important; z-index: 9999 !important; position: fixed !important; width: auto !important; min-width: 140px !important; max-width: 90vw !important; }
}
.user-dropdown.show { display: flex; }
.user-dropdown div { padding: 12px 20px; cursor: pointer; text-align: center; border-bottom: 1px solid #eee; font-size: 13px; white-space: nowrap; }
.user-dropdown div:last-child { border-bottom: none; padding-top: 12px; padding-bottom: 6px; }
.user-dropdown div:hover { background: #f5f5f5; color: var(--primary); }
.btn-login { background: var(--primary); color: #fff; padding: 6px 20px; border-radius: 20px; font-size: 14px; border: none; cursor: pointer; }
.btn-login:hover { background: #0056b3; }

.mobile-menu-overlay {
    position: fixed;
    top: 70px;
    left: -100%;
    margin-left: 10px;
    width: auto !important;
    min-width: 120px;
    max-width: 200px;
    height: auto !important;
    max-height: calc(100vh - 70px);
    background: #fff;
    z-index: 9999 !important;
    box-shadow: 0 0 6px rgba(0,0,0,0.1) !important;
    transition: left 0.3s ease-in-out !important;
    padding: 10px 20px !important;
    border-radius: 12px !important;
    display: inline-block !important;
    margin-bottom: 0 !important;
    pointer-events: auto;
}
.mobile-menu-overlay.show {
    left: 0;
}
.m-menu-item { padding: 10px 0 !important; border-bottom: none !important; font-size: 14px !important; font-weight: normal !important; cursor: pointer; white-space: nowrap; }
.m-menu-item:last-child { margin-bottom: 6px !important; }

.mobile-submenu { transition: all 0.3s ease; }
.m-submenu-item { padding: 8px 0 !important; font-size: 13px !important; border-bottom: none !important; }
.has-submenu .submenu-icon { transition: transform 0.3s ease; }
.has-submenu.open .submenu-icon { transform: rotate(180deg); }
.has-submenu > a { pointer-events: none; }
.has-submenu .mobile-submenu a { pointer-events: auto; }

.carousel-wrap { 
    max-width: 90vw !important;
    min-width: unset !important; 
    margin: 1vw auto;
    width: 100%; 
    position: relative; 
    overflow: hidden; 
    border-radius: 0.4vw !important;
    height: 16vw !important;
    padding: 0 !important; 
    box-sizing: border-box; 
}
.carousel-indicators { 
    position: absolute; 
    bottom: 1vw;
    left: 0; 
    width: 100%; 
    display: flex; 
    justify-content: center; 
    gap: 0.5vw !important;
    z-index: 10; 
}
.carousel-indicator { 
    width: 2vw !important;
    height: 0.4vw !important;
    border-radius: 0.2vw !important;
    background: rgba(255, 255, 255, 0.5); 
    cursor: pointer; 
    transition: all 0.3s ease; 
}
.carousel-indicator.active { 
    background: #007bff; 
    width: 2.8vw !important;
}
.carousel-indicator:hover:not(.active) { 
    background: rgba(255, 255, 255, 0.8); 
}

.carousel { 
    width: 100%; 
    height: 100%; 
    position: relative; 
    overflow: hidden; 
}
.slide { 
    width: 100%; 
    height: 100%; 
    position: absolute; 
    left: 0; 
    transform: translateX(100%); 
    transition: transform 0.5s ease-in-out; 
    opacity: 1; 
}
.slide.active { 
    transform: translateX(0); 
    z-index: 1; 
}
.slide.prev { 
    transform: translateX(-100%); 
    z-index: 0; 
}
.slide img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: center center !important;
    background-color: #f8f8f8;
    position: relative !important;
    transform: none !important;
    top: unset !important;
    left: unset !important;
    margin: 0 !important;
    padding: 0 !important;
}

@media (max-width: 768px) {
    .carousel-wrap { 
        min-width: unset !important; 
        max-width: 100% !important; 
        padding: 0 16px !important; 
        height: 110px !important;
        min-height: 110px !important; 
        display: block !important; 
        border-radius: 8px !important;
        margin: 10px auto !important;
    }
    .carousel-indicators { 
        gap: 5px !important;
        bottom: 15px !important;
    }
    .carousel-indicator { 
        width: 15px !important;
        height: 4px !important;
        border-radius: 2px !important;
    }
    .carousel-indicator.active { 
        width: 25px !important;
    }
}

@media (min-width: 769px) {
    .carousel-wrap { 
        max-width: 90vw !important; 
        height: 16vw !important;
    }
}
.notice-bar { max-width: 95vw; min-width: 1200px; margin: 10px auto; margin-top: 20px; width: 100%; background: #fff8e1; color: #d32f2f; padding: 10px 2vw; font-size: 15px; font-weight: bold; border-radius: 4px; margin-bottom: 10px; box-shadow: 0 1px 2px rgba(0,0,0,0.05); }
@media (min-width: 769px) { .notice-bar { text-align: center; } }

@media (max-width: 768px) {
    .notice-bar { padding: 10px 10px; width: 92%; max-width: 100% !important; min-width: unset !important; box-sizing: border-box; font-size: 14px; font-weight: bold; overflow: hidden; }
}

.notice-scroll-container { width: 100%; overflow: hidden; position: relative; }
.notice-scroll-content { display: inline-block; white-space: nowrap; will-change: transform; }
@keyframes noticeScroll { 0% { transform: translateX(100%); } 100% { transform: translateX(-100%); } }
@supports (-webkit-overflow-scrolling: touch) { .notice-scroll-content { -webkit-transform: translateZ(0); transform: translateZ(0); } }

.container {
    max-width: 95vw;
    min-width: 1200px;
    width: 100%;
    margin: 20px auto;
    padding: 0;
    box-sizing: border-box;
}

@media (max-width: 768px) { 
    .container { 
        max-width: none !important; 
        min-width: unset !important; 
        width: 90% !important; 
        padding: 0 !important; 
        box-sizing: border-box; 
        margin: 20px auto; 
    } 
}

.cat-parent { display: flex; flex-wrap: wrap; column-gap: 0px; row-gap: 15px; margin-top: 25px; margin-bottom: 15px; padding-bottom: 10px; border-bottom: none; padding-left: 0px; font-weight: 400; }
.cat-p-item { font-size: 16px; font-weight: normal !important; cursor: pointer; padding: 8px 15px; border-bottom: 2px solid transparent; color: #555; text-decoration: none; }
.cat-p-item.active { border-color: var(--primary); color: var(--primary); }
.cat-p-item:hover { color: #007bff !important; cursor: pointer; }

@media (max-width: 768px) {
    .cat-p-item { 
        padding: 10px 16px; 
        background: var(--sub-bg); 
        border-radius: 20px; 
        color: #666; 
        font-size: 15px; 
        border-bottom: none; 
        border: none; 
    }
    .cat-p-item.active { 
        background: rgba(24, 144, 255, 0.1); 
        color: #1890ff; 
        font-weight: normal; 
        transform: translateY(0px); 
    }
    body .container .cat-parent {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: flex-start !important;
        align-items: flex-start !important;
        gap: 12px 8px !important;
        padding: 5px !important;
        margin: -10px 0 5px 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    body .container .cat-parent .cat-p-item {
        margin: 0 6px 6px 0px !important;
    }
}
.container .cat-child { 
        display: flex; 
        flex-wrap: wrap; 
        gap: 2px !important;
        row-gap: 20px !important;
        margin-top: 0px !important; 
        margin-bottom: 20px !important; 
        padding: 15px 12px 15px 10px !important;
        background: var(--sub-bg); 
        border-radius: 8px; 
        box-sizing: border-box !important;
    }
    .container .cat-c-item { 
        cursor: pointer; 
        padding: 7px 10px !important; 
        background: #ffffff; 
        border-radius: 15px; 
        color: #666; 
        font-size: 14px; 
        text-decoration: none; 
        transition: all 0.2s; 
        box-sizing: border-box !important;
        margin: 0 !important; 
        margin-left: 10px !important;
    }
    .cat-c-item:hover { background: #e0e7ff; }
    .cat-c-item.active { 
        background: #1890ff; 
        color: #fff; 
        box-shadow: none; 
        border-radius: 15px; 
        font-weight: bold;
        transform: translateY(0px); 
        transition: all 0.2s ease; 
    }

.container .cat-child { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 15px; 
    margin-top: 10px; 
    margin-bottom: 20px; 
    padding: 15px 0px !important;
    background: var(--sub-bg); 
    border-radius: 12px; 
    box-sizing: border-box !important;
}
.container .cat-c-item { 
    cursor: pointer; 
    padding: 7px 14px !important;
    background: #ffffff; 
    border-radius: 15px; 
    color: #666; 
    font-size: 16px; 
    text-decoration: none; 
    transition: all 0.2s; 
    box-sizing: border-box !important;
}
.cat-c-item:hover { background: #e0e7ff; }
.cat-c-item.active { background: #1890ff; color: #fff; box-shadow: none; border-radius: 15px; font-weight: bold; transform: translateY(0px); transition: all 0.2s ease; }

@media (min-width: 2560px) {
    .cat-p-item { font-size: 18px; padding: 10px 20px; }
    .cat-c-item { font-size: 18px; padding: 10px 25px; border-radius: 18px; }
}
@media (min-width: 3840px) {
    .cat-p-item { font-size: 20px; padding: 12px 25px; }
    .cat-c-item { font-size: 20px; padding: 12px 30px; border-radius: 20px; }
}

.search-mobile { display: none; margin: 15px 0; }
@media (max-width: 768px) { .search-mobile { display: block; margin: 20px 0 !important; } }
.search-mobile form { display: flex; width: 100%; }
.search-mobile input { flex: 1; padding: 10px; border: 1px solid #ddd; border-right: none; border-radius: 4px 0 0 4px; background: #fff; }
.search-mobile button { padding: 10px 15px; background: var(--primary); color: #fff; border: none; border-radius: 0 4px 4px 0; }

.grid { display: grid; grid-template-columns: repeat(5, 1fr); column-gap: 20px; row-gap: 18px; }
@media (min-width: 769px) and (max-width: 1199px) { .grid { grid-template-columns: repeat(4, 1fr); column-gap: 15px; } }
@media (max-width: 768px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
        column-gap: 16px !important;
        row-gap: 22px;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}

.card { 
    background: #fff; 
    border-radius: 6px; 
    overflow: hidden; 
    transition: 0.2s; 
    box-shadow: 0 1px 6px rgba(0,0,0,0.2); 
    cursor: pointer; 
    position: relative; 
}
.card:hover { 
    transform: translateY(-3px); 
    box-shadow: 0 8px 15px rgba(0,0,0,0.1); 
}

@media (min-width: 769px) {
    .card {
        border-radius: 12px !important;
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.1) !important;
        border: none !important;
    }
    .card:hover {
        transform: translateY(-3px);
        box-shadow: 0 0 12px rgba(0, 0, 0, 0.12) !important;
        border-color: transparent !important;
    }
    .card .thumb {
        padding-bottom: 56.25% !important;
    }
}

.thumb { 
    padding-bottom: 68%; 
    position: relative; 
    background: #fff;
    width: 100% !important;
    height: 0 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}
.thumb img { 
    position: absolute !important; 
    width: 100% !important; 
    height: 100% !important; 
    object-fit: cover !important;
    top: 0 !important;
    left: 0 !important;
    transform: translate(0, 0) !important;
    margin: 0 !important;
    border: none !important;
}

@media (max-width: 768px) {
    .card .thumb {
        padding-bottom: 70% !important;
        position: relative !important;
        width: 100% !important;
        height: 0 !important;
        overflow: hidden !important;
    }
    .card .thumb img {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        transform: none !important;
        margin: 0 !important;
    }
}

.tag-original { position: absolute; top: 8px; left: 8px; background-color: #dc3545; color: #fff; font-size: 16px; padding: 6px 16px; border-radius: 6px; z-index: 2; font-weight: bold; }
.tag-new { position: absolute; top: 8px; right: 8px; background: linear-gradient(90deg, #28a745, #97d700); color: #fff; font-size: 18px; padding: 8px 18px; border-radius: 8px; z-index: 2; font-weight: bold; }
.tag-copyright { position: absolute; top: 8px; z-index: 2; font-weight: bold; }

@media (min-width: 769px) {
    .tag-original, .tag-new, .tag-collect, .tag-copyright { 
        font-size: 0.6vw !important;
        padding: 0.2vw 0.4vw !important;
        border-radius: 0.25vw !important;
    }
    .notice-bar {
        font-size: 0.7vw !important;
        padding: 0.5vw 2vw !important;
        border-radius: 0.25vw !important;
        color: #dc4f4f !important; 
    }
    
     .nav-search-pc button {
        padding: 0.5vw 1vw !important;
        font-size: 0.7vw !important;
        border-radius: 0 2vw 2vw 0 !important;
    }
}

@media (max-width: 768px) {
    .tag-original, .tag-new { font-size: 11px !important; padding: 3px 7px !important; border-radius: 4px !important; }
    .tag-collect, .tag-copyright { font-size: 11px !important; padding: 3px 7px !important; border-radius: 4px !important; }
    .tag-original[style*="linear-gradient(90deg, #9d4edd, #7b2cbf)"] { font-size: 11px !important; padding: 3px 7px !important; }
}

.audio-icon { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 60px; height: 60px; border-radius: 50%; background: rgba(0,0,0,0.6); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 24px; transition: 0.3s; border: 2px solid #fff; }
.card:hover .audio-icon { animation: spin 2s linear infinite; background: var(--primary); }
@keyframes spin { 100% { transform: translate(-50%, -50%) rotate(360deg); } }

.card-footer { margin-top: 10px; display: flex; justify-content: center; align-items: center; padding: 0 15px; width: 100%; box-sizing: border-box; }
.card-title { font-size: 14px; color: #333; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; }
@media (min-width: 2560px) { .card-title { font-size: 16px; } }
@media (min-width: 3840px) { .card-title { font-size: 18px; } }
.preview-btn { display: none; }

.modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); z-index: 2000; align-items: center; justify-content: center; }
.modal-box { background: #fff; padding: 30px; border-radius: 12px; text-align: center; position: relative; box-shadow: 0 10px 30px rgba(0,0,0,0.15); }

@media (min-width: 769px) {
    #itemModal .modal-box { width: 1200px !important; max-width: 95% !important; padding: 20px !important; min-height: 80vh !important; }
    #itemModal.no-video-url .modal-box { max-width: fit-content !important; min-width: 300px !important; padding: 20px 30px !important; }
    #loginModal .modal-box, #passModal .modal-box { width: 400px !important; max-width: 95% !important; padding: 30px !important; }
    #kfModal .modal-box { width: 400px !important; height: 400px !important; padding: 20px !important; }
}
@media (min-width: 2560px) {
    #itemModal .modal-box { 
        width: 1600px !important;
        max-width: 90% !important;
        padding: 35px !important;
        min-height: 90vh !important;
        font-size: 18px !important; 
    }
    #itemModal .modal-title-bar h3 { font-size: 32px !important; }
    #itemModal.no-video-url .modal-box { 
        min-width: 550px !important;
        padding: 40px 50px !important; 
    }
    #itemModal .material-image-bar img, #itemModal .material-image-bar video { 
        max-height: 800px !important;
    }
    #itemModal .download-btn { 
        padding: 15px 50px !important; 
        font-size: 20px !important; 
    }
    #loginModal .modal-box, #passModal .modal-box { 
        width: 600px !important;
        padding: 45px !important; 
    }
    #kfModal .modal-box { 
        width: 600px !important;
        height: 600px !important;
        padding: 40px !important; 
    }
}
@media (min-width: 3840px) {
    #itemModal .modal-box { width: 2400px !important; max-width: 82% !important; padding: 50px !important; min-height: 92vh !important; font-size: 20px !important; }
    #itemModal .modal-title-bar h3 { font-size: 36px !important; }
    #itemModal.no-video-url .modal-box { min-width: 600px !important; padding: 50px 60px !important; }
    #itemModal .material-image-bar img, #itemModal .material-image-bar video { max-height: 850px !important; }
    #itemModal .download-btn { padding: 18px 60px !important; font-size: 22px !important; }
    #loginModal .modal-box, #passModal .modal-box { width: 650px !important; padding: 55px !important; }
    #kfModal .modal-box { width: 650px !important; height: 650px !important; padding: 50px !important; }
}
@media (max-width: 768px) {
    #itemModal .modal-box { width: 380px !important; max-width: 95% !important; padding: 15px !important; min-height: 70vh !important; }
    #loginModal .modal-box, #passModal .modal-box { width: 320px !important; max-width: 95% !important; }
    #kfModal .modal-box { width: 300px !important; height: 300px !important; padding: 20px !important; }
    .modal-arrow { width: 40px !important; height: 40px !important; }
    .modal-arrow i { font-size: 16px !important; }
}

#itemModal .modal-box { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; position: relative; height: auto !important; min-height: unset !important; }
.modal-title-bar { width: 100%; padding: 15px 0; border-bottom: 1px solid #eee; margin-bottom: 20px; text-align: center; display: flex; justify-content: center; align-items: center; gap: 15px; }
.modal-title-bar h3 { font-size: 24px; margin: 0; color: #333; }
.material-image-bar { width: 100%; display: flex; align-items: center; justify-content: center; padding: 10px 0; height: auto; min-height: unset; }
.material-image-bar img { max-width: 100%; max-height: 500px; width: auto; height: auto; object-fit: contain; border-radius: 8px; box-shadow: none !important; }
.download-bar { width: 100%; padding: 20px 0; border-top: 1px solid #eee; margin-top: 20px; }
@media (min-width: 769px) { .download-bar { position: relative; bottom: auto; right: auto; width: 100%; border-top: 1px solid #eee; margin-top: 20px; padding: 10px 0; text-align: right; } }
.download-btn { display: inline-flex; align-items: center; gap: 10px; padding: 12px 40px; background: var(--primary); color: #fff; border: none; border-radius: 8px; cursor: pointer; font-size: 18px; box-shadow: 0 4px 12px rgba(0,123,255,0.2); }
@media (min-width: 769px) { .download-btn { padding: 10px 30px; font-size: 16px; } }
.download-btn:hover { background: #0056b3; transform: translateY(-2px); box-shadow: 0 6px 15px rgba(0,123,255,0.3); }
.close-btn { position: absolute; top: 20px; right: 20px; font-size: 30px; cursor: pointer; color: #999; transition: all 0.2s; z-index: 10; }
.close-btn:hover { color: #333; transform: scale(1.1); }
.modal-input { width: 100%; padding: 12px; border: 1px solid #ddd; margin-bottom: 15px; border-radius: 8px; font-size: 16px; }
.modal-input:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px rgba(0,123,255,0.1); }
.modal-btn { width: 100%; padding: 12px; background: var(--primary); color: #fff; border: none; border-radius: 8px; cursor: pointer; font-size: 16px; transition: all 0.2s; }
.modal-btn:hover { background: #0056b3; box-shadow: 0 4px 12px rgba(0,123,255,0.2); }

.login-extra { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; font-size: 16px; }
.remember-pwd { display: flex; align-items: center; gap: 8px; color: #666; }
.remember-pwd input { width: 18px; height: 18px; }
.buy-material { display: flex; align-items: center; gap: 8px; color: var(--orange); cursor: pointer; transition: all 0.2s; }
.buy-material:hover { color: #ff5500; transform: translateY(-2px); }

#kfModal .modal-box { display: flex; flex-direction: column; align-items: center; justify-content: center; }
#kfModal img { width: 80%; height: 80%; object-fit: contain; border-radius: 8px; margin-bottom: 15px; }
#kfModal p { font-size: 18px; color: #666; margin: 0; }

.auth-modal-box { width: 900px !important; max-width: 95%; text-align: left; height: 85vh; display:flex; flex-direction:column; }
.auth-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 25px; }
.auth-card { border: 1px solid #eee; padding: 20px; border-radius: 12px; transition: all 0.2s; }
.auth-card:hover { box-shadow: 0 5px 15px rgba(0,0,0,0.05); }

@media (max-width: 768px) {
    .nav-logo, .nav-center { display: none; }
    .mobile-menu-btn { display: flex; align-items: center; order: 1; font-size: 24px !important; cursor: pointer; margin-right: 15px; padding: 5px !important; flex-shrink: 0; width: 40px; height: 40px; justify-content: center; position: relative; z-index: 1001; }
    .mobile-title { display: flex; align-items: center; justify-content: center; order: 2; width: 100%; flex-shrink: 1; flex-grow: 1; font-weight: normal; font-size: 18px; cursor: pointer; height: 100%; padding: 0 !important; margin: 0 !important; overflow: hidden; position: relative; z-index: 1001; } 
    .mobile-title img { width: auto !important; height: 38px !important; object-fit: contain !important; position: relative !important; margin: 0 auto !important; left: unset !important; transform: none !important; }
    .nav-right { order: 3; display: flex; align-items: center; padding-right: 5px !important; margin-right: 0 !important; flex-shrink: 0; width: auto !important; min-width: 60px; position: relative; z-index: 9999 !important; }
    .navbar { justify-content: space-between; display: flex; align-items: center; height: 70px; padding: 0 10px !important; margin: 0 !important; width: 100vw !important; box-sizing: border-box; position: fixed; top: 0; left: 0; z-index: 1000; overflow: hidden; }
    .material-image-bar img { max-height: 350px; }
}

body div:has(> .grid > .card > .thumb > .audio-icon[style*="border-radius:0"]) ~ .card-box,
body div:has(> .grid > .card > .thumb > .audio-icon[style*="border-radius:0"]) .card-box { padding: 6px 15px !important; margin-bottom: 15px !important; }
body div:has(> .grid > .card > .thumb > .audio-icon[style*="border-radius:0"]) .cat-parent { row-gap: 8px !important; margin-top: 8px !important; margin-bottom: 8px !important; padding-bottom: 8px !important; }
body div:has(> .grid > .card > .card-info > .download-app-btn) ~ .card-box,
body div:has(> .grid > .card > .card-info > .download-app-btn) .card-box { padding: 6px 15px !important; margin-bottom: 15px !important; }
body div:has(> .grid > .card > .card-info > .download-app-btn) .cat-parent { row-gap: 8px !important; margin-top: 8px !important; margin-bottom: 8px !important; padding-bottom: 8px !important; }

@media (max-width: 768px) {
  #itemModal .material-image-bar > div { max-height: 220px !important; overflow-y: auto !important; -webkit-overflow-scrolling: touch; }
}

.custom-alert-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0, 0, 0, 0.5); display: flex; align-items: center; justify-content: center; z-index: 99999; opacity: 0; visibility: hidden; transition: all 0.3s ease; }
.custom-alert-overlay.show { opacity: 1; visibility: visible; }
.custom-alert-box { background: #fff; border-radius: 12px; padding: 30px 40px; max-width: 90%; width: 400px; text-align: center; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15); transform: scale(0.8); transition: transform 0.3s ease; }
.custom-alert-overlay.show .custom-alert-box { transform: scale(1); }
.custom-alert-text { font-size: 16px; color: #333; margin-bottom: 25px; line-height: 1.5; }
.custom-alert-btn { padding: 10px 30px; background: #007bff; color: #fff; border: none; border-radius: 8px; font-size: 16px; cursor: pointer; transition: all 0.2s ease; }
.custom-alert-btn:hover { background: #0056b3; box-shadow: 0 4px 12px rgba(0,123,255,0.2); }

.custom-confirm-box { background: #fff; border-radius: 12px; padding: 30px 40px; max-width: 90%; width: 400px; text-align: center; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15); }
.custom-confirm-text { font-size: 16px; color: #333; margin-bottom: 25px; line-height: 1.5; }
.custom-confirm-btns { display: flex; gap: 15px; justify-content: center; }
.custom-confirm-btn { padding: 10px 25px; border-radius: 8px; font-size: 16px; cursor: pointer; transition: all 0.2s ease; border: none; }
.custom-confirm-cancel { background: #f5f7fa; color: #666; }
.custom-confirm-cancel:hover { background: #e9ecef; }
.custom-confirm-ok { background: #007bff; color: #fff; }
.custom-confirm-ok:hover { background: #0056b3; }

#global-loader { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: linear-gradient(135deg, #4776E6 0%, #8E54E9 100%); z-index: 9999999; display: flex; flex-direction: column; align-items: center; justify-content: center; transition: opacity 0.4s ease, visibility 0.4s ease; }
#global-loader.hidden { opacity: 0; visibility: hidden; }
.loader-spinner { width: 80px; height: 80px; border: 6px solid rgba(255, 255, 255, 0.2); border-top: 6px solid #ffffff; border-radius: 50%; animation: loader-spin 1s linear infinite; margin-bottom: 20px; box-shadow: 0 0 20px rgba(255, 255, 255, 0.25), inset 0 0 10px rgba(255, 255, 255, 0.1); transform-origin: center center; }
@keyframes loader-spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
.loader-text { color: #ffffff; font-size: 20px; letter-spacing: 2px; font-weight: bold; animation: text-pulse 1.5s ease-in-out infinite; text-shadow: none; margin-bottom: 25px; }
@keyframes text-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
.loader-progress-container { width: 200px; height: 8px; background-color: rgba(255, 255, 255, 0.2); border-radius: 4px; overflow: hidden; margin-bottom: 15px; }
.loader-progress-bar { width: 0%; height: 100%; background-color: #ffffff; border-radius: 4px; transition: width 0.3s ease; }
.loader-progress-text { color: #ffffff; font-size: 14px; letter-spacing: 1px; margin-top: 0; opacity: 1; line-height: 1.5; text-align: center; width: 200px; }

@media (min-width: 769px) {
    .pagination .total-count { display: inline-block !important; }
    .pagination .jump-page-container { display: flex !important; align-items: center; gap: 8px; }
}

@media (max-width: 768px) {
    .container { 
        padding: 20px 0 !important; 
        box-sizing: border-box !important; 
        width: 90% !important;
        max-width: 100% !important;
        margin: 10px auto !important;
    }
    .container h1 { 
        font-size: 20px !important; 
        margin: 15px 0 10px !important; 
        padding-bottom: 10px !important; 
        letter-spacing: 0.5px !important; 
        margin-top: -30px !important; 
    }
    .container img { 
        max-width: 100% !important; 
        width: 100% !important; 
        height: auto !important; 
    }
    .source-intro-box, .source-tutorial-box {
        width: 100% !important;
        padding: 10px !important;
        margin: 10px auto !important;
        box-sizing: border-box !important;
    }
    
    div[style*="background: #fff; padding: 25px; border-radius: 8px;"] {
        width: calc(100% + 40px) !important;
        margin-left: -20px !important;
        margin-right: -20px !important;
        padding: 15px !important;
        box-sizing: border-box !important;
        position: relative !important;
    }
    
    div[style*="background: #fff; padding: 25px; border-radius: 8px;"] img {
        max-width: 100% !important;
        width: 100% !important;
    }

    .download-btn {
        width: auto !important;
        padding: 10px 18px !important;
        font-size: 15px !important;
        border-radius: 6px !important;
        margin: 0 auto !important;
    }

}
.container a[onclick*="safeNav(event, '?mod=source', 'menu')"] { cursor: pointer; transition: all 0.2s ease; }
.container a[onclick*="safeNav(event, '?mod=source', 'menu')"]:hover { background-color: #007bff !important; color: #fff !important; text-decoration: none !important; }

.container .cat-parent,
.container .cat-child,
.container .grid {
    padding-left: 0;
    padding-right: 0;
    margin-left: 0;
    margin-right: 0;
    width: 100%;
    box-sizing: border-box;
}
@media (max-width: 768px) {
    .container .cat-parent,
    .container .cat-child,
    .container .grid {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}

#top-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: #1890ff;
    z-index: 99999999;
    transition: width 0.2s ease, opacity 0.4s ease;
    width: 0%;
    opacity: 0;
    pointer-events: none;
    box-shadow: 0 0 10px #1890ff, 0 0 5px #1890ff;
}

.nav-item a[onclick*="svip_item"] {
    color: red !important;
    font-weight: bold !important;
    display: inline-block !important;
    transition: transform 0.2s ease !important;
    transform-origin: center !important;
}
.nav-item a[onclick*="svip_item"]:hover {
    transform: scale(1.1) !important;
    color: #dc3545 !important;
}

a {
    text-decoration: none !important;
    cursor: pointer !important;
    outline: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

.nav-link, .cat-link, .page-link, .nav-logo, .home-link {
    pointer-events: auto !important;
    user-select: none !important;
}

.nav-logo {
    display: inline-block;
    text-decoration: none !important;
    outline: none !important;
    -webkit-tap-highlight-color: transparent !important;
    user-select: none !important;
    pointer-events: auto;
}

@media (max-width: 767px) {
    .nav-logo {
        display: none !important;
        visibility: hidden !important;
        width: 0 !important;
        height: 0 !important;
        opacity: 0 !important;
    }
}

body {
    pointer-events: auto;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
}

*:focus {
    outline: none !important;
    box-shadow: none !important;
}

a::after, .nav-logo::after, .home-link::after {
    display: none !important;
    content: "" !important;
}

@media (min-width: 769px) {
  .tag-new {
    position: absolute !important;
    top: 0.4vw !important;
    right: 0.4vw !important;
  }
  .tag-collect {
    position: absolute !important;
    top: 0.4vw !important;
    right: calc(0.4vw + 1.9vw) !important;
  }
}

.image-preview-overlay,
.lightbox,
.modal-backdrop,
div:has(> img[style*="position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%)"]),
body > div:nth-last-child(1):has(img[style*="transform: translate(-50%, -50%)"]) {
    background-color: rgba(0, 0, 0, 0.3) !important;
    background: rgba(0, 0, 0, 0.3) !important;
    backdrop-filter: none !important;
    filter: none !important;
}

img[style*="position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%)"] {
    border-radius: 0 !important;
    transition: none !important;
    touch-action: none !important;
    filter: none !important;
}

@media (min-width: 769px) {
    img[style*="position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%)"] {
        max-width: none !important;
        max-height: 90vh !important;
        width: auto !important;
        height: 90vh !important;
        object-fit: contain !important;
    }
}

@media (max-width: 768px) {
    img[style*="position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%)"] {
        max-height: none !important;
        max-width: 100vw !important;
        width: 100vw !important;
        height: auto !important;
        object-fit: contain !important;
        margin: 0 !important;
        padding: 0 !important;
    }
}

body > div[style*="position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 99999"] {
    background-color: rgba(0, 0, 0, 0.2) !important;
    padding: 0 !important;
    margin: 0 !important;
    backdrop-filter: none !important;
    filter: none !important;
}

body:has(.image-preview-overlay),
body:has(.lightbox),
body:has(div[style*="position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 99999"]) {
    filter: none !important;
    backdrop-filter: none !important;
}

@media (min-width: 769px) {
  .card {
    background: #ffffff !important;
    border-radius: 12px !important;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06) !important;
    overflow: hidden !important;
  }
  .card:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08) !important;
  }
  .card .thumb {
    padding-bottom: 56.25% !important;
  }
}

div[style*="position: fixed; top: 0px; left: 0px; width: 100vw; height: 100vh; background: rgba(0, 0, 0, 0.9); z-index: 9999; display: flex; align-items: center; justify-content: center; cursor: zoom-out; touch-action: none;"] {
    background: rgba(0, 0, 0, 0.3) !important;
}

#rightArrow,
div[style*="position: absolute; top: 50%; right: 20px; transform: translateY(-50%); z-index: 10;"] button {
    width: 65px !important;
    height: 65px !important;
    border-radius: 50% !important;
    background: rgba(0, 0, 0, 0.5) !important;
    color: #fff !important;
    border: 2px solid rgba(255, 255, 255, 0.8) !important;
    font-size: 24px !important;
    cursor: pointer !important;
    opacity: 1 !important;
    transition: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

#rightArrow:hover,
div[style*="position: absolute; top: 50%; right: 20px; transform: translateY(-50%); z-index: 10;"] button:hover {
    background: rgba(0, 0, 0, 0.5) !important;
    transform: none !important; 
    border-color: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

#leftArrow,
div[style*="position: absolute; top: 50%; left: 20px; transform: translateY(-50%); z-index: 10;"] button {
    width: 65px !important;
    height: 65px !important;
    border-radius: 50% !important;
    background: rgba(0, 0, 0, 0.5) !important;
    color: #fff !important;
    border: 2px solid rgba(255, 255, 255, 0.8) !important;
    font-size: 24px !important;
    cursor: pointer !important;
    opacity: 1 !important;
    transition: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

#leftArrow:hover,
div[style*="position: absolute; top: 50%; left: 20px; transform: translateY(-50%); z-index: 10;"] button:hover {
    background: rgba(0, 0, 0, 0.5) !important;
    transform: none !important;
    border-color: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

@media (max-width: 768px) {
    #rightArrow, #leftArrow,
    div[style*="position: absolute; top: 50%; right: 20px;"] button,
    div[style*="position: absolute; top: 50%; left: 20px;"] button {
        width: 55px !important;
        height: 55px !important;
        font-size: 20px !important;
        background: rgba(0, 0, 0, 0.5) !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        z-index: 99999 !important;
    }
}

.modal {
  padding: 5px !important;
}
#itemModal .modal-box {
  margin: 0 !important;
  padding: 8px 15px !important;
}

@media (min-width: 769px) {
  #itemModal .modal-box {
    padding: 5px 15px !important;
  }
}

.download-btn {
    box-shadow: none !important;
    background: #1677FF !important;
    color: #ffffff !important;
}
.download-btn:hover {
    box-shadow: none !important;
    background: #0E66E6 !important;
    transform: translateY(-2px);
}

@media (min-width: 769px) {
    .download-btn {
        box-shadow: none !important;
        background: #1677FF !important;
    }
    .download-btn:hover {
        box-shadow: none !important;
        background: #0E66E6 !important;
    }
}

@media (max-width: 768px) {
    .download-btn {
        box-shadow: none !important;
        background: #1677FF !important;
    }
    .download-btn:hover {
        box-shadow: none !important;
        background: #0E66E6 !important;
    }
}

.card-title {
    max-width: calc(100% - 60px) !important;
    width: 100% !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: inline-block !important;
    vertical-align: middle !important;
}

.preview-btn {
    width: 50px !important;
    min-width: 50px !important;
    display: inline-block !important;
    vertical-align: middle !important;
    margin-left: 10px !important;
    flex-shrink: 0 !important;
}

.card-footer {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0 10px !important;
}

@media (max-width: 768px) {
    .card-title {
        max-width: calc(100% - 50px) !important;
        font-size: 13px !important;
    }
    .preview-btn {
        width: 40px !important;
        min-width: 40px !important;
    }
}

.card-title * {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

@media (min-width: 769px) {
  .card-title {
    font-size: 0.7vw !important;
  }
}
@media (min-width: 2560px) {
  .card-title {
    font-size: 0.8vw !important;
  }
}
@media (min-width: 3840px) {
  .card-title {
    font-size: 0.9vw !important;
  }
}

@media (min-width: 769px) {
    .website-go-btn {
        font-size: 0.6vw !important;
        padding: 0.25vw 0.6vw !important;
        border-radius: 0.2vw !important;
        margin-right: 0.3vw !important;
        margin-left: 0.3vw !important;
    }
    
    .audio-download-btn {
        font-size: 0.6vw !important;
        padding: 0.25vw 0.6vw !important;
        border-radius: 0.2vw !important;
    }
    
    @media (min-width: 2560px) {
        .website-go-btn, .audio-download-btn {
            font-size: 0.7vw !important;
            padding: 0.3vw 0.7vw !important;
        }
    }
    @media (min-width: 3840px) {
        .website-go-btn, .audio-download-btn {
            font-size: 0.8vw !important;
            padding: 0.35vw 0.8vw !important;
        }
    }
}

@media (max-width: 768px) {
    .website-go-btn {
        font-size: 13px !important;
        padding: 4px 10px !important;
        border-radius: 4px !important;
        margin-left: 10px !important;
        margin-right: 8px !important;
    }
    .audio-download-btn {
        font-size: 13px !important;
        padding: 4px 10px !important;
        border-radius: 4px !important;
    }
}

@media (min-width: 769px) {
    .download-app-btn {
        padding: 0.3vw 0.8vw !important;
        border-radius: 0.4vw !important;
        font-size: 0.7vw !important;
        white-space: nowrap !important;
    }
    
    @media (min-width: 2560px) {
        .download-app-btn {
            padding: 0.4vw 0.9vw !important;
            font-size: 0.8vw !important;
            border-radius: 0.5vw !important;
        }
    }
    @media (min-width: 3840px) {
        .download-app-btn {
            padding: 0.5vw 1.0vw !important;
            font-size: 0.9vw !important;
            border-radius: 0.6vw !important;
        }
    }
}

@media (max-width: 768px) {
    .download-app-btn {
        padding: 6px 14px !important;
        border-radius: 6px !important;
        font-size: 13px !important;
    }
}

@media (min-width: 769px) {
    .container .cat-child {
        margin-top: 25px !important;
        margin-bottom: 25px !important;
    }
}

@media (min-width: 769px) {
    .cat-parent {
        position: relative;
        padding-bottom: 1px;
        margin-bottom: 10px;
    }
    
    .cat-parent::before {
        content: "";
        display: block;
        position: absolute;
        left: 0;
        bottom: 0;
        width: 100%;
        height: 1px;
        background-color: #e0e0e0;
        border-radius: 0;
        z-index: 1;
    }
    
    .cat-p-item.active {
        border-bottom: 2px solid var(--primary);
        position: relative;
        z-index: 2;
        padding-bottom: 8px;
    }
}

@media (max-width: 768px) {
    .cat-parent::before {
        display: none !important;
    }
}

@media (min-width: 769px) {
  .notice-bar {
    margin-bottom: 15px !important;
  }
  .cat-parent {
    margin-top: 15px !important;
  }
}