* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #a1c4fd 0%, #c2e9fb 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    touch-action: manipulation;
}

.container {
    text-align: center;
    max-width: 500px;
    width: 100%;
}

h1 {
    font-size: 2.5em;
    color: #ff8a80;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.subtitle {
    color: #666;
    margin-bottom: 30px;
    font-size: 1.1em;
}

.pig-container {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto 40px;
    cursor: pointer;
    user-select: none;
}

.pig {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 0 auto;
    transition: transform 0.3s ease;
}

/* 耳朵 */
.ear {
    position: absolute;
    width: 35px;
    height: 25px;
    background: #ffb6c1;
    border-radius: 50%;
    top: -10px;
}

.ear.left {
    left: 25px;
    transform: rotate(-10deg);
}

.ear.right {
    right: 25px;
    transform: rotate(10deg);
}

/* 脸 */
.face {
    position: absolute;
    width: 120px;
    height: 100px;
    background: #ffb6c1;
    border-radius: 50%;
    top: 20px;
    left: 15px;
}

/* 眼睛 */
.eye {
    position: absolute;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    top: 35px;
}

.eye::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background: #333;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.eye.left {
    left: 30px;
}

.eye.right {
    right: 30px;
}

/* 鼻子 */
.nose {
    position: absolute;
    width: 40px;
    height: 25px;
    background: #ff8a80;
    border-radius: 50%;
    top: 55px;
    left: 50%;
    transform: translateX(-50%);
}

.nose::before, .nose::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background: #ff5252;
    border-radius: 50%;
    top: 8px;
}

.nose::before {
    left: 8px;
}

.nose::after {
    right: 8px;
}

/* 嘴巴 */
.mouth {
    position: absolute;
    width: 25px;
    height: 10px;
    border-bottom: 3px solid #ff8a80;
    border-radius: 0 0 50% 50%;
    top: 75px;
    left: 50%;
    transform: translateX(-50%);
}

/* 身体 */
.body {
    position: absolute;
    width: 140px;
    height: 90px;
    background: #ffb6c1;
    border-radius: 50% 50% 40% 40%;
    top: 80px;
    left: 5px;
}

/* 尾巴 */
.tail {
    position: absolute;
    width: 30px;
    height: 10px;
    background: #ffb6c1;
    border-radius: 50%;
    top: 100px;
    right: -5px;
    transform: rotate(45deg);
}

.tail::after {
    content: '';
    position: absolute;
    width: 15px;
    height: 5px;
    background: #ff8a80;
    border-radius: 50%;
    right: -5px;
    top: 2px;
}

/* 腿 */
.leg {
    position: absolute;
    width: 20px;
    height: 30px;
    background: #ffb6c1;
    border-radius: 10px;
    bottom: 0;
}

.leg.front.left {
    left: 40px;
}

.leg.front.right {
    right: 40px;
}

.leg.back.left {
    left: 30px;
    height: 25px;
}

.leg.back.right {
    right: 30px;
    height: 25px;
}

/* 动画类 */
.jump {
    animation: jump 0.5s ease;
}

.shake {
    animation: shake 0.5s ease;
}

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

@keyframes shake {
    0%, 100% { transform: rotate(0); }
    25% { transform: rotate(-15deg); }
    75% { transform: rotate(15deg); }
}

/* 控制按钮 */
.controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

button {
    padding: 12px 24px;
    background: linear-gradient(135deg, #ffb6c1, #ff8a80);
    border: none;
    border-radius: 25px;
    color: white;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 100px;
    touch-action: manipulation;
}

button:active {
    transform: scale(0.95);
}

.hint {
    color: #888;
    font-size: 0.9em;
    margin-top: 20px;
}

/* 移动端优化 */
@media (max-width: 480px) {
    h1 { font-size: 2em; }
    .pig-container { width: 180px; height: 180px; }
    .pig { width: 130px; height: 130px; }
    button { padding: 10px 20px; min-width: 90px; }
}