* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 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);
    padding: 40px;
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

header {
    text-align: center;
    margin-bottom: 40px;
}

.header-logo {
    max-width: 200px;
    height: auto;
    margin-bottom: 20px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

header h1 {
    font-size: 2.5rem;
    color: #667eea;
    margin-bottom: 10px;
    font-weight: 700;
}

.subtitle {
    color: #666;
    font-size: 1.1rem;
}

.upload-section {
    margin-bottom: 30px;
}

.upload-area {
    border: 3px dashed #667eea;
    border-radius: 15px;
    padding: 60px 20px;
    text-align: center;
    background: #f8f9ff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-area:hover {
    background: #f0f2ff;
    border-color: #764ba2;
    transform: translateY(-2px);
}

.upload-area.dragover {
    background: #e8ebff;
    border-color: #764ba2;
    transform: scale(1.02);
}

.upload-content {
    pointer-events: none;
}

.upload-area h3 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.upload-area p {
    color: #888;
    font-size: 0.95rem;
}

.pdf-list-section {
    margin-top: 30px;
}

.pdf-list-section h2 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.file-count {
    color: #888;
    font-weight: normal;
    font-size: 1rem;
}

.instruction {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 20px;
    font-style: italic;
}

.filename-input-wrapper {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f2ff 100%);
    border: 2px solid #e0e4ff;
    border-radius: 12px;
    padding: 12px 18px;
    transition: all 0.3s ease;
    gap: 12px;
}

.filename-input-wrapper:focus-within {
    border-color: #667eea;
    background: white;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.filename-icon {
    width: 20px;
    height: 20px;
    color: #667eea;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.filename-input-wrapper:focus-within .filename-icon {
    color: #764ba2;
    transform: scale(1.1);
}

.filename-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 1rem;
    font-family: inherit;
    color: #333;
    font-weight: 500;
    padding: 0;
    outline: none;
    transition: all 0.3s ease;
}

.filename-input::placeholder {
    color: #aaa;
    font-weight: 400;
}

.filename-extension {
    color: #667eea;
    font-weight: 600;
    font-size: 1rem;
    white-space: nowrap;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.filename-input-wrapper:focus-within .filename-extension {
    color: #764ba2;
    opacity: 1;
}

.pdf-list {
    margin-bottom: 30px;
    min-height: 100px;
}

.pdf-item {
    background: #f8f9ff;
    border: 2px solid #e0e4ff;
    border-radius: 12px;
    padding: 15px 20px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
    cursor: move;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.pdf-item:hover {
    background: #f0f2ff;
    border-color: #667eea;
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.pdf-item.dragging {
    opacity: 0.5;
    transform: scale(0.95);
}

.pdf-item-info {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
}

.pdf-icon {
    width: 32px;
    height: 32px;
    margin-right: 15px;
    color: #e74c3c;
    flex-shrink: 0;
}

.pdf-details {
    flex: 1;
    min-width: 0;
}

.pdf-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pdf-size {
    font-size: 0.85rem;
    color: #888;
}

.pdf-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn-control {
    background: white;
    border: 2px solid #ddd;
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.1rem;
}

.btn-control:hover {
    background: #667eea;
    border-color: #667eea;
    color: white;
    transform: scale(1.1);
}

.btn-control.remove:hover {
    background: #e74c3c;
    border-color: #e74c3c;
}

.actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

.btn {
    padding: 14px 28px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-secondary:hover {
    background: #f8f9ff;
    transform: translateY(-2px);
}

.btn-icon {
    font-size: 1.1rem;
}

.progress-section {
    margin-top: 30px;
    text-align: center;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e4ff;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 10px;
}

.progress-text {
    color: #667eea;
    font-weight: 600;
}

.result-section {
    margin-top: 30px;
    text-align: center;
}

.success-message {
    padding: 30px;
}

.success-icon {
    width: 64px;
    height: 64px;
    color: #27ae60;
    margin: 0 auto 20px;
}

.success-message h3 {
    color: #27ae60;
    margin-bottom: 25px;
    font-size: 1.5rem;
}

.result-section .actions {
    flex-direction: column;
    align-items: center;
}

.result-section .btn {
    width: 100%;
    max-width: 300px;
    justify-content: center;
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: #888;
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    max-width: 500px;
    width: 100%;
    animation: slideUp 0.3s ease;
    overflow: hidden;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 25px 30px;
    border-bottom: 2px solid #f0f2ff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f2ff 100%);
}

.modal-header h3 {
    color: #667eea;
    font-size: 1.5rem;
    margin: 0;
    font-weight: 700;
}

.modal-close {
    background: transparent;
    border: none;
    font-size: 2rem;
    color: #888;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s ease;
    line-height: 1;
    padding: 0;
}

.modal-close:hover {
    background: #e0e4ff;
    color: #667eea;
    transform: rotate(90deg);
}

.modal-body {
    padding: 30px;
}

.modal-body .filename-input-wrapper {
    margin: 0;
}

.modal-footer {
    padding: 20px 30px;
    border-top: 2px solid #f0f2ff;
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    background: #fafbff;
}

.modal-footer .btn {
    min-width: 120px;
}

@media (max-width: 768px) {
    .container {
        padding: 20px;
    }

    .header-logo {
        max-width: 150px;
    }

    header h1 {
        font-size: 2rem;
    }

    .upload-area {
        padding: 40px 15px;
    }

    .modal-content {
        max-width: 100%;
        margin: 0;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 20px;
    }

    .modal-footer {
        flex-direction: column;
    }

    .modal-footer .btn {
        width: 100%;
    }

    .filename-input-wrapper {
        padding: 10px 15px;
    }

    .filename-icon {
        width: 18px;
        height: 18px;
    }

    .pdf-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .pdf-controls {
        width: 100%;
        justify-content: flex-end;
    }

    .actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}

