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

html {
    overflow-x: hidden;
    width: 100%;
}

.wip-notice {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100vw;
    min-height: 50px;
    background: repeating-linear-gradient(
        45deg,
        #ff9800 0px,
        #ff9800 20px,
        #ffffff 20px,
        #ffffff 40px
    );
    background-size: 299.9% 100%;
    animation: wip-scroll 480s linear infinite;
    /* move by half of the visible pattern (i.e. -150%) to leave a gap between repeats */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: opacity 0.1s linear;
    padding: 10px 0;
    overflow: hidden;
    max-width: 100%;
}

.wip-message {
    font-size: 1.2rem;
    font-weight: bold;
    color: #fff;
    background: #000;
    padding: 8px 20px;
    border-radius: 20px;
    letter-spacing: 0.05em;
    max-width: calc(100% - 80px);
    text-align: center;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

@media (max-width: 600px) {
    .wip-message {
        font-size: 0.9rem;
        padding: 6px 15px;
        letter-spacing: 0.02em;
    }
}

@keyframes wip-scroll {
    0% { background-position: 0 0; }
    100% { background-position: -150% 0; }
}

.wip-close {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #000;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, background 0.2s ease;
    flex-shrink: 0;
}

.wip-close:hover {
    transform: translateY(-50%) scale(1.1);
    background: #333;
}

@media (max-width: 600px) {
    .wip-close {
        width: 28px;
        height: 28px;
        right: 8px;
    }
    
    .wip-close span {
        font-size: 20px;
    }
}

.wip-close span {
    color: #fff;
    font-size: 24px;
    font-weight: bold;
    line-height: 1;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow-x: hidden;
    background: linear-gradient(to bottom, 
        #1a5f7a 0%,
        #15527a 10%,
        #0f4570 20%,
        #0a3860 30%,
        #062b50 40%,
        #031e40 50%,
        #021430 60%,
        #010d20 70%,
        #000810 80%,
        #000408 90%,
        #000000 100%
    );
    min-height: 500vh;
}

.ocean-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.wave {
    position: absolute;
    width: 200%;
    height: 100%;
    opacity: 0.6;
    will-change: transform, opacity;
}

.wave1 {
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120" preserveAspectRatio="none"><path d="M0,60 Q300,10 600,60 T1200,60 L1200,120 L0,120 Z" fill="rgba(41, 128, 185, 0.2)"/></svg>');
    background-size: 50% 150px;
    background-repeat: repeat;
    animation: wave-animation 25s linear infinite;
    top: 0;
}

.wave2 {
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120" preserveAspectRatio="none"><path d="M0,70 Q300,20 600,70 T1200,70 L1200,120 L0,120 Z" fill="rgba(52, 152, 219, 0.15)"/></svg>');
    background-size: 50% 150px;
    background-repeat: repeat;
    animation: wave-animation 20s linear infinite reverse;
    top: 0;
}

.wave3 {
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120" preserveAspectRatio="none"><path d="M0,50 Q300,0 600,50 T1200,50 L1200,120 L0,120 Z" fill="rgba(21, 82, 122, 0.25)"/></svg>');
    background-size: 50% 150px;
    background-repeat: repeat;
    animation: wave-animation 30s linear infinite;
    top: 0;
}

.wave4 {
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120" preserveAspectRatio="none"><path d="M0,80 Q300,30 600,80 T1200,80 L1200,120 L0,120 Z" fill="rgba(15, 69, 112, 0.18)"/></svg>');
    background-size: 50% 150px;
    background-repeat: repeat;
    animation: wave-animation 35s linear infinite reverse;
    top: 0;
}

@keyframes wave-animation {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.content {
    position: relative;
    z-index: 2;
    padding: 0;
}

.depth-zone {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
    transition: opacity 0.5s ease;
}

.depth-zone h1,
.depth-zone h2 {
    font-size: 4rem;
    font-weight: 300;
    margin-bottom: 1rem;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
    letter-spacing: 0.1em;
}

.depth-zone p {
    font-size: 1.5rem;
    font-weight: 200;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
    letter-spacing: 0.05em;
}

.zone-content {
    max-width: 800px;
    margin: 2rem auto;
    font-size: 1.2rem;
    line-height: 1.8;
    text-align: center;
}

.site-header {
    position: relative;
    top: 50px;
    left: 0;
    width: 100%;
    background: linear-gradient(to bottom, #87CEEB 0%, #87CEEB calc(100% - 80px), rgba(20, 60, 80, 0.15) calc(100% - 80px));
    z-index: 1000;
    padding: 2rem 0 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow: visible;
    clip-path: inset(0 0 -100px 0);
    backdrop-filter: blur(10px);
}

.site-title {
    position: relative;
    z-index: 3; /* ensure torus container/bob sits above waves */
    text-align: center;
}

.title-link {
    color: #e0f7fa;
    font-size: 2.5rem;
    font-weight: 400;
    margin: 0 0 0.5rem;
    cursor: pointer;
    transition: letter-spacing 0.3s ease;
    font-family: 'Fredoka One', cursive;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3),
                 0 0 20px rgba(224, 247, 250, 0.4);
    letter-spacing: 0.05em;
    text-decoration: none;
    display: inline-block;
    position: relative;
}

/* swap text on hover */
.normal-text { display: inline; }
.hover-text { display: none; }

.title-link:hover .normal-text { display: none; }
.title-link:hover .hover-text { display: inline; }

.header-bottom {
    position: relative;
    width: 100%;
    height: 240px;
    margin-top: auto;
    overflow: visible;
    background: transparent;
    padding-bottom: 80px;
}

.bubble-cloud {
    position: absolute;
    width: 120px;
    height: 100px;
    background: radial-gradient(circle at 30% 40%, rgba(255, 255, 255, 0.3), transparent 60%),
                radial-gradient(circle at 70% 30%, rgba(255, 255, 255, 0.25), transparent 50%),
                radial-gradient(circle at 50% 70%, rgba(255, 255, 255, 0.2), transparent 55%);
    border-radius: 50%;
}

.bubble-cloud-1 {
    top: 30px;
    right: -120px;
    z-index: 3;
    animation: bubble-drift-fast 35s linear infinite;
    animation-delay: 0s;
    width: 140px;
    height: 110px;
}

.bubble-cloud-2 {
    top: 180px;
    right: -120px;
    z-index: 0;
    animation: bubble-drift-slow 50s linear infinite;
    animation-delay: 1.5s;
    width: 80px;
    height: 65px;
}

.bubble-cloud-3 {
    top: 80px;
    right: -120px;
    z-index: 3;
    animation: bubble-drift-medium 42s linear infinite;
    animation-delay: 2s;
    width: 105px;
    height: 85px;
}

.bubble-cloud-4 {
    top: 220px;
    right: -120px;
    z-index: 0;
    animation: bubble-drift-fast 38s linear infinite;
    animation-delay: 8s;
    width: 90px;
    height: 75px;
}

.bubble-cloud-5 {
    top: 50px;
    right: -120px;
    z-index: 3;
    animation: bubble-drift-slow 48s linear infinite;
    animation-delay: 9.5s;
    width: 130px;
    height: 105px;
}

.bubble-cloud-6 {
    top: 120px;
    right: -120px;
    z-index: 0;
    animation: bubble-drift-medium 40s linear infinite;
    animation-delay: 11s;
    width: 100px;
    height: 85px;
}

.bubble-cloud-7 {
    top: 150px;
    right: -120px;
    z-index: 3;
    animation: bubble-drift-fast 36s linear infinite;
    animation-delay: 19s;
    width: 115px;
    height: 95px;
}

.bubble-cloud-8 {
    top: 40px;
    right: -120px;
    z-index: 0;
    animation: bubble-drift-medium 39s linear infinite;
    animation-delay: 0.5s;
    width: 95px;
    height: 80px;
}

.bubble-cloud-9 {
    top: 200px;
    right: -120px;
    z-index: 3;
    animation: bubble-drift-slow 45s linear infinite;
    animation-delay: 2.5s;
    width: 110px;
    height: 90px;
}

.bubble-cloud-10 {
    top: 110px;
    right: -120px;
    z-index: 0;
    animation: bubble-drift-fast 37s linear infinite;
    animation-delay: 8.5s;
    width: 85px;
    height: 70px;
}

.bubble-cloud-11 {
    top: 70px;
    right: -120px;
    z-index: 3;
    animation: bubble-drift-medium 41s linear infinite;
    animation-delay: 10s;
    width: 125px;
    height: 100px;
}

.bubble-cloud-12 {
    top: 190px;
    right: -120px;
    z-index: 0;
    animation: bubble-drift-slow 47s linear infinite;
    animation-delay: 19.5s;
    width: 105px;
    height: 85px;
}

.bubble-cloud-13 {
    top: 25px;
    right: -120px;
    z-index: 3;
    animation: bubble-drift-fast 34s linear infinite;
    animation-delay: 20s;
    width: 90px;
    height: 75px;
}

.bubble-cloud-14 {
    top: 135px;
    right: -120px;
    z-index: 0;
    animation: bubble-drift-medium 43s linear infinite;
    animation-delay: 1s;
    width: 100px;
    height: 82px;
}

.bubble-cloud-15 {
    top: 165px;
    right: -120px;
    z-index: 3;
    animation: bubble-drift-slow 46s linear infinite;
    animation-delay: 9s;
    width: 120px;
    height: 98px;
}

.bubble-cloud-16 {
    top: 55px;
    right: -120px;
    z-index: 0;
    animation: bubble-drift-fast 36s linear infinite;
    animation-delay: 3s;
    width: 92px;
    height: 77px;
}

.bubble-cloud-17 {
    top: 210px;
    right: -120px;
    z-index: 3;
    animation: bubble-drift-medium 44s linear infinite;
    animation-delay: 4s;
    width: 108px;
    height: 88px;
}

.bubble-cloud-18 {
    top: 95px;
    right: -120px;
    z-index: 0;
    animation: bubble-drift-slow 49s linear infinite;
    animation-delay: 12s;
    width: 118px;
    height: 96px;
}

.bubble-cloud-19 {
    top: 35px;
    right: -120px;
    z-index: 3;
    animation: bubble-drift-fast 35s linear infinite;
    animation-delay: 13s;
    width: 88px;
    height: 72px;
}

.bubble-cloud-20 {
    top: 175px;
    right: -120px;
    z-index: 0;
    animation: bubble-drift-medium 41s linear infinite;
    animation-delay: 15s;
    width: 102px;
    height: 84px;
}

.bubble-cloud-21 {
    top: 145px;
    right: -120px;
    z-index: 3;
    animation: bubble-drift-slow 48s linear infinite;
    animation-delay: 5s;
    width: 115px;
    height: 93px;
}

.bubble-cloud-22 {
    top: 60px;
    right: -120px;
    z-index: 0;
    animation: bubble-drift-fast 37s linear infinite;
    animation-delay: 6s;
    width: 97px;
    height: 80px;
}

.bubble-cloud-23 {
    top: 125px;
    right: -120px;
    z-index: 3;
    animation: bubble-drift-medium 42s linear infinite;
    animation-delay: 16s;
    width: 112px;
    height: 91px;
}

.bubble-cloud-24 {
    top: 85px;
    right: -120px;
    z-index: 0;
    animation: bubble-drift-slow 46s linear infinite;
    animation-delay: 17s;
    width: 106px;
    height: 86px;
}

.bubble-cloud-25 {
    top: 205px;
    right: -120px;
    z-index: 3;
    animation: bubble-drift-fast 38s linear infinite;
    animation-delay: 7s;
    width: 94px;
    height: 78px;
}

@keyframes bubble-drift-fast {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(calc(-100vw - 120px));
    }
}

@keyframes bubble-drift-medium {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(calc(-100vw - 120px));
    }
}

@keyframes bubble-drift-slow {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(calc(-100vw - 120px));
    }
}

.surface {
    color: #e0f7fa;
    position: relative;
}

.surface h2 {
    font-size: 1.5rem;
    font-weight: 200;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

@keyframes fade-grey-white {
    0%, 100% {
        color: #6b7280;
    }
    50% {
        color: #ffffff;
    }
}

.entertube-ship {
    position: absolute;
    width: 200px;
    height: 200px;
    left: 50%;
    top: -40px;
    transform: translateX(-50%);
    overflow: visible;
    /* place ship above navbar but below wave */
    z-index: 2;
    animation: bob 4s ease-in-out infinite;
}

@keyframes bob {
    0%,100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(-15px);
    }
}

#threejs-container {
    width: 100%;
    height: 100%;
}

.ship-wave {
    position: absolute;
    bottom: 90px;
    left: 0;
    width: 100%;
    height: 140px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120" preserveAspectRatio="none"><path d="M0,60 Q150,30 300,60 T600,60 T900,60 T1200,60 L1200,120 L0,120 Z" fill="rgba(30, 100, 150, 0.92)"/></svg>');
    background-size: 200% 100%;
    background-repeat: repeat-x;
    animation: wave-crest 16s ease-in-out infinite;
    /* ensure wave appears over the ship */
    z-index: 3;
    pointer-events: all;
}

.ocean-navbar {
    position: absolute;
    bottom: 40px;
    left: 0;
    width: 100%;
    height: 80px;
    background: rgb(38, 108, 157);
    /* place navbar underneath the ship */
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
}

.navbar-brand {
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: bold;
    letter-spacing: 0.1em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    text-decoration: none;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.navbar-brand:hover {
    color: #b3e5fc;
    text-shadow: 2px 2px 6px rgba(179, 229, 252, 0.5);
}

.navbar-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    color: #ffffff;
    font-size: 1.3rem;
    font-weight: 300;
    letter-spacing: 0.2em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.navbar-link {
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: bold;
    letter-spacing: 0.1em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    text-decoration: none;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.navbar-link:hover {
    color: #b3e5fc;
    text-shadow: 2px 2px 6px rgba(179, 229, 252, 0.5);
}

.header-links {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 3rem;
    z-index: 11;
}

.bar-link {
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    text-decoration: none;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.bar-link:hover {
    color: #b3e5fc;
    text-shadow: 2px 2px 6px rgba(179, 229, 252, 0.5);
}

@media (max-width: 900px) {
    .navbar-link {
        display: none;
    }
    
    .ocean-navbar {
        flex-direction: column;
        justify-content: center;
        gap: 0.5rem;
    }
    
    .navbar-center {
        position: static;
        transform: none;
    }
}

@keyframes wave-crest {
    0%, 100% {
        background-position: 0% 0%;
    }
    50% {
        background-position: 50% 0%;
    }
}

.twilight {
    color: #b3e5fc;
}

.midnight {
    color: #81d4fa;
}

.abyssal {
    color: #4fc3f7;
}

.hadal {
    color: #29b6f6;
}

.site-footer {
    background: #000000;
    padding: 2rem 0;
    text-align: center;
    border-top: 3px solid #29b6f6;
    position: relative;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 3px;
    background: linear-gradient(to right, transparent 0%, #29b6f6 50%, transparent 100%);
    box-shadow: 0 0 10px #29b6f6;
}

.footer-content {
    color: #29b6f6;
    opacity: 0.7;
}

/* Particle effects for deeper zones */
.depth-zone::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20% 30%, rgba(255, 255, 255, 0.15), transparent),
        radial-gradient(2px 2px at 60% 70%, rgba(255, 255, 255, 0.1), transparent),
        radial-gradient(1px 1px at 50% 50%, rgba(255, 255, 255, 0.1), transparent),
        radial-gradient(1px 1px at 80% 10%, rgba(255, 255, 255, 0.15), transparent),
        radial-gradient(2px 2px at 90% 60%, rgba(255, 255, 255, 0.1), transparent),
        radial-gradient(1px 1px at 33% 80%, rgba(255, 255, 255, 0.1), transparent);
    background-size: 200% 200%;
    animation: particles 60s linear infinite;
    pointer-events: none;
    opacity: 0.3;
    will-change: transform;
    transform: translateZ(0);
}

@keyframes particles {
    0% {
        transform: translateY(0) translateZ(0);
    }
    100% {
        transform: translateY(-50%) translateZ(0);
    }
}

/* Scroll-based fade effects */
.depth-zone {
    animation: fadeIn 1s ease-in;
    will-change: opacity;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .depth-zone h1,
    .depth-zone h2 {
        font-size: 2.5rem;
    }
    
    .depth-zone p {
        font-size: 1.2rem;
    }
}
