/* 교회 헌금 집계 시스템 스타일시트 */

/* 기본 스타일 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

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

/* 헤더 스타일 */
header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px 0;
    border-bottom: 2px solid #4a6fa5;
}

header h1 {
    color: #2c3e50;
    font-size: 2.5rem;
    margin-bottom: 10px;
}

header p {
    color: #7f8c8d;
    font-size: 1.2rem;
}

/* 플래시 메시지 */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    text-align: center;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* 파일 업로드 섹션 */
.upload-form {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.file-upload-section {
    margin-bottom: 30px;
}

.file-upload-section h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.file-input-wrapper {
    position: relative;
}

input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-label {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    border: 2px dashed #4a6fa5;
    border-radius: 8px;
    background-color: #f8f9fa;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-label:hover {
    background-color: #e9ecef;
    border-color: #3a5a80;
}

.file-icon {
    font-size: 2rem;
    margin-right: 15px;
}

.file-text {
    font-size: 1.1rem;
    color: #495057;
}

/* 처리 버튼 섹션 */
.process-button-section {
    text-align: center;
    margin-top: 40px;
}

.process-button {
    background: linear-gradient(135deg, #4a6fa5, #3a5a80);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.process-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    background: linear-gradient(135deg, #3a5a80, #2c4a6a);
}

.button-icon {
    font-size: 1.5rem;
    margin-right: 10px;
}

/* 결과 페이지 스타일 */
.result-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.result-header h2 {
    color: #27ae60;
    font-size: 2rem;
    margin-bottom: 15px;
}

.result-filename {
    font-size: 1.1rem;
    color: #7f8c8d;
    margin-bottom: 20px;
}

.download-button {
    display: inline-block;
    background: linear-gradient(135deg, #27ae60, #219653);
    color: white;
    text-decoration: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.download-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    background: linear-gradient(135deg, #219653, #1e8449);
}

/* 결과 섹션 */
.result-sections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.result-section {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.result-section h3 {
    color: #2c3e50;
    font-size: 1.5rem;
    margin-bottom: 20px;
    text-align: center;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.result-grid {
    display: grid;
    gap: 15px;
}

.result-item {
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 8px;
    background-color: #f8f9fa;
}

.result-label {
    display: block;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.result-value {
    display: block;
    color: #4a6fa5;
    font-family: 'Courier New', monospace;
    font-size: 1rem;
}

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

.back-button, .history-button {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.back-button {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.history-button {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
    color: white;
}

.back-button:hover, .history-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* 이력 페이지 스타일 */
.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.history-header h2 {
    color: #2c3e50;
    font-size: 2rem;
}

.history-table-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
}

.history-table th, .history-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.history-table th {
    background-color: #4a6fa5;
    color: white;
    font-weight: bold;
}

.history-table tbody tr:hover {
    background-color: #f8f9fa;
}

.download-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: #27ae60;
    font-weight: bold;
}

.link-icon {
    margin-right: 5px;
}

.no-history {
    text-align: center;
    padding: 50px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.no-history p {
    font-size: 1.2rem;
    color: #7f8c8d;
}

/* 푸터 스타일 */
footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px 0;
    color: #7f8c8d;
    border-top: 1px solid #eee;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    header p {
        font-size: 1rem;
    }
    
    .upload-form {
        padding: 20px;
    }
    
    .result-sections {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 15px;
    }
    
    .history-header {
        flex-direction: column;
        gap: 20px;
    }
    
    .history-table {
        font-size: 0.9rem;
    }
    
    .history-table th, .history-table td {
        padding: 10px;
    }
    
    .file-label {
        flex-direction: column;
        text-align: center;
    }
    
    .file-icon {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .process-button {
        width: 100%;
        padding: 15px;
    }
    
    .result-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.8rem;
    }
    
    .file-label {
        padding: 15px;
    }
    
    .process-button {
        font-size: 1rem;
    }
    
    .result-header h2 {
        font-size: 1.5rem;
    }
    
    .result-section h3 {
        font-size: 1.3rem;
    }
    
    .history-header h2 {
        font-size: 1.5rem;
    }
}
