.image-to-pdf-pro-container {
    max-width: 900px;
    margin: 20px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
}

.pdf-form-wrapper {
    background: #ffffff;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid #e1e8ed;
}

.pdf-form-wrapper h3 {
    margin: 0 0 15px 0;
    color: #1a202c;
    text-align: center;
    font-size: 28px;
    font-weight: 700;
}

.form-section {
    margin-bottom: 30px;
    padding: 25px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.form-section h4 {
    margin: 0 0 20px 0;
    color: #2d3748;
    font-size: 18px;
    font-weight: 600;
}

.file-upload-area {
    position: relative;
    border: 3px dashed #cbd5e0;
    border-radius: 15px;
    padding: 50px 20px;
    text-align: center;
    background: #ffffff;
    transition: all 0.3s ease;
    cursor: pointer;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-upload-area:hover,
.file-upload-area.dragover {
    border-color: #667eea;
    background: #f0f4ff;
    transform: translateY(-2px);
}

.file-upload-area input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

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

.upload-text {
    font-size: 18px;
    font-weight: 600;
    color: #4a5568;
    display: block;
    margin-bottom: 8px;
}

.images-preview {
    margin-top: 20px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

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

.preview-item {
    position: relative;
    background: #f8fafc;
    border-radius: 12px;
    padding: 12px;
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
}

.preview-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.preview-item img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
}

.remove-image {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: #e53e3e;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #4a5568;
    font-weight: 600;
    font-size: 14px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    background: white;
    box-sizing: border-box;
}

.radio-group {
    display: flex;
    gap: 15px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 14px 18px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: white;
    transition: all 0.3s ease;
}

.radio-option:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

.generate-pdf-button {
    width: 100%;
    padding: 20px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 30px;
}

.generate-pdf-button:hover:not(:disabled) {
    transform: translateY(-3px);
}

.generate-pdf-button:disabled {
    background: #a0aec0;
    cursor: not-allowed;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #ffffff40;
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.progress-container {
    margin: 25px 0;
    text-align: center;
}

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

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    width: 0%;
    transition: width 0.3s ease;
}

.pdf-result-container {
    margin-top: 30px;
    background: linear-gradient(135deg, #f0fff4, #e6fffa);
    border-radius: 15px;
    border: 2px solid #9ae6b4;
}

.result-header {
    background: linear-gradient(135deg, #48bb78, #38a169);
    color: white;
    padding: 25px;
    text-align: center;
}

.result-content {
    padding: 30px;
}

.pdf-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-item {
    background: white;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.download-section {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.download-pdf-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 18px 32px;
    background: linear-gradient(135deg, #38a169, #2f855a);
    color: white;
    text-decoration: none;
    border-radius: 15px;
    font-weight: 700;
}

.secondary-button {
    padding: 18px 28px;
    background: #4a5568;
    color: white;
    border: none;
    border-radius: 15px;
    font-weight: 700;
    cursor: pointer;
}

.error-message-pdf {
    margin-top: 25px;
    padding: 20px 25px;
    background: #fed7d7;
    color: #742a2a;
    border: 2px solid #fc8181;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
}

.info-section {
    margin-top: 30px;
    padding: 25px;
    background: #ebf8ff;
    border-radius: 15px;
    border: 1px solid #90cdf4;
}

.info-section h4 {
    margin: 0 0 18px 0;
    color: #2b6cb0;
    font-size: 18px;
    font-weight: 700;
}

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

.info-section li {
    margin-bottom: 12px;
    padding-left: 25px;
    color: #2d3748;
    font-size: 14px;
    position: relative;
}

.info-section li::before {
    content: "✓";
    color: #38a169;
    font-weight: bold;
    position: absolute;
    left: 0;
}

.clear-btn {
    padding: 8px 16px;
    background: #e53e3e;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e2e8f0;
}

.preview-title {
    font-weight: 600;
    color: #2d3748;
    font-size: 16px;
}

.preview-info {
    text-align: center;
}

.preview-name {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.preview-size {
    display: block;
    font-size: 11px;
    color: #718096;
}

@media (max-width: 768px) {
    .image-to-pdf-pro-container {
        margin: 15px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

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

    .pdf-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .download-section {
        flex-direction: column;
    }
}