:root {
    --ocean-blue: #0077be;
    --sand-color: #f4d03f;
    --safe-green: #2ecc71;
    --text-white: #ffffff;
}

body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #333;
}

#game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    background-color: var(--ocean-blue);
    background-image: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 50px 50px;
}

#hud {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    color: var(--text-white);
    text-align: center;
    background: rgba(0, 0, 0, 0.5);
    padding: 10px 20px;
    border-radius: 20px;
    pointer-events: none;
}

#round-display {
    font-size: 24px;
    font-weight: bold;
}

.safe-zone {
    position: absolute;
    left: 0;
    right: 0;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(0, 0, 0, 0.3);
    font-weight: bold;
    font-size: 40px;
    letter-spacing: 10px;
}

#top-safe-zone {
    top: 0;
    background-color: var(--safe-green);
    border-bottom: 5px solid #27ae60;
}

#bottom-safe-zone {
    bottom: 0;
    background-color: var(--sand-color);
    border-top: 5px solid #d4ac0d;
}

.player {
    position: absolute;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.1s;
    z-index: 5;
}

.crab {
    position: absolute;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 4;
}

/* Chibi Turtle */
.chibi-turtle {
    position: relative;
    width: 50px;
    height: 50px;
}

.chibi-turtle .shell {
    position: absolute;
    width: 40px;
    height: 45px;
    background: #27ae60;
    border-radius: 50% 50% 45% 45%;
    border: 3px solid #1e8449;
    top: 5px;
    left: 5px;
    z-index: 2;
    background-image: radial-gradient(#2ecc71 40%, transparent 41%);
    background-size: 15px 15px;
}

.chibi-turtle .head {
    position: absolute;
    width: 25px;
    height: 20px;
    background: #58d68d;
    border-radius: 50%;
    top: -5px;
    left: 12.5px;
    z-index: 3;
    border: 2px solid #1e8449;
}

.chibi-turtle .eye {
    position: absolute;
    width: 5px;
    height: 5px;
    background: black;
    border-radius: 50%;
    top: 5px;
}

.chibi-turtle .eye.left { left: 5px; }
.chibi-turtle .eye.right { right: 5px; }

.chibi-turtle .flipper {
    position: absolute;
    width: 15px;
    height: 10px;
    background: #58d68d;
    border-radius: 50%;
    z-index: 1;
    border: 2px solid #1e8449;
}

.fl-top-left { top: 10px; left: -5px; transform: rotate(-30deg); }
.fl-top-right { top: 10px; right: -5px; transform: rotate(30deg); }
.fl-bot-left { bottom: 5px; left: -2px; transform: rotate(-150deg); }
.fl-bot-right { bottom: 5px; right: -2px; transform: rotate(150deg); }

/* Chibi Axolotl */
.chibi-axolotl {
    position: relative;
    width: 50px;
    height: 60px;
}

.chibi-axolotl .body {
    position: absolute;
    width: 30px;
    height: 40px;
    background: #ffb6c1;
    border-radius: 20px;
    top: 15px;
    left: 10px;
    border: 3px solid #ff69b4;
    z-index: 2;
}

.chibi-axolotl .head {
    position: absolute;
    width: 45px;
    height: 35px;
    background: #ffb6c1;
    border-radius: 15px 15px 25px 25px;
    top: -5px;
    left: 2.5px;
    border: 3px solid #ff69b4;
    z-index: 4;
}

.chibi-axolotl .eye {
    position: absolute;
    width: 6px;
    height: 6px;
    background: #333;
    border-radius: 50%;
    top: 15px;
}

.chibi-axolotl .eye.left { left: 10px; }
.chibi-axolotl .eye.right { right: 10px; }

.chibi-axolotl .gill {
    position: absolute;
    width: 15px;
    height: 6px;
    background: #ff69b4;
    border-radius: 5px;
    z-index: 3;
}

.g-l1 { top: 5px; left: -10px; transform: rotate(-20deg); }
.g-l2 { top: 15px; left: -12px; }
.g-l3 { top: 25px; left: -10px; transform: rotate(20deg); }
.g-r1 { top: 5px; right: -10px; transform: rotate(20deg); }
.g-r2 { top: 15px; right: -12px; }
.g-r3 { top: 25px; right: -10px; transform: rotate(-20deg); }

/* Chibi Crab */
.chibi-crab {
    position: relative;
    width: 50px;
    height: 40px;
}

.chibi-crab .body {
    position: absolute;
    width: 40px;
    height: 30px;
    background: #e74c3c;
    border-radius: 40%;
    top: 5px;
    left: 5px;
    border: 3px solid #c0392b;
    z-index: 2;
}

.chibi-crab .eye {
    position: absolute;
    width: 4px;
    height: 4px;
    background: white;
    border-radius: 50%;
    top: 10px;
    z-index: 3;
}

.chibi-crab .eye::after {
    content: '';
    position: absolute;
    width: 2px;
    height: 2px;
    background: black;
    border-radius: 50%;
    top: 1px;
    left: 1px;
}

.chibi-crab .eye.left { left: 12px; }
.chibi-crab .eye.right { right: 12px; }

.chibi-crab .claw {
    position: absolute;
    width: 15px;
    height: 12px;
    background: #e74c3c;
    border: 2px solid #c0392b;
    border-radius: 50% 50% 10% 10%;
    z-index: 1;
}

.claw.left { top: -5px; left: -2px; transform: rotate(-30deg); }
.claw.right { top: -5px; right: -2px; transform: rotate(30deg); }

.chibi-crab .leg {
    position: absolute;
    width: 10px;
    height: 4px;
    background: #e74c3c;
    z-index: 1;
}

.leg.l1 { top: 15px; left: -5px; transform: rotate(-20deg); }
.leg.l2 { top: 25px; left: -5px; transform: rotate(20deg); }
.leg.r1 { top: 15px; right: -5px; transform: rotate(20deg); }
.leg.r2 { top: 25px; right: -5px; transform: rotate(-20deg); }

/* Obstacles */
.obstacle {
    position: absolute;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
}

.coral {
    width: 30px;
    height: 35px;
    background: #ff7f50;
    border-radius: 10px 10px 5px 5px;
    position: relative;
    border: 2px solid #d35400;
}

.coral::before, .coral::after {
    content: '';
    position: absolute;
    background: #ff7f50;
    border: 2px solid #d35400;
    border-radius: 5px;
}

.coral::before {
    width: 10px;
    height: 20px;
    top: -10px;
    left: 2px;
    transform: rotate(-20deg);
}

.coral::after {
    width: 10px;
    height: 20px;
    top: -5px;
    right: 2px;
    transform: rotate(30deg);
}

.rock {
    width: 35px;
    height: 25px;
    background: #95a5a6;
    border-radius: 40% 60% 50% 50%;
    border: 3px solid #7f8c8d;
    position: relative;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    z-index: 100;
    text-align: center;
}

.hidden {
    display: none !important;
}

h1 {
    font-size: 60px;
    margin-bottom: 20px;
    text-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

.button-group {
    display: flex;
    gap: 20px;
    margin-top: 30px;
}

button {
    padding: 15px 30px;
    font-size: 20px;
    cursor: pointer;
    background-color: var(--safe-green);
    color: white;
    border: none;
    border-radius: 10px;
    transition: transform 0.2s, background-color 0.2s;
}

button:hover {
    transform: scale(1.1);
    background-color: #27ae60;
}

.controls-hint {
    margin-top: 40px;
    display: flex;
    gap: 50px;
    opacity: 0.8;
}

.controls-hint p {
    font-size: 18px;
}

#victory-video-container {
    margin: 20px 0;
    width: 300px;
    height: 170px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}
