:root {
    /* Color Palette: Bubble Blues and Coral Orange */
    --base-color: #e0f7fa; 
    --primary-color: #0288d1; /* Deep sea blue for the sliding panel */
    --accent-color: #C2410C;  /* Coral orange for the main buttons */
    --text-white: #ffffff;
}

body {
   /* Background Image */
   background-image: url(../assets/underwater_rays.jpg);
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;

    /* Kid-friendly font */
    font-family: 'Quicksand', sans-serif;
    height: 90vh;
    margin: -20px 0 50px;
}

/* --- Headings & Text --- */
h1 {
    font-weight: bold;
    margin: 0;
}

h2 {
    text-align: center;
}

p {
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
    letter-spacing: 0.5px;
    margin: 20px 0 30px;
}

/* --- Bubbly Cartoon Buttons --- */
button {
    border-radius: 30px; 
    border: 2px solid var(--primary-color);
    background-color: var(--accent-color); 
    color: var(--text-white);
    font-size: 14px;
    font-weight: bold;
    padding: 12px 45px;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 4px 0px #be4d25; 
    transition: transform 80ms ease-in, box-shadow 80ms ease-in;
}

button:active {
    transform: translateY(4px);
    box-shadow: 0 0px 0px #be4d25;
}

button:focus {
    outline: none;
}

button.fade {
    background-color: transparent;
    border-color: #ffffff;
    box-shadow: none;
}

/* --- Submarine Style Container --- */
.container {
    background-color: #fff;
    border-radius: 40px; 
    border: 10px solid white; 
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);
    position: relative;
    overflow: hidden;
    width: 768px;
    max-width: 100%;
    min-height: 480px;
}

/* --- Forms & Inputs --- */
form {
    background-color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 0 50px;
    height: 100%;
    text-align: center;
}

input {
    background-color: #f0faff;
    border: 2px solid #e0f2f1;
    border-radius: 15px;
    padding: 12px 15px;
    margin: 8px 0;
    width: 100%;
}

/* --- Sliding Logic --- */
.formContainer {
    position: absolute;
    top: 0;
    height: 100%;
    transition: all 0.6s;
}

.signin {
    left: 0;
    width: 50%;
    z-index: 2;
}

.container.rightPanel .signin {
    transform: translate(100%);
}

.signup {
    left: 0;
    width: 50%;
    opacity: 0;
    z-index: 1;
}

.container.rightPanel .signup {
    transform: translate(100%);
    opacity: 1;
    z-index: 5;
    animation: show 0.6s;
}

@keyframes show {
    0%, 49.99% { opacity: 0; z-index: 1; }
    50%, 100% { opacity: 1; z-index: 5; }
}

/* --- Blue Ocean Overlay Panels --- */
.layerContainer {
    position: absolute;
    top: 0;
    left: 50%;
    width: 50%;
    height: 100%;
    overflow: hidden;
    transition: transform 0.6s ease-in-out;
    z-index: 100;
}

.container.rightPanel .layerContainer {
    transform: translateX(-100%);
}

.layer {
    background: linear-gradient(to bottom, #4fc3f7, var(--primary-color));
    color: #ffffff;
    position: relative;
    left: -100%;
    height: 100%;
    width: 200%;
    transform: translateX(0);
    transition: transform 0.6s ease-in-out;
}

.container.rightPanel .layer {
    transform: translateX(50%);
}

.layerPan {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    top: 0;
    height: 100%;
    width: 50%;
    transform: translateX(0);
    transition: transform 0.6s ease-in-out;
}

/* --- Shark & Scuba Decorations --- */

/* Big Floating Shark */
.layerPan::before {
    content: "🦈"; 
    font-size: 85px;
    position: absolute;
    top: 30px;
    z-index: 10;
    filter: drop-shadow(2px 5px 5px rgba(0,0,0,0.2));
    animation: swim 4s ease-in-out infinite;
}

/* Floating Scuba Diver */
.layerPan::after {
    content: "🤿"; 
    font-size: 55px;
    position: absolute;
    bottom: 40px;
    animation: float 5s ease-in-out infinite;
}

@keyframes swim {
    0% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(15px, -15px) rotate(5deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}

@keyframes float {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-25px) rotate(-10deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

/* --- Sliding Panel Specifics --- */
.layerLeft { transform: translateX(-20%); }
.container.rightPanel .layerLeft { transform: translateX(0); }
.layerRight { right: 0; transform: translateX(0); }
.container.rightPanel .layerRight { transform: translateX(20%); }

#signUpResult, #loginResult {
    padding-top: 25px;
    color: #ff5252;
    font-weight: bold;
}