/* --- Global & Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Fredoka+One&family=Montserrat:wght@400;700&display=swap');

:root {
    --nerds-blue-bg: #98e2fc;
    --nerds-dark-blue: #0f308e; 
    --nerds-input-blue: #9de1fb;
    --nerds-input-text: #ffffff;
}

body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    font-family: 'Montserrat', sans-serif;
    background: url('../images/nerds/bg_alternative.png') no-repeat center center fixed;
    background-size: cover;
    color: var(--nerds-dark-blue);
    overflow-x: hidden;
    transition: background-image 0.5s ease-in-out;
}

/* Helper class to switch to Regular BG (For Age Gate) */
body.bg-regular {
    background-image: url('../images/nerds/bg.png');
}

/* --- Sound Icon (Fixed Top Right) --- */
.sound-icon {
    position: fixed;
    top: 25px;
    right: 25px;
    width: 40px; /* Adjust size as needed */
    height: auto;
    z-index: 2000; /* Above everything including overlays */
    cursor: pointer;
    transition: transform 0.2s ease;
}

.sound-icon:hover {
    transform: scale(1.1);
}

/* --- Layout Containers --- */
main {
    width: 100%;
    min-height: 100vh;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

/* --- Standard Page Frame --- */
.pageFrame {
    display: none; /* Hidden by default */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 100vh;
    padding: 25px;
    padding-bottom: 0px;
    box-sizing: border-box;
    position: relative;
}

/* --- DEBUG MODE: Side-by-Side View --- */
/* These styles activate only when JS sets showAllPages = true */
body.debug-view {
    overflow-y: auto;
    background: #333; /* Dark bg to see frames clearly */
}

body.debug-view main {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    padding: 20px;
    gap: 20px;
}

body.debug-view .pageFrame {
    display: flex !important; /* Force show */
    position: relative;
    width: 30%; /* 3 columns */
    min-width: 350px;
    height: 600px; /* Fixed height for preview */
    min-height: auto;
    border: 2px solid white;
    background-color: var(--nerds-blue-bg); /* Give them their own BG */
    overflow: hidden;
    transform: scale(1);
    margin-bottom: 20px;
}
/* -------------------------------------- */


/* --- Cloud Footer --- */
.cloud-footer {
    position: absolute;
    top: -0%;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../images/nerds/bg_center_cloud.png') no-repeat bottom center;
    background-size: auto;
    z-index: 0; 
    pointer-events: none;
}

.frameContent {
    width: 90%;
    max-width: 400px;
    text-align: center;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

/* --- Animations --- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes popIn {
    0% { opacity: 0; transform: scale(0.5); }
    70% { transform: scale(1.05); }
    100% { opacity: 1; transform: scale(1); }
}

/* --- Typography --- */
h1, h2, h3 {
    font-family: 'Fredoka One', cursive;
    text-transform: uppercase;
    color: var(--nerds-dark-blue);
    margin: 15px 0;
}

p { font-weight: 700; }

/* --- Images --- */
.main_logo {
    position: absolute;
    max-width: 132px;
    top: 10px;
    filter: drop-shadow(0px 5px 5px rgba(0, 0, 0, 0.1));
}

.ty-header {
    max-width: 90%;
    margin-bottom: 20px;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.2s forwards; 
}

.character-img {
    max-width: 80%;
    margin-top: 20px;
    opacity: 0; 
    transform-origin: center bottom;
    animation: popIn 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.5s forwards;
}

/* --- Inputs --- */
.store_details_form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 15px;
    zoom: 0.8;
}

.inputFormTitles {
    text-align: left;
    font-weight: 900;
    font-size: 1rem;
    color: var(--nerds-dark-blue);
    margin-bottom: -10px;
    margin-left: 5px;
    text-transform: uppercase;
}

input.gate_submission_form {
    width: 100%;
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #0000001a;
    background-color: var(--nerds-input-blue);
    color: white;
    font-family: 'Fredoka One', cursive;
    font-size: 1.1rem;
    box-sizing: border-box;
    outline: none;
    transition: background-color 0.3s ease;
}

input.gate_submission_form:focus {
    background-color: #8bd6f3;
}

input.gate_submission_form::placeholder {
    color: rgba(255, 255, 255, 0.8);
}

/* --- Buttons --- */
button {
    cursor: pointer;
    font-family: 'Fredoka One', cursive;
    border: none;
    transition: transform 0.1s ease, background-color 0.3s;
}

button:active {
    transform: scale(0.98);
}

.age_gate_buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    margin-top: 10px;
}

.age_gate_btn {
    width: 100%;
    padding: 12px 0;
    font-size: 2rem;
    border-radius: 8px;
    color: white;
    background-color: var(--nerds-dark-blue);
}

.button_selected {
    background-color: var(--nerds-dark-blue);
    color: white;
    width: 100%;
    padding: 15px;
    font-size: 1.8rem;
    border-radius: 8px;
    margin-top: 20px;
}

/* --- Intro Animation --- */
#introPage {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999;
    background-color: var(--nerds-blue-bg);
    display: flex;
    align-items: center;
    justify-content: center;
}

#introVideo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- Helpers --- */
.legal-text {
    font-size: 0.65rem;
    margin-top: 50px;
    font-weight: 700;
    color: var(--nerds-dark-blue);
    text-align: center;
    line-height: 1.4;
    text-transform: uppercase;
}

.legal-text a {
    color: var(--nerds-dark-blue);
    text-decoration: underline;
}