/* 신뢰구간 계산기 전용 스타일 */

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

.ci-info {
    background: #e1f5fe;
    border-left: 4px solid #03a9f4;
    padding: 15px;
    margin: 15px 0;
    border-radius: 5px;
}

.ci-info p {
    margin: 0;
    color: #0277bd;
    font-weight: 500;
}

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

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

.ci-input-section h6 {
    color: #666;
    margin-bottom: 10px;
    font-weight: 600;
}

.calculated-proportion,
.calculated-std,
.calculated-diff,
.calculated-prop-diff,
.proportion-display {
    background: #f0f8ff;
    padding: 10px;
    border-radius: 5px;
    margin: 10px 0;
    font-size: 1.1em;
}

.correlation-info {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 5px;
    margin: 15px 0;
}

.correlation-info p {
    margin: 5px 0;
}

/* 신뢰구간 분석 결과 스타일 */
.ci-analysis-results {
    background: linear-gradient(135deg, #03a9f4 0%, #0277bd 100%);
    color: white;
    border-radius: 15px;
    padding: 30px;
    margin: 20px 0;
}

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

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

.ci-interval-card, .ci-details-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 20px;
    flex: 1;
    min-width: 250px;
}

.ci-interval-card h4, .ci-details-card h4 {
    color: white;
    margin-bottom: 15px;
    font-size: 1.1em;
}

.ci-interval {
    font-size: 2.2em;
    font-weight: bold;
    color: #e1f5fe;
    margin: 15px 0;
    text-align: center;
    letter-spacing: 1px;
}

.ci-point-estimate,
.ci-margin-error,
.ci-method {
    font-size: 1.1em;
    margin: 10px 0;
    color: #e1f5fe;
}

.ci-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);
    text-align: center;
    width: 100%;
}

/* 신뢰구간 시각화 */
.ci-visualization {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
}

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

.ci-chart-container {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    padding: 30px 20px;
    margin: 15px 0;
}

.ci-bar {
    position: relative;
    height: 40px;
    background: #e0e0e0;
    border-radius: 20px;
    margin: 40px 0;
}

.ci-range {
    position: absolute;
    top: 0;
    height: 100%;
    background: linear-gradient(90deg, #03a9f4, #0277bd);
    border-radius: 20px;
    box-shadow: 0 2px 10px rgba(3, 169, 244, 0.3);
}

.ci-point {
    position: absolute;
    top: -10px;
    width: 20px;
    height: 60px;
    background: #ff5722;
    border-radius: 10px;
    transform: translateX(-50%);
    box-shadow: 0 2px 8px rgba(255, 87, 34, 0.4);
}

.ci-bounds {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    font-weight: bold;
    color: #333;
}

.lower-bound, .upper-bound {
    color: #0277bd;
    font-size: 1.1em;
}

.point-estimate {
    color: #ff5722;
    font-size: 1.2em;
    font-weight: bold;
}

/* 해석 가이드 */
.ci-interpretation-guide {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
}

.ci-interpretation-guide h4 {
    color: white;
    margin-bottom: 15px;
}

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

/* AI 해석 스타일 (신뢰구간 특화) */
.ci-analysis-results .ai-interpretation {
    background: rgba(76, 175, 80, 0.2);
    border: 2px solid #4caf50;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
}

.ci-analysis-results .ai-interpretation h4 {
    color: #4caf50;
    margin-bottom: 15px;
}

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

/* 라디오 그룹 개선 */
.radio-group {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin: 10px 0;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 5px;
    transition: background-color 0.3s;
    border: 1px solid #ddd;
}

.radio-group label:hover {
    background-color: #f5f5f5;
}

.radio-group label:has(input:checked) {
    background-color: #e3f2fd;
    border-color: #03a9f4;
}

.radio-group input[type="radio"] {
    margin: 0;
}

/* 행 레이아웃 */
.row {
    display: flex;
    gap: 20px;
    margin: 20px 0;
}

.col {
    flex: 1;
    background: white;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #ddd;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .ci-summary {
        flex-direction: column;
    }
    
    .row {
        flex-direction: column;
        gap: 15px;
    }
    
    .radio-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .ci-interval {
        font-size: 1.8em;
    }
    
    .ci-bounds {
        flex-direction: column;
        text-align: center;
        gap: 5px;
    }
}

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

#confidenceinterval-section .form-control:focus {
    border-color: #03a9f4;
    box-shadow: 0 0 0 3px rgba(3, 169, 244, 0.1);
    outline: none;
}

#confidenceinterval-section .btn-primary {
    background: linear-gradient(135deg, #03a9f4 0%, #0277bd 100%);
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
}

#confidenceinterval-section .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(3, 169, 244, 0.4);
}

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

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

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

/* 체크박스 스타일링 */
#confidenceinterval-section input[type="checkbox"] {
    margin-right: 8px;
    transform: scale(1.2);
}

/* 계산된 값 표시 강조 */
.calculated-proportion strong,
.calculated-std strong,
.calculated-diff strong,
.calculated-prop-diff strong,
.proportion-display strong {
    color: #0277bd;
}

/* 로딩 상태 */
.ci-loading {
    text-align: center;
    padding: 40px;
    color: #03a9f4;
}

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

/* 신뢰구간 시각화 개선 */
.ci-chart-container::before {
    content: "95% 신뢰구간";
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    background: #03a9f4;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.9em;
    font-weight: 500;
}

/* 정보 텍스트 스타일 */
.info-text {
    color: #666;
    font-style: italic;
    margin-bottom: 20px;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 5px;
    border-left: 3px solid #03a9f4;
}

/* 수식 표시 개선 */
.ci-input-section label {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
    display: block;
}

/* 작은 설명 텍스트 */
.ci-input-section small {
    color: #666;
    font-size: 0.9em;
    margin-top: 5px;
    display: block;
}

/* 애니메이션 */
@keyframes ciGlow {
    0% { box-shadow: 0 0 5px rgba(3, 169, 244, 0.5); }
    50% { box-shadow: 0 0 20px rgba(3, 169, 244, 0.8); }
    100% { box-shadow: 0 0 5px rgba(3, 169, 244, 0.5); }
}

.ci-interval-card {
    animation: ciGlow 3s ease-in-out infinite;
}

/* 신뢰구간 정확도 표시 */
.ci-interpretation {
    background: rgba(255, 255, 255, 0.2) !important;
}

/* 신뢰구간 비교 테이블 */
.ci-comparison-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    overflow: hidden;
    margin: 15px 0;
}

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

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

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