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

@font-face {
    font-family: 'Comic Sans MS';
    src: url('Comic Sans MS.ttf') format('truetype');
}

body {
    font-family: Arial, sans-serif;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    position: relative;
    overflow: hidden;
}

.click-container {
    position: relative;
    display: flex;
    justify-content: center;
}

.plus-one-container {
    position: absolute;
    width: 100%;
    height: 100px;
    top: -80px;
    pointer-events: none;
}

.plus-one {
    position: absolute;
    color: #000000;
    font-weight: bold;
    font-size: 20px;
    opacity: 1;
    user-select: none;
    animation: floatAnimation 1.5s ease-out forwards;
    left: 50%; 
    transform: translateX(-50%); 
}

@keyframes floatAnimation {
    0% {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
    100% {
        transform: translateX(calc(-50% + sin(var(--random-angle)) * 15px)) translateY(-60px);
        opacity: 0;
    }
}

.click-box {
    background: linear-gradient(to bottom, #b0b0b0, #777);
    border: 2px solid black;
    padding: 20px 40px;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none; 
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    font-family: 'Comic Sans MS', cursive, sans-serif;
    animation: buttonColorCycle 0.6s steps(5, end) infinite, pulsate 1.5s ease-in-out infinite;
    position: relative;
}

.click-box:hover {
    background: linear-gradient(to bottom, #c5c5c5, #999);
    transform: scale(1.1);
    filter: brightness(1.2);
}

.click-box:active {
    background: linear-gradient(to bottom, #888, #555);
    transform: scale(0.9);
    filter: brightness(0.8);
}

.counter {
    margin-top: 20px;
    font-size: 18px;
    font-family: 'Comic Sans MS', cursive, sans-serif;
    user-select: none; 
    animation: colorCycleMultiplier 10s infinite;
}

.sound-button {
    margin-top: 15px;
    background-color: white;
    border: 2px solid #999;
    border-radius: 5px;
    padding: 8px 15px;
    font-family: 'Comic Sans MS', cursive, sans-serif;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
    user-select: none;
}

.sound-button:hover {
    background-color: #f0f0f0;
    transform: scale(1.05);
}

.sound-button:active {
    background-color: #e0e0e0;
    transform: scale(0.95);
}

.play-icon {
    font-size: 18px;
}

.music-controls {
    margin-top: 15px;
    display: flex;
    justify-content: center;
}

#toggle-music {
    background-color: white;
    border: 2px solid #999;
    border-radius: 5px;
    padding: 8px 15px;
    font-family: 'Comic Sans MS', cursive, sans-serif;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
    user-select: none;
}

#toggle-music:hover {
    background-color: #f0f0f0;
    transform: scale(1.05);
}

#toggle-music:active {
    background-color: #e0e0e0;
    transform: scale(0.95);
}

.music-icon {
    font-size: 18px;
}

.pets-button {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    transition: transform 0.2s ease;
    z-index: 5;
    outline: none;
    display: inline-block;
}

#pets-logo {
    width: 120px;
    height: auto;
    transition: transform 0.2s ease;
    user-select: none; 
}

.pets-button:hover {
    transform: translateY(-50%) scale(1.1);
}

.pets-button:active {
    transform: translateY(-50%) scale(0.9);
}

.flavor-rating-container {
    position: absolute;
    width: 100%;
    height: 150px;
    top: -150px;
    pointer-events: none;
    display: flex;
    justify-content: center;
    align-items: flex-end;
}

.flavor-rating {
    position: absolute;
    bottom: 0;
    max-width: 200px;
    opacity: 0;
    user-select: none;
    animation: floatAndFade 3s ease-out forwards;
}

@keyframes floatAndFade {
    0% {
        transform: translateY(0);
        opacity: 0;
    }
    20% {
        opacity: 1;
    }
    80% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px);
        opacity: 0;
    }
}

#dvd-screensaver {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

#dvd-screensaver img {
    position: absolute;
    width: 130px;  
    height: auto;
    opacity: 0.9;
    transition: filter 0.1s ease;
}

.legendary-corner-hit {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Comic Sans MS', cursive, sans-serif;
    font-size: 48px;
    font-weight: bold;
    color: gold;
    text-shadow: 0 0 10px red, 0 0 20px orange, 0 0 30px yellow;
    z-index: 1000;
    text-align: center;
    animation: pulse-legendary 3s ease-in-out;
    pointer-events: none;
}

.legendary-hit {
    filter: drop-shadow(0 0 10px gold) brightness(2) !important;
    animation: spin-legendary 3s ease-in-out;
}

@keyframes pulse-legendary {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
    10% { opacity: 1; transform: translate(-50%, -50%) scale(1.2); }
    20% { transform: translate(-50%, -50%) scale(0.9); }
    30% { transform: translate(-50%, -50%) scale(1.1); }
    70% { opacity: 1; }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(1.5); }
}

@keyframes spin-legendary {
    0% { transform: rotate(0deg) scale(1); }
    10% { transform: rotate(180deg) scale(2); }
    20% { transform: rotate(360deg) scale(1.5); }
    30% { transform: rotate(540deg) scale(2); }
    50% { transform: rotate(720deg) scale(1.5); }
    100% { transform: rotate(1080deg) scale(1); }
}

.rain-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -2;
    overflow: hidden;
}

.rain-drop {
    position: absolute;
    width: 2px;
    height: 15px;
    background-color: rgba(64, 224, 208, 0.9);  
    transform: rotate(15deg);
    animation: rain-fall linear forwards;
    top: -20px; 
}

@keyframes rain-fall {
    0% {
        transform: translateY(0) translateX(0) rotate(15deg);
        opacity: 0.9;
    }
    100% {
        transform: translateY(calc(100vh + 40px)) translateX(100px) rotate(15deg);
        opacity: 0.9;
    }
}

@keyframes buttonColorCycle {
    0% { background: linear-gradient(to bottom, #ff5555, #cc3333); }  
    20% { background: linear-gradient(to bottom, #5555ff, #3333cc); } 
    40% { background: linear-gradient(to bottom, #ffff55, #cccc33); } 
    60% { background: linear-gradient(to bottom, #55ff55, #33cc33); } 
    80% { background: linear-gradient(to bottom, #aa55ff, #7733cc); } 
    100% { background: linear-gradient(to bottom, #ff5555, #cc3333); }  
}

@keyframes pulsate {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes colorCycleMultiplier {
    0% { color: red; }
    33% { color: blue; }
    66% { color: green; }
    100% { color: red; }
}

.star {
    position: absolute;
    pointer-events: none;
    width: 15px;
    height: 15px;
    user-select: none;
    z-index: 1000;
    animation: fallAndFade 1.5s linear forwards;
}

@keyframes fallAndFade {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, calc(-50% + 50px)) rotate(180deg);
        opacity: 0;
    }
}

.skull-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.35);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    padding-bottom: 220px;
}

.skull-image {
    width: 130px;
    height: 130px;
    object-fit: contain;
    user-select: none;
    pointer-events: none;
}

.skull-click-feedback {
    position: fixed;
    width: 30px;
    height: 30px;
    border: 2px solid red;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 1100;
    animation: skullClickFeedback 0.8s ease-out forwards;
}

@keyframes skullClickFeedback {
    0% { transform: translate(-50%, -50%) scale(0.5); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1.5); opacity: 0; }
}

.paused-animation {
    animation-play-state: paused !important;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(5px);
    z-index: 100;
    justify-content: center;
    align-items: center;
}

.modal-content {
    position: relative;
    max-width: 80%;
    max-height: 80%;
}

.pet-inventory-img {
    width: 100%;
    height: auto;
    display: block;
    user-select: none;
}

.close-button {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 60px;
    height: 60px;
    cursor: pointer;
    user-select: none;
}

.pet-circles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.pet-circle {
    position: absolute;
    width: 40px;
    height: 40px;
    background-color: rgba(128, 128, 128, 0.5);
    border-radius: 50%;
    pointer-events: auto;
    cursor: pointer;
    transition: transform 0.7s ease;
    transform-origin: center center;
}

.pet-circle:hover {
    transform: scale(1.2);
    animation: trembleEffect 0.7s ease-in-out infinite;
}

@keyframes trembleEffect {
    0% { transform: scale(1.2) translate(0, 0); }
    25% { transform: scale(1.2) translate(-2px, 1px); }
    50% { transform: scale(1.2) translate(2px, -1px); }
    75% { transform: scale(1.2) translate(-1px, -1px); }
    100% { transform: scale(1.2) translate(0, 0); }
}

@keyframes sway {
    0% { transform: scale(1.05) rotate(0deg); }
    25% { transform: scale(1.05) rotate(-8deg); }
    75% { transform: scale(1.05) rotate(8deg); }
    100% { transform: scale(1.05) rotate(0deg); }
}

.ripple-effect {
    position: fixed;
    width: 30px;
    height: 30px;
    border: 2px solid;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 1100;
    animation: rippleAnimation 0.8s ease-out forwards;
}

@keyframes rippleAnimation {
    0% { transform: translate(-50%, -50%) scale(0.5); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1.5); opacity: 0; }
}

.joker-card-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: -1;
    pointer-events: none;
}

.joker-shadow {
    position: absolute;
    width: 184px; /* 4% smaller than 192px */
    height: 230px; /* 4% smaller than 240px */
    background-image: url('Card Joker shadow.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    z-index: -2;
    left: calc(50% - 23px); /* 12% more to the left (12% of 192px = 23px) */
    top: 0; /* Same height as the joker card */
    transform: translateX(-50%);
    animation: levitate 3s ease-in-out infinite;
    filter: blur(3px);
}

.joker-card {
    position: relative;
    width: 192px;
    height: 192px;
    object-fit: contain;
    user-select: none;
    pointer-events: auto;
    cursor: pointer;
    z-index: -1;
    animation: levitate 3s ease-in-out infinite;
    transition: transform 0.3s ease;
    transform-style: preserve-3d;
}

@keyframes levitate {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.joker-card:hover,
.joker-card:hover ~ .joker-shadow {
    animation-play-state: paused;
}

.joker-card.tilt-top {
    transform: perspective(600px) rotateX(-15deg) scaleY(0.9);
}

.joker-card.tilt-bottom {
    transform: perspective(600px) rotateX(15deg) scaleY(0.9);
}

.joker-card:hover {
    filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.8)) brightness(1.1);
    transform: scale(1.05);
}