html {
    height: 100%;
}
body {
    font-family: 'Noto Serif JP', serif;
    background-color: #111; 
    color: #f0f0f0;
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

main {
    flex-grow: 1;
}

#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; 
}

header {
    position: relative;
    background-image: linear-gradient(to bottom, #8a5a2e, #78431e);
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
}

header::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 5px;
    left: 0.4rem;
    right: 0.4rem;
    border-left: 2px dashed #f3d773;
    border-right: 2px dashed #f3d773;
    border-bottom: 2px dashed #f3d773;
    border-top: none;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
    pointer-events: none;
}

.icon-link svg {
    transition: fill 0.3s ease, transform 0.3s ease;
    fill: #ffffff;
}
.icon-link:hover svg {
    fill: #9ca3af;
    transform: scale(1.1);
}

.image-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%; 
}

.main-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: opacity 0.3s ease-in-out;
}

#work-title, #work-description, #image-caption, #work-link-container, #node-section {
    transition: opacity 0.3s ease-in-out;
}

.arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2.5rem;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: color 0.3s ease;
    user-select: none;
    padding: 1rem;
    z-index: 10;
}

.arrow:hover {
    color: rgba(255, 255, 255, 1);
}

.arrow-left {
    left: -4rem;
}

.arrow-right {
    right: -4rem;
}

.thumbnail-container {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    justify-content: center;
}

.thumbnail {
    width: 80px;
    height: 45px;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 4px;
    transition: border-color 0.3s ease, transform 0.3s ease;
    opacity: 0.6;
}

.thumbnail:hover {
    transform: scale(1.05);
    opacity: 1;
}

.thumbnail.active {
    border-color: #fff;
    opacity: 1;
}

.pagination-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.4);
    transition: background-color 0.3s ease-in-out;
}
.pagination-dot.active {
    background-color: #f3d773;
}

#node-image {
    cursor: zoom-in;
}
#modal-image {
    transition: transform 0.3s ease-in-out;
    transform-origin: center center;
    cursor: zoom-out;
}

#modal-image.zoomed {
    transform: scale(2.5);
    cursor: grab;
}

.view-3d-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #f3d773;
    color: #111;
    font-weight: bold;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 2px solid #f3d773;
}

.view-3d-button svg {
    stroke: #111; 
    transition: stroke 0.3s ease, transform 0.8s ease;
}

.view-3d-button:hover {
    background-color: transparent;
    color: #f3d773;
    box-shadow: 0 0 15px #f9e193;
    transform: scale(1.05);
}

.view-3d-button:hover svg {
    stroke: #f3d773;
    transform: rotate(360deg);
}

#viewer-canvas {
    cursor: grab;
}

#viewer-canvas:active {
    cursor: grabbing;
}