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

body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
gap: 10px;
padding: 20px;
}

.container {
background: white;
border-radius: 20px;
box-shadow: 0 20px 60px rgba(0,0,0,0.1);
width: 100%;
max-width: 800px;
padding: 40px;
animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
from {
    opacity: 0;
    transform: translateY(20px);
}
to {
    opacity: 1;
    transform: translateY(0);
}
}

.header {
display: flex;
align-items: center;
gap: 15px;
margin-bottom: 40px;
padding: 20px;
background: #f8f9fa;
border-radius: 12px;
}

.logo {
display: flex;
align-items: center;
gap: 8px;
font-weight: 600;
font-size: 18px;
color: #2c3e50;
}

.logo-icon {
width: 30px;
height: 30px;
background: linear-gradient(135deg, #ff6b6b 0%, #ff8e53 100%);
border-radius: 8px;
position: relative;
}

.logo-icon::before {
content: '';
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 60%;
height: 3px;
background: white;
border-radius: 2px;
}

.logo-icon::after {
content: '';
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%) rotate(45deg);
width: 3px;
height: 60%;
background: white;
border-radius: 2px;
}

h1 {
text-align: center;
color: #2c3e50;
margin-bottom: 30px;
font-size: 28px;
font-weight: 600;
}

.upload-area {
border: 3px dashed #5b6dcd;
border-radius: 16px;
padding: 60px 40px;
text-align: center;
background: linear-gradient(135deg, #667eea08 0%, #764ba208 100%);
transition: all 0.3s ease;
cursor: pointer;
position: relative;
margin-bottom: 30px;
}

.upload-area:hover {
border-color: #667eea;
background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
}

.upload-area.active {
border-color: #4caf50;
background: linear-gradient(135deg, #4caf5015 0%, #8bc34a15 100%);
}

.upload-icon {
width: 80px;
height: 80px;
margin: 0 auto 20px;
position: relative;
}

.upload-icon svg {
width: 100%;
height: 100%;
}

.upload-text {
color: #5a6c7d;
font-size: 18px;
margin-bottom: 10px;
font-weight: 500;
}

.upload-subtext {
color: #94a3b8;
font-size: 14px;
}

.btn-start {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
border: none;
padding: 15px 50px;
border-radius: 10px;
font-size: 16px;
font-weight: 600;
cursor: pointer;
transition: all 0.3s ease;
display: block;
width: 100%;
max-width: 300px;
margin: 0 auto;
box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-start:hover:not(:disabled) {
transform: translateY(-2px);
box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.btn-start:disabled {
opacity: 0.5;
cursor: not-allowed;
}

.slogan {
text-align: center;
margin-top: 40px;
padding-top: 30px;
border-top: 1px solid #e5e7eb;
color: #64748b;
font-size: 14px;
font-style: italic;
}

.file-input {
display: none;
}

.file-name {
margin-top: 15px;
color: #2c3e50;
font-weight: 500;
display: none;
}

.file-name.show {
display: block;
}

/* Processing State */
.processing-overlay {
display: none;
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0,0,0,0.5);
z-index: 1000;
align-items: center;
justify-content: center;
}

.processing-overlay.show {
display: flex;
}

.processing-modal {
background: white;
border-radius: 20px;
padding: 40px;
max-width: 400px;
width: 90%;
text-align: center;
animation: slideIn 0.3s ease-out;
}

.processing-filename {
font-size: 18px;
font-weight: 600;
color: #2c3e50;
margin-bottom: 20px;
}

.processing-steps {
text-align: left;
margin: 20px 0;
}

.processing-step {
padding: 10px 0;
color: #64748b;
display: flex;
align-items: center;
gap: 10px;
}

.processing-step.active {
color: #667eea;
font-weight: 500;
}

.processing-step.complete {
color: #4caf50;
}

.step-icon {
width: 20px;
height: 20px;
border: 2px solid #e5e7eb;
border-radius: 50%;
display: inline-flex;
align-items: center;
justify-content: center;
}

.processing-step.active .step-icon {
border-color: #667eea;
background: #667eea;
}

.processing-step.complete .step-icon {
border-color: #4caf50;
background: #4caf50;
}

.processing-step.active .step-icon::after,
.processing-step.complete .step-icon::after {
content: '';
width: 8px;
height: 8px;
background: white;
border-radius: 50%;
}

.progress-text {
color: #ff9800;
font-size: 14px;
font-weight: 500;
margin-top: 20px;
}

.close-btn {
position: absolute;
top: 20px;
right: 20px;
background: none;
border: none;
font-size: 24px;
color: #64748b;
cursor: pointer;
width: 30px;
height: 30px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50%;
transition: background 0.3s;
}

.close-btn:hover {
background: #f1f5f9;
}

/* Success State */
.success-icon {
width: 80px;
height: 80px;
margin: 0 auto 20px;
background: #4caf50;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
animation: scaleIn 0.5s ease-out;
}


/* ===== Expandable API Panel ===== */
.api-panel {
    width: 100%;
    max-width: 800px;
    margin: 20px auto 0;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    background: #f9fafb;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.api-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: #edf2ff;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    user-select: none;
}

.api-header:hover {
    background: #e0e7ff;
}

.api-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 18px;
}

.api-body.open {
    max-height: 200px;
    padding: 18px;
}

.api-body .input-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 12px;
}

.api-body label {
    font-size: 14px;
    color: #475569;
    margin-bottom: 6px;
}

.api-body input {
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.api-body input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.toggle-icon {
    transition: transform 0.3s ease;
}

.toggle-icon.rotate {
    transform: rotate(180deg);
}

@keyframes scaleIn {
from {
    transform: scale(0);
}
to {
    transform: scale(1);
}
}

.success-icon svg {
width: 40px;
height: 40px;
stroke: white;
stroke-width: 3;
}

.success-message {
font-size: 18px;
color: #2c3e50;
margin-bottom: 10px;
}

.success-time {
color: #ff9800;
font-size: 14px;
margin-bottom: 20px;
}

@media (max-width: 640px) {
.container {
    padding: 30px 20px;
}

h1 {
    font-size: 24px;
}

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

.btn-start {
    font-size: 14px;
    padding: 12px 30px;
}
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.show .modal {
    transform: scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 25px;
    border-bottom: 1px solid #e5e7eb;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.modal-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 25px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-body p {
    margin: 0;
    font-size: 16px;
    line-height: 1.5;
    color: #2c3e50;
}

.modal-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding: 20px 25px;
    border-top: 1px solid #e5e7eb;
    background: #f8f9fa;
}

.modal-footer .btn {
    margin: 0;
    min-width: 80px;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid;
}

.btn-primary {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.btn-primary:hover {
    background: #5a6fd8;
}

.btn-secondary {
    background: white;
    color: #64748b;
    border-color: #e5e7eb;
}

.btn-secondary:hover {
    background: #f8f9fa;
    border-color: #667eea;
    color: #667eea;
}

.btn-danger {
    background: #ef4444;
    color: white;
    border-color: #ef4444;
}

.btn-danger:hover {
    background: #dc2626;
}

}
