/* Wiki Styles */

.wiki-container {
    max-width: 100%;
    margin: -10rem auto 0 auto;
    padding: 0 2rem 2rem 2rem;
}

.wiki-section {
    background: rgba(10, 15, 25, 0.7);
    border: 2px solid rgba(120, 150, 180, 0.3);
    border-radius: 12px;
    padding: 2.5rem;
    backdrop-filter: blur(10px);
    margin-bottom: 2rem;
}

/* Wiki Categories */
.wiki-categories {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

.wiki-category {
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(120, 150, 180, 0.3);
    border-radius: 10px;
    padding: 2.5rem;
    text-align: center;
    transition: all 0.3s ease;
    height: fit-content;
}

.wiki-category:hover {
    border-color: #7896b4;
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(120, 150, 180, 0.3);
    background: rgba(0, 0, 0, 0.6);
}

.category-icon {
    font-size: 3rem;
    color: #FFD700;
    margin-bottom: 1rem;
}

.wiki-category h3 {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    color: #ffffff;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.wiki-category p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.category-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.wiki-link {
    background: rgba(120, 150, 180, 0.1);
    border: 1px solid rgba(120, 150, 180, 0.3);
    color: #7896b4;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.wiki-link:hover {
    background: rgba(120, 150, 180, 0.2);
    border-color: #7896b4;
    color: #ffffff;
    transform: translateY(-2px);
}

/* Navigation Tabs */
.wiki-navigation {
    margin-bottom: 2rem;
}

.nav-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(10, 15, 25, 0.7);
    border: 2px solid rgba(120, 150, 180, 0.3);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.nav-tab {
    background: rgba(120, 150, 180, 0.1);
    border: 1px solid rgba(120, 150, 180, 0.3);
    color: #7896b4;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.nav-tab:hover {
    background: rgba(120, 150, 180, 0.2);
    border-color: #7896b4;
    color: #ffffff;
}

.nav-tab.active {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    border-color: #FFD700;
    color: #000000;
    font-weight: 600;
}

/* Items Grid */
.items-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 1rem;
}

@media (max-width: 1800px) {
    .items-grid {
        grid-template-columns: repeat(8, 1fr);
    }
}

@media (max-width: 1400px) {
    .items-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

@media (max-width: 1100px) {
    .items-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 900px) {
    .items-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .items-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    .items-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.item-card {
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(120, 150, 180, 0.3);
    border-radius: 8px;
    padding: 0.75rem;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
    min-height: 200px;
    position: relative;
}

/* Item Visibility Toggle Button */
.item-visibility-toggle {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 24px;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid rgba(120, 150, 180, 0.7);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    padding: 0;
}

.item-visibility-toggle:hover {
    background: rgba(120, 150, 180, 0.8);
    border-color: rgba(120, 150, 180, 1);
    transform: translateX(-50%) scale(1.15);
}

.item-visibility-toggle i {
    color: rgba(120, 150, 180, 0.7);
    font-size: 0.75rem;
}

.item-visibility-toggle:hover i {
    color: #ffffff;
}

.item-card:hover {
    border-color: #7896b4;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(120, 150, 180, 0.2);
    background: rgba(0, 0, 0, 0.6);
}

.item-card.highlighted {
    border: 2px solid #4a90e2;
    background: rgba(74, 144, 226, 0.2);
    box-shadow: 0 0 20px rgba(74, 144, 226, 0.4);
    animation: pulse 2s ease-in-out 3;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(74, 144, 226, 0.4);
    }
    50% {
        box-shadow: 0 0 30px rgba(74, 144, 226, 0.6);
    }
}

.item-image {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(120, 150, 180, 0.1);
    border: 1px solid rgba(120, 150, 180, 0.3);
    border-radius: 6px;
}

.item-image img {
    max-width: 40px;
    max-height: 40px;
    image-rendering: pixelated;
}

.item-placeholder {
    color: rgba(255, 255, 255, 0.3);
    font-size: 1.2rem;
}

.item-info {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.item-name {
    font-family: 'Cinzel', serif;
    font-size: 0.8rem;
    color: #FFD700;
    font-weight: 600;
    line-height: 1.2;
    min-height: 2.4rem;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin: 0;
}

.item-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.7rem;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    margin: 0;
    flex: 1;
}

.item-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: center;
    width: 100%;
    margin-top: auto;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(120, 150, 180, 0.2);
}

.stat-compact {
    display: inline-block;
    color: #FFD700;
    font-size: 0.7rem;
    font-weight: 600;
    background: rgba(120, 150, 180, 0.2);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    border: 1px solid rgba(120, 150, 180, 0.3);
}

/* Combat Stats */
.stat-attack {
    background: rgba(255, 69, 58, 0.2);
    border-color: rgba(255, 69, 58, 0.4);
    color: #ff6b6b;
}

.stat-defense {
    background: rgba(48, 209, 88, 0.2);
    border-color: rgba(48, 209, 88, 0.4);
    color: #51cf66;
}

.stat-armor {
    background: rgba(94, 129, 172, 0.2);
    border-color: rgba(94, 129, 172, 0.4);
    color: #74c0fc;
}

.stat-hitchance {
    background: rgba(255, 159, 64, 0.2);
    border-color: rgba(255, 159, 64, 0.4);
    color: #ffa94d;
}

/* Skills */
.stat-skill {
    background: rgba(175, 122, 197, 0.2);
    border-color: rgba(175, 122, 197, 0.4);
    color: #da77f2;
}

/* Magic & Speed */
.stat-magic {
    background: rgba(94, 129, 244, 0.2);
    border-color: rgba(94, 129, 244, 0.4);
    color: #748ffc;
}

.stat-speed {
    background: rgba(32, 201, 151, 0.2);
    border-color: rgba(32, 201, 151, 0.4);
    color: #38d9a9;
}

/* Element Damage */
.stat-fire {
    background: rgba(255, 107, 53, 0.2);
    border-color: rgba(255, 107, 53, 0.4);
    color: #ff922b;
}

.stat-ice {
    background: rgba(116, 192, 252, 0.2);
    border-color: rgba(116, 192, 252, 0.4);
    color: #74c0fc;
}

.stat-energy {
    background: rgba(255, 212, 59, 0.2);
    border-color: rgba(255, 212, 59, 0.4);
    color: #ffd43b;
}

.stat-earth {
    background: rgba(81, 207, 102, 0.2);
    border-color: rgba(81, 207, 102, 0.4);
    color: #51cf66;
}

.stat-holy {
    background: rgba(255, 245, 157, 0.2);
    border-color: rgba(255, 245, 157, 0.4);
    color: #fff59d;
}

.stat-death {
    background: rgba(142, 142, 147, 0.2);
    border-color: rgba(142, 142, 147, 0.4);
    color: #adb5bd;
}

/* Critical & Leeches */
.stat-crit {
    background: rgba(250, 82, 82, 0.2);
    border-color: rgba(250, 82, 82, 0.4);
    color: #ff6b6b;
}

.stat-lifeleech {
    background: rgba(255, 107, 129, 0.2);
    border-color: rgba(255, 107, 129, 0.4);
    color: #ff8787;
}

.stat-manaleech {
    background: rgba(116, 184, 252, 0.2);
    border-color: rgba(116, 184, 252, 0.4);
    color: #74c0fc;
}

/* Absorb */
.stat-absorb {
    background: rgba(134, 142, 150, 0.2);
    border-color: rgba(134, 142, 150, 0.4);
    color: #adb5bd;
}

.stat-absorb-fire {
    background: rgba(255, 107, 53, 0.15);
    border-color: rgba(255, 107, 53, 0.3);
    color: #ff922b;
}

.stat-absorb-ice {
    background: rgba(116, 192, 252, 0.15);
    border-color: rgba(116, 192, 252, 0.3);
    color: #74c0fc;
}

.stat-absorb-energy {
    background: rgba(255, 212, 59, 0.15);
    border-color: rgba(255, 212, 59, 0.3);
    color: #ffd43b;
}

.stat-absorb-earth {
    background: rgba(81, 207, 102, 0.15);
    border-color: rgba(81, 207, 102, 0.3);
    color: #51cf66;
}

.stat-absorb-holy {
    background: rgba(255, 245, 157, 0.15);
    border-color: rgba(255, 245, 157, 0.3);
    color: #fff59d;
}

.stat-absorb-death {
    background: rgba(142, 142, 147, 0.15);
    border-color: rgba(142, 142, 147, 0.3);
    color: #adb5bd;
}

/* Weight */
.stat-weight {
    background: rgba(173, 181, 189, 0.2);
    border-color: rgba(173, 181, 189, 0.4);
    color: #ced4da;
}

/* Price */
.stat-price {
    background: rgba(255, 215, 0, 0.2);
    border-color: rgba(255, 215, 0, 0.4);
    color: #FFD700;
    font-weight: 700;
}

/* Rune Stats */
.stat-charges {
    background: rgba(138, 43, 226, 0.2);
    border-color: rgba(138, 43, 226, 0.4);
    color: #ba86fc;
    font-weight: 600;
}

.stat-spell {
    background: rgba(75, 0, 130, 0.2);
    border-color: rgba(75, 0, 130, 0.4);
    color: #bb86fc;
    font-weight: 600;
    font-style: italic;
}

.stat {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.65rem;
    background: rgba(120, 150, 180, 0.2);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
}

.stat i {
    font-size: 0.7rem;
    color: #7896b4;
}

/* Monsters Grid */
.monsters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
    max-width: 100%;
}

@media (min-width: 1600px) {
    .monsters-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (min-width: 1200px) and (max-width: 1599px) {
    .monsters-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 900px) and (max-width: 1199px) {
    .monsters-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.monster-card {
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(120, 150, 180, 0.3);
    border-radius: 10px;
    padding: 1rem;
    transition: all 0.3s ease;
    height: fit-content;
}

.monster-card:hover {
    border-color: #7896b4;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(120, 150, 180, 0.2);
    background: rgba(0, 0, 0, 0.6);
}

.monster-header {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(120, 150, 180, 0.2);
}

.monster-image {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(120, 150, 180, 0.1);
    border: 1px solid rgba(120, 150, 180, 0.3);
    border-radius: 8px;
    overflow: hidden;
}

.monster-image img {
    max-width: 48px;
    max-height: 48px;
    image-rendering: pixelated;
}

.monster-outfit-sprite {
    width: 48px !important;
    height: 48px !important;
    max-width: 48px !important;
    max-height: 48px !important;
    image-rendering: pixelated;
}

.monster-static-sprite {
    width: 40px !important;
    height: 40px !important;
    max-width: 40px !important;
    max-height: 40px !important;
    image-rendering: pixelated;
}

.monster-placeholder {
    color: rgba(255, 255, 255, 0.3);
    font-size: 1.5rem;
}

.monster-basic-info {
    flex: 1;
}

.monster-name {
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
    color: #FFD700;
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.monster-difficulty {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.monster-stats {
    margin-bottom: 0;
}

.stat-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
}

.stat-row:last-child {
    margin-bottom: 0;
}

.stat-row .stat {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.8rem;
    background: rgba(120, 150, 180, 0.1);
    padding: 0.4rem 0.5rem;
    border-radius: 4px;
}

.stat-row .stat i {
    color: #7896b4;
    width: 14px;
    text-align: center;
}

/* Monster Loot */
.monster-loot {
    background: rgba(120, 150, 180, 0.05);
    border: 1px solid rgba(120, 150, 180, 0.2);
    border-radius: 8px;
    padding: 1rem;
}

.loot-title {
    font-family: 'Cinzel', serif;
    font-size: 0.9rem;
    color: #FFD700;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.loot-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.4rem;
}

.loot-item {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(120, 150, 180, 0.2);
    border-radius: 6px;
    padding: 0.4rem;
    text-align: center;
    transition: all 0.2s ease;
    cursor: pointer;
}

.loot-item:hover {
    border-color: #7896b4;
    background: rgba(0, 0, 0, 0.5);
}

.loot-image {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.25rem;
    height: 32px;
}

.loot-item img {
    max-width: 32px;
    max-height: 32px;
    image-rendering: pixelated;
}

.loot-placeholder {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.8rem;
    margin: 0 auto 0.25rem;
}

.loot-info {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.loot-name {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    line-height: 1.1;
}

.loot-chance {
    font-size: 0.6rem;
    color: #FFD700;
    font-weight: 600;
}

.loot-count {
    font-size: 0.6rem;
    color: #FFA500;
    font-weight: 600;
}

.loot-container {
    position: relative;
    min-height: 220px;
    overflow: visible;
}

.loot-page-1,
.loot-page-2 {
    position: relative;
    width: 100%;
}

.loot-more {
    background: rgba(120, 150, 180, 0.1);
    border: 1px dashed rgba(120, 150, 180, 0.3);
    border-radius: 6px;
    padding: 0.5rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.loot-more:hover {
    background: rgba(120, 150, 180, 0.2);
    border-color: rgba(120, 150, 180, 0.5);
    color: rgba(255, 255, 255, 0.8);
}

.loot-more i {
    font-size: 1rem;
}

.loot-more span {
    font-size: 0.65rem;
}

.loot-back {
    background: rgba(74, 144, 226, 0.2);
    border: 1px solid rgba(74, 144, 226, 0.3);
    border-radius: 6px;
    padding: 0.5rem;
    text-align: center;
    color: #4a90e2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.loot-back:hover {
    background: rgba(74, 144, 226, 0.3);
    border-color: rgba(74, 144, 226, 0.5);
    color: #ffffff;
}

.loot-back i {
    font-size: 1rem;
}

.loot-back span {
    font-size: 0.65rem;
}

/* Back Button */
.wiki-back-button {
    margin-bottom: 2rem;
    position: relative;
    z-index: 1000;
}

.back-btn {
    background: rgba(120, 150, 180, 0.3);
    border: 2px solid rgba(120, 150, 180, 0.5);
    color: #ffffff;
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    cursor: pointer;
    min-width: 160px;
    justify-content: center;
    position: relative;
    z-index: 1000;
}

.back-btn:hover {
    background: rgba(120, 150, 180, 0.5);
    border-color: #7896b4;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(120, 150, 180, 0.4);
    text-decoration: none;
}

/* Filter */
.wiki-filter {
    margin-bottom: 2rem;
}

.filter-form {
    background: rgba(10, 15, 25, 0.7);
    border: 2px solid rgba(120, 150, 180, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
}

.filter-input {
    position: relative;
    display: flex;
    align-items: center;
    max-width: 500px;
    margin: 0 auto;
}

.filter-input i {
    position: absolute;
    left: 1rem;
    color: #7896b4;
    z-index: 1;
}

.filter-input input {
    flex: 1;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(120, 150, 180, 0.3);
    border-radius: 8px;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    color: #ffffff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.filter-input input:focus {
    outline: none;
    border-color: #7896b4;
    box-shadow: 0 0 0 3px rgba(120, 150, 180, 0.1);
}

.filter-input input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.filter-submit {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    border: none;
    color: #000000;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    margin-left: 0.5rem;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.filter-submit:hover {
    background: linear-gradient(135deg, #FFA500, #FF8C00);
    transform: translateY(-2px);
}

/* Enhanced Search Section */
.wiki-search-section {
    margin: 2rem 0;
    display: flex;
    justify-content: center;
}

.search-container {
    max-width: 600px;
    width: 100%;
}

.search-form {
    background: rgba(10, 15, 25, 0.7);
    border: 2px solid rgba(120, 150, 180, 0.3);
    border-radius: 15px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-icon {
    position: absolute;
    left: 1rem;
    color: #7896b4;
    font-size: 1.1rem;
    z-index: 2;
}

.search-input {
    flex: 1;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(120, 150, 180, 0.3);
    border-radius: 10px;
    padding: 1rem 1rem 1rem 3rem;
    color: #ffffff;
    font-size: 1rem;
    transition: all 0.3s ease;
    min-height: 50px;
}

.search-input:focus {
    outline: none;
    border-color: #7896b4;
    box-shadow: 0 0 0 3px rgba(120, 150, 180, 0.1);
    background: rgba(0, 0, 0, 0.7);
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
}

.search-btn {
    background: linear-gradient(135deg, #4a90e2, #357abd);
    border: 2px solid #4a90e2;
    color: #ffffff;
    padding: 1rem 2rem;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 50px;
    white-space: nowrap;
}

.search-btn:hover {
    background: linear-gradient(135deg, #357abd, #2a5f8f);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.4);
}

.search-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(74, 144, 226, 0.3);
}

.search-btn i {
    font-size: 1rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .search-input-wrapper {
        flex-direction: column;
        gap: 1rem;
    }
    
    .search-input {
        padding-left: 3rem;
    }
    
    .search-btn {
        width: 100%;
        justify-content: center;
    }
    
    .search-icon {
        left: 1rem;
    }
}

/* Filter Section */
.wiki-filter-section {
    margin: 1.5rem 0;
    display: flex;
    justify-content: center;
}

.filter-form {
    background: rgba(10, 15, 25, 0.7);
    border: 2px solid rgba(120, 150, 180, 0.3);
    border-radius: 15px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.filter-label {
    font-family: 'Cinzel', serif;
    color: #FFD700;
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.filter-label i {
    color: #7896b4;
}

.filter-select {
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(120, 150, 180, 0.3);
    border-radius: 10px;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237896b4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.2rem;
    min-width: 250px;
}

.filter-select:hover {
    border-color: #7896b4;
    background-color: rgba(0, 0, 0, 0.7);
}

.filter-select:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.2);
}

.filter-select option {
    background: #1a1f2e;
    color: #ffffff;
    padding: 0.5rem;
}

.filter-select optgroup {
    background: #0d1117;
    color: #FFD700;
    font-weight: 700;
    font-family: 'Cinzel', serif;
    font-size: 0.9rem;
    padding: 0.5rem;
}

.filter-select optgroup option {
    background: #1a1f2e;
    color: #ffffff;
    font-weight: 400;
    font-family: inherit;
    padding-left: 1rem;
}

.filter-clear {
    background: rgba(255, 69, 58, 0.2);
    border: 2px solid rgba(255, 69, 58, 0.4);
    color: #ff6b6b;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.filter-clear:hover {
    background: rgba(255, 69, 58, 0.3);
    border-color: #ff6b6b;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 69, 58, 0.3);
}

.filter-clear i {
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .filter-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-select {
        min-width: 100%;
    }
    
    .filter-clear {
        justify-content: center;
    }
}

/* Pagination */
.pagination-container {
    margin-top: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.pagination-btn {
    background: rgba(120, 150, 180, 0.2);
    border: 2px solid rgba(120, 150, 180, 0.3);
    color: #7896b4;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.pagination-btn:hover {
    background: rgba(120, 150, 180, 0.3);
    border-color: #7896b4;
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-2px);
}

.pagination-number {
    background: rgba(120, 150, 180, 0.1);
    border: 2px solid rgba(120, 150, 180, 0.2);
    color: #7896b4;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 45px;
    text-align: center;
}

.pagination-number:hover {
    background: rgba(120, 150, 180, 0.2);
    border-color: #7896b4;
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-2px);
}

.pagination-number.active {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    border-color: #FFD700;
    color: #000000;
    font-weight: 600;
}

.pagination-dots {
    color: rgba(255, 255, 255, 0.5);
    padding: 0.75rem 0.5rem;
    font-weight: bold;
}

.pagination-info {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    text-align: center;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: rgba(255, 255, 255, 0.5);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #7896b4;
}

.empty-state h3 {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Responsive */
@media (max-width: 1400px) {
    .npcs-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1200px) {
    .wiki-container {
        max-width: 1400px;
        padding: 0 1.5rem 2rem 1.5rem;
    }
    
    .wiki-categories {
        gap: 2rem;
    }
    
    .npcs-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1024px) {
    .wiki-container {
        margin-top: -2rem;
        padding: 0 1.5rem 2rem 1.5rem;
    }
    
    .wiki-categories {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .category-links {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .monsters-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .npcs-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    .npcs-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .wiki-container {
        margin-top: -1rem;
        padding: 0 1rem 1rem 1rem;
    }
    
    .wiki-section {
        padding: 1.5rem;
    }
    
    .category-links {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .nav-tabs {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .item-card {
        flex-direction: column;
        text-align: center;
    }
    
    .monsters-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .npcs-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .monster-header {
        flex-direction: column;
        text-align: center;
    }
    
    .stat-row {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .loot-grid {
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    }
    
    .pagination {
        gap: 0.25rem;
    }
    
    .pagination-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
    
    .pagination-number {
        padding: 0.5rem 0.75rem;
        min-width: 40px;
        font-size: 0.85rem;
    }
}

/* NPC Styles */
.npcs-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
    align-items: start;
}

.npc-card {
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(120, 150, 180, 0.3);
    border-radius: 10px;
    padding: 1.25rem;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: fit-content;
}

.npc-card:hover {
    border-color: #7896b4;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(120, 150, 180, 0.2);
}

.npc-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1rem;
    gap: 0.75rem;
}

.npc-sprite {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(120, 150, 180, 0.2);
    border-radius: 8px;
}

.npc-outfit-sprite {
    max-width: 64px;
    max-height: 64px;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

.npc-static-sprite {
    max-width: 32px;
    max-height: 32px;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

.npc-placeholder {
    font-size: 2rem;
    color: rgba(120, 150, 180, 0.5);
}

.npc-basic-info {
    text-align: center;
    width: 100%;
}

.npc-name {
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
    color: #FFD700;
    margin: 0 0 0.5rem 0;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
    line-height: 1.3;
}

.npc-type {
    font-size: 0.8rem;
    color: #7896b4;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.npc-shop-section {
    padding-top: 1rem;
    border-top: 1px solid rgba(120, 150, 180, 0.2);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.shop-category {
    display: flex;
    flex-direction: column;
}

.shop-category h4 {
    font-family: 'Cinzel', serif;
    font-size: 0.85rem;
    color: #7896b4;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.shop-category h4 i {
    color: #FFD700;
}

.shop-container {
    position: relative;
}

.shop-items-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.shop-item {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(120, 150, 180, 0.2);
    border-radius: 6px;
    padding: 0.4rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.shop-item:hover {
    background: rgba(120, 150, 180, 0.2);
    border-color: #7896b4;
    transform: scale(1.05);
}

.shop-item-image-wrapper {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shop-item-image {
    max-width: 32px;
    max-height: 32px;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

.shop-item-placeholder {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(120, 150, 180, 0.5);
    font-size: 1.2rem;
}

.shop-item-price {
    font-size: 0.7rem;
    color: #FFD700;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
}

.shop-item-more {
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 6px;
    padding: 0.4rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    color: #FFD700;
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.shop-item-more:hover {
    background: rgba(255, 215, 0, 0.2);
    border-color: #FFD700;
    transform: scale(1.05);
}

.shop-item-more i {
    font-size: 1rem;
}

.shop-item-back {
    background: rgba(120, 150, 180, 0.2);
    border: 1px solid rgba(120, 150, 180, 0.3);
    border-radius: 6px;
    padding: 0.4rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    color: #7896b4;
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.shop-item-back:hover {
    background: rgba(120, 150, 180, 0.3);
    border-color: #7896b4;
    transform: scale(1.05);
}

.shop-item-back i {
    font-size: 1rem;
}

.npc-keywords {
    padding-top: 1rem;
    border-top: 1px solid rgba(120, 150, 180, 0.2);
}

.npc-keywords h4 {
    font-family: 'Cinzel', serif;
    font-size: 0.85rem;
    color: #7896b4;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    justify-content: center;
}

.keywords-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: center;
}

.keyword-tag {
    background: rgba(120, 150, 180, 0.2);
    border: 1px solid rgba(120, 150, 180, 0.3);
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    color: #b8d4e8;
    font-family: 'Roboto', sans-serif;
    transition: all 0.2s ease;
}

.keyword-tag:hover {
    background: rgba(120, 150, 180, 0.3);
    border-color: #7896b4;
}

.keyword-tag.more {
    background: rgba(255, 215, 0, 0.1);
    border-color: rgba(255, 215, 0, 0.3);
    color: #FFD700;
    font-weight: 600;
}
/* NPC Dialog Styles */
.npc-dialog-section {
    padding-top: 1rem;
    border-top: 1px solid rgba(120, 150, 180, 0.2);
}

.npc-dialog-section h4 {
    font-family: 'Cinzel', serif;
    font-size: 0.85rem;
    color: #7896b4;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.npc-dialog-section h4 i {
    color: #FFD700;
}

.dialog-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.dialog-step {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(120, 150, 180, 0.2);
    border-radius: 8px;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.player-message {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: #4CAF50;
}

.player-message i {
    font-size: 0.9rem;
    color: #4CAF50;
}

.player-message strong {
    color: #66BB6A;
    font-weight: 600;
}

.npc-message {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: #b8d4e8;
    line-height: 1.4;
}

.npc-message i {
    font-size: 0.9rem;
    color: #7896b4;
    margin-top: 0.1rem;
}

.dialog-items {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.items-label {
    font-size: 0.75rem;
    color: #FFD700;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.items-label i {
    font-size: 0.8rem;
}

.dialog-items-grid {
    display: flex;
    gap: 0.3rem;
}

.dialog-item-image {
    width: 24px;
    height: 24px;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    border: 1px solid rgba(120, 150, 180, 0.3);
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.3);
    padding: 2px;
}

.dialog-more {
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 6px;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    color: #FFD700;
    font-size: 0.75rem;
    font-weight: 600;
}

.dialog-more i {
    font-size: 0.9rem;
}

/* NPC Card Link */
.npc-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    cursor: pointer;
}

.npc-card-link:hover {
    text-decoration: none;
}

/* NPC Detail Styles */
.npc-detail-container {
    max-width: 1200px;
    margin: 0 auto;
}

.npc-detail-header {
    display: flex;
    gap: 2rem;
    margin-bottom: 3rem;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(120, 150, 180, 0.3);
    border-radius: 12px;
}

.npc-detail-sprite {
    width: 128px;
    height: 128px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(120, 150, 180, 0.3);
    border-radius: 12px;
    flex-shrink: 0;
}

.npc-detail-outfit,
.npc-detail-static {
    max-width: 128px;
    max-height: 128px;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

.npc-detail-placeholder {
    font-size: 4rem;
    color: rgba(120, 150, 180, 0.5);
}

.npc-detail-info h2 {
    font-family: 'Cinzel', serif;
    font-size: 2.5rem;
    color: #FFD700;
    margin: 0 0 1rem 0;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
}

.type-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.type-badge.merchant {
    background: rgba(76, 175, 80, 0.2);
    border: 2px solid rgba(76, 175, 80, 0.5);
    color: #66BB6A;
}

.type-badge.quest {
    background: rgba(255, 215, 0, 0.2);
    border: 2px solid rgba(255, 215, 0, 0.5);
    color: #FFD700;
}

.type-badge.interactive {
    background: rgba(33, 150, 243, 0.2);
    border: 2px solid rgba(33, 150, 243, 0.5);
    color: #42A5F5;
}

.type-badge.generic {
    background: rgba(120, 150, 180, 0.2);
    border: 2px solid rgba(120, 150, 180, 0.5);
    color: #7896b4;
}

.map-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    margin-left: 1rem;
    background: rgba(120, 150, 180, 0.2);
    border: 2px solid rgba(120, 150, 180, 0.5);
    border-radius: 20px;
    color: #7896b4;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.map-link-btn:hover {
    background: rgba(120, 150, 180, 0.4);
    border-color: #7896b4;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(120, 150, 180, 0.3);
}

.detail-section {
    margin-bottom: 2rem;
    padding: 2.5rem;
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(120, 150, 180, 0.3);
    border-radius: 12px;
    max-width: 100%;
}

.section-title {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    color: #FFD700;
    margin: 0 0 1.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-title i {
    font-size: 1.3rem;
}

.shop-detail-category {
    margin-bottom: 2rem;
}

.shop-detail-category:last-child {
    margin-bottom: 0;
}

.shop-detail-category h4 {
    font-family: 'Cinzel', serif;
    font-size: 1.2rem;
    color: #7896b4;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.shop-detail-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem;
}

@media (max-width: 1400px) {
    .shop-detail-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1100px) {
    .shop-detail-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .shop-detail-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.shop-detail-item {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(120, 150, 180, 0.2);
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.shop-detail-item:hover {
    background: rgba(120, 150, 180, 0.2);
    border-color: #7896b4;
    transform: translateY(-2px);
}

.shop-detail-image {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shop-detail-image img {
    max-width: 48px;
    max-height: 48px;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

.shop-detail-image i {
    font-size: 2rem;
    color: rgba(120, 150, 180, 0.5);
}

.shop-detail-name {
    font-size: 0.9rem;
    color: #b8d4e8;
    text-align: center;
    line-height: 1.3;
}

.shop-detail-price {
    font-size: 1rem;
    color: #FFD700;
    font-weight: 600;
}

.dialog-detail-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.dialog-detail-step {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(120, 150, 180, 0.2);
    border-radius: 10px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.player-detail-message {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1rem;
    color: #4CAF50;
}

.player-detail-message i {
    font-size: 1.2rem;
}

.player-detail-message strong {
    color: #66BB6A;
    font-weight: 700;
    font-size: 1.1rem;
}

.npc-detail-message {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 1rem;
    color: #b8d4e8;
    line-height: 1.6;
}

.npc-detail-message i {
    font-size: 1.2rem;
    color: #7896b4;
    margin-top: 0.2rem;
}

.dialog-detail-items {
    margin-top: 0.5rem;
    padding: 1rem;
    border-radius: 8px;
}

.dialog-detail-items.required {
    background: rgba(255, 152, 0, 0.1);
    border: 1px solid rgba(255, 152, 0, 0.3);
}

.dialog-detail-items.reward {
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.items-detail-label {
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.dialog-detail-items.required .items-detail-label {
    color: #FF9800;
}

.dialog-detail-items.reward .items-detail-label {
    color: #4CAF50;
}

.items-detail-grid {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.item-detail-box {
    width: 48px;
    height: 48px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(120, 150, 180, 0.3);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
}

.item-detail-box img {
    max-width: 40px;
    max-height: 40px;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

.keywords-detail-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.keyword-detail-tag {
    background: rgba(120, 150, 180, 0.2);
    border: 1px solid rgba(120, 150, 180, 0.3);
    padding: 0.5rem 1rem;
    border-radius: 15px;
    font-size: 0.9rem;
    color: #b8d4e8;
    transition: all 0.2s ease;
}

.keyword-detail-tag:hover {
    background: rgba(120, 150, 180, 0.3);
    border-color: #7896b4;
}

/* Monster Card Link */
.monster-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.2s ease;
}

.monster-card-link:hover {
    text-decoration: none;
    transform: translateY(-5px);
}

/* Monster Detail Styles */
.monster-detail-container {
    max-width: 1200px;
    margin: 0 auto;
}

.monster-detail-header {
    display: flex;
    gap: 2rem;
    margin-bottom: 3rem;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(120, 150, 180, 0.3);
    border-radius: 12px;
}

.monster-detail-sprite {
    width: 128px;
    height: 128px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(120, 150, 180, 0.3);
    border-radius: 12px;
    flex-shrink: 0;
}

.monster-detail-outfit,
.monster-detail-static {
    max-width: 128px;
    max-height: 128px;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

.monster-detail-placeholder {
    font-size: 4rem;
    color: rgba(120, 150, 180, 0.5);
}

.monster-detail-info h2 {
    font-family: 'Cinzel', serif;
    font-size: 2.5rem;
    color: #FFD700;
    margin: 0 0 1rem 0;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
}

.monster-detail-badges {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.difficulty-badge,
.race-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 2px solid;
}

.race-badge {
    background: rgba(120, 150, 180, 0.2);
    border-color: rgba(120, 150, 180, 0.5);
    color: #7896b4;
}

.monster-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.stat-detail-box {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(120, 150, 180, 0.2);
    border-radius: 10px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.2s ease;
}

.stat-detail-box:hover {
    background: rgba(120, 150, 180, 0.2);
    border-color: #7896b4;
}

.stat-icon {
    font-size: 2rem;
    opacity: 0.9;
}

.stat-detail-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat-label {
    font-size: 0.85rem;
    color: #7896b4;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-value {
    font-size: 1.3rem;
    color: #FFD700;
    font-weight: 600;
}

.loot-detail-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem;
}

@media (max-width: 1400px) {
    .loot-detail-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1100px) {
    .loot-detail-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .loot-detail-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.loot-detail-item {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(120, 150, 180, 0.2);
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.loot-detail-item:hover {
    background: rgba(120, 150, 180, 0.2);
    border-color: #7896b4;
    transform: translateY(-2px);
}

.loot-detail-image {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loot-detail-image img {
    max-width: 48px;
    max-height: 48px;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

.loot-detail-image i {
    font-size: 2rem;
    color: rgba(120, 150, 180, 0.5);
}

.loot-detail-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    width: 100%;
}

.loot-detail-name {
    font-size: 0.9rem;
    color: #b8d4e8;
    text-align: center;
    line-height: 1.3;
}

.loot-detail-chance {
    font-size: 0.85rem;
    color: #4CAF50;
    font-weight: 600;
}

.loot-detail-count {
    font-size: 0.8rem;
    color: #7896b4;
    font-style: italic;
}

/* Item Popup */
.item-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.item-popup {
    background: linear-gradient(135deg, rgba(10, 15, 25, 0.98) 0%, rgba(20, 30, 45, 0.98) 100%);
    border: 3px solid #7896b4;
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 2px solid rgba(120, 150, 180, 0.3);
}

.popup-header h3 {
    font-family: 'Cinzel', serif;
    color: #FFD700;
    font-size: 1.5rem;
    margin: 0;
}

.popup-close {
    background: rgba(255, 0, 0, 0.2);
    border: 2px solid rgba(255, 0, 0, 0.4);
    color: #ff6b6b;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.popup-close:hover {
    background: rgba(255, 0, 0, 0.3);
    border-color: #ff6b6b;
    transform: scale(1.1);
}

.popup-content {
    padding: 2rem;
}

.popup-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.popup-option {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(120, 150, 180, 0.3);
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s ease;
    color: inherit;
}

.popup-option:hover {
    border-color: #7896b4;
    background: rgba(120, 150, 180, 0.1);
    transform: translateX(5px);
}

.option-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, rgba(120, 150, 180, 0.2), rgba(120, 150, 180, 0.1));
    border: 2px solid rgba(120, 150, 180, 0.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    flex-shrink: 0;
}

.popup-option:hover .option-icon {
    background: linear-gradient(135deg, rgba(120, 150, 180, 0.3), rgba(120, 150, 180, 0.2));
    border-color: #7896b4;
}

.option-icon i {
    color: #FFD700;
}

.option-text h4 {
    margin: 0 0 0.3rem 0;
    font-family: 'Cinzel', serif;
    color: #ffffff;
    font-size: 1.2rem;
}

.option-text p {
    margin: 0;
    color: #a0b0c0;
    font-size: 0.9rem;
}

/* Admin Option Styling */
.popup-option-admin {
    border-color: rgba(255, 69, 58, 0.4);
    background: rgba(255, 69, 58, 0.05);
}

.popup-option-admin:hover {
    border-color: #ff6b6b;
    background: rgba(255, 69, 58, 0.15);
}

.popup-option-admin .option-icon {
    background: linear-gradient(135deg, rgba(255, 69, 58, 0.2), rgba(255, 69, 58, 0.1));
    border-color: rgba(255, 69, 58, 0.4);
}

.popup-option-admin:hover .option-icon {
    background: linear-gradient(135deg, rgba(255, 69, 58, 0.3), rgba(255, 69, 58, 0.2));
    border-color: #ff6b6b;
}

.popup-option-admin .option-icon i {
    color: #ff6b6b;
}

/* Hidden Items */
.item-card.item-hidden {
    opacity: 0.5;
    filter: grayscale(100%);
    border-color: rgba(255, 69, 58, 0.5) !important;
}

.item-card:hover {
    transform: translateY(-5px) !important;
    border-color: #FFD700;
    box-shadow: 0 5px 20px rgba(255, 215, 0, 0.3);
}

@media (max-width: 768px) {
    .item-popup {
        width: 95%;
        max-width: none;
    }
    
    .popup-header {
        padding: 1rem 1.5rem;
    }
    
    .popup-content {
        padding: 1.5rem;
    }
    
    .popup-option {
        padding: 1rem;
    }
    
    .option-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
}
