/* PoE 2 League CN - Main Styles */

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

body {
    font-family: 'Fontin SmallCaps', Arial, sans-serif;
    background: #1a1a1a;
    color: #c6c6c6;
    line-height: 1.6;
    min-height: 100vh;
}

.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: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

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

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

.custom-header-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #c6c6c6;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.custom-header-link:hover {
    background-color: rgba(255, 194, 73, 0.1);
}

.custom-icon {
    width: 24px;
    height: 24px;
}

/* Container and Layout */
.container-fluid {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.row {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

/* Sidebar Styles */
.sidebar {
    width: 250px;
    background: rgba(0, 0, 0, 0.9);
    border-radius: 8px;
    padding: 20px;
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.sidebar__main-navigation {
    width: 100%;
}

.main-navigation {
    list-style: none;
    padding: 0;
    margin: 0;
}

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

.menu-item a {
    display: block;
    color: #c6c6c6;
    text-decoration: none;
    padding: 10px 15px;
    border-radius: 4px;
    transition: all 0.3s;
    font-size: 14px;
}

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

.menu-item-has-children > a::after {
    content: ' ▼';
    float: right;
    font-size: 10px;
}

.sub-menu {
    list-style: none;
    padding-left: 20px;
    margin-top: 5px;
}

.sub-menu .menu-item a {
    padding: 8px 15px;
    font-size: 13px;
    color: #999;
}

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

/* Main Content */
.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;
}

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

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

.item-type-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.item-type-tag {
    display: 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;
}

.item-type-tag:hover,
.item-type-tag.active {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.3);
}

.item-type-tag img {
    width: 20px;
    height: 20px;
}

/* Search Filters */
.search-filters {
    margin-top: 20px;
}

.search-filters h4 {
    color: #ffffff;
    margin-bottom: 15px;
}

.search-inputs {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.search-input-group {
    flex: 1;
    min-width: 250px;
}

.search-input-group label {
    display: block;
    margin-bottom: 5px;
    color: #c6c6c6;
    font-size: 14px;
}

.search-input {
    width: 100%;
    padding: 10px;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid #555;
    border-radius: 4px;
    color: #c6c6c6;
    font-size: 14px;
}

.search-input:focus {
    outline: none;
    border-color: #666;
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.2);
}

/* Product Catalogue */
.poe-catalogue {
    margin-top: 30px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
}

.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;
    margin-bottom: 0;
    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 Details */
.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;
}

/* Different item name backgrounds and colors based on rarity */

/* Rare items (yellow) - default */
.itemName2 {
    color: #FFFF77;
}

/* Unique items (brown/orange) */
.itemName2.unique,
.itemName2[data-rarity="unique"] {
    color: #AF6025;
    background:
        url(https://web.poecdn.com/protected/image/item/popup2/header-double-unique-left.png) top left / 46px auto no-repeat,
        url(https://web.poecdn.com/protected/image/item/popup2/header-double-unique-right.png) top right / calc(46px - 1px) auto no-repeat,
        url(https://web.poecdn.com/protected/image/item/popup2/header-double-unique-middle.png) top center / 46px auto repeat-x;
}

/* Magic items (blue) */
.itemName2.magic,
.itemName2[data-rarity="magic"] {
    color: #8888FF;
    background:
        url(https://web.poecdn.com/protected/image/item/popup2/header-double-magic-left.png) top left / 46px auto no-repeat,
        url(https://web.poecdn.com/protected/image/item/popup2/header-double-magic-right.png) top right / calc(46px - 1px) auto no-repeat,
        url(https://web.poecdn.com/protected/image/item/popup2/header-double-magic-middle.png) top center / 46px auto repeat-x;
}

/* Normal items (white) */
.itemName2.normal,
.itemName2[data-rarity="normal"] {
    color: #C8C8C8;
    background:
        url(https://web.poecdn.com/protected/image/item/popup2/header-double-normal-left.png) top left / 46px auto no-repeat,
        url(https://web.poecdn.com/protected/image/item/popup2/header-double-normal-right.png) top right / calc(46px - 1px) auto no-repeat,
        url(https://web.poecdn.com/protected/image/item/popup2/header-double-normal-middle.png) top center / 46px auto repeat-x;
}

.lc {
    margin-bottom: 4px;
    font-size: 14px;
    line-height: 1.4;
}

/* Item Type and Base Stats */
.lc:first-of-type {
    color: #888;
    text-align: center;
    font-size: 13px;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Quality, Energy Shield, Item Level */
.lc:nth-of-type(2),
.lc:nth-of-type(3),
.lc:nth-of-type(4) {
    color: #ccc;
    font-size: 13px;
}

/* Requirements */
.lc:nth-of-type(5) {
    color: #ccc;
    margin-bottom: 8px;
}

.coloraugmented {
    color: #8888ff;
}

.colorWhite {
    color: #ffffff;
}

.separator {
    height: 1px;
    background: linear-gradient(90deg, transparent, #666, transparent);
    margin: 12px 0;
    border: none;
}

.fracturedMod {
    color: #aa9e82;
    font-style: italic;
    margin-bottom: 4px;
    font-size: 13px;
}

.explicitMod {
    color: #8888ff;
    margin-bottom: 4px;
    font-size: 13px;
}

.implicitMod {
    color: #8888ff;
    margin-bottom: 4px;
    font-size: 13px;
}

/* Special mod colors */
.lc[style*="color: rgb(136, 136, 255)"] {
    color: #8888ff !important;
}

.lc[style*="color: rgb(255, 255, 255)"] {
    color: #ffffff !important;
}

.lc[style*="color: rgb(170, 158, 130)"] {
    color: #aa9e82 !important;
}

/* Whisper Section */
.whisper {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #666;
    text-align: center;
}

.textCurrency {
    margin-bottom: 12px;
    font-size: 15px;
    color: #FFD700;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.fee-text, .mirror-text {
    color: #c6c6c6;
}

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

.divine-icon, .mirror-icon {
    width: 18px;
    height: 18px;
    vertical-align: middle;
    margin: 0 3px;
}

/* Owner info */
.whisper > div:last-of-type {
    color: #aaa;
    font-size: 13px;
    margin-bottom: 15px;
}

.pobtext {
    display: none;
}

.item-whisper {
    background: linear-gradient(135deg, #DAA520, #FFD700);
    color: #1a1a1a;
    border: 1px solid #B8860B;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    margin: 0 5px;
    margin-top: 8px;
    font-size: 13px;
    font-weight: bold;
    transition: all 0.3s;
    text-shadow: none;
    display: inline-block;
}

.item-whisper:hover {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 194, 73, 0.4);
}

/* Footer */
.footer {
    background: rgba(0, 0, 0, 0.9);
    border-top: 2px solid #444;
    padding: 20px 0;
    text-align: center;
    margin-top: auto;
}

/* Responsive Design */
@media (max-width: 768px) {
    .row {
        flex-direction: column;
    }

    .poe-catalogue {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .sidebar {
        width: 100%;
        position: static;
        margin-bottom: 20px;
    }
    
    .search-inputs {
        flex-direction: column;
    }
    
    .item-type-tags {
        justify-content: center;
    }
    
    .header__container {
        flex-direction: column;
        gap: 15px;
    }
    
    .custom-header-links {
        justify-content: center;
    }
}

/* Scrollbar Styling */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}

.sidebar::-webkit-scrollbar-thumb {
    background: #666;
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: #888;
}

/* Additional Item Styling */
.poe-catalogue .row .right {
    position: relative;
}

/* Item rarity colors */
.itemName2.rare {
    color: #FFFF77;
}

.itemName2.unique {
    color: #AF6025;
}

.itemName2.magic {
    color: #8888FF;
}

.itemName2.normal {
    color: #C8C8C8;
}

/* Mod value highlighting */
.lc strong,
.lc b {
    color: #FFD700;
    font-weight: bold;
}

/* Numeric values in mods */
.lc .value {
    color: #FFD700;
    font-weight: bold;
}

/* Item level and requirements styling */
.lc:contains("物品等级"),
.lc:contains("需求等级"),
.lc:contains("品质"),
.lc:contains("能量护盾") {
    color: #ccc;
    font-size: 13px;
}

/* Special background for item cards */
.poe-catalogue .row {
    background-image:
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.02) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.02) 0%, transparent 50%);
}

/* Enhance the subtle border effect */
.poe-catalogue .row::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    right: 4px;
    bottom: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    pointer-events: none;
}

/* Price section enhancement */
.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);
    margin-bottom: 8px;
}

/* Owner section enhancement */
.textCurrency:nth-child(2) {
    color: #aaa;
    font-size: 13px;
    font-weight: normal;
    margin-bottom: 15px;
}

/* Fix for nested whisper input */
.whisper input[type="text"].whisper {
    display: none;
}

/* Mod text improvements */
.lc span[style*="color:#b4b4ff"] {
    color: #8888ff !important;
    font-style: italic;
}

/* Requirements line styling */
.lc .s {
    color: #ccc;
}

.lc .colorWhite {
    color: #fff !important;
    font-weight: bold;
}
