html, body {
    margin: 0;
    padding: 0;
    background: transparent;
    overflow: hidden;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.param-box {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 420px;
    height: 110px;
    background: repeating-linear-gradient(
        45deg,
        #2d1b4e 0px,
        #2d1b4e 14.14px,
        #3d2563 14.14px,
        #3d2563 28.28px
    );
    border: 2px solid #7c3aed;
    border-radius: 6px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
}

.param-box.show {
    animation: boxFadeIn 0.3s ease forwards;
}

@keyframes boxFadeIn {
    0% {
        opacity: 0;
        visibility: visible;
    }
    100% {
        opacity: 1;
        visibility: visible;
    }
}

.param-container {
    position: relative;
    text-align: center;
    width: 100%;
    padding: 0 20px;
}

.use-code-text {
    color: white;
    font-family: 'Luckiest Guy', cursive;
    font-size: 28px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: scale(0);
    margin-bottom: 10px;
}

.code-text {
    font-family: 'BBH Bartle', sans-serif;
    font-size: 28px;
    background: linear-gradient(180deg, #a78bfa 0%, #7c3aed 50%, #6d28d9 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: scale(0);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.use-code-text.show {
    animation: popOut 0.5s ease forwards, slideUpOut 0.5s ease 3s forwards;
}

.code-text.show {
    animation: popOut 0.5s ease forwards, slideDownOut 0.5s ease 3s forwards;
}

@keyframes popOut {
    0% {
        opacity: 0;
        transform: scale(0);
        visibility: visible;
    }
    60% {
        transform: scale(1.15);
    }
    100% {
        opacity: 1;
        transform: scale(1);
        visibility: visible;
    }
}

@keyframes slideUpOut {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-100px) scale(1);
        visibility: hidden;
    }
}

@keyframes slideDownOut {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(100px) scale(1);
        visibility: hidden;
    }
}

.race-box {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 420px;
    height: 110px;
    background: repeating-linear-gradient(
        45deg,
        #2d1b4e 0px,
        #2d1b4e 14.14px,
        #3d2563 14.14px,
        #3d2563 28.28px
    );
    border: 2px solid #7c3aed;
    border-radius: 6px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 30px;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
}

.race-box.show {
    animation: boxFadeIn 0.3s ease forwards;
}

.race-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.race-text-container {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.race-title {
    font-family: 'Luckiest Guy', cursive;
    font-size: 24px;
    color: white;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: translateX(-50px);
}

.race-title.show {
    animation: slideInLeft 0.5s ease forwards;
}

.race-title.exit-up {
    animation: slideUpOut 0.5s ease forwards;
}

.race-prize {
    font-family: 'Luckiest Guy', cursive;
    font-size: 56px;
    background: linear-gradient(180deg, #a78bfa 0%, #7c3aed 50%, #6d28d9 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0;
    transform: translateX(-50px);
    line-height: 1;
}

.race-prize.show {
    animation: slideInLeft 0.5s ease 0.2s forwards;
}

.race-prize.exit-down {
    animation: slideDownOut 0.5s ease forwards;
}


.race-icon {
    width: 75px;
    height: 75px;
    object-fit: contain;
    opacity: 0;
    transform: scale(0) rotate(-20deg);
    filter: drop-shadow(0 4px 12px rgba(124, 58, 237, 0.4));
}

.race-icon.show {
    animation: trophyBounce 0.6s ease 0.4s forwards;
}

@keyframes trophyBounce {
    0% {
        opacity: 0;
        transform: scale(0) rotate(-20deg);
    }
    50% {
        transform: scale(1.15) rotate(5deg);
    }
    70% {
        transform: scale(0.95) rotate(-3deg);
    }
    85% {
        transform: scale(1.05) rotate(2deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

.race-icon.exit-right {
    animation: trophyExitRight 0.6s ease forwards;
}

@keyframes trophyExitRight {
    0% {
        opacity: 1;
        transform: translateX(0) rotate(0deg) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateX(100px) rotate(180deg) scale(0.8);
        visibility: hidden;
    }
}

.weekly-race-box {
    opacity: 0;
    visibility: hidden;
}

.weekly-race-box.show {
    animation: boxFadeIn 0.3s ease forwards;
}

.weekly-text-container {
    text-align: right;
}

.weekly-race-icon {
    width: 75px;
    height: 75px;
    object-fit: contain;
    opacity: 0;
    transform: translateX(-100px) rotate(-180deg) scale(0.8);
    filter: drop-shadow(0 4px 12px rgba(124, 58, 237, 0.4));
}

.weekly-race-icon.show {
    animation: trophyEnterLeft 0.6s ease forwards;
}

@keyframes trophyEnterLeft {
    0% {
        opacity: 0;
        transform: translateX(-100px) rotate(-180deg) scale(0.8);
    }
    100% {
        opacity: 1;
        transform: translateX(0) rotate(0deg) scale(1);
    }
}

.weekly-race-box .race-title {
    transform: translateX(50px);
}

.weekly-race-box .race-title.show {
    animation: slideInRight 0.5s ease 0.5s forwards;
}

.weekly-race-box .race-prize {
    transform: translateX(50px);
}

.weekly-race-box .race-prize.show {
    animation: slideInRight 0.5s ease 0.7s forwards;
}

.weekly-race-box .race-title.exit-up {
    animation: slideUpOut 0.5s ease forwards;
}

.weekly-race-box .race-prize.exit-down {
    animation: slideDownOut 0.5s ease forwards;
}

.weekly-race-icon.exit-left {
    animation: trophyExitLeft 0.6s ease forwards;
}

@keyframes trophyExitLeft {
    0% {
        opacity: 1;
        transform: translateX(0) rotate(0deg) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateX(-100px) rotate(-180deg) scale(0.8);
        visibility: hidden;
    }
}

@keyframes slideInRight {
    0% {
        opacity: 0;
        transform: translateX(50px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.final-box {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 420px;
    height: 110px;
    background: repeating-linear-gradient(
        45deg,
        #2d1b4e 0px,
        #2d1b4e 14.14px,
        #3d2563 14.14px,
        #3d2563 28.28px
    );
    border: 2px solid #7c3aed;
    border-radius: 6px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
}

.final-box.show {
    animation: boxFadeIn 0.3s ease forwards;
}

.final-text {
    font-family: 'BBH Bartle', sans-serif;
    font-size: 32px;
    color: #7d3aec;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    opacity: 0;
}

.final-text.show {
    animation: fadeInScale 0.5s ease 0.2s forwards;
}

.final-text.exit-up {
    animation: slideUpOut 0.5s ease forwards;
}

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

.overlay {
    width: 420px;
    height: 110px;
    background: repeating-linear-gradient(
        45deg,
        #2d1b4e 0px,
        #2d1b4e 14.14px,
        #3d2563 14.14px,
        #3d2563 28.28px
    );
    border: 2px solid #7c3aed;
    border-radius: 6px;
    display: flex;
    align-items: center;
    padding: 20px 25px;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

.site-name {
    font-family: 'BBH Bartle', sans-serif;
    font-size: 20px;
    color: #7d3aec;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: translateX(-50px);
}

.site-name.show {
    animation: slideInLeft 0.5s ease forwards;
}

.site-name.exit {
    animation: slideOutLeft 0.5s ease forwards;
}

@keyframes slideInLeft {
    0% {
        opacity: 0;
        transform: translateX(-50px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutLeft {
    0% {
        opacity: 1;
        transform: translateX(0);
        visibility: visible;
    }
    99% {
        opacity: 0;
        transform: translateX(-80px);
        visibility: visible;
    }
    100% {
        opacity: 0;
        transform: translateX(-80px);
        visibility: hidden;
    }
}

.site-logo {
    height: 20px;
    width: auto;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
}

.play-button {
    margin-left: auto;
    background: #7c3aed;
    color: white;
    border: none;
    padding: 13px 24px;
    border-radius: 6px;
    font-size: 18px;
    font-family: 'Luckiest Guy', cursive;
    font-weight: 400;
    text-transform: uppercase;
    opacity: 0;
    transform: scale(0);
}

.play-button.show {
    animation: popIn 0.4s ease forwards;
}

.play-button.click {
    animation: clickEffect 3s ease forwards;
}

.play-button.exit {
    animation: slideOutRight 0.5s ease forwards;
}

@keyframes popIn {
    0% {
        opacity: 0;
        transform: scale(0);
        visibility: visible;
    }
    60% {
        opacity: 1;
        transform: scale(1.1);
    }
    100% {
        opacity: 1;
        transform: scale(1);
        visibility: visible;
    }
}

@keyframes slideOutRight {
    0% {
        opacity: 1;
        transform: translateX(0) scale(1);
        visibility: visible;
    }
    99% {
        opacity: 0;
        transform: translateX(80px) scale(1);
        visibility: visible;
    }
    100% {
        opacity: 0;
        transform: translateX(80px) scale(1);
        visibility: hidden;
    }
}

.cursor {
    position: absolute;
    width: 35px;
    height: 35px;
    left: 60px;
    top: 65px;
    pointer-events: none;
    opacity: 0;
    filter: brightness(0) invert(1) drop-shadow(0 0 8px rgba(255, 255, 255, 0.8)) drop-shadow(0 0 15px rgba(255, 255, 255, 0.5));
}

.cursor.show {
    animation: cursorAppear 3s ease forwards;
}

.cursor.exit {
    animation: cursorDropDown 0.5s ease forwards;
}

@keyframes cursorAppear {
    0% {
        opacity: 0;
        left: 60px;
        top: 65px;
    }
    5% {
        opacity: 1;
    }
    55% {
        left: 320px;
        top: 55px;
    }
    70% {
        left: 320px;
        top: 55px;
        transform: scale(0.85);
    }
    80% {
        transform: scale(1);
    }
    100% {
        opacity: 1;
        left: 320px;
        top: 55px;
    }
}

@keyframes cursorDropDown {
    0% {
        opacity: 1;
        left: 320px;
        top: 55px;
        visibility: visible;
    }
    99% {
        opacity: 0;
        left: 320px;
        top: 150px;
        visibility: visible;
    }
    100% {
        opacity: 0;
        left: 320px;
        top: 150px;
        visibility: hidden;
    }
}

@keyframes clickEffect {
    0%, 65% {
        opacity: 1;
        transform: scale(1);
        visibility: visible;
    }
    72% {
        opacity: 1;
        transform: scale(0.9);
    }
    82% {
        opacity: 1;
        transform: scale(1.08);
    }
    100% {
        opacity: 1;
        transform: scale(1);
        visibility: visible;
    }
}


