/* PoE 2 League CN - FastAdmin版本样式 */

/* 最高优先级强制覆盖 */
.container-fluid {
    max-width: 1600px !important;
    width: 100% !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
}

.poe-catalogue {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)) !important;
    gap: 12px !important;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 移除body样式，使用原始CSS文件中的样式 */

/* Language Switcher Styles */
.language-switcher {
    display: flex;
    gap: 5px;
    align-items: center;
}

.lang-btn {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid #555;
    color: #c6c6c6;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.lang-btn:hover,
.lang-btn.active {
    background: rgba(255, 255, 255, 0.1);
    border-color: #777;
    color: #ffffff;
}

.lang-btn.active {
    background: rgba(255, 215, 0, 0.2);
    border-color: rgba(255, 215, 0, 0.5);
    color: #FFD700;
}

/* Category and Subcategory Icon Styles */
.category-icon {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    object-fit: contain;
    vertical-align: middle;
}

.subcategory-icon {
    width: 16px;
    height: 16px;
    margin-right: 8px;
    object-fit: contain;
    vertical-align: middle;
}

.filter-icon {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    object-fit: contain;
    vertical-align: middle;
    flex-shrink: 0;
}

/* Category Link Styles */
.category-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
}

.subcategory-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
}

/* Search Section Styles */
.search-section {
    margin-bottom: 30px;
}

.search-title {
    color: #ffffff;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.category-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.category-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #c6c6c6;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
    text-decoration: none;
}

.category-button:hover,
.category-button.active {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.3);
    text-decoration: none;
}

.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Styles */
.header {
    background: rgba(0, 0, 0, 0.8);
    border-bottom: 2px solid #444;
    padding: 10px 0;
    position: relative;
    z-index: 1000;
}

.header__container {
    max-width: 1600px !important; /* 强制覆盖原始CSS */
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px !important; /* 强制覆盖原始CSS */
}

.header__logo-img {
    height: 60px;
    width: auto;
}

.custom-header-links {
    display: flex;
    gap: 20px;
}

.header-link {
    color: #c6c6c6;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    transition: all 0.3s;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.header-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

/* 强制覆盖原始CSS的限制性设置 */
.container-fluid {
    max-width: 1600px !important; /* 覆盖原始的1200px限制 */
    padding: 10px !important; /* 减少边距 */
    width: 100% !important;
}

/* 覆盖Bootstrap网格系统 */
.row {
    display: flex !important;
    gap: 15px !important;
    margin: 0 !important;
    max-width: none !important;
}

/* 重新定义侧边栏宽度 */
.col-md-3 {
    flex: 0 0 180px !important; /* 固定宽度而不是百分比 */
    max-width: 180px !important;
    padding: 0 !important;
}

/* 重新定义主内容区域 */
.col-md-9 {
    flex: 1 !important; /* 占用剩余空间 */
    max-width: none !important;
    padding: 0 !important;
}

/* Main Container */
.main-container {
    flex: 1;
    display: flex;
    max-width: 1600px !important; /* 强制覆盖原始CSS */
    margin: 0 auto;
    padding: 15px !important; /* 强制覆盖原始CSS */
    gap: 20px !important; /* 强制覆盖原始CSS */
}

/* Sidebar Styles */
.sidebar {
    width: 200px; /* 进一步缩窄侧边栏 */
    flex-shrink: 0;
}

.sidebar-content {
    background: rgba(0, 0, 0, 0.8);
    border-radius: 8px;
    padding: 16px; /* 减少内边距 */
    border: 1px solid #444;
}

.sidebar-title {
    color: #ffffff;
    font-size: 1.2em;
    margin-bottom: 15px;
    text-align: center;
    border-bottom: 1px solid #444;
    padding-bottom: 10px;
}

.category-list {
    list-style: none;
}

.category-item {
    margin-bottom: 5px;
}

.category-link {
    display: flex;
    align-items: center;
    padding: 10px;
    color: #c6c6c6;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s;
    position: relative;
}

.category-link:hover,
.category-item.active > .category-link {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.category-icon {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    object-fit: contain;
}

.category-name {
    flex: 1;
    font-size: 14px;
}

.category-arrow {
    font-size: 12px;
    transition: transform 0.3s;
}

.category-item.active .category-arrow {
    transform: rotate(180deg);
}

/* Subcategory Styles */
.subcategory-list {
    list-style: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    margin-left: 20px;
}

.subcategory-list.show {
    max-height: 500px;
}

.subcategory-item {
    margin-bottom: 2px;
}

.subcategory-link {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    color: #aaa;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s;
    font-size: 13px;
}

.subcategory-link:hover,
.subcategory-item.active .subcategory-link {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
}

.subcategory-icon {
    width: 16px;
    height: 16px;
    margin-right: 8px;
    object-fit: contain;
}

/* Content Area */
.content-area {
    flex: 1;
    background: rgba(0, 0, 0, 0.85);
    border-radius: 8px;
    padding: 30px;
    min-height: 600px;
}

/* Page Header */
.page-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #444;
}

.page-header__title {
    font-size: 2.5em;
    color: #ffffff;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.page-header__subtitle {
    font-size: 1.2em;
    color: #c6c6c6;
    margin: 0;
}

/* Filter Section */
.filter-section {
    margin-bottom: 30px;
}

.filter-section h3 {
    color: #ffffff;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-tag {
    display: flex;
    align-items: center;
    padding: 8px 15px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid #555;
    border-radius: 20px;
    color: #c6c6c6;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
}

.filter-tag:hover,
.filter-tag.active {
    background: rgba(255, 255, 255, 0.1);
    border-color: #777;
    color: #ffffff;
}

.filter-icon {
    width: 16px;
    height: 16px;
    margin-right: 6px;
    object-fit: contain;
}

/* Product Catalogue - 强制覆盖原始CSS */
.poe-catalogue {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)) !important; /* 进一步减少最小宽度 */
    gap: 15px !important; /* 减少间距以节省空间 */
    margin-top: 20px !important;
    width: 100% !important;
}

.poe-catalogue .row {
    background: 
        linear-gradient(135deg, rgba(20, 20, 20, 0.95), rgba(40, 40, 40, 0.95)),
        radial-gradient(circle at 20% 20%, rgba(255, 215, 0, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 215, 0, 0.03) 0%, transparent 50%);
    border: 2px solid #444;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s;
    position: relative;
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.poe-catalogue .row::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: 
        linear-gradient(45deg, 
            rgba(255, 215, 0, 0.2) 0%, 
            rgba(255, 215, 0, 0.1) 25%, 
            rgba(100, 100, 100, 0.3) 50%, 
            rgba(255, 215, 0, 0.1) 75%, 
            rgba(255, 215, 0, 0.2) 100%
        );
    border-radius: 12px;
    z-index: -1;
    opacity: 0.8;
}

.poe-catalogue .row:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.1);
    border-color: #666;
}

.row-content {
    display: flex;
    gap: 25px;
    align-items: flex-start;
    width: 100%;
}

.row-content .left {
    flex-shrink: 0;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 10px;
    border: 1px solid #555;
}

.row-content .left img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    display: block;
}

.row-content .right {
    flex: 1;
}

/* Item Name with Three-part Background */
.itemName2 {
    background:
        url('https://web.poecdn.com/protected/image/item/popup2/header-double-rare-left.png?v=1739989653373&key=GlFK9dDlo33Cw3Ak7P5MnA') top left / 46px auto no-repeat,
        url('https://web.poecdn.com/protected/image/item/popup2/header-double-rare-right.png?v=1739989653373&key=rXqdxbUkuIkWyVJPJVY9cQ') top right / calc(46px - 1px) auto no-repeat,
        url('https://web.poecdn.com/protected/image/item/popup2/header-double-rare-middle.png?v=1739989653373&key=yJGcA667EzDzrPzd1_9-vg') top center / 46px auto repeat-x;
    background-color: rgba(40, 40, 40, 0.9);
    border: 1px solid rgba(255, 215, 0, 0.3);
    text-align: center;
    background-size: auto 100%;
    height: 58px !important;
    padding-top: 6px !important;
    font-size: 16px;
    font-weight: bold;
    color: #FFD700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    margin: 10px 0;
    line-height: 1.2;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Item Details */
.item-details {
    margin: 15px 0;
    font-size: 14px;
    line-height: 1.4;
    color: #ccc;
}

.item-price {
    margin: 15px 0;
}

.textCurrency {
    margin-bottom: 8px;
    font-size: 14px;
}

.textCurrency:first-child {
    background: rgba(255, 255, 255, 0.05);
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #FFD700;
    font-weight: bold;
}

.textCurrency:nth-child(2) {
    color: #aaa;
    font-size: 13px;
}

/* Item Actions */
.item-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-copy {
    background: #4CAF50;
    color: white;
}

.btn-copy:hover {
    background: #45a049;
}

.btn-whisper {
    background: #2196F3;
    color: white;
}

.btn-whisper:hover {
    background: #1976D2;
}

/* Loading Indicator */
.loading-indicator {
    text-align: center;
    padding: 40px;
    color: #ccc;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #333;
    border-top: 4px solid #FFD700;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Pagination */
.pagination-wrapper {
    margin-top: 30px;
    text-align: center;
}

.pagination {
    display: inline-flex;
    gap: 5px;
}

.pagination a,
.pagination span {
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid #555;
    color: #c6c6c6;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s;
}

.pagination a:hover,
.pagination .current {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

/* Product Detail Page Styles */
.breadcrumb {
    margin-bottom: 20px;
    padding: 10px 0;
    border-bottom: 1px solid #444;
}

.breadcrumb a {
    color: #c6c6c6;
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumb a:hover {
    color: #ffffff;
}

.breadcrumb .separator {
    margin: 0 10px;
    color: #666;
}

.breadcrumb .current {
    color: #FFD700;
    font-weight: bold;
}

.product-detail-card {
    background: rgba(0, 0, 0, 0.8);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    border: 2px solid #444;
}

.product-detail-content {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.product-image-section {
    flex-shrink: 0;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #555;
}

.product-detail-image {
    width: 120px;
    height: 120px;
    object-fit: contain;
    display: block;
}

.product-info-section {
    flex: 1;
}

.product-category {
    margin: 15px 0;
}

.category-badge {
    display: inline-block;
    background: rgba(255, 215, 0, 0.2);
    color: #FFD700;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    margin-right: 8px;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.category-badge.secondary {
    background: rgba(136, 136, 255, 0.2);
    color: #8888FF;
    border-color: rgba(136, 136, 255, 0.3);
}

.product-details {
    margin: 20px 0;
}

.product-details h3 {
    color: #ffffff;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.detail-content {
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #555;
    line-height: 1.6;
    color: #ccc;
}

.product-price-section {
    display: flex;
    gap: 30px;
    margin: 20px 0;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.price-info, .owner-info {
    flex: 1;
}

.price-label, .owner-label {
    font-size: 12px;
    color: #aaa;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.price-value {
    font-size: 18px;
    color: #FFD700;
    font-weight: bold;
}

.owner-value {
    font-size: 16px;
    color: #ffffff;
}

.product-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.btn-large {
    padding: 12px 24px;
    font-size: 14px;
    flex: 1;
}

.btn-bookmark {
    background: #FF9800;
    color: white;
}

.btn-bookmark:hover {
    background: #F57C00;
}

.btn-bookmark.bookmarked {
    background: #4CAF50;
}

/* Multi-language Details */
.multilang-details {
    background: rgba(0, 0, 0, 0.8);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    border: 2px solid #444;
}

.lang-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 20px;
    border-bottom: 1px solid #444;
}

.lang-tab {
    padding: 10px 20px;
    background: transparent;
    border: none;
    color: #c6c6c6;
    cursor: pointer;
    border-radius: 6px 6px 0 0;
    transition: all 0.3s;
}

.lang-tab:hover,
.lang-tab.active {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.lang-panel {
    display: none;
}

.lang-panel.active {
    display: block;
}

.lang-panel h4 {
    color: #ffffff;
    margin-bottom: 15px;
}

.detail-text {
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #555;
    line-height: 1.6;
    color: #ccc;
}

/* Related Products */
.related-products {
    background: rgba(0, 0, 0, 0.8);
    border-radius: 12px;
    padding: 20px;
    border: 2px solid #444;
}

.related-products h3 {
    color: #ffffff;
    margin-bottom: 20px;
    text-align: center;
}

.related-placeholder {
    text-align: center;
    padding: 40px;
    color: #aaa;
}

/* 左侧菜单折叠功能样式 */
.menu-item-has-children > a {
    position: relative;
    cursor: pointer;
}

.menu-item-has-children > a::after {
    content: '▼';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    transition: transform 0.3s ease;
    color: #999;
}

.menu-item-has-children[aria-expanded="false"] > a::after {
    transform: translateY(-50%) rotate(-90deg);
}

.menu-item-has-children[aria-expanded="true"] > a::after {
    transform: translateY(-50%) rotate(0deg);
    color: #fff;
}

.sub-menu {
    list-style: none;
    padding-left: 20px;
    margin-top: 5px;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    max-height: 1000px;
    opacity: 1;
}

/* 注释掉收起子菜单的样式，保持所有二级分类默认展开 */
/* .menu-item-has-children[aria-expanded="false"] .sub-menu {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
} */

.sub-menu .menu-item a {
    padding: 8px 15px;
    font-size: 13px;
    color: #999;
    display: block;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.sub-menu .menu-item a:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.1);
}

.sub-menu .menu-item.current-menu-item a {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.15);
}

/* 移动端强制修复 - 全局置顶搜索区域 */
@media (max-width: 768px) {
    .mobile-search-section {
        display: block !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 9999 !important;
        background: rgba(26, 26, 26, 0.98) !important;
        backdrop-filter: blur(10px) !important;
        border-bottom: 2px solid #444 !important;
        padding: 12px !important;
        box-shadow: 0 2px 10px rgba(0,0,0,0.5) !important;
    }

 /*    .page-wrapper {
        padding-top: 80px !important;
    }
 */
    .container-fluid {
        margin-top: 0 !important;
    }

    .search-section {
        display: none !important;
    }
}

/* 价格显示样式 */
.textCurrency {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
    font-size: 14px;
    color: #c6c6c6;
}

.fee-text {
    color: #ffffff;
    font-weight: bold;
}

.fee-space {
    width: 4px;
}

.divine-number {
    color: #FFD700;
    font-weight: bold;
    font-size: 15px;
}

.divine-x {
    color: #c6c6c6;
    margin: 0 2px;
}

.divine-wrapper {
    display: inline-flex;
    align-items: center;
    margin-left: 2px;
}

.divine-icon {
    width: 16px;
    height: 16px;
    vertical-align: middle;
    object-fit: contain;
}

.mirror-text {
    color: #c6c6c6;
    margin-left: 4px;
}

.mirror-number {
    color: #FFD700;
    font-weight: bold;
}

.mirror-x {
    color: #c6c6c6;
    margin: 0 2px;
}

.mirror-wrapper {
    display: inline-flex;
    align-items: center;
    margin-left: 2px;
}

.mirror-icon {
    width: 16px;
    height: 16px;
    vertical-align: middle;
    object-fit: contain;
}

/* Responsive Design */
/* 大屏幕优化 */
@media (min-width: 1920px) {
    .container-fluid {
        max-width: 1800px !important;
        padding: 5px !important;
    }

    .poe-catalogue {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
        gap: 10px !important;
    }
}

@media (min-width: 1600px) {
    .container-fluid {
        max-width: 1600px !important;
        padding: 8px !important;
    }

    .poe-catalogue {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)) !important;
        gap: 12px !important;
    }
}

@media (max-width: 1024px) {
    .main-container {
        max-width: 100%;
        padding: 12px;
    }

    .poe-catalogue {
        grid-template-columns: 1fr; /* 在中等屏幕上显示单列 */
        gap: 18px;
    }
}

@media (max-width: 768px) {
    .main-container {
        flex-direction: column;
        gap: 15px;
        padding: 10px;
    }

    .sidebar {
        width: 100%;
    }

    .poe-catalogue {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .category-buttons {
        justify-content: center;
    }

    .category-button {
        font-size: 13px;
        padding: 6px 10px;
    }

    .filter-icon {
        width: 16px;
        height: 16px;
    }
}
