/* WIAsis 메인 스타일시트 */

:root {
    --primary-color: #2563eb;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --background: #f8fafc;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 헤더 스타일 */
header {
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 20px 0;
    box-shadow: var(--shadow);
}

header h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
}

header p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* 메인 컨텐츠 */
main {
    padding: 40px 0;
    min-height: calc(100vh - 200px);
}

/* 카드 스타일 */
.card {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.card h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.card h2 i {
    color: var(--primary-color);
}

/* 업로드 영역 */
.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 60px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #f8fafc;
}

.upload-area:hover {
    border-color: var(--primary-color);
    background-color: #f0f9ff;
}

.upload-area.drag-over {
    border-color: var(--primary-color);
    background-color: #e0f2fe;
}

.upload-area i {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 15px;
    display: block;
}

.upload-area p {
    color: var(--text-secondary);
    font-size: 16px;
}

/* 파일 정보 */
.file-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background-color: #f0f9ff;
    border-radius: 6px;
    margin-top: 15px;
}

.file-info i {
    color: var(--primary-color);
    font-size: 20px;
}

.file-info span {
    flex: 1;
    font-weight: 500;
}

/* 버튼 스타일 */
button {
    border: none;
    border-radius: 6px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #1d4ed8;
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background-color: #475569;
}

.btn-small {
    padding: 5px 10px;
    font-size: 12px;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 테이블 스타일 */
.table-wrapper {
    overflow-x: auto;
    margin-bottom: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background-color: #f8fafc;
    font-weight: 600;
    color: var(--text-primary);
}

tr:hover {
    background-color: #f8fafc;
}

/* 분석 그리드 */
.analysis-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.analysis-btn {
    background-color: white;
    border: 2px solid var(--border-color);
    padding: 30px 20px;
    text-align: center;
    transition: all 0.2s ease;
    flex-direction: column;
}

.analysis-btn:hover:not(:disabled) {
    border-color: var(--primary-color);
    background-color: #f0f9ff;
}

.analysis-btn i {
    font-size: 32px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.analysis-btn span {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

/* 변수 선택기 */
.variable-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.variable-list h3,
.variable-selected h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.var-container {
    min-height: 200px;
    background-color: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 15px;
}

.drop-zone {
    border: 2px dashed var(--border-color);
}

.drop-zone.drag-over {
    border-color: var(--primary-color);
    background-color: #e0f2fe;
}

.var-item {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 8px 12px;
    margin-bottom: 8px;
    cursor: move;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.var-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow);
}

.var-item i {
    color: var(--text-secondary);
}

/* 차트 컨테이너 */
.chart-container {
    margin: 30px 0;
    padding: 20px;
    background-color: #f8fafc;
    border-radius: 8px;
}

/* 액션 버튼 */
.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

/* 로딩 오버레이 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-overlay p {
    color: white;
    font-size: 18px;
    font-weight: 500;
}

/* 결과 섹션 */
#resultContent {
    margin-bottom: 30px;
}

.result-table {
    width: 100%;
    margin-bottom: 20px;
}

.result-table th {
    background-color: var(--primary-color);
    color: white;
}

/* 푸터 */
footer {
    background-color: var(--card-bg);
    border-top: 1px solid var(--border-color);
    padding: 20px 0;
    text-align: center;
}

footer p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .variable-selector {
        grid-template-columns: 1fr;
    }
    
    .analysis-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .action-buttons button {
        width: 100%;
    }
}


/* 언어 전환 버튼 */
header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.language-switcher {
    display: flex;
    gap: 5px;
}

.lang-btn {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    background-color: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lang-btn:hover {
    background-color: var(--background);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.lang-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* 언어별 숨김 처리 */
[data-lang-content] {
    display: none;
}

body[data-lang="ko"] [data-lang-content="ko"],
body[data-lang="en"] [data-lang-content="en"] {
    display: inline-block;
}

body[data-lang="ko"] [data-lang-text="ko"],
body[data-lang="en"] [data-lang-text="en"] {
    display: inline;
}

body[data-lang="ko"] [data-lang-text="en"],
body[data-lang="en"] [data-lang-text="ko"] {
    display: none;
}

/* 헤더 레이아웃 수정 */
header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.header-content {
    flex: 1;
}

/* 모바일 반응형 개선 */
@media (max-width: 768px) {
    header .container {
        padding: 15px;
    }
    
    header h1 {
        font-size: 24px;
    }
    
    header p {
        font-size: 12px;
        margin-bottom: 10px;
    }
    
    .language-switcher {
        position: absolute;
        top: 15px;
        right: 15px;
    }
    
    .card {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .analysis-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .analysis-btn {
        padding: 20px 15px;
    }
    
    .variable-selector {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    table {
        font-size: 12px;
    }
    
    th, td {
        padding: 8px;
    }
    
    .upload-area {
        padding: 40px 15px;
    }
    
    .upload-area i {
        font-size: 36px;
    }
    
    .upload-area p {
        font-size: 14px;
    }
    
    button {
        font-size: 12px;
        padding: 8px 16px;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .action-buttons button {
        width: 100%;
    }
}

/* 태블릿 반응형 */
@media (min-width: 769px) and (max-width: 1024px) {
    .analysis-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .container {
        padding: 0 30px;
    }
}

/* 아주 작은 화면 */
@media (max-width: 480px) {
    header h1 {
        font-size: 20px;
    }
    
    .lang-btn {
        padding: 4px 8px;
        font-size: 11px;
    }
    
    .card h2 {
        font-size: 18px;
    }
    
    .analysis-btn i {
        font-size: 24px;
    }
    
    .analysis-btn span {
        font-size: 12px;
    }
}

/* PWA 스타일 */
@media (display-mode: standalone) {
    body {
        padding-top: env(safe-area-inset-top);
    }
}

/* WIAvese 링크 버튼 */
.wiaverse-link {
    margin-right: 15px;
}

.wiaverse-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.wiaverse-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.wiaverse-btn i {
    font-size: 16px;
}

/* 헤더 레이아웃 조정 */
header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* 모바일에서 */
@media (max-width: 768px) {
    .wiaverse-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .wiaverse-btn span {
        display: none; /* 모바일에서는 텍스트 숨김 */
    }
    
    .header-right {
        position: absolute;
        top: 15px;
        right: 15px;
        gap: 10px;
    }
}

/* 예제 데이터 스타일 */
.upload-methods {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-bottom: 20px;
}

.upload-option {
    flex: 1;
}

.upload-divider {
    font-size: 18px;
    font-weight: bold;
    color: #6b7280;
    text-align: center;
    padding: 0 20px;
}

.example-section {
    text-align: center;
    padding: 20px;
    border: 2px dashed #e5e7eb;
    border-radius: 12px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.example-section h3 {
    color: #1f2937;
    margin-bottom: 8px;
    font-size: 20px;
}

.example-section p {
    color: #6b7280;
    margin-bottom: 20px;
}

.example-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.example-btn {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.example-btn:hover {
    border-color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.example-btn i {
    font-size: 24px;
    color: #3b82f6;
}

.example-btn span {
    font-weight: bold;
    color: #1f2937;
    font-size: 14px;
}

.example-btn small {
    color: #6b7280;
    font-size: 12px;
}

.file-actions {
    margin-top: 10px;
    display: flex;
    gap: 10px;
    justify-content: center;
}

/* 반응형 */
@media (max-width: 768px) {
    .upload-methods {
        flex-direction: column;
        gap: 20px;
    }
    
    .upload-divider {
        order: -1;
        padding: 10px 0;
    }
    
    .example-buttons {
        grid-template-columns: 1fr;
    }
}


/* Footer 스타일 */
footer {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    color: white;
    text-align: center;
    padding: 40px 0 30px;
    margin-top: 50px;
}

footer .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.pride-badge {
    margin-bottom: 10px;
}

.pride-badge strong {
    font-size: 20px;
    color: var(--primary-color);
    display: block;
}

.pride-message {
    margin: 10px 0 20px;
    font-size: 14px;
    color: #d1d5db;
    font-style: italic;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.copyright {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 20px;
}

/* 반응형 */
@media (max-width: 768px) {
    footer {
        padding: 30px 0 20px;
    }
    
    .pride-badge strong {
        font-size: 18px;
    }
    
.pride-message {
    margin: 10px 0 20px;
    font-size: 14px;
    color: #d1d5db;
    font-style: italic;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}
    
    .copyright {
        font-size: 11px;
    }
}

/* AI 버튼 스타일 */
.btn-ai {
    background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 10px 0;
}

.btn-ai:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #9333ea 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

/* 모달 스타일 */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header {
    background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 100%);
    color: white;
    padding: 20px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.close {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    opacity: 0.8;
}

.close:hover {
    opacity: 1;
}

.modal-body {
    padding: 30px;
}

.modal-footer {
    padding: 20px 30px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* API 키 입력 */
#apiKeyInput {
    width: 100%;
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 20px;
    font-family: monospace;
}

#apiKeyInput:focus {
    border-color: #8b5cf6;
    outline: none;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.api-help {
    background: #f8fafc;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #8b5cf6;
}

.api-help h4 {
    color: #8b5cf6;
    margin-bottom: 10px;
}

.api-help ol {
    margin: 10px 0;
    padding-left: 20px;
}

.api-help li {
    margin: 5px 0;
    color: #374151;
}

.safety-note {
    background: #ecfdf5;
    color: #065f46;
    padding: 10px;
    border-radius: 6px;
    margin-top: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* AI 해석 결과 */
.ai-result {
    max-width: 800px;
}

.ai-explanation {
    min-height: 200px;
    background: #f8fafc;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.ai-explanation .loading {
    text-align: center;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 100px;
}

.ai-explanation .content {
    line-height: 1.6;
    color: #374151;
}

.ai-explanation h4 {
    color: #8b5cf6;
    margin-bottom: 10px;
}

.ai-explanation ul, .ai-explanation ol {
    margin: 10px 0;
    padding-left: 20px;
}

.ai-explanation li {
    margin: 5px 0;
}

/* 반응형 */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .btn-ai {
        font-size: 12px;
        padding: 10px 16px;
    }
}

/* 카이제곱 교차표 스타일 */
.crosstab-section {
    margin: 20px 0;
    background: #f8fafc;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.crosstab-section h4 {
    color: #374151;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.result-table.crosstab {
    width: 100%;
    margin: 0;
    background: white;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.result-table.crosstab th {
    background: #4f46e5;
    color: white;
    font-weight: bold;
    text-align: center;
    padding: 12px 8px;
}

.result-table.crosstab td {
    text-align: center;
    padding: 10px 8px;
    border-bottom: 1px solid #e5e7eb;
}

.result-table.crosstab td:first-child {
    background: #f1f5f9;
    font-weight: bold;
    text-align: left;
}

.result-table.crosstab tr:last-child td {
    background: #f1f5f9;
    font-weight: bold;
    border-bottom: none;
}

.significant {
    color: #dc2626;
    font-weight: bold;
}

/* 분석 버튼 그리드 업데이트 */
.analysis-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

@media (max-width: 768px) {
    .analysis-buttons {
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
    }
}

/* Mann-Whitney 결과 스타일 */
.group-stats-section {
    margin: 20px 0;
    background: #f8fafc;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.group-stats-section h4 {
    color: #374151;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.group-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.group-stats {
    background: white;
    padding: 15px;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.group-stats h5 {
    color: #4f46e5;
    margin-bottom: 12px;
    text-align: center;
    font-weight: bold;
}

.result-table.mini {
    font-size: 13px;
    margin: 0;
}

.result-table.mini td {
    padding: 6px 8px;
}

.result-table.mini td:first-child {
    background: #f1f5f9;
    font-weight: 500;
    width: 40%;
}

.median-comparison {
    background: #e0f2fe;
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid #0284c7;
    text-align: center;
}

.median-comparison p {
    margin: 0;
    color: #0c4a6e;
    font-weight: 500;
}

/* 반응형 */
@media (max-width: 768px) {
    .group-comparison {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .group-stats {
        padding: 12px;
    }
    
    .result-table.mini {
        font-size: 12px;
    }
}

/* 다중 회귀분석 스타일 */
.model-summary {
    background: #f0f9ff;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #0284c7;
    margin-bottom: 20px;
}

.model-summary h4 {
    color: #0c4a6e;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.coefficients-section {
    margin: 20px 0;
    background: #f8fafc;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.coefficients-section h4 {
    color: #374151;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.result-table.regression {
    width: 100%;
    margin: 0;
    background: white;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    font-size: 14px;
}

.result-table.regression th {
    background: #4f46e5;
    color: white;
    font-weight: bold;
    text-align: center;
    padding: 12px 8px;
}

.result-table.regression td {
    text-align: center;
    padding: 10px 8px;
    border-bottom: 1px solid #e5e7eb;
}

.result-table.regression td:first-child {
    text-align: left;
    font-weight: 500;
}

.vif-section {
    margin: 20px 0;
    background: #fefce8;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #eab308;
}

.vif-section h4 {
    color: #a16207;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.result-table.vif {
    width: 100%;
    margin: 0 0 10px 0;
    background: white;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.result-table.vif th {
    background: #eab308;
    color: white;
    font-weight: bold;
    text-align: center;
    padding: 12px 8px;
}

.result-table.vif td {
    text-align: center;
    padding: 10px 8px;
    border-bottom: 1px solid #e5e7eb;
}

.result-table.vif td:first-child {
    text-align: left;
    font-weight: 500;
}

.low-vif {
    color: #059669;
    font-weight: 500;
}

.medium-vif {
    color: #d97706;
    font-weight: 500;
}

.high-vif {
    color: #dc2626;
    font-weight: bold;
}

.vif-note {
    margin: 10px 0 0 0;
    color: #a16207;
    font-style: italic;
}

/* 키 통계량 그리드 업데이트 */
.key-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 15px 0;
}

.stat-item {
    background: white;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 4px;
    font-weight: 500;
}

.stat-value {
    display: block;
    font-size: 18px;
    font-weight: bold;
    color: #1f2937;
}

.stat-value.significant {
    color: #dc2626;
}

/* 반응형 */
@media (max-width: 768px) {
    .key-stats {
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
    }
    
    .model-summary, .coefficients-section, .vif-section {
        padding: 15px;
    }
    
    .result-table.regression, .result-table.vif {
        font-size: 12px;
    }
    
    .result-table.regression th, .result-table.vif th,
    .result-table.regression td, .result-table.vif td {
        padding: 8px 4px;
    }
}

/* 로지스틱 회귀분석 스타일 */
.model-summary.logistic {
    background: #f0f9ff;
    border-left-color: #0284c7;
}

.odds-ratio-section {
    margin: 20px 0;
    background: #fef3c7;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #f59e0b;
}

.odds-ratio-section h4 {
    color: #92400e;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.result-table.logistic {
    width: 100%;
    margin: 0 0 10px 0;
    background: white;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    font-size: 13px;
}

.result-table.logistic th {
    background: #f59e0b;
    color: white;
    font-weight: bold;
    text-align: center;
    padding: 12px 8px;
}

.result-table.logistic td {
    text-align: center;
    padding: 10px 8px;
    border-bottom: 1px solid #e5e7eb;
}

.result-table.logistic td:first-child {
    text-align: left;
    font-weight: 500;
}

.odds-note {
    margin: 10px 0 0 0;
    color: #92400e;
    font-style: italic;
}

.confusion-matrix-section {
    margin: 20px 0;
    background: #ecfdf5;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #10b981;
}

.confusion-matrix-section h4 {
    color: #047857;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.result-table.confusion {
    width: 100%;
    margin: 0;
    background: white;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    font-size: 14px;
}

.result-table.confusion th {
    background: #10b981;
    color: white;
    font-weight: bold;
    text-align: center;
    padding: 12px 8px;
}

.result-table.confusion td {
    text-align: center;
    padding: 12px 8px;
    border-bottom: 1px solid #e5e7eb;
}

.result-table.confusion td:first-child {
    text-align: left;
    font-weight: 500;
    background: #f1f5f9;
}

.result-table.confusion .correct {
    background: #dcfce7;
    color: #166534;
    font-weight: bold;
}

.result-table.confusion .incorrect {
    background: #fef2f2;
    color: #991b1b;
    font-weight: bold;
}

/* 분석 버튼 그리드 업데이트 */
.analysis-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
    margin: 20px 0;
}

@media (max-width: 768px) {
    .analysis-buttons {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }
    
    .odds-ratio-section, .confusion-matrix-section {
        padding: 15px;
    }
    
    .result-table.logistic, .result-table.confusion {
        font-size: 11px;
    }
    
    .result-table.logistic th, .result-table.confusion th,
    .result-table.logistic td, .result-table.confusion td {
        padding: 8px 4px;
    }
}

/* Kruskal-Wallis 검정 스타일 */
.group-stats-table-section {
    margin: 20px 0;
    background: #f1f5f9;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #475569;
}

.group-stats-table-section h4 {
    color: #334155;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.result-table.kruskal {
    width: 100%;
    margin: 0;
    background: white;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    font-size: 13px;
}

.result-table.kruskal th {
    background: #475569;
    color: white;
    font-weight: bold;
    text-align: center;
    padding: 12px 8px;
}

.result-table.kruskal td {
    text-align: center;
    padding: 10px 8px;
    border-bottom: 1px solid #e2e8f0;
}

.result-table.kruskal td:first-child {
    text-align: left;
    font-weight: 500;
    background: #f8fafc;
}

.posthoc-section {
    margin: 20px 0;
    background: #fefce8;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #ca8a04;
}

.posthoc-section h4 {
    color: #a16207;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.result-table.posthoc {
    width: 100%;
    margin: 0 0 10px 0;
    background: white;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    font-size: 13px;
}

.result-table.posthoc th {
    background: #ca8a04;
    color: white;
    font-weight: bold;
    text-align: center;
    padding: 12px 8px;
}

.result-table.posthoc td {
    text-align: center;
    padding: 10px 8px;
    border-bottom: 1px solid #fef3c7;
}

.result-table.posthoc td:first-child {
    text-align: left;
    font-weight: 500;
}

.posthoc-note {
    margin: 10px 0 0 0;
    color: #a16207;
    font-style: italic;
}

/* 분석 버튼 그리드 마지막 업데이트 */
.analysis-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(125px, 1fr));
    gap: 10px;
    margin: 20px 0;
}

@media (max-width: 768px) {
    .analysis-buttons {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }
    
    .group-stats-table-section, .posthoc-section {
        padding: 15px;
    }
    
    .result-table.kruskal, .result-table.posthoc {
        font-size: 11px;
    }
    
    .result-table.kruskal th, .result-table.posthoc th,
    .result-table.kruskal td, .result-table.posthoc td {
        padding: 8px 4px;
    }
}

/* Wilcoxon 부호순위 검정 스타일 */
.prepost-comparison {
    margin: 20px 0;
    background: #f0fdf4;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #22c55e;
}

.prepost-comparison h4 {
    color: #15803d;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.comparison-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 20px;
    align-items: center;
}

.comparison-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.comparison-item h5 {
    color: #374151;
    margin-bottom: 10px;
    text-align: center;
    font-weight: bold;
}

.comparison-arrow {
    text-align: center;
    padding: 10px;
}

.comparison-arrow i {
    font-size: 24px;
    margin-bottom: 8px;
    display: block;
}

.comparison-arrow i.improvement {
    color: #22c55e;
}

.comparison-arrow i.decline {
    color: #ef4444;
}

.change-amount {
    font-size: 14px;
    text-align: center;
}

.change-amount strong {
    display: block;
    font-size: 18px;
    color: #1f2937;
}

.change-amount small {
    color: #6b7280;
}

.changes-summary {
    margin: 20px 0;
    background: #fefce8;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #eab308;
}

.changes-summary h4 {
    color: #a16207;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.changes-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 15px;
}

.change-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.change-item.improvement {
    border-top: 4px solid #22c55e;
}

.change-item.decline {
    border-top: 4px solid #ef4444;
}

.change-item.unchanged {
    border-top: 4px solid #6b7280;
}

.change-count {
    font-size: 28px;
    font-weight: bold;
    color: #1f2937;
    margin-bottom: 5px;
}

.change-label {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 3px;
}

.change-percent {
    font-size: 12px;
    color: #6b7280;
}

.rank-info {
    background: rgba(255, 255, 255, 0.7);
    padding: 10px;
    border-radius: 6px;
    text-align: center;
    font-size: 13px;
    color: #92400e;
}

/* 반응형 */
@media (max-width: 768px) {
    .comparison-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .comparison-arrow {
        order: 3;
    }
    
    .comparison-arrow i {
        font-size: 20px;
        transform: rotate(90deg);
    }
    
    .changes-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .prepost-comparison, .changes-summary {
        padding: 15px;
    }
}


/* 시계열 분석 CSS */
.timeseries-selector {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.var-group {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    background: #f9f9f9;
}

.var-group h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 14px;
}

.timeseries-var {
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.timeseries-var:hover {
    background: #e3f2fd;
    transform: translateX(5px);
}

.var-type {
    font-size: 12px;
    color: #666;
    margin-left: 5px;
}

.selected-var {
    background: #4CAF50;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.remove-var {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    margin-left: 10px;
}

.remove-var:hover {
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
}

.placeholder {
    color: #999;
    font-style: italic;
    padding: 20px;
    text-align: center;
    border: 2px dashed #ddd;
    border-radius: 6px;
}

#timeUnit {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}
1fr;
    gap: 10px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f5f5f5;
}

.stat-item label {
    font-weight: 500;
    color: #666;
}

.stat-item value {
    font-weight: bold;
    color: #333;
}

.trend-direction {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 8px;
}

.trend-direction.increasing {
    color: #4CAF50;
}

.trend-direction.decreasing {
    color: #F44336;
}

.trend-direction.stable {
    color: #FF9800;
}

.trend-strength {
    font-size: 14px;
    color: #666;
}

.seasonality-info, .stationarity-info {
    text-align: center;
}

.has-seasonality {
    color: #4CAF50;
}

.no-seasonality {
    color: #999;
}

.pattern-info {
    margin-top: 8px;
    font-size: 14px;
    color: #666;
}

.stationarity-result.stationary {
    color: #4CAF50;
}

.stationarity-result.non-stationary {
    color: #FF9800;
}

.interpretation {
    margin-top: 8px;
    font-size: 14px;
    color: #666;
}

.chart-container {
    grid-column: 1 / -1;
}

.chart-area {
    text-align: center;
    margin-top: 15px;
}

#tsCanvas {
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    max-width: 100%;
    height: auto;
}

.ai-interpretation {
    grid-column: 1 / -1;
    background: #f8f9fa;
}

.ai-content {
    line-height: 1.6;
}

.ai-content h4 {
    color: #333;
    margin: 15px 0 8px 0;
}

.ai-content p {
    margin: 8px 0;
    color: #555;
}

.ai-content li {
    margin: 5px 0;
    color: #666;
    list-style: none;
    padding-left: 15px;
    position: relative;
}

.ai-content li:before {
    content: '•';
    color: #4CAF50;
    position: absolute;
    left: 0;
}


/* PCA 분석 CSS */
.pca-selector {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.pca-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.checkbox-label input[type='checkbox'] {
    margin: 0;
}

.option-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.option-row label {
    min-width: 120px;
    font-weight: 500;
}

.pca-var {
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.pca-var:hover {
    background: #e3f2fd;
    transform: translateX(5px);
}

/* PCA 결과 CSS */
.pca-results {
    padding: 20px;
}

.components-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.component-item {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 12px;
    background: #f9f9f9;
}

.component-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.variance-badge {
    background: #4CAF50;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
}

.component-details {
    font-size: 14px;
    color: #666;
}

.interpretation {
    margin-bottom: 4px;
    font-style: italic;
}

.cumulative {
    font-size: 12px;
    color: #999;
}

.loadings-table {
    overflow-x: auto;
    margin-top: 10px;
}

.loadings-matrix {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.loadings-matrix th,
.loadings-matrix td {
    border: 1px solid #ddd;
    padding: 6px 8px;
    text-align: center;
}

.loadings-matrix th {
    background: #f5f5f5;
    font-weight: bold;
}

.variable-name {
    background: #f9f9f9 !important;
    font-weight: 500;
    text-align: left !important;
}

.loading-cell {
    font-family: 'Courier New', monospace;
    font-size: 11px;
}

.high-loading {
    font-weight: bold;
    border: 2px solid #333 !important;
}

#screeCanvas, #scatterCanvas {
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    max-width: 100%;
    height: auto;
}


/* K-means 분석 CSS */
.kmeans-selector {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.kmeans-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.kmeans-var {
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.kmeans-var:hover {
    background: #e3f2fd;
    transform: translateX(5px);
}

/* K-means 결과 CSS */
.kmeans-results {
    padding: 20px;
}

.clusters-overview {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.cluster-summary {
    padding: 15px;
    border-radius: 8px;
    background: #f9f9f9;
}

.cluster-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.cluster-size {
    background: #e0e0e0;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
}

.cluster-desc {
    font-size: 14px;
    color: #666;
    font-style: italic;
}

.profile-table {
    overflow-x: auto;
    margin-top: 15px;
}

.cluster-profile-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.cluster-profile-table th,
.cluster-profile-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: center;
}

.cluster-profile-table th {
    background: #f5f5f5;
    font-weight: bold;
}

.profile-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.mean-value {
    font-weight: bold;
    font-size: 14px;
}

.std-value {
    font-size: 10px;
    color: #999;
    margin-top: 2px;
}

#elbowCanvas, #clusterCanvas, #parallelCanvas {
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    max-width: 100%;
    height: auto;
}


/* 생존 분석 CSS */
.survival-selector {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.survival-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.survival-var {
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.survival-var:hover {
    background: #e3f2fd;
    transform: translateX(5px);
}

/* 생존 분석 결과 CSS */
.survival-results {
    padding: 20px;
}

.survival-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    background: #f5f5f5;
    border-radius: 6px;
}

.summary-item label {
    font-weight: 500;
    color: #666;
}

.summary-item value {
    font-weight: bold;
    color: #333;
}

.survival-probs {
    margin-top: 20px;
}

.prob-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 10px;
}

.prob-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    background: #e8f5e8;
    border-radius: 4px;
    border-left: 3px solid #4CAF50;
}

.time-label {
    font-size: 12px;
    color: #666;
}

.prob-value {
    font-weight: bold;
    color: #2E7D32;
}

.groups-comparison {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.group-item {
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
}

.group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.group-size {
    background: #e0e0e0;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
}

.group-stats {
    display: flex;
    gap: 15px;
    font-size: 14px;
    color: #666;
}

.logrank-test {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    background: #f0f0f0;
}

.test-result {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.test-result.significant {
    background: #e8f5e8;
    padding: 10px;
    border-radius: 6px;
    border-left: 4px solid #4CAF50;
}

.test-result.not-significant {
    background: #fff3e0;
    padding: 10px;
    border-radius: 6px;
    border-left: 4px solid #FF9800;
}

.p-value {
    font-family: 'Courier New', monospace;
    font-weight: bold;
}

.interpretation {
    font-weight: 500;
}

.risk-table {
    overflow-x: auto;
    margin-top: 15px;
}

.risk-table-content {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.risk-table-content th,
.risk-table-content td {
    border: 1px solid #ddd;
    padding: 8px 12px;
    text-align: center;
}

.risk-table-content th {
    background: #f5f5f5;
    font-weight: bold;
}

#survivalCanvas {
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    max-width: 100%;
    height: auto;
}
result.normal {
    color: #4CAF50;
    font-weight: bold;
}

.overall-result.non-normal {
    color: #FF9800;
    font-weight: bold;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.detail-section {
    background: white;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.detail-section h5 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 14px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 5px;
}

.stats-mini-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 10px;
}

.mini-stat {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    padding: 4px 0;
}

.mini-stat label {
    color: #666;
}

.mini-stat value {
    font-weight: bold;
    color: #333;
}

.distribution-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 8px;
}

.distrib-item {
    font-size: 11px;
    color: #666;
    font-style: italic;
}

.test-results {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.test-item {
    background: #f5f5f5;
    padding: 10px;
    border-radius: 4px;
}

.test-name {
    font-weight: bold;
    font-size: 12px;
    color: #333;
    margin-bottom: 5px;
}

.test-stats {
    font-size: 11px;
    color: #666;
}

.test-stats div {
    margin: 2px 0;
}

.conclusion.normal {
    color: #4CAF50;
    font-weight: bold;
}

.conclusion.non-normal {
    color: #FF9800;
    font-weight: bold;
}

.error {
    color: #f44336;
    font-style: italic;
}

.recommendations {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.recommendation-item {
    font-size: 12px;
    color: #555;
    line-height: 1.4;
}

.visualization-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

.viz-tab {
    padding: 8px 16px;
    border: none;
    background: none;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.viz-tab.active {
    border-bottom-color: #4CAF50;
    color: #4CAF50;
    font-weight: bold;
}

.viz-tab:hover {
    background: #f5f5f5;
}

.visualization-content {
    position: relative;
}

.viz-panel {
    display: none;
}

.viz-panel.active {
    display: block;
}

.chart-item {
    margin-bottom: 30px;
    text-align: center;
}

.chart-item h4 {
    margin-bottom: 10px;
    color: #333;
}

.chart-item canvas {
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    max-width: 100%;
}

/* 분산 동질성 검정 CSS */
.levene-selector {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.levene-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.levene-var {
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.levene-var:hover {
    background: #e3f2fd;
    transform: translateX(5px);
}

/* 분산 동질성 검정 결과 CSS */
.levene-results {
    padding: 20px;
}

.conclusion.homogeneous {
    color: #4CAF50;
    font-weight: bold;
}

.conclusion.heterogeneous {
    color: #FF9800;
    font-weight: bold;
}

.overall-conclusion {
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.overall-conclusion.homogeneous {
    background: #e8f5e8;
    border: 2px solid #4CAF50;
}

.overall-conclusion.heterogeneous {
    background: #fff3e0;
    border: 2px solid #FF9800;
}

.conclusion-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
}

.conclusion-header i {
    font-size: 24px;
}

.conclusion-text {
    font-size: 18px;
    font-weight: bold;
}

.conclusion-details {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.detail-item label {
    font-size: 12px;
    color: #666;
    margin-bottom: 4px;
}

.detail-item value {
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

.basic-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.test-results-detail {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.test-result-item {
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid;
}

.test-result-item.homogeneous {
    background: #e8f5e8;
    border-left-color: #4CAF50;
}

.test-result-item.heterogeneous {
    background: #fff3e0;
    border-left-color: #FF9800;
}

.test-result-item.error {
    background: #ffebee;
    border-left-color: #f44336;
}

.test-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.test-name {
    font-weight: bold;
    font-size: 16px;
}

.test-conclusion {
    background: rgba(255,255,255,0.8);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
}

.test-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 8px;
    font-size: 14px;
}

.test-description {
    font-size: 12px;
    color: #666;
    font-style: italic;
}

.test-error {
    color: #f44336;
    font-style: italic;
}

.group-variance-table {
    overflow-x: auto;
    margin-top: 15px;
}

.variance-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.variance-table th,
.variance-table td {
    border: 1px solid #ddd;
    padding: 8px 12px;
    text-align: center;
}

.variance-table th {
    background: #f5f5f5;
    font-weight: bold;
}

.group-name {
    background: #f9f9f9 !important;
    font-weight: 500;
    text-align: left !important;
}

.variance-value {
    font-weight: bold;
    color: #333;
}

.recommendations {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.recommendation-item {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.recommendation-item:last-child {
    border-bottom: none;
}

#leveneBoxplot, #leveneVariance, #leveneHistogram {
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    max-width: 100%;
    height: auto;
}

/* 🎯 WIAsis Enhanced Button Styles - 개선된 버튼 스타일 */

/* 기본 버튼 스타일 재정의 */
.btn, .analysis-btn, .btn-primary, .btn-secondary, .btn-success, .btn-warning, .btn-info, .btn-danger, .btn-ai {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 🎯 주요 실행 버튼 (Execute, Calculate 등) */
.btn-primary, .analysis-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover, .analysis-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

/* 📈 성공/계산 버튼 */
.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

/* 📄 보조 버튼 (Download, Reset 등) */
.btn-secondary {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.3);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #4b5563 0%, #374151 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(107, 114, 128, 0.4);
}

/* 🔄 경고/새로고침 버튼 */
.btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.btn-warning:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

/* 🤖 AI 설명 버튼 */
.btn-ai {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.btn-ai:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

/* ☕ 후원 버튼 특별 스타일 */
.btn-donate, .donation-btn {
    background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.3);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.btn-donate:hover, .donation-btn:hover {
    background: linear-gradient(135deg, #db2777 0%, #be185d 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(236, 72, 153, 0.4);
}

.btn-donate::before, .donation-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.btn-donate:hover::before, .donation-btn:hover::before {
    left: 100%;
}

/* 🎨 개선된 액션 버튼 컨테이너 */
.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 20px 0;
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    align-items: center;
    justify-content: center;
}

/* 🎯 버튼 그룹핑 */
.button-group, .button-group-main, .button-group-secondary {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.button-group-horizontal {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    margin: 15px 0;
}

.button-divider {
    width: 1px;
    height: 30px;
    background: #e2e8f0;
    margin: 0 10px;
}

/* 💫 로딩 및 비활성화 상태 */
.btn:disabled, .analysis-btn:disabled, .btn-primary:disabled, .btn-secondary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn-loading {
    position: relative;
    color: transparent;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 📱 반응형 개선 */
@media (max-width: 768px) {
    .action-buttons {
        flex-direction: column;
        align-items: center;
        padding: 15px;
    }
    
    .btn, .analysis-btn, .btn-primary, .btn-secondary, .btn-success, .btn-warning, .btn-info, .btn-danger, .btn-ai {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }

    .button-group, .button-group-main, .button-group-secondary, .button-group-horizontal {
        flex-direction: column;
        width: 100%;
        align-items: center;
    }

    .button-divider {
        width: 50%;
        height: 1px;
        margin: 10px 0;
    }
}


/* 🚀 글로벌 액션 바 (하단 고정) */
.global-action-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    backdrop-filter: blur(10px);
    border-top: 2px solid #3b82f6;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    padding: 12px 0;
}

.global-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 🎯 글로벌 버튼 스타일 */
.global-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 20px;
    border: none;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: white;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    min-width: 80px;
}

.global-btn i {
    font-size: 20px;
    margin-bottom: 4px;
}

.global-btn span {
    font-size: 11px;
    text-align: center;
    line-height: 1.2;
}

/* 🎨 글로벌 버튼 개별 스타일 */
.global-btn-reset {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.global-btn-reset:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.global-btn-download {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.global-btn-download:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.global-btn-settings {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.3);
}

.global-btn-settings:hover {
    background: linear-gradient(135deg, #4b5563 0%, #374151 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(107, 114, 128, 0.4);
}

/* 🎭 글로벌 버튼 특수 효과 */
.global-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s ease;
}

.global-btn:hover::before {
    left: 100%;
}

/* 📱 모바일 최적화 */
@media (max-width: 768px) {
    .global-actions {
        gap: 15px;
        padding: 0 15px;
    }
    
    .global-btn {
        min-width: 70px;
        padding: 10px 15px;
    }
    
    .global-btn i {
        font-size: 18px;
    }
    
    .global-btn span {
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .global-actions {
        gap: 10px;
        padding: 0 10px;
    }
    
    .global-btn {
        min-width: 60px;
        padding: 8px 12px;
    }
    
    .global-btn i {
        font-size: 16px;
    }
    
    .global-btn span {
        font-size: 9px;
    }
}

/* 🌟 본문 하단 여백 추가 (글로벌 액션 바 공간 확보) */
body {
    padding-bottom: 80px;
}

main {
    padding-bottom: 20px;
}

/* 🎯 각 섹션 버튼 단순화 */
.button-group-center {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
}

.action-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
    padding: 15px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

