/* ==========================================================================
   NPC Card Styles
   ========================================================================== */

.npc-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e5e7;
}

.npc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.npc-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1d1d1f;
    margin: 0;
}

.btn-batch-generate {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #f5f5f7;
    border: 1px solid #d2d2d7;
    border-radius: 8px;
    font-size: 0.875rem;
    color: #1d1d1f;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-batch-generate:hover {
    background: #e8e8ed;
    border-color: #0071e3;
    color: #0071e3;
}

.npc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

.npc-card {
    position: relative;
    background: #fff;
    border: 1px solid #e5e5e7;
    border-radius: 12px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.npc-card:hover {
    border-color: #0071e3;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.npc-image {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 0.75rem;
    background: #f5f5f7;
}

.npc-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.npc-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #86868b;
}

.npc-info {
    text-align: center;
}

.npc-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.npc-chapters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    justify-content: center;
}

.chapter-chip {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    background: #f5f5f7;
    border-radius: 4px;
    font-size: 0.6875rem;
    color: #86868b;
    font-weight: 500;
}

.btn-generate-sheet {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0071e3;
    border: none;
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.npc-card:hover .btn-generate-sheet {
    opacity: 1;
}

.btn-generate-sheet:hover {
    background: #0077ed;
}

.npc-empty {
    text-align: center;
    padding: 2rem;
    color: #86868b;
}

.npc-empty p {
    margin: 0.5rem 0;
}

.npc-hint {
    font-size: 0.8125rem;
    font-style: italic;
}

/* Character tabs */
.character-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #e5e5e7;
}

.character-tab {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    font-size: 0.9375rem;
    font-weight: 500;
    color: #86868b;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: all 0.2s ease;
}

.character-tab:hover {
    color: #1d1d1f;
}

.character-tab.active {
    color: #0071e3;
    border-bottom-color: #0071e3;
}

.character-tab-content {
    display: none;
}

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