body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    background-color: #f0f2f5;
    font-family: 'Comic Sans MS', 'Chalkboard SE', 'Marker Felt', sans-serif;
    text-align: center;
    padding: 20px;
    box-sizing: border-box;
    transition: background-color 0.5s ease; /* Smooth transition for background color */
    background-image: none; /* Default state, no image */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.creepy-font {
    font-family: 'Creepster', cursive, 'Metal Mania', cursive, 'Nosifier', cursive, fantasy; /* Added creepy fonts */
}

h1 {
    color: #333;
    margin-bottom: 40px;
    position: relative;
    z-index: 1;
}

#will-you-text { /* Style for the new clickable 'Will you' text */
    cursor: pointer;
    text-decoration: underline;
    color: #0056b3; /* A distinct color for clickable text */
    transition: color 0.2s ease;
}

#will-you-text:hover {
    color: #007bff;
}

.button-container {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

button {
    padding: 20px 40px;
    font-size: 2em;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.3s ease, font-size 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    will-change: transform;
    font-family: inherit;
}

button:active {
    transform: translateY(2px) scale(0.98);
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

#yes-button {
    background-color: #28a745; /* Green */
}

#no-button {
    background-color: #dc3545; /* Red */
}

#maybe-button {
    background-color: #6f42c1; /* Purple */
    position: absolute;
    display: none;
    z-index: 10;
    animation: fade-in 0.5s;
    font-size: 1.5em;
    padding: 15px 30px;
}

#idk-button {
    background-color: #007bff; /* Blue */
    position: absolute;
    display: none;
    z-index: 10;
    animation: fade-in 0.5s;
    font-size: 1.5em;
    padding: 15px 30px;
}

#destroy-button {
    background-color: #333; /* Dark Gray */
    color: #f00; /* Red text */
    border: 2px solid #f00; /* Red border */
    position: absolute;
    display: none;
    z-index: 10;
    animation: fade-in 0.5s;
    font-size: 1.5em;
    padding: 15px 30px;
    box-shadow: 0 0 15px rgba(255,0,0,0.5), inset 0 0 10px rgba(255,0,0,0.3); /* Glowing effect */
}

#baby-button { /* New Baby button style */
    background-color: #FFC0CB; /* Light Pink */
    color: #8A2BE2; /* Blue Violet */
    border: 2px solid #8A2BE2;
    position: absolute;
    display: none;
    z-index: 10;
    animation: fade-in 0.5s;
    font-size: 1.5em;
    padding: 15px 30px;
    box-shadow: 0 0 10px rgba(255,192,203,0.7), inset 0 0 5px rgba(138,43,226,0.5);
    font-family: 'Comic Sans MS', cursive; /* A friendly font */
}

#ligma2-button { /* New Ligma2 button style */
    background-color: #FF6347; /* Tomato */
    color: white;
    border: 2px solid #B22222; /* Firebrick */
    position: absolute;
    display: none; /* Hidden by default */
    z-index: 11; /* Above other floating buttons */
    animation: fade-in 0.5s;
    font-size: 1.5em;
    padding: 15px 30px;
    box-shadow: 0 0 12px rgba(255,99,71,0.7), inset 0 0 8px rgba(178,34,34,0.5);
}

#squid-game-button { /* New Squid Game button style */
    background-color: #000; /* Black */
    color: #FF0000; /* Red */
    border: 2px solid #FF0000;
    position: absolute;
    display: none;
    z-index: 10;
    animation: fade-in 0.5s, pulse-red 1s infinite alternate; /* Pulsing effect */
    font-family: 'Metal Mania', cursive; /* Creepy/Thematic font */
    font-size: 1.8em;
    padding: 18px 36px;
    box-shadow: 0 0 15px rgba(255,0,0,0.7);
}

#skipper-button { /* New Skipper button style */
    background-color: #17a2b8; /* Cyan */
    color: white;
    border: 2px solid #0056b3;
    position: absolute;
    display: none;
    z-index: 10;
    animation: fade-in 0.5s;
    font-size: 1.5em;
    padding: 15px 30px;
    box-shadow: 0 0 10px rgba(23, 162, 184, 0.7);
}

@keyframes pulse-red {
    from { box-shadow: 0 0 15px rgba(255,0,0,0.7); }
    to { box-shadow: 0 0 25px rgba(255,0,0,1); }
}

@keyframes shake-mild {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

@keyframes shake-strong {
    0% { transform: translate(2px, 1px) rotate(0deg); }
    10% { transform: translate(-2px, -3px) rotate(-2deg); }
    20% { transform: translate(-4px, 0px) rotate(2deg); }
    30% { transform: translate(4px, 3px) rotate(0deg); }
    40% { transform: translate(2px, -1px) rotate(2deg); }
    50% { transform: translate(-2px, 3px) rotate(-1deg); }
    60% { transform: translate(-4px, 2px) rotate(0deg); }
    70% { transform: translate(4px, 2px) rotate(-2deg); }
    80% { transform: translate(-2px, -1px) rotate(2deg); }
    90% { transform: translate(2px, 3px) rotate(0deg); }
    100% { transform: translate(2px, -3px) rotate(-1deg); }
}

/* New: Extreme shake */
@keyframes shake-extreme {
    0% { transform: translate(0, 0) rotate(0deg); }
    10% { transform: translate(-10px, -5px) rotate(-3deg); }
    20% { transform: translate(10px, 5px) rotate(3deg); }
    30% { transform: translate(-10px, -5px) rotate(-3deg); }
    40% { transform: translate(10px, 5px) rotate(3deg); }
    50% { transform: translate(-10px, -5px) rotate(-3deg); }
    60% { transform: translate(10px, 5px) rotate(3deg); }
    70% { transform: translate(-10px, -5px) rotate(-3deg); }
    80% { transform: translate(10px, 5px) rotate(3deg); }
    90% { transform: translate(-10px, -5px) rotate(-3deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}

/* New: Fatal shake */
@keyframes shake-fatal {
    0% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(-20px, -10px) rotate(-5deg); }
    50% { transform: translate(20px, 10px) rotate(5deg); }
    75% { transform: translate(-20px, -10px) rotate(-5deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}

.shake-mild {
    animation: shake-mild 0.2s 2;
}

.shake-strong {
    animation: shake-strong 0.4s 2;
}

.shake-extreme { /* New class for extreme shake */
    animation: shake-extreme 0.1s infinite;
}

.shake-fatal { /* New class for fatal shake */
    animation: shake-fatal 0.05s infinite;
}

/* New: Devilish background effect */
.devilish-background {
    background-color: #8B0000; /* Dark Red */
    animation: devilish-shake 0.1s infinite;
}

@keyframes devilish-shake {
    0% { transform: translate(1px, 1px) rotate(0deg); }
    10% { transform: translate(-1px, -2px) rotate(-1deg); }
    20% { transform: translate(-3px, 0px) rotate(1deg); }
    30% { transform: translate(3px, 2px) rotate(0deg); }
    40% { transform: translate(1px, -1px) rotate(1deg); }
    50% { transform: translate(-1px, 2px) rotate(-1deg); }
    60% { transform: translate(-3px, 1px) rotate(0deg); }
    70% { transform: translate(3px, 1px) rotate(-1deg); }
    80% { transform: translate(-1px, -1px) rotate(1deg); }
    90% { transform: translate(1px, 2px) rotate(0deg); }
    100% { transform: translate(1px, -2px) rotate(-1deg); }
}

#you-win,
#almost-good-ending,
#almost-bad-ending,
#bad-ending,
#how-ending,
#evil-ending,
#best-ending,
#yes-im-sure-ending,
#worst-ending,
#wonderful-ending,
#bruh-ending,
#idk-ending,
#devilish-ending,
#yes-button-press-ending,
#nuh-uh-ending,
#destroyer-ending,
#dragger-ending,
#wait-what-ending,
#image-ending,
#among-us-ending,
#ligma-ending, 
#mobile-ending, 
#googoogaagaa-ending,
/* New Ending Messages from this prompt */
#idk-im-doing-ending,
#keyboard-spam-ending,
#ligma2-ending,
#will-you-ending,
#woah-ending,
#roblox-ending,
#devil-baby-ending,
#skipper-ending,
/* New Ending Messages from current prompt */
#paster-ending,
#squid-game-ending,
#are-u-dead-ending,
#pause-ending,
#unpause-ending,
#about-to-pause-ending,
#pausno-ending { 
    position: absolute;
    top: 35%; /* Moved higher */
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
    text-shadow: 3px 3px 0 #fff, 6px 6px 0 rgba(0,0,0,0.2);
    animation: win-animation 1s ease-out forwards;
    text-align: center;
}

#you-win {
    font-size: 5em;
    color: #28a745;
}

#almost-good-ending {
    font-size: 4em;
    color: #20c997; /* Teal */
}

#almost-bad-ending {
    font-size: 4em;
    color: #ffc107; /* Yellow/Orange */
}

#bad-ending {
    font-size: 5em;
    color: #dc3545; /* Red */
}

#how-ending {
    font-size: 5em;
    color: #6f42c1; /* Purple */
}

#evil-ending {
    font-size: 5em;
    color: #660000; /* Dark Red */
    text-shadow: 3px 3px 0 #000, 6px 6px 0 rgba(255,0,0,0.3);
}

#best-ending {
    font-size: 5em;
    color: #FFD700; /* Gold */
}

#yes-im-sure-ending {
    font-size: 4em;
    color: #17a2b8; /* Cyan */
}

#worst-ending {
    font-size: 5em;
    color: #333; /* Dark Gray */
    text-shadow: 2px 2px 0 #999, 4px 4px 0 rgba(0,0,0,0.1);
}

#wonderful-ending {
    font-size: 6em;
    font-weight: bold;
    color: transparent;
    background: linear-gradient(45deg, #ff00de, #ff7f00, #ffff00, #00ff00, #00ffff, #007bff, #8a2be2);
    -webkit-background-clip: text;
    background-clip: text;
    text-shadow: 3px 3px 0 rgba(255,255,255,0.5);
    animation: win-animation 1.5s ease-out forwards;
}

#bruh-ending {
    font-size: 6em;
    color: #8D6E63; /* A brownish, deadpan color */
    text-shadow: 2px 2px 0 #ccc, 4px 4px 0 rgba(0,0,0,0.1);
}

#idk-ending {
    font-size: 5em;
    color: #7B68EE; /* MediumSlateBlue - a slightly thoughtful/uncertain color */
}

#devilish-ending {
    font-size: 5em;
    color: #4B0082; /* Indigo - deep and ominous purple */
    text-shadow: 4px 4px 0 #000, 8px 8px 0 rgba(255,0,0,0.5);
}

#yes-button-press-ending {
    font-size: 4.5em;
    color: #FF4500; /* OrangeRed */
}

#nuh-uh-ending {
    font-size: 5.5em;
    color: #696969; /* DimGray */
    text-shadow: 2px 2px 0 #fff, 4px 4px 0 rgba(0,0,0,0.1);
}

#destroyer-ending {
    font-size: 5.5em;
    color: #8B0000; /* DarkRed */
    text-shadow: 3px 3px 0 #000, 6px 6px 0 rgba(255,0,0,0.3);
}

#dragger-ending {
    font-size: 5.5em;
    color: #008B8B; /* DarkCyan */
}

#wait-what-ending {
    font-size: 5em;
    color: #FF8C00; /* Dark Orange, for a questioning, slightly confused feel */
}

#image-ending {
    font-size: 5em;
    color: #ADFF2F; /* GreenYellow, for a fresh, pleasant feel */
}

#among-us-ending {
    font-size: 5em;
    color: #FF0000; /* Red, classic Among Us Imposter color */
    text-shadow: 3px 3px 0 #000, 6px 6px 0 rgba(255,0,0,0.3);
    font-family: 'Metal Mania', cursive; /* Use a slightly quirky font */
}

#ligma-ending { /* New Ending Message Style */
    font-size: 5em;
    color: #FFA07A; /* Light Salmon, playful */
    text-shadow: 3px 3px 0 #fff, 6px 6px 0 rgba(0,0,0,0.2);
}

#mobile-ending { /* New Ending Message Style */
    font-size: 4em;
    color: #32CD32; /* LimeGreen, fresh and clean */
    text-shadow: 2px 2px 0 #fff, 4px 4px 0 rgba(0,0,0,0.1);
}

#googoogaagaa-ending { /* New Ending Message Style */
    font-size: 5em;
    color: #FF69B4; /* Hot Pink, cute */
    text-shadow: 3px 3px 0 #fff, 6px 6px 0 rgba(0,0,0,0.2);
}

/* New Ending Message Styles from this prompt */
#idk-im-doing-ending {
    font-size: 4.5em;
    color: #800080; /* Purple */
    text-shadow: 2px 2px 0 #fff, 4px 4px 0 rgba(0,0,0,0.1);
}

#keyboard-spam-ending {
    font-size: 4.5em;
    color: #556B2F; /* DarkOliveGreen */
    text-shadow: 2px 2px 0 #fff, 4px 4px 0 rgba(0,0,0,0.1);
    font-family: 'Nosifier', cursive; /* A chaotic font */
}

#ligma2-ending {
    font-size: 5em;
    color: #FF4500; /* OrangeRed */
    text-shadow: 3px 3px 0 #fff, 6px 6px 0 rgba(0,0,0,0.2);
}

#will-you-ending {
    font-size: 5em;
    color: #4682B4; /* SteelBlue */
    text-shadow: 3px 3px 0 #fff, 6px 6px 0 rgba(0,0,0,0.2);
}

#woah-ending {
    font-size: 5.5em;
    color: #DAA520; /* Goldenrod */
    text-shadow: 3px 3px 0 #fff, 6px 6px 0 rgba(0,0,0,0.2);
}

#roblox-ending {
    font-size: 5em;
    color: #0000FF; /* Bright Blue, like Roblox */
    text-shadow: 3px 3px 0 #fff, 6px 6px 0 rgba(0,0,0,0.2);
}

#devil-baby-ending {
    font-size: 5.5em;
    color: #8B0000; /* Dark Red, devilish */
    text-shadow: 3px 3px 0 #000, 6px 6px 0 rgba(255,0,0,0.3);
    font-family: 'Creepster', cursive; /* Creepy font for devil baby */
}

#skipper-ending { /* New Skipper Ending Message Style */
    font-size: 5em;
    color: #00BFFF; /* DeepSkyBlue */
    text-shadow: 3px 3px 0 #fff, 6px 6px 0 rgba(0,0,0,0.2);
}

/* New Ending Message Styles from current prompt */
#paster-ending {
    font-size: 5em;
    color: #1E90FF; /* DodgerBlue */
    text-shadow: 3px 3px 0 #fff, 6px 6px 0 rgba(0,0,0,0.2);
}

#squid-game-ending {
    font-size: 5em;
    color: #FFD700; /* Gold */
    text-shadow: 3px 3px 0 #000, 6px 6px 0 rgba(255,0,0,0.5);
    font-family: 'Metal Mania', cursive;
}

#are-u-dead-ending {
    font-size: 4.5em;
    color: #8B4513; /* SaddleBrown, a somewhat eerie, dusty color */
    text-shadow: 2px 2px 0 #fff, 4px 4px 0 rgba(0,0,0,0.1);
}

/* New Pause-related ending messages */
#pause-ending {
    font-size: 5em;
    color: #607D8B; /* Blue Grey */
}

#unpause-ending {
    font-size: 5em;
    color: #4CAF50; /* Green */
}

#about-to-pause-ending {
    font-size: 4em;
    color: #FFEB3B; /* Amber */
}

#pausno-ending {
    font-size: 5em;
    color: #9C27B0; /* Deep Purple */
    text-shadow: 3px 3px 0 #000, 6px 6px 0 rgba(156,39,176,0.3);
}

@keyframes win-animation {
    0% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

#play-again-button {
    display: none;
    margin-top: 30px;
    background-color: #007bff; /* Blue */
    font-size: 1.5em;
    padding: 15px 30px;
}

#endings-menu-button {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 10px 20px;
    font-size: 1em;
    background-color: #6c757d;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 102;
}

#pause-button {
    position: fixed;
    top: 20px;
    left: 20px;
    padding: 10px 20px;
    font-size: 1em;
    background-color: #FFC107; /* Amber */
    color: #333;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 102;
}

.modal {
    display: none; 
    position: fixed;
    z-index: 101;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
    animation: fade-in 0.3s;
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
    border-radius: 10px;
    text-align: left;
    position: relative;
}

.pause-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
}

.pause-content h2 {
    font-size: 3em;
    color: #333;
    margin-bottom: 30px;
}

.pause-content button {
    margin: 15px 0;
    font-size: 2em;
    padding: 15px 30px;
    width: 80%;
    max-width: 300px;
}

#unpause-button {
    background-color: #4CAF50; /* Green */
}

#pausno-button {
    background-color: #E91E63; /* Pink */
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close-button:hover,
.close-button:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

#endings-list {
    list-style-type: none;
    padding: 0;
}

#endings-list li {
    margin-bottom: 10px;
    font-size: 1.2em;
}

#endings-list li.unlocked .ending-name {
    color: #28a745;
    font-weight: bold;
}

#endings-list li.unlocked .ending-hint {
    color: #6c757d; /* Style for hint of unlocked endings */
}

#roblox-icon { /* New Roblox icon style */
    position: fixed;
    bottom: 5px; /* Near bottom edge */
    right: 5px; /* Near right edge */
    width: 40px; /* Very small */
    height: 40px;
    background-image: url('robux_icon.png');
    background-size: contain;
    background-repeat: no-repeat;
    cursor: pointer;
    opacity: 0.4; /* Very low opacity */
    transition: opacity 0.3s ease; /* Smooth hover effect */
    z-index: 100; /* Above most content, but below confetti/modals */
    display: none; /* Hidden by default, shown on game reset */
}

#roblox-icon:hover {
    opacity: 1; /* Fully visible on hover */
}

/* New: Body styling when paused */
body.paused {
    pointer-events: none; /* Disable interaction with underlying elements */
}

/* Ensure the modal is interactive when body is paused */
.modal {
    pointer-events: auto;
}