/* 상관관계 분석기 스타일 */

/* 기본 레이아웃 */
.analyzer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* 페이지 제목 */
.page-title {
    text-align: center;
    margin-bottom: 3rem;
}

.page-title h1 {
    color: #1e40af;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.page-title p {
    color: #6b7280;
    font-size: 1.1rem;
}

/* 업로드 섹션 */
.upload-section {
    margin-bottom: 2rem;
}

.upload-area {
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 3rem;
    text-align: center;
    background: #f8fafc;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover {
    border-color: #3b82f6;
    background: #eff6ff;
}

.upload-area.drag-over {
    border-color: #3b82f6;
    background: #dbeafe;
    transform: scale(1.02);
}

.upload-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.upload-text {
    font-size: 1.2rem;
    color: #475569;
    margin-bottom: 1.5rem;
}

.upload-button {
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    font-size: 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.file-input {
    display: none;
}

/* 결과 섹션 */
.results-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.results-section h3 {
    color: #1e40af;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

#analysisResults {
    margin-bottom: 1.5rem;
}

/* 결과 카드 */
.result-card {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    max-height: 600px;
    overflow-y: auto;
}

.result-card h4 {
    color: #1e40af;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: 700;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #3b82f6;
}

.result-card::-webkit-scrollbar {
    width: 8px;
}

.result-card::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.result-card::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.result-card::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.result-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.result-table th,
.result-table td {
    padding: 0.75rem;
    text-align: center;
    border: 1px solid #e5e7eb;
}

.result-table th {
    background: #f3f4f6;
    font-weight: 600;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.download-button,
.copy-button {
    flex: 1;
    min-width: 200px;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.download-button {
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    color: white;
}

.copy-button {
    background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
    color: white;
}

.download-button:hover,
.copy-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* 알림 */
.notification {
    position: fixed;
    top: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 1000;
}

.notification.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.notification.success {
    border-left: 4px solid #10b981;
}

.notification.error {
    border-left: 4px solid #ef4444;
}

.notification.info {
    border-left: 4px solid #3b82f6;
}

.notification.warning {
    border-left: 4px solid #f59e0b;
}

/* 로딩 오버레이 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-overlay.show {
    display: flex;
}

.loading-spinner {
    text-align: center;
    background: white;
    padding: 2rem 3rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 1rem;
    border: 4px solid #f3f4f6;
    border-top: 4px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-text {
    margin: 0;
    font-size: 1rem;
    color: #475569;
    font-weight: 500;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .analyzer-container {
        padding: 1rem;
    }

    .page-title h1 {
        font-size: 2rem;
    }

    .action-buttons {
        flex-direction: column;
    }

    .download-button,
    .copy-button {
        min-width: 100%;
    }

    .notification {
        top: 1rem;
        right: 1rem;
        left: 1rem;
    }
}

/* 소형 모바일 (480px 이하) */
@media (max-width: 480px) {
    .analyzer-container {
        padding: 0.5rem;
    }

    .page-title h1 {
        font-size: 1.5rem;
    }

    .upload-area {
        padding: 1.5rem 0.75rem;
    }

    .upload-area p {
        font-size: 0.85rem;
    }

    /* 데이터 테이블 가로 스크롤 */
    .table-container,
    .data-preview {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .data-table,
    table {
        font-size: 0.8rem;
    }

    .data-table th,
    .data-table td,
    table th,
    table td {
        padding: 0.4rem 0.2rem;
        white-space: nowrap;
    }

    .action-buttons {
        gap: 0.5rem;
    }

    .download-button,
    .copy-button {
        font-size: 0.85rem;
        padding: 0.6rem 1rem;
    }

    .section-header h2,
    .result-section h2 {
        font-size: 1.1rem;
    }
}
