* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    overflow: hidden;
    height: 100vh;
}

.container {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.basketball-court {
    position: relative;
    width: 800px;
    height: 600px;
    background: linear-gradient(45deg, #FF6B6B, #4ECDC4);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    overflow: hidden;
}

.court-lines {
    position: absolute;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(90deg, transparent 48%, #fff 49%, #fff 51%, transparent 52%),
        linear-gradient(0deg, transparent 48%, #fff 49%, #fff 51%, transparent 52%);
    opacity: 0.3;
}

.character {
    position: absolute;
    left: 100px;
    bottom: 50px;
    width: 120px;
    height: 180px;
    z-index: 10;
    transition: all 0.3s ease;
}

.doraemon-svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 5px 10px rgba(0,0,0,0.3));
    transition: transform 0.1s ease;
}

/* 哆啦A梦眼睛动画 */
.doraemon-svg #leftEye,
.doraemon-svg #rightEye {
    transition: all 0.1s ease;
}

.doraemon-svg #leftEyeHighlight,
.doraemon-svg #rightEyeHighlight {
    transition: all 0.1s ease;
}

/* 投篮动画 */
.character.shooting {
    animation: shooting 1s ease-in-out;
}

@keyframes shooting {
    0% { transform: translateY(0) rotate(0deg); }
    30% { transform: translateY(-20px) rotate(-10deg); }
    60% { transform: translateY(-10px) rotate(5deg); }
    100% { transform: translateY(0) rotate(0deg); }
}

/* 哆啦A梦特殊动画 */
.character:hover .doraemon-svg {
    transform: scale(1.05);
}

/* 眼睛眨眼动画 */
@keyframes blink {
    0%, 90%, 100% { transform: scaleY(1); }
    95% { transform: scaleY(0.1); }
}

.doraemon-svg #leftEyeOuter,
.doraemon-svg #rightEyeOuter {
    animation: blink 3s infinite;
}

.basketball {
    position: absolute;
    left: 200px;
    bottom: 100px;
    width: 60px;
    height: 60px;
    z-index: 5;
    transition: all 0.5s ease;
}

.basketball svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 3px 6px rgba(0,0,0,0.3));
}

/* 篮球弹跳动画 */
.basketball.bouncing {
    animation: bounce 0.6s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* 投篮轨迹动画 */
.basketball.shooting {
    animation: shoot 1.5s ease-in-out forwards;
}

@keyframes shoot {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }
    30% {
        transform: translate(100px, -150px) rotate(180deg);
    }
    60% {
        transform: translate(200px, -200px) rotate(360deg);
    }
    100% {
        transform: translate(300px, -100px) rotate(540deg);
    }
}

.basket {
    position: absolute;
    right: 50px;
    top: 100px;
    width: 120px;
    height: 80px;
    z-index: 3;
}

.basket svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 5px 10px rgba(0,0,0,0.3));
}

.score-display {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(255,255,255,0.9);
    padding: 15px 25px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    z-index: 20;
}

.score-display h2 {
    color: #333;
    font-size: 24px;
    font-weight: bold;
}

.controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    z-index: 20;
}

.shoot-button, .reset-button {
    padding: 12px 25px;
    font-size: 16px;
    font-weight: bold;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.shoot-button {
    background: linear-gradient(45deg, #FF6B6B, #FF8E53);
    color: white;
}

.shoot-button:hover {
    background: linear-gradient(45deg, #FF5252, #FF7043);
    transform: translateY(-2px);
    box-shadow: 0 7px 20px rgba(0,0,0,0.3);
}

.shoot-button:active {
    transform: translateY(0);
}

.reset-button {
    background: linear-gradient(45deg, #4ECDC4, #44A08D);
    color: white;
}

.reset-button:hover {
    background: linear-gradient(45deg, #26A69A, #00695C);
    transform: translateY(-2px);
    box-shadow: 0 7px 20px rgba(0,0,0,0.3);
}

.effects {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 15;
}

.sparkle {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #FFD700;
    border-radius: 50%;
    opacity: 0;
    animation: sparkle 1s ease-in-out;
}

@keyframes sparkle {
    0% {
        opacity: 0;
        transform: scale(0) rotate(0deg);
    }
    50% {
        opacity: 1;
        transform: scale(1) rotate(180deg);
    }
    100% {
        opacity: 0;
        transform: scale(0) rotate(360deg);
    }
}

/* 成功投篮特效 */
.basketball.success {
    animation: success 0.5s ease-in-out;
}

@keyframes success {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .basketball-court {
        width: 90vw;
        height: 70vh;
    }
    
    .character {
        width: 80px;
        height: 120px;
        left: 50px;
    }
    
    .basketball {
        width: 40px;
        height: 40px;
        left: 120px;
    }
    
    .basket {
        width: 80px;
        height: 60px;
        right: 30px;
    }
    
    .score-display h2 {
        font-size: 18px;
    }
    
    .shoot-button, .reset-button {
        padding: 10px 20px;
        font-size: 14px;
    }
}
