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

body {
  font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif;
  overflow: hidden;
  height: 100vh;
  width: 100vw;
  background: linear-gradient(135deg, #0a0e27 0%, #1a1f3a 50%, #0d1228 100%);
  color: #fff;
  position: relative;
}

/* 赛博朋克背景网格 */
body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(rgba(0, 243, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 243, 255, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
  z-index: 0;
}

/* 霓虹光晕效果 */
body::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(0, 243, 255, 0.08) 0%, transparent 50%),
              radial-gradient(circle at 70% 50%, rgba(255, 0, 128, 0.06) 0%, transparent 50%);
  animation: neonPulse 8s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes neonPulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.1); }
}

.container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 20px;
  gap: 15px;
  position: relative;
  z-index: 1;
}

h1 {
  font-size: 28px;
  font-weight: 600;
  text-align: center;
  margin: 0;
  padding: 10px 0;
  background: linear-gradient(135deg, #00f3ff 0%, #ff0080 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 30px rgba(0, 243, 255, 0.3);
  letter-spacing: 2px;
  flex-shrink: 0;
}

.canvas-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 20px;
  padding: 20px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(0, 243, 255, 0.2);
  box-shadow: 
    0 0 40px rgba(0, 243, 255, 0.1),
    inset 0 0 60px rgba(0, 243, 255, 0.05);
  min-height: 0;
}

/* Canvas 容器发光边框动画 */
.canvas-wrap::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, #00f3ff, #ff0080, #00f3ff, #ff0080);
  background-size: 400% 400%;
  border-radius: 22px;
  z-index: -1;
  opacity: 0.3;
  animation: borderGlow 6s ease infinite;
}

@keyframes borderGlow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

#svgaCanvas {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  display: block;
  object-fit: contain;
}

.panel {
  background: rgba(10, 14, 39, 0.8);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 20px;
  border: 1px solid rgba(0, 243, 255, 0.15);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
}

.btn {
  border: none;
  border-radius: 12px;
  padding: 12px 28px;
  font-size: 15px;
  font-weight: 500;
  margin: 6px;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, #00f3ff 0%, #0099ff 100%);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 
    0 4px 15px rgba(0, 243, 255, 0.3),
    0 0 0 0 rgba(0, 243, 255, 0);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 6px 20px rgba(0, 243, 255, 0.4),
    0 0 0 4px rgba(0, 243, 255, 0.1);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn:disabled:hover {
  transform: none;
  box-shadow: none;
}

.btn:disabled::before {
  display: none;
}

#status {
  margin-top: 12px;
  color: #8b9dc3;
  word-break: break-all;
  font-size: 14px;
  line-height: 1.6;
  padding: 10px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  border-left: 3px solid #00f3ff;
}

.info {
  background: rgba(10, 14, 39, 0.6);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 15px;
  font-size: 13px;
  color: #6b7fa3;
  line-height: 1.8;
  border: 1px solid rgba(0, 243, 255, 0.1);
  flex-shrink: 0;
}

.info code {
  background: rgba(0, 243, 255, 0.15);
  padding: 2px 8px;
  border-radius: 4px;
  font-family: 'Consolas', 'Monaco', monospace;
  color: #00f3ff;
  border: 1px solid rgba(0, 243, 255, 0.3);
}
