
/* Scrollbar prevention - only on html and body */
html {
    overflow: hidden;
}

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    overflow: hidden; /* Never show scrollbars */
    background: black;
    perspective: 1200px;

    /* Default: dynamic layout - no flex centering */
    display: block;
}

.scene-container {
    position: relative;
    width: 100vw; /* Dynamic: fill viewport width */
    height: 100vh; /* Dynamic: fill viewport height */
    background: #87ceeb;
    transition: transform 0.3s ease;
}

.layer {
    position: absolute;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.3s ease;
}

/* Blurred background frame using sky layer */
.hidden-text {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -10;

    /* Use the same background image as the sky layer */
    background-image: url('newAssets/HeronEcotox4_0004s_0001_Background.png');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    background-attachment: fixed;

    /* Enhanced frosted glass blur effect */
    filter: blur(12px) brightness(1.1) saturate(1.2);

    /* Glassmorphism overlay for depth separation */
    background-color: rgba(135, 206, 235, 0.15);
    background-blend-mode: soft-light;

    /* Subtle gradient overlay for enhanced depth */
    background-image:
        linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 50%, rgba(0, 0, 0, 0.05) 100%),
        url('newAssets/HeronEcotox4_0004s_0001_Background.png');

    /* Ensure it doesn't interfere with interactions */
    pointer-events: none;
    overflow: hidden;
}

/* Landscape layers */
.sky {
    width: 100%;
    height: 100%;
    top: 0%;
    left: 0%;
    z-index: 1;
    background: #87ceeb;
    background-image: url('newAssets/HeronEcotox4_0004s_0001_Background.png');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
}

.treeLine {
    width: 100%;
    height: 100%;
    top: 0%;
    left: 0%;
    z-index: 2;
    background: transparent;
    background-image: url('newAssets/HeronEcotox4_0004s_0000__-Mask.-Tree-line.png');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
}

/* Dynamic Text Overlay - centered in the sky layer */
.toxicity-text-overlay {
    position: absolute;
    top: 10%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    max-width: 800px;
    z-index: 3;
    pointer-events: none;
    text-align: center;
    color: black;
    font-family: "Didact Gothic", sans-serif;
    font-size: 29px;
    opacity: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(255, 255, 255, 0.2);
    line-height: 1.4;
    transition: opacity 0.6s ease-in-out, transform 0.6s ease-in-out;
}

.toxicity-text-overlay.fade-out {
    opacity: 0;
    transform: translate(-50%, -50%) translateY(-10px);
}

.toxicity-text-overlay.hidden {
    opacity: 0;
    transition: opacity 1s ease-out;
}

/* Responsive positioning and text sizing */
@media (max-width: 1200px) {
    .toxicity-text-overlay {
        font-size: 24px;
        max-width: 700px;
    }
}

@media (max-width: 768px) {
    .toxicity-text-overlay {
        width: 90%;
        max-width: 600px;
        top: 25%;
        font-size: 20px;
        line-height: 1.3;
    }
}

@media (max-width: 480px) {
    .toxicity-text-overlay {
        font-size: 16px;
        max-width: 90%;
    }
}

.weeds {
    width: 100%;
    height: 100%;
    top: 0%;
    left: 0%;
    z-index: 3;
    background: transparent;
    background-image: url('newAssets/HeronEcotox4_0003s_0000_Weeeds.png');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
}

.weeds_right {
width: 30%;
height: 50%;
top: 40%;
left: 70%;
z-index: 3;
background: transparent;
background-image: url('newAssets/HeronEcotox4_0003s_0000_Weeeds_right.png');
background-size: contain;
background-repeat: no-repeat;
background-position: center;
}

.underwater {
  width: 100%;
height: 30%;
top: 70%;
left: 0%;
z-index: 6;
background: transparent;
background-image: url('newAssets/HeronEcotox4_0001s_0001_Underwater.png');
background-size: cover;
background-repeat: no-repeat;
background-position: center;
   
}

.waterweeds {
width: 100%;
height: 24%;
top: 76%;
left: 0%;
z-index: 6;
background: transparent;
background-image: url('newAssets/HeronEcotox4_0001s_0000_Waterweeds.png');
background-size: cover;
background-repeat: no-repeat;
background-position: center;
}

.fishBase1 {
width: 8%;
height: 8%;
top: 85%;
left: 65%;
z-index: 10;
background: transparent;
background-image: url('newAssets/HeronEcotox4_0000s_0004_Fishbase_1.png');
background-size: contain;
background-repeat: no-repeat;
background-position: center;
pointer-events: auto;
cursor: pointer;
}

.fishBase2 {
width: 10%;
height: 10%;
top: 78%;
left: 10%;
z-index: 10;
background: transparent;
background-image: url('newAssets/HeronEcotox4_0000s_0004_Fishbase_2.png');
background-size: contain;
background-repeat: no-repeat;
background-position: center;
pointer-events: auto;
cursor: pointer;
}

.fish1 {
  width: 10%;
height: 10%;
top: 82%;
left: 1%;
z-index: 7;
background: transparent;
background-image: url('newAssets/HeronEcotox4_0000s_0001_Pumpkinseed.png');
background-size: contain;
background-repeat: no-repeat;
background-position: center;
pointer-events: auto;
cursor: pointer;
}

.fish2 {
width: 10%;
height: 10%;
top: 87%;
left: 16%;
z-index: 8;
background: transparent;
background-image: url('newAssets/HeronEcotox4_0000s_0002_BlueGill.png');
background-size: contain;
background-repeat: no-repeat;
background-position: center;
pointer-events: auto;
cursor: pointer;
}

.fish3 {
width: 10%;
height: 10%;
top: 80%;
left: 25%;
z-index: 9;
background: transparent;
background-image: url('newAssets/HeronEcotox4_0000s_0003_Crappie.png');
background-size: contain;
background-repeat: no-repeat;
background-position: center;
pointer-events: auto;
cursor: pointer;
}

.pike {
width: 40%;
height: 20%;
top: 79%;
left: 66%;
z-index: 9;
background: transparent;
background-image: url('newAssets/HeronEcotox4_0000s_0000_Pike_small.png');
background-size: contain;
background-repeat: no-repeat;
background-position: center;
pointer-events: auto;
cursor: pointer;
}

.heron {
width: 10%;
height: 75%;
top: 15%;
left: 77%;
z-index: 3;
background: transparent;
background-image: url('newAssets/HeronEcotox4_0002s_0001_Heron Base.png');
background-size: contain;
background-repeat: no-repeat;
background-position: center;
pointer-events: auto;
cursor: pointer;
position: relative;
overflow: hidden;
}

/* Shimmer overlay canvas */
.shimmer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
    --shimmer-x: 50;
    --shimmer-y: 50;
}

.heron.shimmer-active .shimmer-overlay {
    opacity: 0.8;
}

.heronOther.shimmer-active .shimmer-overlay {
    opacity: 0.8;
}

.pike.shimmer-active .shimmer-overlay {
    opacity: 0.8;
}

.fish1.shimmer-active .shimmer-overlay {
    opacity: 0.8;
}

.fish2.shimmer-active .shimmer-overlay {
    opacity: 0.8;
}

.fish3.shimmer-active .shimmer-overlay {
    opacity: 0.8;
}

.fishBase1.shimmer-active .shimmer-overlay {
    opacity: 0.8;
}

.fishBase2.shimmer-active .shimmer-overlay {
    opacity: 0.8;
}

/* Flying away heron styles */
.heronFlyingAway {
  width: 24%;
height: 24%;
top: 32%;
right: 51%;
z-index: 3;
background-image: url('newAssets/HeronEcotox4_0002s_0000_Otherheron_flyAway.png');
background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    pointer-events: auto;
    cursor: pointer;
}

.heronFlyingAway.shimmer-active .shimmer-overlay {
    opacity: 0.8;
}

/* New waterweeds styles */
.waterweedsNew {
width: 100%;
height: 29%;
bottom: 0%;
left: 0%;
z-index: 6;
background-image: url('newAssets/HeronEcotox4_0001s_0000_Waterweeds_grown.png');
background-size: cover;
background-repeat: no-repeat;
background-position: center;
pointer-events: none;
}

/* waterweedsNew is a background element and does not use shimmer effects */

/* Heron now uses enhanced shimmer effect - see .heron.shimmer-active::before above */

@keyframes shimmer {
    0% {
        filter: brightness(1) drop-shadow(0 0 0px rgba(255, 0, 0, 0));
    }
    16.67% {
        filter: brightness(1.15) drop-shadow(0 0 20px rgba(255, 127, 0, 0.6));
    }
    33.33% {
        filter: brightness(1.15) drop-shadow(0 0 20px rgba(255, 255, 0, 0.6));
    }
    50% {
        filter: brightness(1.15) drop-shadow(0 0 20px rgba(0, 255, 0, 0.6));
    }
    66.67% {
        filter: brightness(1.15) drop-shadow(0 0 20px rgba(0, 0, 255, 0.6));
    }
    83.33% {
        filter: brightness(1.15) drop-shadow(0 0 20px rgba(75, 0, 130, 0.6));
    }
    100% {
        filter: brightness(1) drop-shadow(0 0 0px rgba(255, 0, 0, 0));
    }
}

.heronOther {
width: 10%;
height: 14%;
top: 55%;
left: 33%;
z-index: 6;
background: transparent;
background-image: url('newAssets/HeronEcotox4_0002s_0000_Otherheron.png');
background-size: contain;
background-repeat: no-repeat;
background-position: center;
pointer-events: auto;
cursor: pointer;
}



.layer.with-image {
    background-color: transparent;
}

/* ============================================ */
/* FLEXIBLE VIEWPORT SYSTEM */
/* ============================================ */

/* Default (exactly 1920×1080 or smaller): Dynamic responsive layout */
/* Scene fills entire viewport - no scrollbars on 1920×1080 monitors */

/* Larger viewports (1921px+ width OR 1081px+ height): Fixed-size centered mode */
/* Switches to fixed 1920×1080 composition centered with black borders */
/* Prevents asset misalignment by keeping composition at intended size */
@media (min-width: 1921px), (min-height: 1081px) {
    body {
        /* Enable flex centering for viewports larger than 1920×1080 */
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .scene-container {
        /* Fixed dimensions - no scaling beyond intended design */
        width: 1920px;
        height: 1080px;
        /* Centered by parent flex container */
        /* Black borders fill extra space */
        flex-shrink: 0;
    }
}

/* ============================================ */
/* DISINTEGRATION EFFECT STYLES */
/* ============================================ */

.disintegration-container {
    position: absolute;
    pointer-events: none;
}

.disintegration-container > canvas {
    position: absolute;
    left: 0;
    top: 0;
    transition: transform 1s ease-out, opacity 1s ease-out;
    opacity: 1;
    transform: rotate(0deg) translate(0px, 0px) rotate(0deg);
}

/* Debug animation for disintegration frames */
@keyframes debug-pulse {
    0% { opacity: 1; transform: scale(1); }
    100% { opacity: 0.5; transform: scale(1.1); }
}

/* ============================================ */
/* TOXICITY CONTROLS STYLES */
/* ============================================ */

.bottom-controls-container {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    z-index: 1000;
}

/* Pulsing dot indicator - shows where next speech bubble will appear */
.pulse-indicator {
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(255, 215, 0, 0.9);
    box-shadow:
        0 0 10px rgba(255, 215, 0, 0.6),
        0 0 20px rgba(255, 215, 0, 0.4),
        0 0 30px rgba(255, 215, 0, 0.2);
    pointer-events: none;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease-out;
}

.pulse-indicator.visible {
    opacity: 0; /* TESTING: Hidden to test tilt effect alone - change back to 1 */
    animation: pulse-glow 1.5s ease-in-out infinite;
}

.pulse-indicator.fade-out {
    opacity: 0;
    animation: none;
}

/* Orange variant for visibility against yellow backgrounds (e.g., heron) */
.pulse-indicator.pulse-orange {
    background: rgba(255, 80, 0, 0.9);
    box-shadow:
        0 0 10px rgba(255, 80, 0, 0.6),
        0 0 20px rgba(255, 80, 0, 0.4),
        0 0 30px rgba(255, 80, 0, 0.2);
}

.pulse-indicator.pulse-orange.visible {
    opacity: 0; /* TESTING: Hidden to test tilt effect alone - change back to 1 */
    animation: pulse-glow-orange 1.5s ease-in-out infinite;
}

@keyframes pulse-glow-orange {
    0%, 100% {
        transform: scale(1);
        box-shadow:
            0 0 10px rgba(255, 80, 0, 0.6),
            0 0 20px rgba(255, 80, 0, 0.4),
            0 0 30px rgba(255, 80, 0, 0.2);
    }
    50% {
        transform: scale(1.3);
        box-shadow:
            0 0 15px rgba(255, 80, 0, 0.8),
            0 0 30px rgba(255, 80, 0, 0.5),
            0 0 45px rgba(255, 80, 0, 0.3);
    }
}

/* Final message - displayed at end of sequence */
.final-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 700px;
    padding: 40px 50px;
    background: rgba(0, 0, 0, 0.85);
    border-radius: 16px;
    text-align: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    pointer-events: none;
}

.final-message.visible {
    opacity: 1;
}

.final-message p {
    font-family: "Didact Gothic", sans-serif;
    font-size: 1.5rem;
    line-height: 1.7;
    color: #ffffff;
    margin: 0;
    font-style: italic;
}

.final-message strong {
    color: #4ecdc4;
    font-style: normal;
    font-weight: bold;
}

@keyframes pulse-glow {
    0%, 100% {
        transform: scale(1);
        box-shadow:
            0 0 10px rgba(255, 215, 0, 0.6),
            0 0 20px rgba(255, 215, 0, 0.4),
            0 0 30px rgba(255, 215, 0, 0.2);
    }
    50% {
        transform: scale(1.3);
        box-shadow:
            0 0 15px rgba(255, 215, 0, 0.8),
            0 0 30px rgba(255, 215, 0, 0.5),
            0 0 45px rgba(255, 215, 0, 0.3);
    }
}

.toxicity-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.toxicity-label {
    color: white;
    font-family: "Didact Gothic", sans-serif;
    font-size: 16px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.toxicity-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toxicity-btn {
    /* Liquid glass base styling */
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;

    /* Button dimensions */
    width: 44px;
    height: 44px;

    /* Center the chevron */
    display: flex;
    align-items: center;
    justify-content: center;

    /* Interaction */
    cursor: pointer;
    transition: all 0.3s ease;

    /* Remove default button styles */
    outline: none;

    /* Subtle shadow for depth */
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.toxicity-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow:
        0 6px 16px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.toxicity-btn:active:not(:disabled) {
    transform: translateY(0px);
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.toxicity-btn:disabled {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    cursor: not-allowed;
    opacity: 0.4;
    transform: none;
    box-shadow:
        0 2px 6px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.toxicity-btn .chevron {
    color: white;
    font-size: 18px;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    transition: color 0.3s ease;
}

.toxicity-btn:disabled .chevron {
    color: rgba(255, 255, 255, 0.3);
    text-shadow: none;
}

.toxicity-value {
    color: white;
    font-family: "Didact Gothic", sans-serif;
    font-size: 18px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    min-width: 50px;
    text-align: center;
}

/* More Info Button - Liquid Glass Style */
.btn-more-info {
    /* Liquid glass base styling */
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;

    /* Button styling */
    padding: 12px 20px;
    color: white;
    font-family: "Didact Gothic", sans-serif;
    font-size: 14px;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);

    /* Interaction */
    cursor: pointer;
    transition: all 0.3s ease;

    /* Remove default button styles */
    outline: none;

    /* Subtle shadow for depth */
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-more-info:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow:
        0 6px 16px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-more-info:active {
    transform: translateY(0px);
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}


