@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;500;600;700&display=swap');

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

body {
    font-family: 'Noto Sans KR', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

.header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
    padding: 30px 0;
}

.header h1 {
    font-size: 32px;
    margin-bottom: 10px;
}

.header p {
    font-size: 16px;
    opacity: 0.9;
}

main {
    display: grid;
    gap: 40px;
}

.upload-section {
    margin-bottom: 40px;
}

.upload-box {
    background: white;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.file-input-wrapper {
    position: relative;
    margin-bottom: 20px;
}

#card_image {
    display: none;
}

.file-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    border: 2px dashed #667eea;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8f9ff;
}

.file-label:hover {
    background: #f0f2ff;
    border-color: #764ba2;
}

.file-label i {
    font-size: 48px;
    color: #667eea;
    margin-bottom: 10px;
}

.file-label span {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.file-label p {
    font-size: 13px;
    color: #999;
}

#card_image:focus ~ .file-label {
    background: #f0f2ff;
    border-color: #764ba2;
}

.btn-submit,
.btn-secondary {
    width: 100%;
    padding: 14px 20px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-submit {
    background: radial-gradient(circle, #FFEAA7 0%, #DAA520 100%);
    color: #000000;
    border: 1px solid #B8860B;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.btn-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.6);
    background: radial-gradient(circle, #FFE066 0%, #CC8A00 100%);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-secondary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
    margin-top: 15px;
}

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

#preview {
    margin-top: 20px;
}

#preview img {
    max-width: 100%;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.result-box {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    margin-top: 40px;
}

.result-box h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.result-box h3 i {
    color: #4CAF50;
    font-size: 24px;
}

#parsedData {
    list-style: none;
}

#parsedData li {
    padding: 12px 0;
    border-bottom: 1px solid #eee;
    font-size: 15px;
    color: #555;
}

#parsedData li:last-child {
    border-bottom: none;
}

#parsedData strong {
    color: #333;
    font-weight: 600;
    min-width: 80px;
    display: inline-block;
}

.result-actions {
    margin-top: 20px;
}

.info-section {
    margin-top: 60px;
    padding: 40px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.info-section h2 {
    font-size: 24px;
    margin-bottom: 30px;
    text-align: center;
    color: #333;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.info-card {
    padding: 20px;
    text-align: center;
    background: #f8f9ff;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.info-card:hover {
    background: #f0f2ff;
    transform: translateY(-5px);
}

.info-card i {
    font-size: 36px;
    color: #667eea;
    margin-bottom: 10px;
}

.info-card h4 {
    font-size: 16px;
    margin-bottom: 8px;
    color: #333;
}

.info-card p {
    font-size: 14px;
    color: #666;
}

@media (max-width: 600px) {
    .container {
        padding: 0 10px;
    }

    .header h1 {
        font-size: 24px;
    }

    .upload-box {
        padding: 20px;
    }

    .file-label {
        padding: 30px 15px;
    }

    .file-label i {
        font-size: 36px;
    }

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