* {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
      font-family: Microsoft YaHei, sans-serif;
    }

    body {
      background: var(--bg);
      padding: 20px;
    }

    .container {
      max-width: 800px;
      margin: 0 auto;
      background: var(--bg);
      border-radius: 12px;
      box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
      padding: 20px;
    }

    h1 {
      text-align: center;
      margin-bottom: 20px;
      color: var(--text);
      font-size: 24px;
    }

    .tab {
      display: flex;
      gap: 8px;
      margin-bottom: 16px;
      flex-wrap: wrap;
      justify-content: center;
    }

    .tab button {
      padding: 8px 14px;
      border: none;
      border-radius: 6px;
      background: var(--bg);
      color: var(--text);
      cursor: pointer;
      font-size: 14px;
    }

    .tab button.active {
      background: var(--btn-bg);
      color: var(--text);
    }

    .panel {
      display: none;
      margin-bottom: 20px;
    }

    .panel.active {
      display: block;
    }

    .line {
      display: flex;
      gap: 10px;
      align-items: center;
      margin-bottom: 14px;
      flex-wrap: wrap;
      justify-content: center;
    }

    .line select,
    .line input,
    .line button {
      padding: 8px 12px;
      border: 1px solid #ddd;
      border-radius: 6px;
      font-size: 14px;
    }

    .line button {
      background: var(--btn-bg);
      color: var(--text);
      border: none;
      cursor: pointer;
    }

    .line button.secondary {
      background: #6c757d;
    }

    .line button.danger {
      background: #dc3545;
    }

    .line button:disabled {
      background: #ccc;
      cursor: not-allowed;
    }

    .result-box {
      padding: 20px;
      background: var(--bg);
      border-radius: 10px;
      text-align: center;
      margin: 16px 0;
      min-height: 80px;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-direction: column;
      gap: 8px;
    }

    .big-name {
      font-size: 36px;
      font-weight: bold;
      color: #222;
      animation: fadeIn 0.5s, pulse 0.8s infinite alternate;
    }

    .small-tag {
      font-size: 16px;
      color: #666;
      margin-top: 6px
    }

    .name-list {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      margin-top: 8px;
      justify-content: center
    }

    .name-item {
      background: var(--bg);
      padding: 4px 10px;
      border-radius: 16px;
      font-size: 13px;
      animation: pop 0.5s;
    }

    .rolling-name {
      font-size: 36px;
      font-weight: bold;
      color: var(--text);
      animation: roll 0.1s infinite;
    }

    .history {
      margin-top: 20px
    }

    .history h3 {
      margin-bottom: 10px;
      font-size: 15px
    }

    .history .item {
      padding: 6px 10px;
      background: var(--bg);
      border-radius: 4px;
      margin-bottom: 4px;
      font-size: 13px;
      color: #333
    }

    /* 核心动画保留 */
    @keyframes fadeIn {
      from {
        opacity: 0;
        transform: scale(0.9)
      }

      to {
        opacity: 1;
        transform: scale(1)
      }
    }

    @keyframes roll {
      0% {
        transform: translateY(-8px);
        opacity: 0.8
      }

      50% {
        transform: translateY(0);
        opacity: 1
      }

      100% {
        transform: translateY(8px);
        opacity: 0.8
      }
    }

    @keyframes pulse {
      from {
        transform: scale(1);
        text-shadow: 0 0 4px rgba(64, 158, 255, 0.3)
      }

      to {
        transform: scale(1.03);
        text-shadow: 0 0 10px rgba(64, 158, 255, 0.6)
      }
    }

    @keyframes pop {
      from {
        transform: scale(0.8);
        opacity: 0
      }

      to {
        transform: scale(1);
        opacity: 1
      }
    }

    @keyframes bgFlash {
      0% {
        background: #f8f9fa
      }

      50% {
        background: #e3f2ff
      }

      100% {
        background: #f8f9fa
      }
    }

    .flash-bg {
      animation: bgFlash 0.5s 3;
    }