/* ============================================================================
   DSD → Excel 변환기 - 스타일
   ============================================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: '맑은 고딕', 'Malgun Gothic', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #f5f7fa;
    color: #333;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Header */
.header {
    text-align: center;
    padding: 40px 20px 20px;
}

.header h1 {
    font-size: 28px;
    color: #1a365d;
    margin-bottom: 8px;
}

.header p {
    font-size: 14px;
    color: #718096;
}

/* Main Container */
.container {
    width: 100%;
    max-width: 640px;
    padding: 0 20px 40px;
}

/* Drop Zone */
.drop-zone {
    border: 2px dashed #cbd5e0;
    border-radius: 12px;
    padding: 48px 24px;
    text-align: center;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.drop-zone:hover {
    border-color: #4299e1;
    background: #ebf8ff;
}

.drop-zone.dragover {
    border-color: #3182ce;
    background: #bee3f8;
    transform: scale(1.01);
}

.drop-zone.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.drop-zone-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.drop-zone-text {
    font-size: 16px;
    color: #4a5568;
    margin-bottom: 8px;
}

.drop-zone-hint {
    font-size: 12px;
    color: #a0aec0;
}

.drop-zone input[type="file"] {
    display: none;
}

/* File Info */
.file-info {
    display: none;
    margin-top: 16px;
    padding: 12px 16px;
    background: #edf2f7;
    border-radius: 8px;
    font-size: 13px;
    color: #4a5568;
}

.file-info.visible {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.file-info .filename {
    font-weight: bold;
    color: #2d3748;
}

.file-info .filesize {
    color: #718096;
}

/* Progress */
.progress-area {
    display: none;
    margin-top: 20px;
}

.progress-area.visible {
    display: block;
}

.progress-bar-container {
    width: 100%;
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4299e1, #3182ce);
    border-radius: 3px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-bar.indeterminate {
    width: 30%;
    animation: indeterminate 1.5s infinite ease-in-out;
}

@keyframes indeterminate {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(400%); }
}

.progress-text {
    font-size: 13px;
    color: #4a5568;
    text-align: center;
}

/* Result */
.result-area {
    display: none;
    margin-top: 20px;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
}

.result-area.visible {
    display: block;
}

.result-area.success {
    background: #f0fff4;
    border: 1px solid #c6f6d5;
}

.result-area.error {
    background: #fff5f5;
    border: 1px solid #fed7d7;
}

.result-icon {
    font-size: 36px;
    margin-bottom: 8px;
}

.result-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 4px;
}

.result-area.success .result-title {
    color: #22543d;
}

.result-area.error .result-title {
    color: #9b2c2c;
}

.result-detail {
    font-size: 13px;
    color: #718096;
    margin-bottom: 16px;
}

.result-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background: #3182ce;
    color: #fff;
}

.btn-primary:hover {
    background: #2b6cb0;
}

.btn-secondary {
    background: #edf2f7;
    color: #4a5568;
}

.btn-secondary:hover {
    background: #e2e8f0;
}

/* Sheet Summary */
.sheet-summary {
    margin-top: 12px;
    font-size: 12px;
    color: #a0aec0;
    max-height: 80px;
    overflow-y: auto;
    line-height: 1.6;
}

/* Footer */
.footer {
    margin-top: auto;
    padding: 20px;
    text-align: center;
    font-size: 12px;
    color: #a0aec0;
}

.footer a {
    color: #4299e1;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 480px) {
    .header h1 {
        font-size: 22px;
    }

    .drop-zone {
        padding: 32px 16px;
    }

    .drop-zone-icon {
        font-size: 36px;
    }
}
