body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: 'Roboto', Arial, sans-serif;
    color: #333;
    background-color: #f0f8ff;  /* Alice Blue */
}


h1 {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 2rem;
    background: linear-gradient(to right, #4834d4, #be2edd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
a {
    color: #3498db;
    text-decoration: none;
}

.container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: relative;
}

.fixed-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: #87cefa;  /* Light Sky Blue */
    padding: 10px 20px;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #333;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.file-controls, .pdf-controls, .search-controls {
    display: flex;
    align-items: center;
}

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

.file-label {
    padding: 8px 15px;
    background-color: #4169e1;  /* Royal Blue */
    color: white;
    cursor: pointer;
    border-radius: 20px;
    transition: background-color 0.3s ease;
}

.file-label:hover {
    background-color: #1e90ff;  /* Dodger Blue */
}

.pdf-controls button, .search-controls button {
    margin-left: 10px;
    padding: 8px 15px;
    background-color: #4169e1;  /* Royal Blue */
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.pdf-controls button:hover, .search-controls button:hover {
    background-color: #1e90ff;  /* Dodger Blue */
}

.content-wrapper {
    display: flex;
    height: calc(100vh - 60px);
    margin-top: 60px;
}

.pdf-viewer {
    flex: 1;
    overflow: auto;
    padding: 20px;
    background-color: #e6e6fa;  /* Lavender */
}

#pdf-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.page-container {
    position: relative;
    margin-bottom: 20px;
    background-color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

canvas {
    border: 1px solid #b0e0e6;  /* Powder Blue */
}

.text-layer {
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    opacity: 0.2;
    line-height: 1.0;
}

.text-layer > div {
    color: transparent;
    position: absolute;
    white-space: pre;
    cursor: text;
    transform-origin: 0% 0%;
}

input[type="text"] {
    padding: 8px 15px;
    margin-right: 10px;
    border: 1px solid #87cefa;  /* Light Sky Blue */
    border-radius: 20px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s ease;
}

input[type="text"]:focus {
    border-color: #4169e1;  /* Royal Blue */
}

.chat-panel {
    width: 300px;
    display: flex;
    flex-direction: column;
    border-left: 1px solid #b0e0e6;  /* Powder Blue */
    transition: width 0.3s ease, background-color 0.3s ease;
    background-color: #f0f8ff;  /* Alice Blue */
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
}

.chat-panel.collapsed {
    width: 30px;
}

.chat-toggle {
    align-self: flex-end;
    padding: 8px 12px;
    cursor: pointer;
    background-color: #9370db;  /* Medium Purple */
    border: none;
    font-size: 18px;
    color: white;
    border-radius: 0 0 0 10px;
    transition: background-color 0.3s ease;
}

.chat-toggle:hover {
    background-color: #8a2be2;  /* Blue Violet */
}

.chat-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

#chat-container {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    background-color: #ffffff;
    border-radius: 10px;
    margin: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.input-area {
    padding: 15px;
    border-top: 1px solid #b0e0e6;  /* Powder Blue */
    background-color: #ffffff;
    display: flex;
    align-items: center;
}

#question-input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #87cefa;  /* Light Sky Blue */
    border-radius: 20px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s ease;
}

#question-input:focus {
    border-color: #4169e1;  /* Royal Blue */
}

#question-button {
    background-color: #ffd700;  /* Gold */
    color: #333;
    border: none;
    padding: 10px 15px;
    margin-left: 10px;
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#question-button:hover {
    background-color: #ffa500;  /* Orange */
}

.message {
    margin-bottom: 15px;
    padding: 10px;
    border-radius: 10px;
    max-width: 80%;
}

.message.user {
    align-self: flex-end;
    background-color: #e0ffff;  /* Light Cyan */
}

.message.ai {
    align-self: flex-start;
    background-color: #e6e6fa;  /* Lavender */
}

.message strong {
    font-weight: bold;
    margin-bottom: 5px;
    display: block;
}

.highlight-list {
    margin-top: 10px;
    padding-left: 20px;
}

.highlight-item {
    cursor: pointer;
    transition: color 0.3s ease;
}

.highlight-item:hover {
    color: #4169e1;  /* Royal Blue */
}

.translation-item {
    color: #696969;  /* Dim Gray */
    font-style: italic;
    margin-left: 10px;
}

.current-match {
    background-color: #ffd700 !important;  /* Gold */
}

.resizer {
    width: 5px;
    background: #b0e0e6;  /* Powder Blue */
    cursor: col-resize;
    transition: background 0.3s ease;
}

.resizer:hover {
    background: #87cefa;  /* Light Sky Blue */
}

.drop-zone {
    border: 2px dashed #ccc;
    border-radius: 20px;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: pointer;
}

.drag-highlight {
    border-color: #007bff;
    background-color: rgba(0, 123, 255, 0.1);
}

.drop-text {
    font-size: 1.2em;
    color: #777;
}

/* PDFが読み込まれたら.drop-textを非表示にする */
.pdf-loaded .drop-text {
    display: none;
}
