/* ===== 기본 설정 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --secondary-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--bg-light);
}

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

/* ===== Hero Section ===== */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
}

.hero-content {
    animation: fadeInUp 0.8s ease-out;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hero-title i {
    margin-right: 15px;
}

.hero-subtitle {
    font-size: 1.3rem;
    font-weight: 300;
    margin-bottom: 40px;
    opacity: 0.95;
}

.hero-subtitle strong {
    font-weight: 700;
    text-decoration: underline;
}

.value-props {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.value-prop {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 500;
}

.value-prop i {
    color: var(--secondary-color);
    font-size: 1.3rem;
}

/* ===== Upload Section ===== */
.upload-section {
    padding: 60px 0;
    background: white;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 30px;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 15px;
}

.section-title i {
    color: var(--primary-color);
}

.upload-area {
    border: 3px dashed var(--border-color);
    border-radius: 16px;
    padding: 60px 40px;
    text-align: center;
    background: var(--bg-light);
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover {
    border-color: var(--primary-color);
    background: #eff6ff;
    transform: translateY(-2px);
}

.upload-area.dragover {
    border-color: var(--primary-color);
    background: #eff6ff;
    transform: scale(1.02);
}

.upload-icon {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.upload-area h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.upload-area p {
    color: var(--text-light);
    margin-bottom: 25px;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.upload-info {
    margin-top: 20px;
    display: flex;
    gap: 30px;
    justify-content: center;
    flex-wrap: wrap;
}

.upload-info p {
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 8px;
}

.upload-info i {
    color: var(--primary-color);
}

/* ===== Results Section ===== */
.results-section {
    padding: 60px 0;
    background: var(--bg-light);
}

.table-container {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 40px;
    box-shadow: var(--shadow-md);
}

.table-wrapper {
    overflow-x: auto;
    margin-top: 20px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.data-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.data-table th {
    padding: 16px 12px;
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
}

.data-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s ease;
}

.data-table tbody tr:hover {
    background: var(--bg-light);
}

.data-table tbody tr.total-row {
    background: #fef3c7;
    font-weight: 700;
    border-top: 2px solid var(--warning-color);
}

.data-table tbody tr.total-row:hover {
    background: #fde68a;
}

.data-table td {
    padding: 14px 12px;
    color: var(--text-dark);
}

.data-table td.positive {
    color: var(--secondary-color);
    font-weight: 600;
}

.data-table td.negative {
    color: var(--danger-color);
    font-weight: 600;
}

/* ===== Charts ===== */
.charts-container {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 40px;
    box-shadow: var(--shadow-md);
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.chart-box {
    background: var(--bg-light);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.chart-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-dark);
    text-align: center;
}

.chart-container {
    position: relative;
}

/* ===== Download Section ===== */
.download-section {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 40px;
    box-shadow: var(--shadow-md);
}

.download-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.btn-download {
    background: var(--secondary-color);
    color: white;
    border: none;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-download:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* ===== Info Section ===== */
.info-section {
    padding: 60px 0;
    background: white;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.info-card {
    background: var(--bg-light);
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
}

.info-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.info-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.info-card ul {
    list-style: none;
    padding-left: 0;
}

.info-card li {
    padding: 8px 0;
    color: var(--text-dark);
    line-height: 1.6;
}

.info-card li strong {
    color: var(--primary-color);
}

.message-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    padding: 30px;
    margin-top: 30px;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.message-box h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.message-box p {
    font-size: 1.1rem;
    opacity: 0.95;
    line-height: 1.7;
}

/* ===== Footer ===== */
.footer {
    background: var(--text-dark);
    color: white;
    text-align: center;
    padding: 30px 0;
}

.footer p {
    opacity: 0.9;
}

/* ===== Animations ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp 0.6s ease-out;
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .value-props {
        flex-direction: column;
        gap: 15px;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .upload-area {
        padding: 40px 20px;
    }

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

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

    .btn-download {
        width: 100%;
        justify-content: center;
    }

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

    .data-table {
        font-size: 0.85rem;
    }

    .data-table th,
    .data-table td {
        padding: 10px 8px;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 50px 0;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .upload-info {
        flex-direction: column;
        gap: 10px;
    }
}

/* ===== Utility Classes ===== */
.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.hidden {
    display: none !important;
}
