
:root {
    --deep: #020c15;
    --navy: #031725;
    --blue: #07344b;
    --cyan: #65e8ed;
    --light-cyan: #a4faff;
    --white: #e8fbff;
    --muted: #8bb9c6;
    --coral: #43d9d0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    overflow: hidden;
    background: var(--deep);
    font-family: "Vazirmatn", sans-serif;
}

.scene {
    position: relative;
    width: 100%;
    min-height: 100vh;
    min-height: 100svh;
    overflow: hidden;
    isolation: isolate;
    background:
        linear-gradient(
            180deg,
            #062a3c 0%,
            #052437 28%,
            #031927 58%,
            #020c15 100%
        );
}

/* OCEAN */

.ocean {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: -5;
}

.surface-light {
    position: absolute;
    top: -180px;
    left: 50%;
    width: 120%;
    height: 430px;
    transform: translateX(-50%);
    border-radius: 50%;
    background: radial-gradient(
        ellipse,
        rgba(74, 214, 230, .25) 0%,
        rgba(28, 124, 157, .12) 35%,
        transparent 72%
    );
    filter: blur(28px);
}

.light-rays {
    position: absolute;
    inset: 0;
    overflow: hidden;
    opacity: .65;
}

.light-rays span {
    position: absolute;
    top: -20%;
    width: 120px;
    height: 90%;
    background: linear-gradient(
        180deg,
        rgba(142, 249, 255, .15),
        rgba(76, 208, 223, .035) 55%,
        transparent
    );
    filter: blur(24px);
    transform-origin: top center;
    animation: rayMove 9s ease-in-out infinite alternate;
}

.light-rays span:nth-child(1) {
    left: 14%;
    transform: rotate(17deg);
}

.light-rays span:nth-child(2) {
    left: 37%;
    width: 170px;
    transform: rotate(-12deg);
    animation-delay: -3s;
}

.light-rays span:nth-child(3) {
    left: 65%;
    width: 100px;
    transform: rotate(13deg);
    animation-delay: -5s;
}

.light-rays span:nth-child(4) {
    left: 85%;
    width: 150px;
    transform: rotate(-18deg);
    animation-delay: -2s;
}

@keyframes rayMove {
    from {
        opacity: .35;
        filter: blur(24px);
    }
    to {
        opacity: .8;
        filter: blur(32px);
    }
}

.water-glow {
    position: absolute;
    top: 28%;
    left: 50%;
    width: 750px;
    height: 500px;
    transform: translateX(-50%);
    background: radial-gradient(
        ellipse,
        rgba(16, 105, 131, .16),
        transparent 70%
    );
    filter: blur(35px);
}

.ocean-depth {
    position: absolute;
    inset: 45% 0 0;
    background: linear-gradient(
        180deg,
        transparent,
        rgba(0, 10, 17, .35) 35%,
        rgba(0, 5, 10, .8) 100%
    );
}

.stars {
    position: absolute;
    inset: 0;
}

.stars i {
    position: absolute;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: rgba(160, 243, 255, .8);
    box-shadow: 0 0 9px rgba(87, 220, 238, .7);
    animation: starBlink 3s ease-in-out infinite;
}

.stars i:nth-child(1) { top: 17%; left: 12%; }
.stars i:nth-child(2) { top: 28%; left: 27%; animation-delay: .7s; }
.stars i:nth-child(3) { top: 13%; left: 48%; animation-delay: 1.4s; }
.stars i:nth-child(4) { top: 32%; left: 73%; animation-delay: .3s; }
.stars i:nth-child(5) { top: 19%; left: 89%; animation-delay: 1.8s; }
.stars i:nth-child(6) { top: 42%; left: 8%; animation-delay: 1s; }
.stars i:nth-child(7) { top: 37%; left: 38%; animation-delay: 2s; }
.stars i:nth-child(8) { top: 46%; left: 60%; animation-delay: .5s; }
.stars i:nth-child(9) { top: 39%; left: 94%; animation-delay: 1.2s; }
.stars i:nth-child(10) { top: 24%; left: 57%; animation-delay: 2.3s; }

@keyframes starBlink {
    0%, 100% { opacity: .25; }
    50% { opacity: .9; }
}

/* DISTANT FISH */

.distant-fish {
    position: absolute;
    z-index: -3;
    width: 48px;
    height: 19px;
    opacity: .5;
    border-radius: 50%;
    background: #65c9d3;
    filter: drop-shadow(0 0 8px rgba(80, 224, 234, .6));
}

.distant-fish::before {
    content: "";
    position: absolute;
    top: 3px;
    left: -12px;
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
    border-right: 15px solid #65c9d3;
}

.distant-fish::after {
    content: "";
    position: absolute;
    top: 6px;
    right: 9px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #d7ffff;
}

.fish-one {
    top: 30%;
    left: -80px;
    animation: fishSwim 24s linear infinite;
}

.fish-two {
    top: 42%;
    right: -90px;
    transform: scale(.65);
    animation: fishSwimReverse 30s linear infinite;
    animation-delay: 5s;
}

@keyframes fishSwim {
    from { left: -80px; }
    to { left: 110%; }
}

@keyframes fishSwimReverse {
    from { right: -90px; }
    to { right: 110%; }
}

/* JELLYFISH */

.jellyfish {
    position: absolute;
    z-index: -2;
    width: 85px;
    height: 125px;
    opacity: .7;
    animation: jellyFloat 7s ease-in-out infinite;
}

.jelly-one {
    top: 25%;
    right: 12%;
}

.jelly-two {
    top: 43%;
    left: 13%;
    transform: scale(.65);
    animation-delay: -3s;
    opacity: .48;
}

.jelly-head {
    position: absolute;
    top: 0;
    left: 50%;
    width: 66px;
    height: 43px;
    transform: translateX(-50%);
    border-radius: 50% 50% 38% 38%;
    background: linear-gradient(
        135deg,
        rgba(141, 250, 255, .8),
        rgba(30, 137, 169, .4)
    );
    box-shadow:
        0 0 15px rgba(83, 226, 241, .45),
        0 0 45px rgba(55, 190, 214, .3);
}

.jelly-tentacles {
    position: absolute;
    top: 36px;
    left: 50%;
    display: flex;
    gap: 8px;
    transform: translateX(-50%);
}

.jelly-tentacles span {
    width: 2px;
    height: 62px;
    border-radius: 50%;
    background: linear-gradient(
        180deg,
        rgba(129, 242, 255, .8),
        transparent
    );
    animation: tentacleMove 2.5s ease-in-out infinite alternate;
}

.jelly-tentacles span:nth-child(even) {
    animation-delay: -.8s;
    height: 48px;
}

@keyframes jellyFloat {
    0%, 100% { margin-top: 0; }
    50% { margin-top: -25px; }
}

@keyframes tentacleMove {
    from { transform: rotate(-9deg); }
    to { transform: rotate(9deg); }
}

/* SUNKEN SHIP */

.ship {
    position: absolute;
    z-index: -2;
    right: 13%;
    bottom: 17%;
    width: 280px;
    height: 190px;
    opacity: .37;
    transform: rotate(-8deg);
    filter: drop-shadow(0 0 12px rgba(28, 119, 140, .15));
}

.ship-body {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 65px;
    background: linear-gradient(180deg, #254d5a, #102a37);
    clip-path: polygon(0 0, 100% 0, 82% 75%, 15% 100%);
}

.ship-deck {
    position: absolute;
    bottom: 55px;
    left: 15%;
    width: 75%;
    height: 13px;
    background: #52727a;
    border-radius: 3px;
}

.ship-mast {
    position: absolute;
    bottom: 62px;
    left: 50%;
    width: 5px;
    height: 130px;
    background: #456773;
    transform: rotate(3deg);
}

.ship-sail {
    position: absolute;
    bottom: 83px;
    left: 52%;
    width: 85px;
    height: 90px;
    background: linear-gradient(135deg, #3d6873, #1a3947);
    clip-path: polygon(0 0, 100% 45%, 0 100%);
    opacity: .7;
}

/* SEA FLOOR */

.sea-floor {
    position: absolute;
    z-index: -1;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 19%;
    background: linear-gradient(
        180deg,
        #0a3442,
        #071e2a 40%,
        #020b12
    );
    border-top: 1px solid rgba(83, 208, 221, .16);
}

.rock {
    position: absolute;
    bottom: 65%;
    background: linear-gradient(145deg, #17404b, #071a25);
    border-radius: 45% 55% 0 0;
}

.rock-one {
    left: 5%;
    width: 170px;
    height: 70px;
}

.rock-two {
    right: 8%;
    width: 210px;
    height: 90px;
}

.rock-three {
    right: 42%;
    width: 120px;
    height: 45px;
}

.coral {
    position: absolute;
    bottom: 55%;
    display: flex;
    align-items: flex-end;
    gap: 7px;
}

.coral-one { left: 22%; }
.coral-two { right: 24%; transform: scale(.7); }

.coral span {
    display: block;
    width: 9px;
    height: 55px;
    border-radius: 10px 10px 2px 2px;
    background: linear-gradient(180deg, #4d9b9b, #17404a);
    transform-origin: bottom;
}

.coral span:nth-child(2) { height: 78px; transform: rotate(-12deg); }
.coral span:nth-child(3) { height: 42px; transform: rotate(13deg); }
.coral span:nth-child(4) { height: 64px; transform: rotate(8deg); }
.coral span:nth-child(5) { height: 35px; transform: rotate(-8deg); }

.sea-plant {
    position: absolute;
    bottom: 50%;
    display: flex;
    gap: 4px;
}

.plant-one { left: 4%; }
.plant-two { right: 5%; transform: scale(.8); }

.sea-plant span {
    width: 10px;
    height: 75px;
    border-radius: 100% 0 100% 0;
    background: linear-gradient(180deg, #2c8a83, #10434b);
    transform-origin: bottom;
    animation: plantMove 4s ease-in-out infinite alternate;
}

.sea-plant span:nth-child(2) {
    height: 100px;
    transform: rotate(12deg);
    animation-delay: -2s;
}

.sea-plant span:nth-child(3) {
    height: 60px;
    transform: rotate(-15deg);
    animation-delay: -1s;
}

@keyframes plantMove {
    from { transform: rotate(-8deg); }
    to { transform: rotate(9deg); }
}

.glowing-stone {
    position: absolute;
    bottom: 15%;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #7cf5ed;
    box-shadow: 0 0 12px #53e9e4, 0 0 30px rgba(83, 233, 228, .5);
    animation: stoneGlow 3s ease-in-out infinite;
}

.stone-one { left: 36%; }
.stone-two { right: 38%; animation-delay: 1s; }
.stone-three { right: 14%; bottom: 25%; animation-delay: 2s; }

@keyframes stoneGlow {
    0%, 100% { opacity: .35; }
    50% { opacity: 1; }
}

/* BUBBLES */

.bubbles {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.bubble {
    position: absolute;
    bottom: -30px;
    border: 1px solid rgba(174, 244, 255, .4);
    border-radius: 50%;
    background: rgba(120, 224, 239, .035);
    box-shadow: inset 0 0 5px rgba(180, 248, 255, .15);
    animation: bubbleRise linear infinite;
}

@keyframes bubbleRise {
    0% {
        transform: translate3d(0, 0, 0) scale(.7);
        opacity: 0;
    }
    10% { opacity: .65; }
    90% { opacity: .4; }
    100% {
        transform: translate3d(35px, -110vh, 0) scale(1.1);
        opacity: 0;
    }
}

/* CONTENT */

.content {
    position: absolute;
    z-index: 3;
    top: 50%;
    left: 50%;
    width: min(600px, 90%);
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--white);
}

.status {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 17px;
    border: 1px solid rgba(111, 225, 236, .2);
    border-radius: 30px;
    background: rgba(5, 34, 47, .48);
    color: #a6dce5;
    font-size: 13px;
    backdrop-filter: blur(8px);
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #f07878;
    box-shadow: 0 0 10px rgba(240, 120, 120, .8);
    animation: statusBlink 1.5s infinite;
}

@keyframes statusBlink {
    50% { opacity: .25; }
}

.error-number {
    margin: 8px 0 0;
    font-size: clamp(100px, 16vw, 185px);
    line-height: 1.25;
    font-weight: 800;
    letter-spacing: 5px;
    color: #d9fbff;
    text-shadow:
        0 0 15px rgba(91, 225, 239, .4),
        0 0 55px rgba(42, 174, 199, .3);
    animation: numberGlow 5s ease-in-out infinite;
}

@keyframes numberGlow {
    0%, 100% {
        text-shadow:
            0 0 15px rgba(91, 225, 239, .4),
            0 0 55px rgba(42, 174, 199, .3);
    }
    50% {
        text-shadow:
            0 0 25px rgba(91, 225, 239, .65),
            0 0 80px rgba(42, 174, 199, .5);
    }
}

.signal-line {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: -4px;
    color: #8ed9e1;
    font-size: 14px;
}

.signal-line span {
    width: 48px;
    height: 1px;
    background: linear-gradient(90deg, transparent, #5bcbd5);
}

.signal-line span:last-child {
    transform: rotate(180deg);
}

.content h1 {
    margin-top: 22px;
    font-size: clamp(25px, 4vw, 35px);
    font-weight: 700;
    color: #e4fbff;
    text-shadow: 0 0 20px rgba(80, 210, 225, .22);
}

.description {
    max-width: 440px;
    margin: 12px auto 0;
    color: #a4c7d0;
    font-size: 14px;
    line-height: 2.1;
}

.coordinates {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
    color: #79b7c3;
    font-size: 12px;
}

.coordinates i {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #55dce0;
    box-shadow: 0 0 8px #55dce0;
}

/* BUTTONS */

.actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 27px;
}

.home-button,
.back-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 9px;
    font-family: inherit;
    font-size: 13px;
    text-decoration: none;
    cursor: pointer;
    transition: .3s ease;
}

.home-button {
    color: #03202a;
    background: linear-gradient(135deg, #a4faff, #4fcbd6);
    box-shadow: 0 5px 25px rgba(54, 197, 211, .18);
}

.home-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(54, 197, 211, .35);
}

.button-arrow {
    font-size: 17px;
    transition: transform .3s ease;
}

.home-button:hover .button-arrow {
    transform: translate(3px, -3px);
}

.back-button {
    border: 1px solid rgba(131, 225, 236, .3);
    color: #c4e8ed;
    background: rgba(4, 32, 45, .55);
}

.back-button:hover {
    border-color: #65dce5;
    background: rgba(22, 88, 103, .4);
}

/* FOOTER */

.bottom-info {
    position: absolute;
    z-index: 3;
    right: 0;
    bottom: 22px;
    left: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    color: #81aeba;
    font-size: 11px;
    letter-spacing: .2px;
}

.depth-info {
    color: #62d5db;
    font-weight: 700;
}

/* VIGNETTE */

.vignette {
    position: absolute;
    z-index: 2;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(
        ellipse at center,
        transparent 35%,
        rgba(0, 7, 13, .18) 75%,
        rgba(0, 5, 10, .55) 100%
    );
}

/* TABLET */

@media (max-width: 768px) {
    .content {
        width: 90%;
    }

    .ship {
        right: 2%;
        bottom: 15%;
        transform: rotate(-8deg) scale(.75);
        transform-origin: bottom right;
    }

    .jelly-one {
        right: 5%;
    }

    .jelly-two {
        left: 4%;
    }

    .bottom-info {
        padding: 0 3%;
        font-size: 10px;
    }

    .sea-floor {
        height: 17%;
    }
}

/* MOBILE */

@media (max-width: 480px) {
    .content {
        top: 47%;
        width: 92%;
    }

    .status {
        font-size: 11px;
        padding: 7px 13px;
    }

    .error-number {
        font-size: clamp(105px, 31vw, 145px);
        margin-top: 12px;
    }

    .signal-line {
        gap: 8px;
        font-size: 11px;
    }

    .signal-line span {
        width: 27px;
    }

    .content h1 {
        margin-top: 18px;
        font-size: 25px;
    }

    .description {
        max-width: 320px;
        font-size: 12px;
        line-height: 2;
    }

    .coordinates {
        gap: 9px;
        font-size: 10px;
        margin-top: 16px;
    }

    .actions {
        gap: 8px;
        margin-top: 22px;
    }

    .home-button,
    .back-button {
        min-height: 44px;
        padding: 0 14px;
        gap: 7px;
        font-size: 11px;
    }

    .bottom-info {
        bottom: 13px;
        padding: 0 12px;
        font-size: 8px;
    }

    .ship {
        right: -70px;
        bottom: 14%;
        transform: rotate(-8deg) scale(.55);
    }

    .jelly-one {
        top: 16%;
        right: -10px;
        transform: scale(.55);
    }

    .jelly-two {
        top: 48%;
        left: -15px;
        transform: scale(.45);
    }

    .sea-floor {
        height: 14%;
    }

    .coral-one {
        left: 15%;
        transform: scale(.7);
        transform-origin: bottom left;
    }

    .coral-two {
        right: 12%;
    }

    .rock-one {
        left: -45px;
    }

    .rock-two {
        right: -65px;
    }
}

/* SHORT SCREENS */

@media (max-height: 650px) and (min-width: 481px) {
    .content {
        transform: translate(-50%, -50%) scale(.82);
    }

    .bottom-info {
        bottom: 10px;
    }

    .ship {
        bottom: 12%;
    }
}

@media (max-height: 560px) {
    .content {
        transform: translate(-50%, -50%) scale(.72);
    }
}

/* REDUCED MOTION */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
    }
}
