/* 禁止系统默认的 touch 行为 */
body {
    touch-action: none;
    overscroll-behavior: none;
    -webkit-user-select: none;
    user-select: none;
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

/* 自定义动画 */
@keyframes popIn {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.tile-pop {
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.tile-wrong {
    background-color: #fee2e2 !important;
    /* red-100 */
    color: #ef4444 !important;
    /* red-500 */
    transition: all 0.2s;
}

/* 消除动画：变为花朵并消失 */
@keyframes bloomFade {
    0% {
        transform: scale(0.5);
        opacity: 1;
    }

    50% {
        transform: scale(1.3);
        opacity: 0.8;
    }

    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

.tile-blooming {
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    font-size: 2rem;
    /* 更大的 emoji */
    animation: bloomFade 0.8s ease-out forwards;
    pointer-events: none;
    z-index: 50;
}

/* 消除动画 (旧的保留作为 fallback 或 unused) */
.tile-cleared {
    transform: scale(0);
    opacity: 0;
    transition: all 0.5s ease-out;
}

/* 选中连线效果 - 可选 */
.connector {
    position: absolute;
    height: 4px;
    background-color: #15803d;
    /* green-700 */
    transform-origin: left center;
    z-index: 10;
    border-radius: 2px;
    pointer-events: none;
}

/* 田园风背景纹理模拟 */
.bg-pattern {
    background-color: #86efac;
    background-image: radial-gradient(#4ade80 2px, transparent 2px);
    background-size: 20px 20px;
}

/* 弹窗卡片风格 */
.popup-card {
    background-color: #fffbeb;
    /* amber-50 */
    background-image: radial-gradient(#fcd34d 1px, transparent 1px);
    background-size: 10px 10px;
    border: 8px solid #bbf7d0;
    /* green-200 */
    box-shadow:
        0 0 0 4px #fff,
        /* 内白边 */
        0 10px 25px -5px rgba(0, 0, 0, 0.2),
        0 8px 10px -6px rgba(0, 0, 0, 0.2);
    position: relative;
}

/* 缝纫线效果 */
.popup-card::before {
    content: '';
    position: absolute;
    inset: 6px;
    border: 2px dashed #86efac;
    /* green-300 */
    border-radius: 1rem;
    pointer-events: none;
}

/* 3D 按钮风格 */
.btn-3d-green {
    background: linear-gradient(to bottom, #4ade80, #22c55e);
    border-bottom: 4px solid #15803d;
    /* green-700 */
    color: white;
    transition: all 0.1s;
}

.btn-3d-green:active {
    transform: translateY(2px);
    border-bottom: 2px solid #15803d;
}

.btn-3d-orange {
    background: linear-gradient(to bottom, #fb923c, #ea580c);
    border-bottom: 4px solid #c2410c;
    /* orange-700 */
    color: white;
    transition: all 0.1s;
}

.btn-3d-orange:active {
    transform: translateY(2px);
    border-bottom: 2px solid #c2410c;
}

.btn-3d-white {
    background: white;
    border-bottom: 4px solid #cbd5e1;
    /* slate-300 */
    color: #64748b;
    transition: all 0.1s;
}

.btn-3d-white:active {
    transform: translateY(2px);
    border-bottom: 2px solid #cbd5e1;
}

/* 呼吸效果 */
@keyframes breathe {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.02);
    }
}

.animate-breathe {
    animation: breathe 2s infinite ease-in-out;
}
