body {
    font-family: system-ui, -apple-system, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    background-color: #f4f6f8;
}

header {
    background-color: #1a252f;
    color: white;
    padding: 1.2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    margin: 0;
    font-size: 1.6rem;
    letter-spacing: 1px;
}

[role="toolbar"] {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

[role="toolbar"] button {
    background-color: #34495e;
    color: white;
    border: 1px solid #2c3e50;
    padding: 0.6rem 1.2rem;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

[role="toolbar"] button:hover {
    background-color: #f1c40f;
    color: #1a252f;
}

[role="toolbar"] button:focus {
    outline: 3px solid #f1c40f;
    outline-offset: 2px;
}

.pagination-bar {
    background-color: #ffffff;
    padding: 15px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    border-bottom: 2px solid #e2e8f0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.pagination-bar button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
}

.pagination-bar button:hover {
    background-color: #2980b9;
}

.pagination-bar button:focus {
    outline: 3px solid #f1c40f;
}

#page-indicator {
    font-weight: bold;
    color: #2c3e50;
    font-size: 1.1rem;
    min-width: 150px;
    text-align: center;
}

main {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    display: flex;
    justify-content: center;
}

#editor-canvas {
    background-color: white;
    width: 100%;
    max-width: 850px;
    padding: 50px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.08);
    min-height: 800px;
    line-height: 1.8;
    font-size: 1.15rem;
    color: #2c3e50;
    border-radius: 4px;
}

#editor-canvas:focus {
    outline: 3px solid #3498db;
}

.pdf-word {
    display: inline;
}

.visual-highlight { background-color: #fff3cd; }
.visual-underline { text-decoration: underline; text-decoration-color: #e74c3c; text-decoration-thickness: 2px; }
.visual-strikeout { text-decoration: line-through; text-decoration-color: #7f8c8d; text-decoration-thickness: 2px; }
.visual-bold { font-weight: bold; }
.visual-italic { font-style: italic; }

#visual-toast {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background-color: #2c3e50;
    color: white;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
    font-weight: bold;
    transform: translateY(150%);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1000;
}

#visual-toast.show {
    transform: translateY(0);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}