* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}
body {
    background: black;
    overflow: hidden;
}

/* Title Screen Layout */
#title-screen {
    position: relative;
    width: 100vw;
    height: 100vh;
}

/* Background Video */
#title-video {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* UI Overlay */
#title-ui {
    position: absolute;
    top: 50%;
        left: 100px;              /* moved a little to the left */
    transform: translateY(-50%);

    display: flex;
    flex-direction: column;
    align-items: center; /* LEFT alignment */
    gap: 40px;
}


#game-title {
    width: 650px;
}

#start-btn {
    width: 200px;
    cursor: pointer;
    transition: transform 0.2s;
}

#start-btn:hover {
    transform: scale(1.1);
}

#credits-text {
    position: absolute;
    bottom: 0;
    right: 0;
    font-size: 20px;
    color: #5374a5;
    font-family: Arial, sans-serif;
    font-weight: bold;
    text-align: right;
    line-height: 1.4;
    z-index: 100;
    padding: 8px 8px;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.8), 0 0 10px rgba(0, 0, 0, 0.6), 0 0 15px rgba(0, 0, 0, 0.4);
}

/* Cutscene */
#cutscene {
    width: 100vw;
    height: 100vh;
}

#cutscene-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#gameplay {
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    position: relative;
}

#game-container {
    position: relative; /* IMPORTANT */
    width: 4000px;
    height: 2500px;
    top: 0;
    left: 0;
    z-index: 0;
}

#game-map {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1; /* Background video behind everything */
}

#player {
    position: absolute;
    width: 250px;
    transition: transform 0.1s linear;
    z-index: 10; /* ALWAYS on top */
    border: none;
    filter: drop-shadow(0px 12px 8px rgba(0,0,0,0.35));
}

/* --- HUD --- */
.gameplay1-hud-title, #gameplay1-hud-title {
    position: fixed;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    width: 500px;
    height: auto;
    z-index: 210;
    pointer-events: none;
    opacity: 0.95;
}

.gameplay2-hud-title, #gameplay2-hud-title {
    position: fixed;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    width: 500px;
    height: auto;
    z-index: 210;
    pointer-events: none;
    opacity: 0.95;
}
.plankton {
    position: absolute;
    width: 70px;
    height: auto;
    transition: transform 0.1s linear;
    z-index: 0;
}
/* Score in top-left corner */
#score {
    position: fixed;     /* fixed relative to viewport */
    top: 20px;
    left: 20px;
    color: rgb(113, 149, 187);
    font-size: 24px;
    font-family: Arial, sans-serif;
    text-shadow: 1px 1px 4px black;
    z-index: 200;        /* on top of everything */
}

#skip-btn {
    font-family: Arial, sans-serif;
}

/* Attack button in bottom-right corner */

#attack-btn {
    position: fixed;     /* fixed relative to viewport */
    bottom: 50px;
    right: 50px;
    width: 150px;
    height: 150px;
    cursor: pointer;
    z-index: 200;        /* on top of everything */
    opacity: 0.75;
}

/* --- Touch Arrow Controls --- */
#touch-arrows {
    position: fixed;
    left: 40px;
    bottom: 40px;
    display: grid;
    grid-template-columns: repeat(3, 80px);
    grid-template-rows: repeat(3, 80px);
    gap: 12px;
    z-index: 1000;
    background: none;
    pointer-events: auto;
}
#touch-arrows[style*="display: flex"] {
    grid-template-columns: auto;
    grid-template-rows: auto;
}
 .arrow {
    width: 68px;
    height: 68px;
    background: rgba(255,255,255,0.18);
    border: 4px solid #fff;
    border-radius: 15px;
    color: #fff;
    box-shadow: 0 4px 16px rgba(0,0,0,0.35);
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    touch-action: manipulation;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.arrow:active {
    background: rgba(255,255,255,0.35);
    transform: scale(1.12);
}
.arrow-btn {
    background: none;
    border: none;
    padding: 0;
    margin: 0px;
    cursor: pointer;
    outline: none;
    opacity: 0.75;
}
.arrow-btn:active {
    filter: brightness(0.85);
}
 .arrow-svg {
    display: block;
    width: 85px;
    height: 85px;
}
#bigfish-bg {
    position: absolute;
    z-index: 1;
}
