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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    overflow: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.container {
    position: relative;
    z-index: 1;
}

.container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
}


#canvas {
    border: 3px solid transparent;
    border-image: linear-gradient(135deg, #667eea, #764ba2, #f093fb, #667eea) 1;
    border-radius: 10px;
    background: radial-gradient(circle at center, #1a1a2e 0%, #0a0a15 100%);
    display: block;
    margin: 0 auto 20px;
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.3),
        0 0 60px rgba(102, 126, 234, 0.2),
        inset 0 0 80px rgba(102, 126, 234, 0.05);
}

.controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

button {
    padding: 12px 30px;
    font-size: 16px;
    font-weight: bold;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

#startBtn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

#resetBtn {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

#saveBtn {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

button:active {
    transform: translateY(0);
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* 添加闪烁动画 */
@keyframes sparkle {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

.container::before,
.container::after {
    content: '✨';
    position: absolute;
    font-size: 24px;
    animation: sparkle 2s ease-in-out infinite;
}

.container::before {
    top: 10px;
    left: 10px;
    animation-delay: 0s;
}

.container::after {
    top: 10px;
    right: 10px;
    animation-delay: 1s;
}

@media (max-width: 850px) {
    #canvas {
        width: 100%;
        height: auto;
    }
}

