      /* 内联CSS样式 */
      * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
      }

      body {
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
        line-height: 1.6;
        color: #333;
        background-color: #f8fafc;
      }

      .nav {
        background-color: #fff;
        border-bottom: 1px solid #e5e7eb;
        padding: 1rem 0;
        position: sticky;
        top: 0;
        z-index: 100;
      }
      table.tbl td, table.tbl th {
    border: 1px solid #e6e6e6;
    padding: 5px 8px;
    word-break: normal;
}

      table.periodic td {
    background-color: #fff !important;
    border: 1px solid #333;
    text-align: center;
}

      table.periodic td.nonmetal {
        background-color: #2f986b !important;
      }

      table.periodic td.metal {
        background-color: #ffd700 !important;
      }

      table.periodic td.blank {
        border: none !important;
        background-color: transparent !important;
      }

      /* 元素周期表容器样式 */
      .periodic-container {
        margin: 2rem 0;
        background: white;
        border-radius: 0.75rem;
        padding: 1.5rem;
        box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
      }

      .periodic-scroll {
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: #cbd5e0 #f7fafc;
        position: relative;
      }

      .periodic-scroll::before {
        content: "";
        position: absolute;
        top: 0;
        right: 0;
        width: 20px;
        height: 100%;
        pointer-events: none;
        z-index: 1;
      }

      .periodic-scroll::after {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 20px;
        height: 100%;
        pointer-events: none;
        z-index: 1;
      }

      .periodic-scroll::-webkit-scrollbar {
        height: 8px;
      }

      .periodic-scroll::-webkit-scrollbar-track {
        background: #f7fafc;
        border-radius: 4px;
      }

      .periodic-scroll::-webkit-scrollbar-thumb {
        background: #cbd5e0;
        border-radius: 4px;
      }

      .periodic-scroll::-webkit-scrollbar-thumb:hover {
        background: #a0aec0;
      }

      table.periodic ruby {
        font-size: 0.65rem;
      }

      table.periodic rt {
        font-size: 0.5rem;
      }

      .nav-container {
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 1rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
      }

      .nav-logo {
        display: flex;
        align-items: center;
        text-decoration: none;
        color: #1f2937;
        font-weight: 600;
        font-size: 1.125rem;
      }

      .nav-logo .icon {
        margin-right: 0.5rem;
      }

      .nav-links {
        /*display: flex;*/
        gap: 2rem;
      }

      .nav-link {
        text-decoration: none;
        color: #6b7280;
        font-weight: 500;
        transition: color 0.2s ease;
      }

      .nav-link:hover,
      .nav-link.active {
        color: #3b82f6;
      }

      .container {
        max-width: 1200px;
        margin: 0 auto;
        padding: 1rem 1rem;
      }

      .header {
        text-align: center;
        margin-bottom: 1rem;
      }

      .title {
        font-size: 2rem;
        font-weight: 700;
        color: #1f2937;
        margin-bottom: 0.5rem;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.75rem;
      }

      .subtitle {
        font-size: 1.125rem;
        color: #6b7280;
        margin-bottom: 0;
      }

      .converter-card,
      .result-card,
      .examples-card {
        background: white;
        border-radius: 0.75rem;
        padding: 2rem;
        margin-bottom: 2rem;
        box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1),
          0 1px 2px 0 rgba(0, 0, 0, 0.06);
      }

      .form-group {
        margin-bottom: 1.5rem;
      }

      .form-label {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        font-weight: 600;
        color: #374151;
        margin-bottom: 0.75rem;
        font-size: 0.875rem;
      }

      .form-input {
        width: 100%;
        padding: 0.75rem 1rem;
        border: 2px solid #e5e7eb;
        border-radius: 0.5rem;
        font-size: 1rem;
        transition: all 0.2s ease;
        background-color: #fff;
      }

      .form-input:focus {
        outline: none;
        border-color: #3b82f6;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
      }

      .number-input {
        font-family: "Monaco", "Menlo", "Ubuntu Mono", monospace;
        font-size: 1.125rem;
      }

      .option-group {
        display: flex;
        gap: 1.5rem;
      }

      .option-item {
        display: flex;
        align-items: center;
        gap: 0.5rem;
      }

      .option-item input[type="radio"] {
        width: 1rem;
        height: 1rem;
      }

      .btn-group {
        display: flex;
        gap: 1rem;
        justify-content: center;
      }

      .btn {
        background-color: #3b82f6;
        color: white;
        border: none;
        padding: 0.75rem 2rem;
        border-radius: 0.5rem;
        font-size: 1rem;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.2s ease;
      }

      .btn:hover {
        background-color: #2563eb;
        transform: translateY(-1px);
      }

      .btn-secondary {
        background-color: #6b7280;
      }

      .btn-secondary:hover {
        background-color: #4b5563;
      }
      table.periodic td.metal {
    background-color: #ceffcd !important;
}

      .result-display {
        background-color: #f9fafb;
        border: 2px solid #e5e7eb;
        border-radius: 0.5rem;
        padding: 1.5rem;
        font-size: 1.125rem;
        font-weight: 500;
        color: #374151;
        min-height: 3rem;
        display: flex;
        align-items: center;
        word-break: break-all;
      }

      .result-display.has-result {
        background-color: #f0f9ff;
        border-color: #3b82f6;
        color: #1e40af;
      }

      .examples-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1rem;
      }

      .example-item {
        background-color: #f9fafb;
        border: 1px solid #e5e7eb;
        border-radius: 0.375rem;
        padding: 1rem;
        cursor: pointer;
        transition: all 0.2s ease;
      }

      .example-item:hover {
        border-color: #3b82f6;
        background-color: #f0f9ff;
      }

      .example-number {
        font-family: "Monaco", "Menlo", "Ubuntu Mono", monospace;
        font-weight: 600;
        color: #1e40af;
        margin-bottom: 0.5rem;
        font-size: 1rem;
      }

      .example-chinese {
        color: #059669;
        font-weight: 500;
        font-size: 0.875rem;
      }

      .message {
        padding: 0.75rem;
        border-radius: 0.375rem;
        margin: 1rem 0;
        font-size: 0.875rem;
      }

      .message.error {
        background-color: #fef2f2;
        color: #991b1b;
        border: 1px solid #fecaca;
      }

      .message.success {
        background-color: #f0fdf4;
        color: #166534;
        border: 1px solid #bbf7d0;
      }

      .copy-btn {
        background-color: #059669;
        font-size: 0.75rem;
        padding: 0.5rem 1rem;
        margin-left: 0.5rem;
      }

      .copy-btn:hover {
        background-color: #047857;
      }

      .footer {
        background-color: #fff;
        border-top: 1px solid #e5e7eb;
        padding: 2rem 0;
        margin-top: 4rem;
      }

      .footer-container {
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 1rem;
        text-align: center;
        color: #6b7280;
      }
      table.periodic td {
        font-size: 13px;
      }

      @media (max-width: 768px) {
        .nav-links {
          display: none;
        }

        .title {
          font-size: 2rem;
        }

        .btn-group {
          flex-direction: column;
          align-items: center;
        }

        .examples-grid {
          grid-template-columns: 1fr;
        }

        .option-group {
          flex-direction: column;
          gap: 1rem;
        }

        /* 移动设备上的元素周期表样式 */
        .periodic-container {
          margin: 1rem -1rem;
          padding: 1rem;
          border-radius: 0;
        }

        .periodic-scroll {
          margin: 0 -1rem;
          padding: 0 1rem;
        }

        table.periodic {
          min-width: 900px;
          font-size: 0.6rem;
        }

        table.periodic td {
          padding: 1px;
          font-size: 12px;
          line-height: 1;
        }

        table.periodic ruby {
          font-size: 0.5rem;
        }

        table.periodic rt {
          font-size: 0.4rem;
        }

        /* 滚动提示 */
        .periodic-container::after {
          content: "← 左右滑动查看完整周期表 →";
          display: block;
          text-align: center;
          color: #6b7280;
          font-size: 0.75rem;
          margin-top: 0.5rem;
          font-style: italic;
        }
      }

      @media (max-width: 480px) {
        .container {
          padding: 1rem 0.5rem;
        }

        .title {
          font-size: 1.5rem;
        }

        .periodic-container {
          margin: 1rem -0.5rem;
          padding: 0.75rem;
        }

        .periodic-scroll {
          margin: 0 -0.75rem;
          padding: 0 0.75rem;
        }

        table.periodic {
          min-width: 800px;
          font-size: 0.55rem;
        }

        table.periodic ruby {
          font-size: 0.45rem;
        }

        table.periodic rt {
          font-size: 0.35rem;
        }
        table.periodic td {
          padding: 1px;
          font-size: 12px;
          line-height: 1;
        }
      }