/* 빈도분석 스타일 - 차이검정과 동일한 디자인 */

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

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

/* 빈도표 스타일 */
.frequency-table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

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

.frequency-table th {
    background: #f1f5f9;
    font-weight: 600;
    color: #1e40af;
    padding: 0.75rem;
    text-align: center;
    border: 1px solid #e2e8f0;
}

.frequency-table td {
    padding: 0.75rem;
    text-align: center;
    border: 1px solid #e2e8f0;
}

.frequency-table tbody tr:hover {
    background: #f8fafc;
}

/* 변수명 셀 */
.variable-name-cell {
    background: #f1f5f9 !important;
    color: #1e40af !important;
    font-weight: 700;
    text-align: center !important;
    vertical-align: middle !important;
    min-width: 150px;
    border-left: 4px solid #3b82f6 !important;
}

/* 범주 셀 */
.category-cell {
    text-align: left !important;
    font-weight: 500;
    color: #475569;
}

/* 숫자 셀 */
.number-cell {
    font-family: 'Monaco', 'Menlo', monospace;
    font-weight: 500;
    text-align: center;
}

/* 변수 구분선 */
.variable-separator td {
    border-top: 2px solid #cbd5e1;
}


/* 액션 버튼 */
.action-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

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

.download-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.warning {
    border-left: 4px solid #f59e0b;
}

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

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

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

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

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

    .frequency-table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .frequency-table,
    #dataPreview table {
        font-size: 0.8rem;
    }

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

    .action-buttons {
        gap: 0.5rem;
    }

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