/**
 * 🔬 연구 시스템 프리미엄 스타일
 * NIKKE + Blue Archive 스타일
 */

/* ===== 연구 컨테이너 ===== */
#content-research {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 연구소 헤더 */
.research-header {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, rgba(107, 92, 231, 0.15), rgba(26, 26, 46, 0.9));
    border: 1px solid rgba(107, 92, 231, 0.3);
    border-radius: 16px;
}

.research-header h3 {
    color: #6B5CE7;
    margin: 0 0 10px 0;
    font-size: 1.3rem;
}

.research-header p {
    color: #888;
    margin: 0;
    font-size: 0.9rem;
}

/* 시설 목록 */
#facility-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* 시설 카드 */
.facility-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 18px;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.4), rgba(26, 26, 46, 0.8));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    transition: all 0.3s ease;
}

.facility-card:hover {
    border-color: rgba(107, 92, 231, 0.5);
    transform: translateX(5px);
}

/* 등급별 왼쪽 테두리 */
.facility-card.rarity-Normal {
    border-left: 4px solid #9E9E9E;
}

.facility-card.rarity-Unique {
    border-left: 4px solid #66BB6A;
}

.facility-card.rarity-Rare {
    border-left: 4px solid #42A5F5;
}

.facility-card.rarity-Special {
    border-left: 4px solid #AB47BC;
}

.facility-card.rarity-SR {
    border-left: 4px solid #FF7043;
}

.facility-card.rarity-SSR {
    border-left: 4px solid #EF5350;
}

.facility-card.rarity-UR {
    border-left: 4px solid #FFD700;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.05), rgba(26, 26, 46, 0.9));
}

/* 크리처 아이콘 */
.creature-icon {
    width: 70px;
    height: 70px;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.creature-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 정보 영역 */
.facility-card .info-area {
    flex: 1;
}

.facility-card .creature-name {
    font-size: 1.1rem;
    font-weight: bold;
    color: #fff;
    margin-bottom: 4px;
}

.facility-card .creature-level {
    font-size: 0.9rem;
    color: #aaa;
}

.facility-card .creature-count {
    font-size: 0.8rem;
    color: #666;
}

/* 강화 버튼 */
.btn-upgrade {
    min-width: 110px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #6B5CE7, #8B5CF6);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-upgrade:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(107, 92, 231, 0.4);
}

.btn-upgrade.disabled {
    background: #4a4a4a;
    cursor: not-allowed;
    opacity: 0.6;
}

/* 강화 성공 이펙트 */
@keyframes upgrade-success {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
        box-shadow: 0 0 30px rgba(76, 175, 80, 0.6);
    }

    100% {
        transform: scale(1);
    }
}

.facility-card.upgraded {
    animation: upgrade-success 0.5s ease;
}

/* 연구 진행 바 */
.research-progress {
    width: 100%;
    height: 6px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 3px;
    margin-top: 8px;
    overflow: hidden;
}

.research-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #6B5CE7, #a29bfe);
    border-radius: 3px;
    transition: width 0.5s ease;
}

/* 빈 상태 */
.research-empty {
    text-align: center;
    padding: 40px 20px;
    color: #888;
}

.research-empty .icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

/* 반응형 */
@media (max-width: 600px) {
    .facility-card {
        flex-direction: column;
        text-align: center;
    }

    .btn-upgrade {
        width: 100%;
    }
}

/* ========================================
   🌞 라이트 모드 - 연구 탭 (Research)
   Blue Archive 청량 스타일
   ======================================== */

[data-theme="light"] .research-header {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(255, 255, 255, 0.95));
    border: 1px solid rgba(59, 130, 246, 0.2);
}

[data-theme="light"] .research-header h3 {
    color: #1e40af;
}

[data-theme="light"] .research-header p {
    color: #64748b;
}

/* 시설 카드 */
[data-theme="light"] .facility-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(240, 248, 255, 0.9));
    border: 1px solid rgba(59, 130, 246, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .facility-card:hover {
    border-color: #3b82f6;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(255, 255, 255, 0.98));
    transform: translateX(5px);
}

/* 등급별 왼쪽 테두리는 색상 유지하되 투명도 조정 필요한 경우 오버라이드 */
[data-theme="light"] .facility-card.rarity-UR {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 255, 255, 0.95));
}

[data-theme="light"] .creature-icon {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
}

/* 정보 영역 */
[data-theme="light"] .facility-card .creature-name {
    color: #1e293b;
}

[data-theme="light"] .facility-card .creature-level {
    color: #64748b;
}

[data-theme="light"] .facility-card .creature-count {
    color: #94a3b8;
}

/* 강화 버튼 */
[data-theme="light"] .btn-upgrade {
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

[data-theme="light"] .btn-upgrade:hover {
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

[data-theme="light"] .btn-upgrade.disabled {
    background: #cbd5e1;
    color: #64748b;
}

/* 연구 진행 바 */
[data-theme="light"] .research-progress {
    background: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .research-progress-fill {
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
}

/* 빈 상태 */
[data-theme="light"] .research-empty {
    color: #64748b;
}