html, body {
    overflow: hidden;
}

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

body {
    font-family: Arial, sans-serif;
    background: rgb(255, 255, 255);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

.content {
    padding: 40px;
    position: relative;
    z-index: 1;
    min-height: 100vh;
}

.text-block {
    margin: 30px 0;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    max-width: 800px;
}

.water-overlay {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(
        to top,
        rgba(135, 206, 250, 0.7) 0%,
        rgba(135, 206, 250, 0.5) 70%,
        rgba(135, 206, 250, 0.3) 100%
    );
    transition: height 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
    pointer-events: none;
    backdrop-filter: blur(0.1px);
    overflow: hidden;
}

.water-overlay::before,
.water-overlay::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 60px;
    top: 0;
    pointer-events: none;
    z-index: 2;
}

.water-overlay::before {
    background: url('data:image/svg+xml;utf8,<svg width="100%25" height="100%25" viewBox="0 0 400 60" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M0 30 Q 50 10 100 30 T 200 30 T 300 30 T 400 30 V60 H0Z" fill="%23b3e0ff" fill-opacity="0.25"/><path d="M0 40 Q 50 20 100 40 T 200 40 T 300 40 T 400 40 V60 H0Z" fill="%23b3e0ff" fill-opacity="0.18"/></svg>');
    background-size: 400px 60px;
    background-repeat: repeat-x;
    animation: wave1 6s linear infinite;
    opacity: 0.7;
}

.water-overlay::after {
    background: url('data:image/svg+xml;utf8,<svg width="100%25" height="100%25" viewBox="0 0 400 60" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M0 35 Q 60 25 120 35 T 240 35 T 360 35 T 400 35 V60 H0Z" fill="%2399d6f5" fill-opacity="0.18"/></svg>');
    background-size: 400px 60px;
    background-repeat: repeat-x;
    animation: wave2 8s linear infinite reverse;
    opacity: 0.5;
}

@keyframes wave1 {
    0% { background-position-x: 0; }
    100% { background-position-x: 400px; }
}

@keyframes wave2 {
    0% { background-position-x: 0; }
    100% { background-position-x: 400px; }
}

.water-surface {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 8px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.8) 25%,
        rgba(255, 255, 255, 0.4) 50%,
        rgba(255, 255, 255, 0.8) 75%,
        transparent 100%
    );
    animation: surfacewave 2.5s ease-in-out infinite;
    z-index: 3;
    opacity: 0.8;
}

@keyframes surfacewave {
    0%, 100% {
        transform: translateY(0) scaleY(1);
        opacity: 0.8;
    }
    25% {
        transform: translateY(-2px) scaleY(1.2);
        opacity: 1;
    }
    50% {
        transform: translateY(2px) scaleY(0.9);
        opacity: 0.9;
    }
    75% {
        transform: translateY(-1px) scaleY(1.1);
        opacity: 1;
    }
}

/* Caustics effect overlay */
.water-overlay .caustics {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1;
    opacity: 0.18;
    background: url('data:image/svg+xml;utf8,<svg width="200" height="200" viewBox="0 0 200 200" fill="none" xmlns="http://www.w3.org/2000/svg"><ellipse cx="100" cy="100" rx="80" ry="30" fill="white" fill-opacity="0.2"/><ellipse cx="60" cy="140" rx="30" ry="10" fill="white" fill-opacity="0.13"/><ellipse cx="150" cy="60" rx="25" ry="8" fill="white" fill-opacity="0.12"/></svg>');
    background-size: 200px 200px;
    background-repeat: repeat;
    mix-blend-mode: screen;
    animation: causticsmove 12s linear infinite;
}

@keyframes causticsmove {
    0% { background-position: 0 0; }
    100% { background-position: 200px 200px; }
}

.cat-status {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 20;
    background: rgba(255, 255, 255, 0.85);
    padding: 12px 16px;
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(255, 255, 255, 1), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cat-status.breathing {
    color: #22c55e;
    border-color: #22c55e;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(34, 197, 94, 0.2);
}

.cat-status.drowning {
    color: #ef4444;
    border-color: #ef4444;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(239, 68, 68, 0.2);
    animation: pulse 1s ease-in-out infinite alternate;
}

@keyframes pulse {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0.8;
        transform: scale(1.02);
    }
}

.chart-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 5;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 8px;
    padding: 0 10%;
}

.fake-candle {
    width: 25px;
    position: relative;
    transition: opacity 0.3s ease;
}

.fake-candle.red {
    background: linear-gradient(to top, #ffffff 0%, #ffffff 100%);
    border: 2px solid #b91c1c;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.3);
}

.fake-candle.green {
    background: linear-gradient(to top, #ffffff 0%, #ffffff 100%);
    border: 2px solid #15803d;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.3);
}

.fake-candle .candle-wick {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 8px;
    background: inherit;
}

.fake-candle .candle-wick.bottom {
    top: auto;
    bottom: -8px;
}

.candle-container {
    position: fixed;
    bottom: 0;
    right: 15%;
    z-index: 11;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stock-candle {
    width: 30px;
    background: linear-gradient(to top, #ffffff 0%, #ffffff 100%);
    border: 2px solid #15803d;
    position: relative;
    transition: height 0.1s ease;
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.3);
}

.candle-wick {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 10px;
    background: #15803d;
}

.candle-wick.bottom {
    top: auto;
    bottom: -10px;
}

.cat-on-candle {
    position: relative;
    width: 80px;
    height: 60px;
    left: -35px;
    margin-bottom: 25px;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.2));
}

.bubbles {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100vh;
    pointer-events: none;
    z-index: 15;
    overflow: hidden;
}

.bubble {
    position: absolute;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: float 6s linear infinite;
    opacity: 0;
}

@keyframes float {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) scale(1);
        opacity: 0;
    }
}

.fish-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100vh;
    pointer-events: none;
    z-index: 12;
    overflow: hidden;
}

.fish {
    position: absolute;
    width: 60px;
    height: 40px;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.fish.visible {
    opacity: 0.8;
}

.fish1 {
    animation: swim1 12s linear infinite;
    bottom: 100px;
}

.fish2 {
    animation: swim2 15s linear infinite;
    animation-delay: -5s;
    bottom: 60px;
}

.fish3 {
    animation: swim3 18s linear infinite;
    animation-delay: -10s;
    bottom: 90px;
}

@keyframes swim1 {
    0% {
        transform: translateX(-100px) translateY(0) scaleX(1);
    }
    25% {
        transform: translateX(25vw) translateY(-20px) scaleX(1);
    }
    50% {
        transform: translateX(50vw) translateY(10px) scaleX(1);
    }
    75% {
        transform: translateX(75vw) translateY(-15px) scaleX(1);
    }
    100% {
        transform: translateX(calc(100vw + 100px)) translateY(5px) scaleX(1);
    }
}

@keyframes swim2 {
    0% {
        transform: translateX(calc(100vw + 100px)) translateY(0) scaleX(-1);
    }
    25% {
        transform: translateX(75vw) translateY(15px) scaleX(-1);
    }
    50% {
        transform: translateX(50vw) translateY(-10px) scaleX(-1);
    }
    75% {
        transform: translateX(25vw) translateY(20px) scaleX(-1);
    }
    100% {
        transform: translateX(-100px) translateY(-5px) scaleX(-1);
    }
}

@keyframes swim3 {
    0% {
        transform: translateX(-100px) translateY(0) scaleX(1);
    }
    20% {
        transform: translateX(20vw) translateY(-30px) scaleX(1);
    }
    40% {
        transform: translateX(40vw) translateY(25px) scaleX(1);
    }
    60% {
        transform: translateX(60vw) translateY(-20px) scaleX(1);
    }
    80% {
        transform: translateX(80vw) translateY(15px) scaleX(1);
    }
    100% {
        transform: translateX(calc(100vw + 100px)) translateY(-10px) scaleX(1);
    }
}

.candle-indicator {
    position: absolute;
    top: -18px; /* above the candle */
    left: 100%; /* to the right of the candle */
    margin-left: 32px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    z-index: 2;
}

.dead-cat {
    position: absolute;
    left: 4px;
    top: 4px;
}

/* Remove fixed positioning from #candleLevelIndicator */
#candleLevelIndicator {
    position: static;
    left: unset;
    top: unset;
    right: unset;
    width: auto;
    min-width: 40px;
    height: 20px;
    z-index: unset;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    pointer-events: none;
}

#candleLevelIndicator .indicator-text {
    color: #111;
    font-size: 15px;
    font-weight: bold;
    margin-bottom: 2px;
    background: rgba(255,255,255,0.85);
    padding: 0 4px;
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

#candleLevelIndicator .indicator-line {
    width: 32px;
    height: 3px;
    background: #111;
    border-radius: 2px;
}

#waterLevelIndicator {
    position: fixed;
    right: 10px;
    width: auto;
    min-width: 40px;
    height: 20px;
    z-index: 40;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
}

#waterLevelIndicator .indicator-text {
    color: #2563eb;
    font-size: 15px;
    font-weight: bold;
    margin-bottom: 2px;
    background: rgba(255,255,255,0.85);
    padding: 0 4px;
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

#waterLevelIndicator .indicator-line {
    width: 32px;
    height: 3px;
    background: #2563eb;
    border-radius: 2px;
}

/* === Cat HP Bar === */
#catHPBarContainer {
    width: 110px;
    height: 14px;
    background: rgba(0,0,0,0.15);
    border-radius: 0;
    margin: 0 0 4px -4px;
    position: absolute;
    left: 0;
    right: 0;
    top: -18px;
    z-index: 2;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    /* overflow: hidden; */
    border: 1.5px solid #1e3a1e;
}
#catHPBar {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, #22c55e 0%, #4ade80 100%);
    border-radius: 0;
    transition: width 0.3s cubic-bezier(0.4,0,0.2,1);
    box-shadow: 0 0 6px #22c55e44;
}

/* Cat glow effects */
#catOnCandleImg.cat-glow-heal {
    animation: catGlowHeal 0.5s;
    box-shadow: 0 0 24px 8px #22c55e88, 0 2px 8px rgba(0,0,0,0.12);
}
#catOnCandleImg.cat-glow-damage {
    animation: catGlowDamage 0.5s;
    box-shadow: 0 0 24px 8px #dc262688, 0 2px 8px rgba(0,0,0,0.12);
}
@keyframes catGlowHeal {
    0% { box-shadow: 0 0 0 0 #22c55e00; }
    50% { box-shadow: 0 0 24px 8px #22c55e88; }
    100% { box-shadow: 0 0 0 0 #22c55e00; }
}
@keyframes catGlowDamage {
    0% { box-shadow: 0 0 0 0 #dc262600; }
    50% { box-shadow: 0 0 24px 8px #dc262688; }
    100% { box-shadow: 0 0 0 0 #dc262600; }
}

/* Cat SVG border for glow effect */
.cat-glow-border-heal .cat-outline {
    stroke: #22c55e;
    stroke-width: 6px;
    stroke-linejoin: round;
    stroke-linecap: round;
}
.cat-glow-border-damage .cat-outline {
    stroke: #dc2626;
    stroke-width: 6px;
    stroke-linejoin: round;
    stroke-linecap: round;
}

#catHPChange {
    position: absolute;
    left: 50%;
    top: -22px;
    transform: translateX(-50%);
    pointer-events: none;
    z-index: 3;
    font-size: 18px;
    font-weight: bold;
    min-width: 30px;
    text-align: center;
}
.hp-change-anim {
    animation: hpChangeFloat 0.8s ease-out forwards;
    opacity: 1;
}
.hp-change-heal {
    color: #22c55e;
    text-shadow: 0 1px 6px #22c55e55;
}
.hp-change-damage {
    color: #dc2626;
    text-shadow: 0 1px 6px #dc262655;
}
@keyframes hpChangeFloat {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    80% {
        opacity: 1;
        transform: translateX(-50%) translateY(-18px);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(-28px);
    }
} 

/* Modal styles */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: transparent;
  z-index: 1001;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
}
.modal-content {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  padding: 36px 32px 28px 32px;
  max-width: 420px;
  width: 90vw;
  text-align: center;
  position: absolute;
  font-size: 16px;
  margin-top: 0;
  left: 70px;
  top: 60px;
}
.modal-content h2 {
  margin-top: 0;
  font-size: 1.6em;
  color: #222;
}
.modal-content p {
  margin: 18px 0 0 0;
  color: #333;
  font-size: 1em;
}
.modal-close {
  position: absolute;
  top: 10px;
  right: 16px;
  background: none;
  border: none;
  font-size: 2em;
  color: #888;
  cursor: pointer;
  z-index: 2;
  transition: color 0.2s;
}
.modal-close:hover {
  color: #dc2626;
}
.info-btn {
  transition: box-shadow 0.2s, background 0.2s;
}
.info-btn:hover {
  background: #fef9c3;
  box-shadow: 0 4px 16px #facc1533;
} 

.x-btn {
    position: absolute;
    top: 10px;
    right: 16px;
    background: none;
    border: none;
    font-size: 2em;
    color: #888;
    cursor: pointer;
    z-index: 2;
    transition: color 0.2s;
}
.x-btn:hover {
    background: #e0e7ef;
    box-shadow: 0 4px 16px #64748b33;
}
.x-btn span {
    font-family: 'Arial Black', Arial, sans-serif;
    font-size: 28px;
} 

#moonImg {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: auto;
    z-index: 10;
    pointer-events: none;
    opacity: 0.95;
} 