* {
    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;
    color: #333;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

/* Header */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px 30px;
    text-align: center;
}

.header-icon {
    font-size: 48px;
    margin-bottom: 15px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

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

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

/* Main Content */
.main-content {
    padding: 40px 30px;
}

/* Section Title */
.section-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title i {
    color: #667eea;
}

/* Excel Upload Section */
.excel-upload-section {
    margin-bottom: 30px;
    padding: 30px;
    background: linear-gradient(135deg, #e0f7fa 0%, #e1f5fe 100%);
    border-radius: 15px;
    border: 2px dashed #26c6da;
}

.upload-area {
    background: white;
    border: 3px dashed #b0bec5;
    border-radius: 15px;
    padding: 50px 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.upload-area:hover {
    border-color: #667eea;
    background: #f5f7ff;
}

.upload-area.drag-over {
    border-color: #667eea;
    background: #f5f7ff;
    transform: scale(1.02);
}

.upload-content {
    width: 100%;
}

.upload-icon {
    font-size: 64px;
    color: #667eea;
    margin-bottom: 20px;
    display: block;
}

.upload-text {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.upload-hint {
    font-size: 14px;
    color: #999;
    margin-bottom: 20px;
}

.upload-btn {
    padding: 12px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Noto Sans KR', sans-serif;
}

.upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

/* Excel Info */
.excel-info {
    margin-top: 20px;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: white;
    border-radius: 10px;
    margin-bottom: 15px;
}

.file-icon {
    font-size: 40px;
    color: #10ac84;
}

.file-details {
    flex: 1;
}

.file-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.file-stats {
    font-size: 14px;
    color: #666;
}

.remove-file-btn {
    padding: 10px;
    background: #ff6b6b;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-file-btn:hover {
    background: #ff5252;
    transform: scale(1.1);
}

.excel-download-btn {
    width: 100%;
    padding: 15px 30px;
    background: linear-gradient(135deg, #10ac84 0%, #1dd1a1 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'Noto Sans KR', sans-serif;
}

.excel-download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(16, 172, 132, 0.4);
}

.excel-download-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.excel-format-guide {
    margin-top: 15px;
    padding: 15px;
    background: white;
    border-radius: 10px;
    display: flex;
    align-items: start;
    gap: 10px;
    font-size: 14px;
    color: #555;
}

.excel-format-guide i {
    color: #26c6da;
    font-size: 18px;
    margin-top: 2px;
}

/* Quick Test Section */
.quick-test-section {
    margin-top: 20px;
    text-align: center;
}

.quick-test-btn {
    width: 100%;
    padding: 15px 30px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'Noto Sans KR', sans-serif;
    box-shadow: 0 4px 15px rgba(245, 87, 108, 0.3);
}

.quick-test-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 87, 108, 0.4);
}

.quick-test-hint {
    margin-top: 10px;
    font-size: 13px;
    color: #666;
    font-style: italic;
}

/* Divider */
.divider {
    text-align: center;
    margin: 40px 0;
    position: relative;
}

.divider::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px;
    background: linear-gradient(to right, transparent, #e0e0e0, transparent);
}

.divider span {
    position: relative;
    background: white;
    padding: 0 20px;
    color: #999;
    font-weight: 600;
    font-size: 14px;
}

/* Input Section */
.input-section {
    margin-bottom: 30px;
}

.input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

.url-input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    font-family: 'Noto Sans KR', sans-serif;
}

.url-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.download-btn {
    padding: 15px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Noto Sans KR', sans-serif;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.download-btn:active {
    transform: translateY(0);
}

/* Batch Input Section */
.batch-input-section {
    margin-top: 20px;
}

.batch-textarea {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 14px;
    font-family: 'Noto Sans KR', sans-serif;
    resize: vertical;
    transition: all 0.3s ease;
    margin-bottom: 10px;
}

.batch-textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.batch-download-btn {
    width: 100%;
    padding: 15px 30px;
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'Noto Sans KR', sans-serif;
}

.batch-download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(17, 153, 142, 0.4);
}

/* Preview Section */
.preview-section {
    margin-bottom: 30px;
    display: none;
}

.preview-section.active {
    display: block;
}

.preview-section h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #333;
}

.preview-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.preview-item {
    position: relative;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    background: #f9f9f9;
    transition: all 0.3s ease;
}

.preview-item:hover {
    border-color: #667eea;
    transform: scale(1.02);
}

.preview-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.preview-info {
    padding: 10px;
    font-size: 12px;
    color: #666;
    word-break: break-all;
}

/* Download History */
.download-history {
    margin-bottom: 30px;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.history-header h3 {
    font-size: 20px;
    color: #333;
}

.clear-btn {
    padding: 8px 16px;
    background: #ff6b6b;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'Noto Sans KR', sans-serif;
}

.clear-btn:hover {
    background: #ff5252;
    transform: translateY(-2px);
}

.history-list {
    background: #f9f9f9;
    border-radius: 10px;
    padding: 20px;
    max-height: 300px;
    overflow-y: auto;
}

.empty-message {
    text-align: center;
    color: #999;
    font-style: italic;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.history-item:hover {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.history-item:last-child {
    margin-bottom: 0;
}

.history-thumbnail {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
}

.history-info {
    flex: 1;
}

.history-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.history-url {
    font-size: 12px;
    color: #999;
    word-break: break-all;
}

.history-time {
    font-size: 11px;
    color: #aaa;
    margin-top: 3px;
}

.history-status {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.history-status.success {
    background: #d4edda;
    color: #155724;
}

.history-status.error {
    background: #f8d7da;
    color: #721c24;
}

/* Info Box */
.info-box {
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
    padding: 20px;
    border-radius: 10px;
    display: flex;
    gap: 15px;
}

.info-box i {
    font-size: 24px;
    color: #2196f3;
    flex-shrink: 0;
}

.info-content p {
    font-weight: 600;
    margin-bottom: 10px;
    color: #1976d2;
}

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

.info-content li {
    padding: 5px 0;
    color: #555;
    position: relative;
    padding-left: 20px;
}

.info-content li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #2196f3;
    font-weight: bold;
}

/* Footer */
.footer {
    background: #f5f5f5;
    padding: 20px;
    text-align: center;
    color: #666;
    font-size: 14px;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #323232;
    color: white;
    padding: 15px 25px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast i {
    font-size: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        border-radius: 0;
        margin: -20px;
    }

    .header {
        padding: 30px 20px;
    }

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

    .main-content {
        padding: 30px 20px;
    }

    .input-group {
        flex-direction: column;
    }

    .download-btn {
        justify-content: center;
    }

    .preview-container {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .toast {
        right: 20px;
        left: 20px;
        bottom: 20px;
    }
}

/* Loading Animation */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.loading {
    animation: spin 1s linear infinite;
}