body {
    font-family: Arial, sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}
.container {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}
.pdf-container {
    flex: 1;
    border: 1px solid #ddd;
    position: relative;
    min-height: 600px;
    overflow: hidden;
}
.text-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
#pdfPreview {
    width: 100%;
    height: auto;
    display: block;
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
}
.selection-box {
    position: absolute;
    border: 2px dashed red;
    background-color: rgba(255, 0, 0, 0.1);
    pointer-events: none;
}
#extractedText, #analysisPrompt {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    min-height: 150px;
    box-sizing: border-box;
    font-family: monospace;
    resize: vertical;
}
#analysisResult {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    min-height: 150px;
    max-height: 400px;
    box-sizing: border-box;
    overflow-y: auto;
    background-color: #f9f9f9;
}
.button-container {
    display: flex;
    gap: 10px;
    margin: 10px 0;
}
button {
    padding: 10px 15px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
button:hover {
    background-color: #45a049;
}
.page-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
}
.loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 15px;
    border-radius: 5px;
    text-align: center;
}
#pageNum {
    width: 50px;
    text-align: center;
}
.upload-area {
    border: 2px dashed #ccc;
    padding: 20px;
    text-align: center;
    margin-bottom: 15px;
    border-radius: 5px;
    cursor: pointer;
}
.upload-area.drag-over {
    background-color: #f0f8ff;
    border-color: #4CAF50;
}
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}
