* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: #0a0a0a;
    overflow: hidden;
    cursor: pointer;
}

.story-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

.background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: all 1.5s ease-in-out;
    z-index: 1;
}

.bg-scene1 { background-image: url("assets/map.png"); }
.bg-scene2 { background-image: url("assets/forest1.png");}
.bg-scene3 { background-image: url("assets/forest3.png");}
.bg-scene4 { background-image: url("assets/forest2.png");}
.bg-scene5 { background-image: url("assets/direction.png"); }

.firefly {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #ffeb3b;
    border-radius: 50%;
    box-shadow: 0 0 10px #ffeb3b;
    animation: firefly 8s linear infinite;
    z-index: 3;
}

@keyframes firefly {
    0% { transform: translateY(100vh) translateX(0px); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-10vh) translateX(100px); opacity: 0; }
}

.character {
    position: absolute;
    width: 200px;
    height: auto;
    bottom: 120px;
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 4;
}

.character img {
    width: 100%;
    height: auto;
    display: block;
}

.character.luffy { left: -250px; }
.character.zoro { right: -250px; }

.character.active.luffy {
    left: 100px;
    transform: scale(1.1);
}
.character.active.zoro {
    right: 100px;
    transform: scale(1.1);
}

.dialogue-container {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.9), rgba(20, 20, 20, 0.95));
    backdrop-filter: blur(10px);
    border-top: 2px solid #4a90e2;
    padding: 20px;
    z-index: 5;
    transform: translateY(100%);
    transition: transform 0.5s ease-in-out;
}

.dialogue-container.visible {
    transform: translateY(0);
}

.speaker-name {
    color: #4a90e2;
    font-weight: bold;
    font-size: 18px;
    margin-bottom: 10px;
}

.dialogue-text {
    color: #ffffff;
    font-size: 16px;
    line-height: 1.6;
    min-height: 50px;
}

.next-button {
    position: absolute;
    bottom: 10px;
    right: 20px;
    background: transparent;
    color: white;
    border: 1px solid white;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}
.next-button:hover {
    background: #487098;
    transform: scale(1.05);
}

.choices-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
    flex-direction: column;
    gap: 20px;
    z-index: 6;
}

 .choices-container{
    background: url("assets/wooden_pole.png");
    background-size:  100% 100%;
    background-position: center;

 }

.choices-container a img{
    width: 250px;
    padding-top: 0px;
}

.choices-container a:hover {
    transform: scale(1.05);
    
}

.title {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: #108836;
    font-size: 28px;
    font-weight: bold;
    text-align: center;
    z-index: 5;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

.fade-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: black;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease-in-out;
    z-index: 10;
}
.fade-overlay.active { opacity: 1; }
