/* 차이검정 분석기 스타일 */

/* 기본 레이아웃 */
.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;
}

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

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

#dataPreview {
    overflow-x: auto;
    max-height: 400px;
}

#dataPreview table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

#dataPreview th,
#dataPreview td {
    border: 1px solid #e2e8f0;
    padding: 0.75rem;
    text-align: left;
}

#dataPreview th {
    background: #f1f5f9;
    font-weight: 600;
    color: #1e40af;
    position: sticky;
    top: 0;
}

#dataPreview tr:hover {
    background: #f8fafc;
}

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

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

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.setting-item {
    display: flex;
    flex-direction: column;
}

.setting-item label {
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.5rem;
}

.setting-select {
    padding: 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    transition: all 0.3s ease;
}

.setting-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.analyze-button {
    width: 100%;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    padding: 1rem;
    font-size: 1.1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.analyze-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.analyze-button:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    transform: 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 {
    background: #f8fafc;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid #3b82f6;
}

.result-card h4 {
    color: #1e40af;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.result-card p {
    margin: 0.5rem 0;
    color: #475569;
}

.result-card table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.result-card th,
.result-card td {
    border: 1px solid #e2e8f0;
    padding: 0.75rem;
    text-align: left;
}

.result-card th {
    background: #f1f5f9;
    font-weight: 600;
    color: #1e40af;
}

.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;
}

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

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

    .settings-grid {
        grid-template-columns: 1fr;
    }

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

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

    .log-controls {
        flex-wrap: wrap;
    }

    .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;
    }

    .settings-grid {
        gap: 0.75rem;
    }

    .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;
    }
}
