/* MMPI-2 Hybrid 시각화 전용 스타일 */

/* 척도 그리드 시스템 */
.scales-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.scale-item-detailed {
    background: white;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border-left: 4px solid #ddd;
}

.scale-item-detailed:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.scale-item-detailed.clinical {
    border-left-color: #e74c3c;
    background: linear-gradient(135deg, #fff 0%, #fdf2f2 100%);
}

.scale-item-detailed.elevated {
    border-left-color: #f39c12;
    background: linear-gradient(135deg, #fff 0%, #fffbf2 100%);
}

.scale-item-detailed.selected {
    border: 2px solid #3498db;
    background: linear-gradient(135deg, #fff 0%, #f0f8ff 100%);
}

.scale-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.scale-name {
    font-weight: 600;
    font-size: 16px;
    color: #2c3e50;
}

.scale-score {
    background: #34495e;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
}

.scale-bar-container {
    margin: 10px 0;
    position: relative;
}

.scale-bar-background {
    height: 20px;
    background: #ecf0f1;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

.scale-bar-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 1s ease;
    position: relative;
}

.scale-markers {
    position: absolute;
    top: -25px;
    width: 100%;
    height: 20px;
}

.marker {
    position: absolute;
    font-size: 10px;
    color: #7f8c8d;
    transform: translateX(-50%);
}

.scale-interpretation {
    font-size: 12px;
    color: #5d6d7e;
    margin-top: 8px;
    line-height: 1.4;
}

.btn-micro {
    background: #3498db;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 10px;
    cursor: pointer;
    position: absolute;
    top: 10px;
    right: 10px;
    transition: all 0.3s;
}

.btn-micro:hover {
    background: #2980b9;
    transform: scale(1.1);
}

/* 임상 척도 카드 */
.clinical-scales-detailed {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.clinical-scale-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    position: relative;
}

.clinical-scale-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 25px rgba(0,0,0,0.12);
}

.clinical-scale-card.clinical {
    border: 2px solid #e74c3c;
    background: linear-gradient(135deg, #fff 0%, #fdf2f2 100%);
}

.clinical-scale-card.clinical::before {
    content: "★";
    position: absolute;
    top: 10px;
    right: 10px;
    color: #e74c3c;
    font-size: 20px;
}

.scale-title {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.scale-title h5 {
    margin: 0;
    color: #2c3e50;
}

.scale-title small {
    color: #7f8c8d;
    font-size: 12px;
}

.t-score {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
}

.scale-details {
    margin: 15px 0;
}

.scale-percentile {
    background: #ecf0f1;
    color: #34495e;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    display: inline-block;
    margin-bottom: 8px;
}

.scale-description {
    font-size: 13px;
    line-height: 1.5;
    color: #5d6d7e;
    margin-bottom: 10px;
}

.clinical-significance {
    background: #ffeaa7;
    border-left: 4px solid #fdcb6e;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    color: #6c5ce7;
    font-weight: 600;
}

.btn-select-scale {
    background: transparent;
    border: 2px solid #3498db;
    color: #3498db;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
    margin-top: 10px;
}

.btn-select-scale:hover {
    background: #3498db;
    color: white;
}

.btn-select-scale.selected {
    background: #3498db;
    color: white;
}

/* RC 척도 그리드 */
.rc-scales-grid {
    margin: 20px 0;
}

.section-title {
    color: #2c3e50;
    margin: 20px 0 10px 0;
    font-weight: 600;
}

.normal-scales-compact {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0;
}

.scale-chip {
    background: #ecf0f1;
    color: #2c3e50;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
}

/* 내용 척도 히트맵 */
.content-scales-heatmap {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 3px 15px rgba(0,0,0,0.08);
}

.heatmap-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 8px;
    margin: 15px 0;
}

.heatmap-cell {
    aspect-ratio: 1;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.heatmap-cell:hover {
    border-color: #3498db;
    transform: scale(1.05);
}

.cell-label {
    font-size: 10px;
    font-weight: 600;
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
}

.cell-score {
    font-size: 12px;
    font-weight: 700;
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
}

.elevated-content-details {
    margin-top: 20px;
}

/* PSY-5 프로필 */
.psy5-radar-container {
    display: flex;
    justify-content: center;
    margin: 20px 0;
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.08);
}

.psy5-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.psy5-item {
    background: white;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.psy5-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}

.psy5-item.clinical {
    border-left: 4px solid #e74c3c;
}

.psy5-item.elevated {
    border-left: 4px solid #f39c12;
}

.psy5-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.psy5-name {
    font-size: 12px;
    color: #7f8c8d;
    margin-bottom: 8px;
}

.psy5-description {
    font-size: 13px;
    line-height: 1.4;
    color: #5d6d7e;
}

/* 프로필 비교 차트 */
.profile-chart-container {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 3px 15px rgba(0,0,0,0.08);
}

/* 해석 결과 스타일 */
.interpretation-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    padding: 30px;
    margin: 20px 0;
}

.selected-scales-summary {
    background: rgba(255,255,255,0.2);
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 14px;
}

.interpretation-text {
    line-height: 1.8;
    margin: 20px 0;
    font-size: 15px;
}

.interpretation-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.interpretation-actions .btn {
    flex: 1;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .scales-grid {
        grid-template-columns: 1fr;
    }
    
    .clinical-scales-detailed {
        grid-template-columns: 1fr;
    }
    
    .heatmap-grid {
        grid-template-columns: repeat(5, 1fr);
    }
    
    .psy5-details {
        grid-template-columns: 1fr;
    }
}

/* 애니메이션 */
@keyframes scaleSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.scale-item-detailed,
.clinical-scale-card,
.psy5-item {
    animation: scaleSlideIn 0.5s ease forwards;
}

/* 로딩 상태 */
.loading-scales {
    opacity: 0.6;
    pointer-events: none;
}

.loading-scales::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    border: 2px solid #3498db;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* 선택 상태 하이라이트 */
.scale-selected {
    border: 3px solid #3498db !important;
    background: linear-gradient(135deg, #fff 0%, #ebf3fd 100%) !important;
    position: relative;
}

.scale-selected::after {
    content: '✓';
    position: absolute;
    top: 10px;
    right: 10px;
    background: #3498db;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}