body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #000;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    user-select: none;
}

.game-viewport {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    pointer-events: none;
    transition: opacity 0.5s ease-in-out;
}

#bg-layer { z-index: 10; }
#video-layer { z-index: 5; }
#sprite-layer { z-index: 20; display: flex; justify-content: center; align-items: flex-end; }
.ui-layer { z-index: 100; pointer-events: auto; }

#bg-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.top-bar {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    opacity: 0.6;
    transition: opacity 0.3s;
}

.top-bar:hover { opacity: 1; }

.btn-icon {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.dialog-box {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1000px;
    min-height: 140px;
    background: rgba(0, 0, 0, 0.75);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 20px 30px;
    color: #f0f0f0;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.speaker-name {
    position: absolute;
    top: -25px;
    left: 40px;
    background: #007acc;
    padding: 5px 20px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 18px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.dialog-text {
    font-size: 20px;
    line-height: 1.5;
    margin-top: 10px;
}

.continue-indicator {
    position: absolute;
    right: 25px;
    bottom: 15px;
    font-size: 20px;
    color: #aaa;
    animation: bounce 1.5s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.choice-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 150;
}

.choice-btn {
    background: rgba(30, 30, 30, 0.9);
    border: 2px solid #007acc;
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.choice-btn:hover {
    background: #007acc;
    transform: scale(1.02);
}

.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}