/* =========================
GLOBAL
========================= */

body{
margin:0;
background:#0b0f14;
color:white;
font-family:Arial, sans-serif;
text-align:center;
overflow:hidden;
}

h1{
margin:10px;
font-weight:600;
}

/* =========================
MENU SINEMATIK
========================= */

#menuScreen{
position:fixed;
top:0;
left:0;
width:100%;
height:100%;
overflow:hidden;
display:flex;
align-items:center;
justify-content:center;
z-index:999;
}

/* OCEAN BACKGROUND */

.ocean{
position:absolute;
width:200%;
height:200%;
background:linear-gradient(
180deg,
#0b2e3f 0%,
#124a63 40%,
#1c6f8c 70%,
#0b2e3f 100%
);
animation:waveMove 20s linear infinite;
}

@keyframes waveMove{
0%{transform:translate(0,0);}
50%{transform:translate(-5%, -3%);}
100%{transform:translate(0,0);}
}

.ocean::before,
.ocean::after{
content:"";
position:absolute;
width:200%;
height:200%;
background:
radial-gradient(circle at 30% 30%, rgba(255,255,255,0.08), transparent 60%),
radial-gradient(circle at 70% 70%, rgba(255,255,255,0.05), transparent 60%);
animation:waveFloat 12s ease-in-out infinite;
}

.ocean::after{
animation-delay:6s;
opacity:0.6;
}

@keyframes waveFloat{
0%,100%{transform:translateY(0);}
50%{transform:translateY(20px);}
}

/* OVERLAY */

.overlay{
position:absolute;
width:100%;
height:100%;
background:radial-gradient(circle, transparent 40%, rgba(0,0,0,0.7) 100%);
}

/* MENU CONTENT */

.menu-content{
position:relative;
z-index:2;
text-align:center;
animation:fadeIn 1.2s ease;
}

@keyframes fadeIn{
from{opacity:0; transform:translateY(20px);}
to{opacity:1; transform:translateY(0);}
}

.title{
font-size:42px;
text-shadow:0 0 20px rgba(255,255,255,0.4);
margin-bottom:10px;
}

.subtitle{
opacity:0.8;
margin-bottom:25px;
}

/* BUTTON MENU */

.menu-buttons{
display:flex;
flex-direction:column;
gap:12px;
align-items:center;
}

.menu-buttons button{
background:rgba(255,255,255,0.1);
color:#fff;
border:none;
padding:12px 20px;
border-radius:10px;
cursor:pointer;
width:220px;
transition:0.3s;
}

.menu-buttons button:hover{
background:#4CAF50;
transform:scale(1.05);
box-shadow:0 0 10px rgba(76,175,80,0.6);
}

/* =========================
GAME LAYOUT (ASLI MAS)
========================= */

#game{
display:flex;
justify-content:center;
gap:20px;
margin-top:10px;
}

/* =========================
MAP
========================= */

#map{
position:relative;
width:900px;
height:500px;
border:3px solid #222;
border-radius:6px;
overflow:hidden;
box-shadow:0 0 20px rgba(0,0,0,0.6);
}

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

/* =========================
PORT ICON
========================= */

.port{
position:absolute;
width:40px;
cursor:pointer;
transition:0.2s;
}

.port:hover{
transform:scale(1.2);
}

/* =========================
SHIPS
========================= */

.ship{
position:absolute;
width:40px;
transition:0.1s linear;
pointer-events:none;
}

/* =========================
PIRATE
========================= */

.pirate{
position:absolute;
width:45px;
pointer-events:none;
}

/* =========================
PANEL UI
========================= */

#panel{
background:#1c1f26;
padding:15px;
width:220px;
border-radius:6px;
border:2px solid #333;
text-align:left;
box-shadow:0 0 10px rgba(0,0,0,0.7);
}

#panel h2{
margin-top:0;
border-bottom:1px solid #333;
padding-bottom:5px;
}

/* =========================
RESOURCE
========================= */

#panel p{
margin:6px 0;
font-size:15px;
}

#panel img{
width:20px;
vertical-align:middle;
margin-right:6px;
}

/* =========================
EVENT BOX
========================= */

#event{
margin-top:10px;
padding:8px;
background:#111;
border:1px solid #333;
border-radius:4px;
font-size:13px;
min-height:35px;
}

/* =========================
BUTTON DEFAULT
========================= */

button{
background:#ff9800;
border:none;
padding:8px 12px;
border-radius:4px;
cursor:pointer;
font-weight:bold;
margin-top:5px;
}

button:hover{
background:#ffa726;
}

/* =========================
RESPONSIVE
========================= */

@media (max-width:900px){

#game{
flex-direction:column;
align-items:center;
}

#map{
width:95%;
height:400px;
}

#panel{
width:90%;
}

.title{
font-size:34px;
}

}
