/* --- Floating Inspector (Bottom Right) --- */
.inspector-floating-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 100;
    pointer-events: none;
    /* Let clicks pass through area */
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
}

.inspector-card {
    width: 300px;
    background: rgba(10, 10, 15, 0.95);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    backdrop-filter: blur(12px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    pointer-events: auto;
    /* Re-enable clicks on the card */
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 80vh;
}

.inspector-header {
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid var(--border-glass);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.inspector-header h2 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-secondary);
    margin: 0;
}

.btn-close-floating {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    line-height: 1;
}

.btn-close-floating:hover {
    color: #fff;
}

.inspector-body-scroll {
    padding: 16px;
    overflow-y: auto;
}

.hero-header-floating {
    text-align: left;
}

.hero-header-floating h3 {
    font-size: 1.4rem;
    margin-bottom: 4px;
    color: #fff;
}

.planet-types-floating {
    display: flex;
    gap: 6px;
    margin-top: 6px;
    flex-wrap: wrap;
}

.type-tag-floating {
    font-size: 0.65rem;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 1px;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
}

/* Type Specific Colors */
.type-tag-floating.rocky {
    color: var(--type-rocky);
    border-color: rgba(168, 162, 158, 0.3);
    background: rgba(168, 162, 158, 0.1);
}

.type-tag-floating.stormal {
    color: var(--type-stormal);
    border-color: rgba(14, 165, 233, 0.3);
    background: rgba(14, 165, 233, 0.1);
}

.type-tag-floating.verdant {
    color: var(--type-verdant);
    border-color: rgba(34, 197, 94, 0.3);
    background: rgba(34, 197, 94, 0.1);
}

.type-tag-floating.giant {
    color: var(--type-giant);
    border-color: rgba(249, 115, 22, 0.3);
    background: rgba(249, 115, 22, 0.1);
}

.type-tag-floating.ringed {
    color: var(--type-ringed);
    border-color: rgba(217, 70, 239, 0.3);
    background: rgba(217, 70, 239, 0.1);
}

.type-tag-floating.magma {
    color: var(--type-magma);
    border-color: rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.1);
}

.type-tag-floating.aqua {
    color: var(--type-aqua);
    border-color: rgba(6, 182, 212, 0.3);
    background: rgba(6, 182, 212, 0.1);
}

.type-tag-floating.crystal {
    color: var(--type-crystal);
    border-color: rgba(139, 92, 246, 0.3);
    background: rgba(139, 92, 246, 0.1);
}

.type-tag-floating.void {
    color: var(--type-void);
    border-color: rgba(30, 41, 59, 0.3);
    background: rgba(30, 41, 59, 0.1);
}

.stat-row-compact {
    margin-bottom: 16px;
}

.stats-grid-floating {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.stat-row-floating {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    padding: 8px 12px;
    border-radius: 8px;
}

.stat-meta {
    display: flex;
    flex-direction: column;
}

.stat-meta label {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-muted);
}

.stat-meta .stat-lv {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent-blue);
}

.btn-upgrade-floating {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-secondary);
    font-weight: 700;
}

.btn-upgrade-floating.intensity {
    border-color: rgba(251, 191, 36, 0.3);
    color: var(--accent-gold);
}

.btn-upgrade-floating.frequency {
    border-color: rgba(6, 182, 212, 0.3);
    color: var(--type-aqua);
}

.btn-upgrade-floating:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn-upgrade-floating.intensity:hover:not(:disabled) {
    background: rgba(251, 191, 36, 0.2);
    border-color: var(--accent-gold);
    color: #fff;
    box-shadow: 0 0 15px rgba(251, 191, 36, 0.4);
}

.btn-upgrade-floating.frequency:hover:not(:disabled) {
    background: rgba(6, 182, 212, 0.2);
    border-color: var(--type-aqua);
    color: #fff;
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.4);
}

.btn-upgrade-floating:disabled {
    background: rgba(0, 0, 0, 0.4);
    border-color: rgba(239, 68, 68, 0.2) !important;
    color: rgba(239, 68, 68, 0.4) !important;
    cursor: not-allowed;
    filter: desaturate(0.5);
}

.btn-upgrade-floating .cost {
    font-size: 0.85rem;
    font-variant-numeric: tabular-nums;
}

.btn-upgrade-floating .icon {
    font-size: 1rem;
    opacity: 0.8;
}

.production-summary-floating {
    background: rgba(0, 0, 0, 0.3);
    padding: 12px;
    border-radius: 8px;
    font-size: 0.85rem;
}

.production-summary-floating div {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}

.production-summary-floating div:last-child {
    margin-bottom: 0;
}

.flavor-text-floating {
    font-style: italic;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 16px;
    line-height: 1.4;
}

.bonus-box-floating {
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.2);
    padding: 12px;
    border-radius: 8px;
}

.bonus-box-floating label {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--accent-blue);
    margin-bottom: 4px;
}

.bonus-value {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
}

/* Hero Image in Inspector */
.inspector-hero-image {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.4);
    margin-bottom: 16px;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-glass);
}

.inspector-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.inspector-hero-image .image-overlay {
    position: absolute;
    inset: 0;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
    background: radial-gradient(circle at center, transparent 40%, rgba(0, 0, 0, 0.3) 100%);
}

/* Credit Section */
.inspector-credit {
    margin-top: 20px;
    padding-top: 12px;
    border-top: 1px solid var(--border-glass);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.inspector-credit .label {
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.7;
}

.inspector-credit .val {
    font-weight: 600;
    color: var(--text-primary);
}

/* --- Inspector Action Button --- */
.btn-inspect-action {
    width: 100%;
    padding: 10px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-inspect-action.equip {
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid var(--accent-blue);
    color: var(--accent-blue);
}

.btn-inspect-action.equip:hover {
    background: var(--accent-blue);
    color: #fff;
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.4);
    transform: translateY(-2px);
}

.btn-inspect-action.unequip {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid #ef4444;
    color: #ef4444;
}

.btn-inspect-action.unequip:hover {
    background: #ef4444;
    color: #fff;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
    transform: translateY(-2px);
}