/* Guide Container - Mirroring Boss Modal */
.guide-container {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 100000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
    pointer-events: none;
}

.guide-container.active {
    display: flex;
    pointer-events: auto;
}

/* Disable touch controls when guide is open */
.guide-container.active ~ .touch-controls,
.guide-container.active + * .touch-controls,
body .guide-container.active ~ .touch-controls {
    pointer-events: none !important;
    z-index: 100 !important;
    opacity: 0.3;
}

.guide-container.active * {
    pointer-events: auto;
}

/* Guide Panel - styled like boss-content */
.guide-panel {
    background: #111111;
    border: 1px solid #333;
    border-radius: 8px;
    width: min(700px, 95vw);
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 20px rgba(0,0,0,0.8);
    color: #e0e0e0;
    font-family: Arial, sans-serif;
    position: relative;
    overflow: hidden;
}

/* Guide Header - styled like boss-header */
.guide-header {
    background: linear-gradient(180deg, #222 0%, #111 100%);
    border-bottom: 1px solid #444;
    padding: 15px;
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.guide-header h3 {
    margin: 0;
    color: #fff;
    font-size: 16px;
    font-weight: bold;
}

/* Guide Body - styled like boss-body for vertical side-by-side tabs and content */
.guide-body {
    display: flex;
    flex-direction: row;
    padding: 15px;
    gap: 15px;
    height: 65vh; /* Fixed height for independent scrolling */
    min-height: 200px;
    max-height: calc(85vh - 60px); /* Fits inside panel */
    overflow: hidden;
    width: 100%;
}

/* Guide Tabs - styled like boss-tabs */
.guide-tabs {
    display: flex;
    flex-direction: column;
    width: 150px;
    min-width: 150px;
    gap: 5px;
    border-right: 1px solid #333;
    padding-right: 15px;
    overflow-y: auto;
}

.guide-tab {
    flex-shrink: 0;
    background: #222;
    border: 1px solid #444;
    color: #ccc;
    padding: 10px;
    text-align: left;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
    font-weight: bold;
    font-size: 13px;
}

.guide-tab:hover {
    background: #333;
    color: #fff;
}

.guide-tab.active {
    background: #555;
    color: #ff9900;
    border-color: #777;
}

/* Guide Close Button */
.guide-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.guide-close img {
    width: 20px;
    height: 20px;
}

/* Guide Content Container */
.guide-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    padding-right: 5px;
}

.guide-tab-content {
    display: none;
    flex: 1;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.85);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 12px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.guide-tab-content.active {
    display: block;
}

/* Monsters List */
.monsters-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 12px;
    max-height: calc(75vh - 100px);
    overflow-y: auto;
    padding: 5px;
    pointer-events: auto;
    touch-action: manipulation;
}

.monster-card {
    background: rgba(40, 40, 40, 0.8);
    border: 2px solid rgba(100, 100, 100, 0.3);
    border-radius: 10px;
    padding: 10px;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
    pointer-events: auto;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(255, 255, 255, 0.2);
}

.monster-card:hover {
    background: rgba(50, 50, 50, 0.9);
    border-color: rgba(150, 150, 150, 0.6);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.monster-image-compact {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.3);
    padding: 5px;
    transition: transform 0.3s ease;
}

.monster-card:hover .monster-image-compact {
    transform: scale(1.1);
}

.monster-name-compact {
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    line-height: 1.2;
    word-wrap: break-word;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    max-width: 100%;
}

.monster-header {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.monster-image {
    width: 45px;
    height: 45px;
    object-fit: contain;
    border-radius: 5px;
    background: rgba(0, 0, 0, 0.3);
    padding: 3px;
    flex-shrink: 0;
}

.monster-info {
    flex: 1;
}

.monster-name {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
}

/* Monster Detail Modal */
.monster-detail-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    pointer-events: none;
}

.monster-detail-modal.active {
    display: flex;
    pointer-events: auto;
}

.monster-detail-content {
    background: rgba(30, 30, 30, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(100, 100, 100, 0.3);
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    width: 85%;
    max-width: 400px;
    max-height: 75vh;
    overflow-y: auto;
    position: relative;
    display: flex;
    flex-direction: column;
}

.monster-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-bottom: 1px solid rgba(100, 100, 100, 0.3);
    background: rgba(20, 20, 20, 0.8);
    position: sticky;
    top: 0;
    z-index: 10;
}

.monster-detail-header h3 {
    margin: 0;
    color: #fff;
    font-size: 16px;
    font-weight: bold;
}

.monster-detail-close img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    pointer-events: none;
}

.monster-detail-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    transition: background 0.2s;
}

.monster-detail-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.monster-detail-body {
    padding: 10px;
    flex: 1;
    overflow-y: auto;
}

.monster-detail-header-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.monster-detail-image {
    width: 50px;
    height: 50px;
    object-fit: contain;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.3);
    padding: 4px;
    flex-shrink: 0;
}

.monster-detail-name {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
}

.monster-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-top: 12px;
}

.monster-stat {
    background: rgba(0, 0, 0, 0.3);
    padding: 8px 10px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.monster-stat-icon {
    font-size: 14px;
    flex-shrink: 0;
}

.monster-stat-label {
    font-size: 10px;
    color: #95a5a6;
    margin-right: 2px;
    flex-shrink: 0;
}

.monster-stat-value {
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    flex-shrink: 0;
}

.monster-drops {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(100, 100, 100, 0.2);
}

.monster-drops-title {
    font-size: 11px;
    color: #95a5a6;
    margin-bottom: 6px;
    font-weight: 600;
    text-transform: uppercase;
}

.monster-drops-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.monster-drop-item {
    background: rgba(52, 152, 219, 0.2);
    border: 1px solid rgba(52, 152, 219, 0.3);
    padding: 4px 6px;
    border-radius: 5px;
    font-size: 10px;
    color: #3498db;
    display: flex;
    align-items: center;
    gap: 4px;
}

.drop-item-icon {
    width: 20px !important;
    height: 20px !important;
    object-fit: contain;
    border-radius: 3px;
    background: rgba(0, 0, 0, 0.2);
    padding: 1px;
    flex-shrink: 0;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.drop-item-icon-placeholder {
    width: 20px;
    height: 20px;
    background: rgba(100, 100, 100, 0.3);
    border: 1px solid rgba(150, 150, 150, 0.5);
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    color: #999;
    flex-shrink: 0;
}

.drop-item-quantity {
    font-weight: 600;
    color: #3498db;
    font-size: 11px;
    margin-left: 4px;
}

/* Hide any text that might show item ID */
.monster-drop-item span:not(.drop-item-quantity):not(.chance) {
    display: none !important;
}

.monster-drop-item .chance {
    color: #f39c12;
    font-weight: 600;
    font-size: 10px;
    margin-left: auto;
}

/* NPCs List */
.npcs-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 12px;
    max-height: calc(75vh - 100px);
    overflow-y: auto;
    padding: 5px;
}

.npc-card {
    background: rgba(40, 40, 40, 0.8);
    border: 2px solid rgba(100, 100, 100, 0.3);
    border-radius: 10px;
    padding: 10px;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
    pointer-events: auto;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(255, 255, 255, 0.2);
}

.npc-card:hover {
    background: rgba(50, 50, 50, 0.9);
    border-color: rgba(150, 150, 150, 0.6);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.npc-image-compact {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.3);
    padding: 5px;
    transition: transform 0.3s ease;
}

.npc-card:hover .npc-image-compact {
    transform: scale(1.1);
}

.npc-name-compact {
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    line-height: 1.2;
    word-wrap: break-word;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    max-width: 100%;
}

.npc-dialogue {
    margin-top: 10px;
    padding: 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    font-size: 12px;
    color: #ecf0f1;
    font-style: italic;
    line-height: 1.4;
}

.npc-shop-info {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(100, 100, 100, 0.2);
}

.npc-shop-info-title {
    font-size: 12px;
    color: #95a5a6;
    margin-bottom: 8px;
    font-weight: 600;
    text-transform: uppercase;
}

.npc-shop-items-count {
    font-size: 13px;
    color: #3498db;
}

/* Loading Message */
.loading-message {
    text-align: center;
    padding: 40px 20px;
    color: #95a5a6;
    font-size: 14px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #95a5a6;
    font-size: 14px;
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

/* Responsive */
@media (max-width: 768px) {
    .guide-container {
        z-index: 99999 !important;
    }
    
    .guide-panel {
        width: 88% !important;
        max-width: 100% !important;
        max-height: 55vh !important;
        z-index: 99999 !important;
        pointer-events: auto !important;
        touch-action: manipulation !important;
    }
    
    .guide-header {
        padding: 3px 5px !important;
    }
    
    .guide-header h3 {
        font-size: 14px !important;
    }
    
    .guide-tab {
        padding: 3px 5px !important;
        font-size: 10px !important;
    }
    
    .guide-close {
        width: 20px !important;
        height: 20px !important;
        font-size: 16px !important;
    }
    
    .guide-content {
        padding: 3px !important;
        pointer-events: auto !important;
        touch-action: manipulation !important;
    }
    
    .monsters-list,
    .npcs-list {
        gap: 6px !important;
        padding: 3px !important;
        max-height: calc(50vh - 80px) !important;
        pointer-events: auto !important;
        touch-action: manipulation !important;
    }
    
    .monster-card,
    .npc-card {
        padding: 6px !important;
        gap: 4px !important;
        pointer-events: auto !important;
        touch-action: manipulation !important;
    }
    
    .monster-image-compact,
    .npc-image-compact {
        width: 35px !important;
        height: 35px !important;
    }
    
    .monster-name-compact,
    .npc-name-compact {
        font-size: 10px !important;
    }
    
    .monster-image,
    .npc-image {
        width: 35px !important;
        height: 35px !important;
    }
    
    .monster-name,
    .npc-name {
        font-size: 11px !important;
    }
    
    .monster-stats {
        grid-template-columns: 1fr;
    }
    
    .drop-item-icon {
        width: 16px !important;
        height: 16px !important;
    }
    
    .monster-drop-item {
        padding: 3px 4px !important;
        gap: 3px !important;
        font-size: 9px !important;
    }
    
    .drop-item-quantity {
        font-size: 9px !important;
    }
    
    .monster-drop-item .chance {
        font-size: 8px !important;
    }
}

