/* 
 * TESSAWORLD.COM - NPC Module Styles v3.0
 * Inherits from style.css "Void" Theme
 */

:root {
    /* Map local variables to Global Theme */
    --primary-color: var(--accent-cyan);
    --secondary-color: var(--text-secondary);
    --accent-color: var(--accent-gold);
}

/* --- OVERRIDES & COMPATIBILITY --- */
body {
    /* Body background handled by style.css */
    /* Ensure font inheritance */
    font-family: var(--font-body);
}

.main-content {
    flex: 1;
}

/* --- NPC CARDS (Dark Glass) --- */
.card {
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
    backdrop-filter: blur(5px);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-color: var(--accent-cyan);
    background: rgba(21, 27, 46, 0.9);
}

.npc-title {
    color: #fff;
    font-family: var(--font-heading);
    font-weight: 700;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    margin-bottom: 0.5rem;
}

.card-text {
    color: var(--text-secondary);
}

.npc-card-img {
    height: 200px;
    width: 100%;
    object-fit: cover;
    /* Changed to cover for better filling, or contain if shapes vary wildly */
    object-position: center;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
    transition: transform 0.4s ease;
}

.card:hover .npc-card-img {
    transform: scale(1.05);
}

/* --- VIEWER CONTAINER --- */
.viewer-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    /* Increased for desktop */
    margin: 0 auto;
    text-align: center;
}

.viewer-image {
    width: 100%;
    max-height: 70vh;
    object-fit: contain;
    height: auto;
    display: block;
    margin: 0 auto;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.5));
    /* Stronger shadow */
    cursor: grab;
    transition: filter 0.3s;
}

.viewer-image:active {
    cursor: grabbing;
}

/* --- CONTROLS --- */
.controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 2rem;
    position: relative;
    z-index: 20;
}

/* Override Bootstrap Buttons for NPC Controls */
.btn-primary,
.btn-outline-primary {
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    font-weight: 700;
    font-family: var(--font-heading);
    letter-spacing: 1px;
}

.btn-primary {
    background-color: var(--accent-cyan);
    border-color: var(--accent-cyan);
    color: #000;
}

.btn-primary:hover,
.btn-primary:active,
.btn-primary.active {
    background-color: #fff !important;
    border-color: #fff !important;
    color: #000 !important;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}

.btn-outline-primary {
    color: var(--accent-cyan);
    border-color: var(--accent-cyan);
}

.btn-outline-primary:hover,
.btn-outline-primary.active {
    background-color: var(--accent-cyan) !important;
    color: #000 !important;
    border-color: var(--accent-cyan) !important;
}

/* --- ANGLE THUMBNAILS --- */
.angle-thumbnails {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 1.5rem;
    flex-wrap: wrap;
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
    max-width: fit-content;
    margin-left: auto;
    margin-right: auto;
    backdrop-filter: blur(5px);
}

.angle-thumb {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.1);
}

.angle-thumb:hover,
.angle-thumb.active {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 10px var(--accent-cyan);
    transform: scale(1.1);
}

/* --- ALERTS --- */
.custom-alert {
    background: rgba(11, 16, 33, 0.8);
    border: 1px solid var(--glass-border);
    border-left: 4px solid var(--accent-gold);
    color: var(--text-secondary);
    padding: 1.5rem;
    border-radius: var(--radius-md);
}

.custom-alert strong {
    color: #fff;
}

.custom-alert .alert-link {
    color: var(--accent-cyan);
}

/* --- MOBILE RESPONSIVE --- */
@media (max-width: 768px) {
    .npc-card-img {
        height: 160px;
        object-fit: contain;
        /* Keep contain for mobile readability */
        background: transparent;
    }

    .npc-title {
        font-size: 1.2rem;
    }

    .viewer-image {
        max-height: 50vh;
    }

    .angle-thumb {
        width: 40px;
        height: 40px;
    }
}