body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    font-family: Arial, sans-serif;
    background-color: #111111;
}

header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}

a {
  color: rgb(101, 185, 6);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover, a:focus {
  color: #fff;
  background: rgb(101, 185, 6);
  text-decoration: none;
  border-radius: 2px;
  padding: 2px 4px;
}

#info {
    color: #ffffff;
    font-size: 18px;
    font-weight: bold;
}

.control-bar {
    position: absolute;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    display: flex;
    gap: 15px;
    align-items: left;
    background-color: rgba(0, 0, 0, 0.3);
    padding: 10px 20px;
    border-radius: 5px;
    white-space: nowrap;
}

#controls {
    display: flex;
    gap: 15px;
    align-items: center;
}

#controls select {
    padding: 1px 1px;
    border-radius: 4px;
    border: 1px solid #666;
    background-color: #333;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
}

#controls select:hover {
    background-color: #444;
}

/* #toggleView {
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    background-color: #4CAF50;
    color: white;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
} */

/* #toggleView:hover {
    opacity: 0.9;
} */

#fileUploadContainer {
    display: flex;
    gap: 15px;
    align-items: center;
}

button {
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    background-color: #4CAF50;
    color: white;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

button:hover {
    background-color: #45a049;
    transform: translateY(-1px);
}

#scotFileName {
    color: #fff;
    font-size: 14px;
    margin-left: 10px;
}

#nodeInfo {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background-color: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 15px;
    border-radius: 5px;
    font-size: 14px;
    width: 300px;
    min-height: 100px;
    z-index: 100;
    display: block;
    transition: opacity 0.3s ease;
}

#nodeInfo:empty {
    padding: 15px;
    opacity: 0.7;
}

#nodeInfo:empty::before {
    content: 'Hover over a node to see its details';
    color: #888;
    font-style: italic;
}

#bookInfo {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background-color: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 15px;
    border-radius: 5px;
    font-size: 14px;
    width: 300px;
    min-height: 100px;
    z-index: 100;
    display: block;  /* Always show the panel */
}

#bookInfo:empty {
    padding: 15px;
    content: 'Hover over a book to see its details';
}

#bookInfo:empty::before {
    content: 'Hover over a book to see its details';
    color: #888;
    font-style: italic;
}

#axisLabel {
    position: absolute;
    bottom: 20px;
    left: 30%;
    transform: translateX(-50%);
    color: #ff8800;
    font-size: 14px;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 5px 15px;
    border-radius: 3px;
    z-index: 100;
}

/* Focus styles for accessibility */
button:focus, select:focus {
    outline: 2px solid #4CAF50;
    outline-offset: 2px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        padding: 10px;
    }

    #info {
        margin-bottom: 10px;
        text-align: center;
    }

    .control-bar {
        flex-direction: column;
        align-items: stretch;
        width: 40%;
        max-width: 300px;
        white-space: normal;
    }

    #controls, #fileUploadContainer {
        flex-direction: column;
        align-items: stretch;
    }

    #bookInfo {
        left: 30%;
        right: auto;
        transform: translateX(-50%);
        width: 80%;
        max-width: none;
        top: 250px;
    }

    button {
        width: 100%;
    }
}

#visualization-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

#visualization-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.hint {
    font-size: 0.85em;
    color: #a89d01;
}