.page-numbers-body {
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    
    min-height: calc(100vh - 80px);
    color: #1a1a1a;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
}

.main-container {
    padding: 40px;
    max-width: 900px;
    width: 100%;
    text-align: center;
}

.tool-header h1 {
    color: #5b21b6;
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tool-header h1 i {
    margin-right: 15px;
    font-size: 2.5rem;
}

.tool-header p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 30px;
}

.upload-section {
    border: 3px dashed #e0e0e0;
    border-radius: 12px;
    padding: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
}

.upload-section:hover,
.upload-section.dragover {
    background-color: #f0f0ff;
    border-color: #5d5dff;
}

.drop-content .upload-icon {
    font-size: 4rem;
    color: #5b21b6;
    margin-bottom: 15px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20px);
    }
    60% {
        transform: translateY(-10px);
    }
}

.drop-content p {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

.drop-content span {
    font-size: 1rem;
    color: #888;
    margin-top: 5px;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f0f0f5;
    border-radius: 8px;
    padding: 15px 20px;
    border: 1px solid #e0e0e0;
    margin-bottom: 30px;
}

.file-details {
    display: flex;
    align-items: center;
    flex-grow: 1;
}

.file-details .file-icon {
    font-size: 2rem;
    color: #e33b3b;
    margin-right: 15px;
}

.file-details #pdfFileName {
    font-weight: 600;
    color: #1a1a1a;
    margin-right: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-details #pdfFileSize {
    font-size: 0.9rem;
    color: #666;
}

.status-message-container {
    display: flex;
    align-items: center;
}

.status-message {
    font-size: 0.9rem;
    font-weight: bold;
    color: #e33b3b;
    margin-left: 10px;
}

.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border-left-color: #5d5dff;
    animation: spin 1s ease infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.preview-container {
    position: relative;
    max-width: 100%;
    margin: 0 auto 30px;
    text-align: center;
}

#preview-img {
    width: 100%;
    height: auto;
    display: block;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.position-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 0;
}

.position-box {
    border: 2px solid transparent;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
}

.position-box:hover {
    background-color: rgba(93, 93, 255, 0.1);
    border-color: #5d5dff;
}

.position-box.selected {
    background-color: #5d5dff;
    border: 3px solid #5d5dff;
    box-shadow: 0 0 10px #5d5dff;
    border-radius: 8px;
    background-color: rgba(93, 93, 255, 0.2);
}

.position-box.selected:after {
    content: "✓";
    color: white;
    font-size: 2rem;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.btn {
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    text-decoration: none;
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.btn-convert {
    background-color: #5d5dff;
}

.btn-convert:hover {
    background-color: #3f3fcc;
    transform: translateY(-2px);
}

.btn-convert:disabled {
    background-color: #a0a0ff;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-download {
    background-color: #28a745;
}

.btn-download:hover {
    background-color: #218838;
    transform: translateY(-2px);
}

#processing-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
}

#processing-container p {
    font-size: 1.2rem;
    font-weight: 600;
    margin-top: 20px;
}
