* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'JetBrains Mono';
}

body {
    background: #1a1a1a;
    padding: 40px 20px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
}

h1 {
    color: #fff;
    margin-bottom: 10px;
    text-align: center;
}

.controls {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

button {
    padding: 8px 16px;
    background: #4a90e2;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

button:hover {
    background: #357abd;
}

button.secondary {
    background: #666;
}

button.secondary:hover {
    background: #777;
}

button.apply {
    background: #4caf50;
}

button.apply:hover {
    background: #45a049;
}

button.danger {
    background: #f44336;
}

button.danger:hover {
    background: #da190b;
}

input[type="file"] {
    display: none;
}

label {
    padding: 8px;
    background: #666;
    font-size: 14px;
    color: white;
}
.threshold-controls {
    display: flex;
    gap: 10px;
    justify-content: center;
    color: white;
    align-items: center;
    flex-wrap: wrap;
    font-size: 12px;
    margin-bottom: 15px;
}

.threshold-slider {
    display: flex;
    gap: 10px;
    align-items: center;
}

input[type="range"] {
    width: 150px;
}

.threshold-label {
    color: #aaa;
    font-size: 12px;
    min-width: 120px;
}


.stats {
    text-align: center;
    color: #aaa;
    font-size: 12px;
    margin-bottom: 15px;
}

.reading-area {
    position: relative;
    background: #2a2a2a;
    overflow: auto;
    padding: 20px;
    width: 100%;
    height: 600px;
    border: 2px solid #444;
}

#pdfContainer {
    position: relative;
    display: inline-block;
    margin: 0px auto;
    overflow: hidden;
}

#pdfCanvas {
    position: relative;
    z-index: 1;
    width: 100%;
    display: block;
}

#overlayCanvas {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0px;
    left: 0px;
    z-index: 2;
    pointer-events: none;
    image-rendering: crisp-edges;
}

#cursorCanvas {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
    pointer-events: none;
}

.page-nav {
    text-align: center;
    color: #aaa;
    margin-top: 15px;
    font-size: 12px;
}

.page-nav button {
    padding: 5px 12px;
    font-size: 12px;
}


