body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    overflow: hidden;
}

.vr-container-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
}

.vr-container {
    display: flex;
    width: 100%;
    height: 100%;
    position: relative;
}

.vr-sidebar {
    width: 250px;
    background-color: #fff;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    z-index: 10;
    transition: transform 0.3s ease-in-out;
    transform: translateX(0);
}

.vr-sidebar.collapsed {
    transform: translateX(-100%);
}

.vr-header {
    padding: 10px;
    border-bottom: 1px solid #ddd;
    font-weight: bold;
    text-align: center;
    background-color: #f7f7f7;
    flex-shrink: 0;
}

.vr-file-list {
    list-style: none;
    padding: 0;
    margin: 0;
    overflow-y: auto;
    flex-grow: 1;
}

.vr-file-list li {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    font-size: 14px;
    word-break: break-all;
    transition: background-color 0.2s;
}

.vr-file-list li:hover {
    background-color: #f0f0f0;
}

.vr-file-list li.active {
    background-color: #007bff;
    color: white;
}

.vr-viewer {
    flex-grow: 1;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.sidebar-toggle-button {
    position: absolute;
    top: 50%;
    left: 100%;
    transform: translateY(-50%); 
    width: 28px;
    height: 56px;
    padding: 0;
    margin: 0;
    background-color: #fff;
    border: 1px solid #ddd;
    border-left: none;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    z-index: 9;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    line-height: 1;
    color: #555;
    transition: background-color 0.2s;
}

.sidebar-toggle-button:hover {
    background-color: #f7f7f7;
}

@media (max-width: 768px) {
    .vr-sidebar {
        width: 85%;
        max-width: 300px;
    }
}

.swipe-guide {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 60px;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    z-index: 30;
    pointer-events: none;
    opacity: 0;
    animation: fade-in 0.5s ease-out forwards, swipe-animation 8s 0.5s ease-in-out forwards;
}

@keyframes fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes swipe-animation {
    0%   { transform: translate(-50%, -50%); }
    5%   { transform: translate(calc(-50% - 50px), -50%); }
    10%  { transform: translate(calc(-50% + 50px), -50%); }
    15%  { transform: translate(calc(-50% - 50px), -50%); }
    20%  { transform: translate(calc(-50% + 50px), -50%); }
    25%  { transform: translate(calc(-50% - 50px), -50%); }
    30%  { transform: translate(-50%, -50%); }
    40%  { transform: translate(-50%, -50%); }
    45%  { transform: translate(-50%, calc(-50% - 50px)); }
    50%  { transform: translate(-50%, calc(-50% + 50px)); }
    55%  { transform: translate(-50%, calc(-50% - 50px)); }
    60%  { transform: translate(-50%, calc(-50% + 50px)); }
    65%  { transform: translate(-50%, calc(-50% - 50px)); }
    70%  { transform: translate(-50%, -50%); }
    80%  { transform: translate(-50%, -50%); }
    90%  { opacity: 1; }
    100% { opacity: 0; transform: translate(-50%, -50%); }
}

.info-button {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 12px 25px;
    font-size: 18px;
    border-radius: 30px;
    cursor: pointer;
    z-index: 8;
    white-space: nowrap;
    transition: background-color 0.2s;
}

.info-button:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.info-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    padding: 20px;
    box-sizing: border-box;
    z-index: 10;
    transition: transform 0.3s ease-in-out;
    transform: translateX(100%);
    overflow-y: auto;
}

.info-panel.open {
    transform: translateX(0);
}

.info-panel h3 {
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #ccc;
}

.info-panel p {
    font-size: 14px;
    line-height: 1.7;
}

.info-panel-close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #aaa;
    transition: color 0.2s;
}

.info-panel-close-btn:hover {
    color: #333;
}

.image-title-display {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 24px;
    font-weight: bold;
    z-index: 7;
    pointer-events: none;
    white-space: nowrap;
    text-shadow: none;
}

/* VRモードアイコンを強制的に非表示にする */
.a-enter-vr {
    display: none !important;
}
