* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #1a1a2e;
    color: #e0e0e0;
    min-height: 100vh;
}

#app {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header h1 {
    text-align: center;
    margin-bottom: 20px;
    color: #e94560;
    font-size: 1.8rem;
}

#controls {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    align-items: flex-start;
    flex-wrap: wrap;
}

#search-area {
    flex: 1;
    display: flex;
    gap: 8px;
    min-width: 300px;
}

#search-input {
    flex: 1;
    padding: 10px 14px;
    border: 2px solid #333;
    border-radius: 8px;
    background: #16213e;
    color: #e0e0e0;
    font-size: 14px;
    resize: vertical;
    font-family: inherit;
}

#search-input:focus {
    outline: none;
    border-color: #e94560;
}

#search-btn {
    padding: 10px 24px;
    background: #e94560;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    align-self: flex-start;
    height: 42px;
}

#search-btn:hover {
    background: #c73652;
}

#page-nav {
    display: flex;
    align-items: center;
    gap: 12px;
    align-self: flex-start;
    height: 42px;
}

#page-nav button {
    padding: 8px 16px;
    background: #16213e;
    color: #e0e0e0;
    border: 2px solid #333;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
}

#page-nav button:hover:not(:disabled) {
    border-color: #e94560;
}

#page-nav button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

#page-info {
    font-size: 14px;
    white-space: nowrap;
}

#drop-zone {
    border: 3px dashed #333;
    border-radius: 16px;
    padding: 80px 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

#drop-zone.active {
    display: block;
}

#drop-zone.hidden {
    display: none;
}

#drop-zone:hover,
#drop-zone.dragover {
    border-color: #e94560;
    background: rgba(233, 69, 96, 0.05);
}

#drop-message p:first-child {
    font-size: 1.5rem;
    margin-bottom: 8px;
    color: #e94560;
}

#drop-message p:last-child {
    font-size: 0.9rem;
    color: #888;
}

#viewer-container {
    background: #0f3460;
    border-radius: 12px;
    padding: 20px;
    overflow: auto;
    max-height: 80vh;
}

#viewer-container.hidden {
    display: none;
}

#pdf-wrapper {
    position: relative;
    display: inline-block;
    margin: 0 auto;
}

#viewer-container {
    text-align: center;
}

#pdf-canvas {
    display: block;
    margin: 0 auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

#highlight-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.highlight-box {
    position: absolute;
    background: rgba(233, 69, 96, 0.3);
    border: 2px solid #e94560;
    border-radius: 2px;
    transition: background 0.2s;
}

.highlight-box:hover {
    background: rgba(233, 69, 96, 0.5);
}

#results-info {
    margin-top: 12px;
    text-align: center;
    font-size: 14px;
    color: #888;
}

#results-info.hidden {
    display: none;
}

#match-count {
    background: #16213e;
    padding: 6px 16px;
    border-radius: 20px;
    display: inline-block;
}
