/* 基本样式 */
body {
    font-family: "IBM Plex Mono", serif;
    background-color: #eee;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: linear-gradient(45deg, #ff6347, #ff4500); /* 背景渐变 */
    animation: bodyBackground 5s infinite alternate; /* 背景动画 */
}

@keyframes bodyBackground {
    0% {
        background: linear-gradient(45deg, #ff6347, #ff4500);
    }
    50% {
        background: linear-gradient(45deg, #32cd32, #8a2be2);
    }
    100% {
        background: linear-gradient(45deg, #ff6347, #ff4500);
    }
}

.wrapper {
    text-align: center;
}

.button {
    margin-top: 40vh;
    display: inline-block;
}

.button__link {
    color: white;
    font-size: 1.5rem;
    display: inline-block;
    padding: 1.5rem 3rem;
    border: rgb(255, 0, 0) 10px solid;
    border-radius: 0.5rem;
    text-decoration: none;
    letter-spacing: 0.5rem;
    transition: all 0.3s cubic-bezier(0.725, 0.885, 0.32, 1.275);
}

/* ===================== Fun 按钮 ===================== */
.button__link.fun {
    background: #ffea00;
    border: 2px solid #ffcc00;
    box-shadow: 0 4px 20px rgba(255, 204, 0, 0.5);
    position: relative;
    animation: funBackgroundChange 4s infinite alternate; /* Fun按钮背景变化 */
}

/* Fun按钮背景变化 */
@keyframes funBackgroundChange {
    0% {
        background: #ffea00;
    }
    25% {
        background: #ff6347;
    }
    50% {
        background: #ffcc00;
    }
    75% {
        background: #ff8c00;
    }
    100% {
        background: #ffea00;
    }
}

/* Fun按钮的颜色和动画 */
.button__link.fun:hover {
    color: #ff4500;
    font-size: 2rem;
    letter-spacing: 0.8rem;
    transform: scale(1.2) rotate(10deg);
    box-shadow: 0 8px 40px rgba(255, 204, 0, 0.7);
    animation: funShapeChange 3s infinite alternate;
}

@keyframes funShapeChange {
    0% {
        color: white;
        border-radius: 0%;
        font-size: 1.5rem;
    }
    25% {
        background: #ff6347;
        color: white;
        border-radius: 20%;
        font-size: 1.7rem;
    }
    50% {
        background: #ffcc00;
        color: #ff4500;
        border-radius: 50%;
        font-size: 1.8rem;
    }
    75% {
        background: #ff8c00;
        color: #ffff00;
        border-radius: 30%;
        font-size: 2rem;
    }
    100% {
        background: #ffea00;
        color: white;
        border-radius: 0%;
        font-size: 1.5rem;
    }
}

.button__link.fun:active {
    transform: scale(0.7) rotate(-10deg);
    box-shadow: 0 4px 30px rgba(255, 204, 0, 0.8);
}

/* ===================== Shy 按钮 ===================== */
.button__link.shy {
    background: #ff69b4;
    border: 4px solid #f06292;
    box-shadow: 0 4px 10px rgba(255, 105, 180, 0.4);
    position: relative;
}

.button__link.shy:hover {
    background: linear-gradient(135deg, #ff69b4, #ff1493);
    transform: scale(0.85) translateY(-10px);
    box-shadow: 0 6px 30px rgba(255, 105, 180, 0.6);
    filter: blur(3px);
    opacity: 0.9;
    animation: shyFadeIn 0.5s ease-in-out forwards;
}

@keyframes shyFadeIn {
    0% {
        opacity: 0.7;
        transform: scale(0.9) translateY(0);
    }
    50% {
        opacity: 1;
        transform: scale(0.85) translateY(-10px);
    }
    100% {
        opacity: 0.9;
        transform: scale(0.85) translateY(-10px);
    }
}

.button__link.shy:active {
    transform: scale(0.6) translateY(-20px);
    opacity: 0.5;
    box-shadow: 0 2px 10px rgba(255, 105, 180, 0.3);
}

/* ===================== Calm 按钮 ===================== */
.button__link.calm {
    background-color: #2e8b57;
    border: 4px solid #006400;
    box-shadow: 0 4px 10px rgba(0, 100, 0, 0.3);
    transition: all 0.5s ease-in-out;
}

.button__link.calm:hover {
    background-color: #006400;
    transform: scale(1.1) translateY(-10px);
    box-shadow: 0 8px 40px rgba(0, 100, 0, 0.6);
    animation: calmBreathing 2s ease-in-out infinite;
}

@keyframes calmBreathing {
    0% {
        transform: scale(1.05) translateY(-5px);
    }
    50% {
        transform: scale(1.1) translateY(-10px);
    }
    100% {
        transform: scale(1.05) translateY(-5px);
    }
}

.button__link.calm:active {
    transform: scale(1.2) translateY(-15px);
    box-shadow: 0 10px 50px rgba(0, 100, 0, 1);
}

/* ===================== Mad 按钮 ===================== */
.button__link.mad {
    background: #ff0000;
    border: 4px solid #d10000;
    box-shadow: 0 4px 20px rgba(255, 0, 0, 0.7);
    transition: all 0.3s ease;
    position: relative;
    border-radius: 0.5rem;
}

/* 为Mad按钮加上黄色警戒线 */
.button__link.mad:before {
    content: '';
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    border: 2px solid yellow;
    border-radius: 0.5rem;
    animation: warningBlink 1s infinite; /* 警戒线闪烁效果 */
}

/* 按钮悬停时背景和震动效果 */
.button__link.mad:hover {
    background: #d10000;
    transform: scale(3) rotate(90deg); /* 放大并旋转 */
    box-shadow: 0 15px 80px rgba(255, 0, 0, 1);
    animation: madExplosion 0.8s ease-in-out forwards; /* 整个页面背景变红 */
    animation: madShake 0.1s infinite; /* 更强的震动效果 */
}

/* 背景颜色的爆炸和闪烁 */
@keyframes madExplosion {
    0% {
        transform: scale(1) rotate(0deg);
        background: #ff0000;
    }
    25% {
        background: #ff3b3b; 
    }
    50% {
        background: #ff0000;
    }
    75% {
        background: #d10000;
    }
    100% {
        transform: scale(3) rotate(90deg);
        background: #ff0000;
    }
}

/* 震动效果：按钮及警戒线 */
@keyframes madShake {
    0% {
        transform: scale(3) rotate(90deg);
    }
    25% {
        transform: scale(3.1) rotate(100deg);
    }
    50% {
        transform: scale(3.2) rotate(110deg);
    }
    75% {
        transform: scale(3) rotate(120deg);
    }
    100% {
        transform: scale(3.1) rotate(90deg);
    }
}

/* 警戒线闪烁效果 */
@keyframes warningBlink {
    0% {
        border-color: yellow;
    }
    50% {
        border-color: #ff6347; /* 黄色警戒线闪烁成橙色 */
    }
    100% {
        border-color: yellow;
    }
}

.button__link.mad:active {
    transform: scale(4) rotate(120deg); /*mad*/
    box-shadow: 0 20px 100px rgba(255, 0, 0, 1);
}


/* ===================== Spontaneous 按钮 ===================== */
.button__link.spontaneous {
    background: linear-gradient(45deg, #9370db, #8a2be2);
    box-shadow: 0 4px 20px rgba(138, 43, 226, 0.5);
    border: 3px solid transparent;
    position: relative;
    animation: spontaneousShapeChange 3s infinite; /* 去掉 alternate */
}

@keyframes spontaneousShapeChange {
    0% {
        border-radius: 0%;
        border-color: #9370db;
    }
    25% {
        border-radius: 10%;
        border-color: #8a2be2;
    }
    50% {
        border-radius: 50%;
        border-color: #ff6347;
    }
    75% {
        border-radius: 30%;
        border-color: #32cd32;
    }
    100% {
        border-radius: 0%;
        border-color: #ff4500;
    }
}

.button__link.spontaneous:hover {
    background: linear-gradient(45deg, #8a2be2, #9370db);
    transform: scale(1.3) rotate(20deg);
    box-shadow: 0 8px 40px rgba(138, 43, 226, 0.7);
}

.button__link.spontaneous:active {
    transform: scale(0.8) rotate(-20deg);
    box-shadow: 0 4px 30px rgba(138, 43, 226, 0.6);
}

@media (max-width: 768px) {
    .button__link {
        font-size: 1rem;
        padding: 1rem 2rem;
    }
}

