body {
    margin: 0;
    background: linear-gradient(90deg, #00050a 0%, #000000 100%) fixed;
    color: white;
    font-family: 'Courier New', Courier, monospace;
    overflow-x: hidden;
}
#starfield {
    position: fixed;
    top: 0;
    left: 0;
    z-index: -1;
}

#ui-container {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 10;
}

#distance-display { 
    font-size: 2rem;
    font-weight: bold; 
}
#message-display { 
    font-size: 1.2rem; 
    color: #ffeb3b; 
    margin-top: 5px;
    transition: opacity 0.5s ease;
    opacity: 1; }

    #message-display.fade-out {
    opacity: 0;
}

#hero {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 250px; 
    height: auto;
    pointer-events: none;
    transition: transform 0.1s ease-out;
}
@media screen and (max-width: 480px) {
    #hero {
        width: 60vw; 
    }
    
    #distance-display {
        font-size: 24px;
    }
    
    #message-display {
        font-size: 16px;
    }
}

#share-button,#reset-btn {
    margin-top: 15px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: white;
    cursor: pointer;
    border-radius: 5px;
}

#character-selector {
    margin: 10px 0;
    display: flex;
    gap: 5px;
}

#character-selector button {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid #fff;
    color: white;
    cursor: pointer;
    padding: 5px 10px;
}


#hero-switch-btn {
    position: fixed;
    bottom: 50px;
    right: 20px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: white;
    cursor: pointer;
    border-radius: 20px;
    font-size: 12px;
    z-index: 100;
}

.legal-footer {
    position: fixed;
    bottom: 0;
    width: 100%;
    text-align: center;
    background: rgba(0, 0, 0, 0.5);
    padding: 5px 0;
    pointer-events: none; /* クリックを邪魔しない */
}

.legal-footer p,
.legal-footer a {
    font-size: 1rem;
    color: #fff;
    margin: 0;
}

#tutorial-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 200;
    pointer-events: none; /* 下の操作を邪魔しない */
    transition: opacity 0.8s ease;
}
#tutorial-overlay.hidden {
    opacity: 0;
}
.tutorial-content {
    color: white;
    text-align: center;
    font-size: 18px;
    text-shadow: 0 0 10px rgba(0,0,0,0.8);
}