* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background: #2D2D2D;
    color: #E8EAED;
    overflow: hidden;
}

/* APP CONTAINER */
.pdf-app {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
}

/* TOOLBAR - SIMPLE & CLEAN */
.toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    background: #3C4043;
    border-bottom: 1px solid #5F6368;
    height: 48px;
}

.tool-btn {
    background: none;
    border: none;
    color: #E8EAED;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 150ms;
}

.tool-btn:hover {
    background: rgba(255, 255, 255, 0.08);
}

.tool-btn:active {
    background: rgba(255, 255, 255, 0.12);
}

.tool-btn svg {
    width: 20px;
    height: 20px;
}

.filename {
    font-size: 14px;
    font-weight: 500;
    color: #E8EAED;
    margin-right: auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 300px;
}

.toolbar-center {
    display: flex;
    align-items: center;
    gap: 4px;
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 4px;
}

.page-info {
    font-size: 13px;
    color: #E8EAED;
    padding: 0 12px;
    min-width: 60px;
    text-align: center;
}

.zoom-level {
    font-size: 13px;
    color: #E8EAED;
    padding: 0 8px;
    min-width: 50px;
    text-align: center;
}

.divider {
    width: 1px;
    height: 20px;
    background: #5F6368;
    margin: 0 8px;
}

/* MAIN CONTENT */
.main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* SIDEBAR - CURRENT PAGE THUMBNAIL */
.sidebar {
    width: 200px;
    background: #3C4043;
    border-right: 1px solid #5F6368;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sidebar.hidden {
    display: none;
}

.thumbnail-container {
    position: relative;
    width: 100%;
    cursor: pointer;
}

.thumbnail {
    width: 100%;
    display: block;
    border: 2px solid transparent;
    border-radius: 2px;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.thumbnail:hover {
    border-color: #8AB4F8;
}

.thumbnail-page {
    position: absolute;
    bottom: 8px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 11px;
    font-weight: 500;
    color: #E8EAED;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

/* VIEWER */
.viewer {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
    background: #2D2D2D;
    padding: 24px;
}

.viewer::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

.viewer::-webkit-scrollbar-track {
    background: #2D2D2D;
}

.viewer::-webkit-scrollbar-thumb {
    background: #5F6368;
    border-radius: 6px;
}

.viewer::-webkit-scrollbar-thumb:hover {
    background: #80868B;
}

/* EMPTY STATE */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #9AA0A6;
    gap: 16px;
}

.empty-state p {
    font-size: 14px;
}

.empty-state.hidden {
    display: none;
}

/* CANVAS CONTAINER */
.canvas-container {
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    background: white;
}

.canvas-container.hidden {
    display: none;
}

#pdfCanvas {
    display: block;
}

/* TEXT LAYER */
.text-layer {
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    opacity: 0.2;
    line-height: 1.0;
}

.text-layer>span {
    color: transparent;
    position: absolute;
    white-space: pre;
    cursor: text;
    transform-origin: 0% 0%;
}

.text-layer ::selection {
    background: rgba(26, 115, 232, 0.8);
}

.text-layer ::-moz-selection {
    background: rgba(26, 115, 232, 0.8);
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .toolbar {
        flex-wrap: wrap;
        height: auto;
    }

    .toolbar-center {
        order: 3;
        width: 100%;
        justify-content: center;
        padding-top: 8px;
        border-top: 1px solid #5F6368;
    }

    .sidebar {
        width: 120px;
        padding: 8px;
    }
}