/* 검정력 분석 전용 스타일 */

.power-form-container {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin: 15px 0;
    border: 1px solid #e9ecef;
}

.power-info {
    background: #e8f5e8;
    border-left: 4px solid #4caf50;
    padding: 15px;
    margin: 15px 0;
    border-radius: 5px;
}

.power-info p {
    margin: 0;
    color: #2e7d32;
    font-weight: 500;
}

.power-input-section {
    margin: 20px 0;
}

.power-input-section h5 {
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #f0f0f0;
}

.info-text {
    color: #666;
    font-style: italic;
    margin-bottom: 20px;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 5px;
}

.range-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
}

.range-inputs span {
    font-weight: bold;
    color: #666;
}

/* 검정력 분석 결과 스타일 */
.power-analysis-results {
    background: linear-gradient(135deg, #4caf50 0%, #2e7d32 100%);
    color: white;
    border-radius: 15px;
    padding: 30px;
    margin: 20px 0;
}

.power-analysis-results h3 {
    color: white;
    margin-bottom: 25px;
    text-align: center;
}

.power-summary {
    display: flex;
    gap: 20px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.power-value-card, .sample-size-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 20px;
    flex: 1;
    min-width: 200px;
    text-align: center;
}

.power-value-card h4, .sample-size-card h4 {
    color: white;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.power-value, .sample-size-value {
    font-size: 2.5em;
    font-weight: bold;
    margin: 10px 0;
}

.sample-description {
    font-size: 1em;
    color: #e8f5e8;
    margin-top: 5px;
}

/* 검정력 수준별 색상 */
.power-value-card.excellent .power-value {
    color: #76ff03;
}

.power-value-card.good .power-value {
    color: #4caf50;
}

.power-value-card.fair .power-value {
    color: #ff9800;
}

.power-value-card.poor .power-value {
    color: #f44336;
}

.power-interpretation {
    font-size: 1.1em;
    font-weight: 500;
    margin-top: 10px;
    padding: 8px 16px;
    border-radius: 20px;
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
}

/* 검정력 게이지 */
.power-gauge {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
}

.power-gauge h4 {
    color: white;
    text-align: center;
    margin-bottom: 20px;
}

.gauge-container {
    position: relative;
    margin: 20px 0;
}

.gauge-bar {
    height: 20px;
    background: linear-gradient(to right, 
        #f44336 0% 50%, 
        #ff9800 50% 80%, 
        #4caf50 80% 95%, 
        #76ff03 95% 100%);
    border-radius: 10px;
    position: relative;
    margin: 20px 0;
}

.gauge-marker {
    position: absolute;
    top: -5px;
    width: 30px;
    height: 30px;
    background: white;
    border: 3px solid #333;
    border-radius: 50%;
    transform: translateX(-50%);
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.gauge-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
}

.gauge-labels span {
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.9em;
    text-align: center;
    min-width: 60px;
}

/* 권장사항 */
.power-recommendations {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
}

.power-recommendations h4 {
    color: white;
    margin-bottom: 15px;
}

.recommendation-text {
    color: #e8f5e8;
    font-size: 1.1em;
    line-height: 1.6;
}

/* 테이블 스타일 */
.power-table, .sensitivity-table {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
}

.power-table h4, .sensitivity-table h4 {
    color: white;
    margin-bottom: 15px;
    text-align: center;
}

.power-comparison-table, .sensitivity-comparison-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    overflow: hidden;
}

.power-comparison-table th, .sensitivity-comparison-table th {
    background: #333;
    color: white;
    padding: 12px;
    text-align: center;
    font-weight: 600;
}

.power-comparison-table td, .sensitivity-comparison-table td {
    padding: 10px;
    text-align: center;
    color: #333;
    border-bottom: 1px solid #eee;
}

.power-comparison-table tr:nth-child(even) td,
.sensitivity-comparison-table tr:nth-child(even) td {
    background: rgba(0, 0, 0, 0.05);
}

.power-comparison-table tr.recommended {
    background: rgba(76, 175, 80, 0.2) !important;
    font-weight: bold;
}

/* 검정력 수준 라벨 */
.power-level {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.9em;
    font-weight: 500;
}

.power-level.excellent {
    background: #76ff03;
    color: #1b5e20;
}

.power-level.good {
    background: #4caf50;
    color: white;
}

.power-level.fair {
    background: #ff9800;
    color: white;
}

.power-level.poor {
    background: #f44336;
    color: white;
}

/* 민감도 분석 차트 */
.sensitivity-chart {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
}

.sensitivity-chart h4 {
    color: white;
    text-align: center;
    margin-bottom: 20px;
}

.chart-container {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    padding: 15px;
    display: flex;
    justify-content: center;
}

/* AI 해석 스타일 (power-analysis 특화) */
.power-analysis-results .ai-interpretation {
    background: rgba(33, 150, 243, 0.2);
    border: 2px solid #2196f3;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
}

.power-analysis-results .ai-interpretation h4 {
    color: #2196f3;
    margin-bottom: 15px;
}

.power-analysis-results .ai-text {
    color: #e3f2fd;
    font-size: 1.1em;
    line-height: 1.6;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .power-summary {
        flex-direction: column;
    }
    
    .range-inputs {
        flex-direction: column;
        gap: 5px;
    }
    
    .range-inputs input {
        width: 100% !important;
    }
    
    .gauge-labels {
        flex-direction: column;
        gap: 5px;
        align-items: center;
    }
    
    .power-value, .sample-size-value {
        font-size: 2em;
    }
    
    .power-comparison-table, .sensitivity-comparison-table {
        font-size: 0.9em;
    }
}

/* 폼 요소 개선 */
#poweranalysis-section .form-control {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 10px 15px;
    font-size: 1em;
    transition: all 0.3s ease;
}

#poweranalysis-section .form-control:focus {
    border-color: #4caf50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
    outline: none;
}

#poweranalysis-section .btn-primary {
    background: linear-gradient(135deg, #4caf50 0%, #2e7d32 100%);
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
}

#poweranalysis-section .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.4);
}

#poweranalysis-section .btn-primary:disabled {
    background: #ccc;
    transform: none;
    box-shadow: none;
}

#poweranalysis-section .btn-secondary {
    background: #6c757d;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
}

#poweranalysis-section .btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

/* 로딩 상태 */
.power-loading {
    text-align: center;
    padding: 40px;
    color: #4caf50;
}

.power-loading i {
    font-size: 2em;
    animation: spin 1s linear infinite;
}

/* 애니메이션 */
@keyframes powerGlow {
    0% { box-shadow: 0 0 5px rgba(76, 175, 80, 0.5); }
    50% { box-shadow: 0 0 20px rgba(76, 175, 80, 0.8); }
    100% { box-shadow: 0 0 5px rgba(76, 175, 80, 0.5); }
}

.power-value-card.good {
    animation: powerGlow 2s ease-in-out infinite;
}

/* 툴팁 */
.power-tooltip {
    position: relative;
    display: inline-block;
    cursor: help;
}

.power-tooltip .tooltiptext {
    visibility: hidden;
    width: 250px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 10px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -125px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.9em;
}

.power-tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}
