/* Main Container */
.pdf-crop-tool-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

/* Upload Section */
.upload-section {
    background: #f9f9f9;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.upload-section h2 {
    margin-top: 0;
    color: #23282d;
    font-size: 24px;
}

.file-upload-wrapper {
    position: relative;
    margin: 20px 0;
}

.file-upload-input {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-upload-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    border: 2px dashed #ccd0d4;
    border-radius: 4px;
    padding: 15px;
    transition: all 0.3s ease;
}

.file-upload-label:hover {
    border-color: #007cba;
}

.file-upload-text {
    color: #555;
    font-size: 16px;
}

.file-upload-button {
    background: #f0f0f0;
    color: #555;
    padding: 8px 15px;
    border-radius: 3px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.file-upload-label:hover .file-upload-button {
    background: #e0e0e0;
}

.file-info {
    margin-top: 10px;
    font-size: 14px;
    color: #666;
}

.file-name {
    font-weight: 500;
}

.file-size {
    color: #999;
}

/* Preview Section */
.preview-section {
    background: #f9f9f9;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.pdf-preview-container {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.pdf-preview-wrapper {
    position: relative;
    display: inline-block;
    border: 1px solid #ddd;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: auto;
    max-width: 100%;
}

#pdf-preview {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Crop Overlay Styles */
.crop-overlay {
    position: absolute;
    border: 2px dashed rgba(0, 123, 255, 0.8);
    background-color: rgba(0, 123, 255, 0.1);
    pointer-events: none;
    display: none;
    z-index: 10;
}

.crop-overlay.active {
    display: block;
    pointer-events: auto;
}

.pdf-info {
    background: #fff;
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.pdf-info h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
    color: #23282d;
}

.info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
}

.info-label {
    font-weight: 500;
    color: #555;
}

.info-value {
    color: #23282d;
}

/* Controls Section */
.controls-section {
    background: #f9f9f9;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.page-navigation, .crop-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.button {
    background: #f0f0f0;
    border: 1px solid #ccc;
    color: #23282d;
    padding: 8px 16px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.button:hover {
    background: #e0e0e0;
    border-color: #999;
}

.button-primary {
    background: #007cba;
    border-color: #006ba1;
    color: #fff;
}

.button-primary:hover {
    background: #006ba1;
    border-color: #005a87;
}

.crop-mode {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.crop-mode label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    font-size: 14px;
    color: #555;
}

/* Processing Section */
.processing-section {
    text-align: center;
    padding: 30px;
    background: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.processing-spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top: 4px solid #007cba;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .pdf-crop-tool-container {
        padding: 15px;
    }
    
    .upload-section, .preview-section, .controls-section {
        padding: 15px;
    }
    
    .page-navigation, .crop-actions {
        flex-wrap: wrap;
    }
    
    .crop-mode {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .file-upload-label {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .pdf-info {
        padding: 10px;
    }
    
    .info-row {
        flex-direction: column;
        gap: 3px;
    }
}