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

body {
    font-family: Arial, Helvetica, sans-serif;
    min-height: 100vh;
    background-color: #000000;
    background-image: url('magic_bg.png');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center center;
    overflow-x: hidden;
    cursor: pointer;
}

p {
    text-align: center;
    margin-top: 20px;
    padding: 0;
}

.button_container {
    display: flex;
    justify-content: space-around;
    margin: 0 auto;
}

button.b {
    width: 160px;
    height: 60px;
    background-image: url('btn_bg.png');
    background-size: cover;
    color: white;
    box-shadow: 0.5px 0.5px 5px rgba(100, 15, 180, 0.6);
    cursor: pointer;
}

button.b:hover {
    color: #bfa0dd;
    text-decoration: underline;
}

canvas {
    height: 500px;
    width: 900px;
    display: block;
    margin: 0 auto;
}

/* --- 点击波纹效果样式 --- */
.ripple {
    position: fixed;
    border-radius: 50%;
    /* 关键改动：初始状态是一个小的、半透明的紫色圆点 */
    width: 10px;
    height: 10px;
    background-color: rgba(174, 92, 251, 0.5); /* 半透明紫色 */
    transform: translate(-50%, -50%); /* 保持居中定位 */
    animation: ripple 0.8s ease-out;
    pointer-events: none;
}
/* 波纹扩散动画 */
@keyframes ripple {
    to {
        /* 关键改动：动画结束时，尺寸变大，透明度变为0 */
        width: 200px;   /* 扩散到200px宽 */
        height: 200px;  /* 扩散到200px高 */
        opacity: 0;
    }
}

.magic-particle {
    position: fixed;
    width: 10px;
    height: 10px;
    background-color: rgba(195, 186, 250, 0.9);
    border-radius: 50%;
    box-shadow: 0 0 15px 5px rgba(109, 15, 198, 0.6);
    top: -20px;
    pointer-events: none;
    animation: fall linear infinite;
}

@keyframes fall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}