:root {
      --bg: #fafbfc;
      --card-bg: #ffffff;
      --group-bg: #f8fafc;
      --text-color: #2d3748;
      --text-secondary: #718096;
      --link-color: #4a5568;
      --hover-color: #edf2f7;
      --primary-color: #3182ce;
      --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.04), 0 1px 2px 0 rgba(0, 0, 0, 0.02);
      --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.06), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
      --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
      --border-radius: 8px;
      --icon-size: 28px;
    }

    body {
      margin: 0;
      padding: 24px 24px 60px 24px;
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
      background-color: var(--bg);
      color: var(--text-color);
      line-height: 1.6;
      min-height: 100vh;
      box-sizing: border-box;
    }

    h1 {
      text-align: center;
      margin: 0 0 32px 0;
      font-size: 24px;
      font-weight: 600;
      color: var(--text-color);
    }

    .container {
      max-width: 1600px;
      margin: 0 auto;
      display: flex;
      flex-direction: column;
      gap: 20px;
    }

    .group {
      background-color: var(--group-bg);
      border-radius: var(--border-radius);
      padding: 18px;
      position: relative;
      border: 1px solid rgba(0, 0, 0, 0.03);
    }

    .group-title {
      font-size: 15px;
      font-weight: 600;
      color: var(--text-secondary);
      margin-bottom: 14px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      letter-spacing: 0.5px;
    }

    .group-settings,
    .link-settings {
      cursor: pointer;
      padding: 0 5px;
      font-size: 16px;
      user-select: none;
      opacity: 0;
      transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
      color: var(--text-secondary);
      border-radius: 4px;
    }

    .group-settings:hover,
    .link-settings:hover {
      background-color: rgba(0, 0, 0, 0.04);
      color: var(--text-color);
    }

    .group:hover .group-settings {
      opacity: 1;
      transition: opacity 0.3s ease;
    }

    .link:hover .link-settings {
      opacity: 1;
      transition: opacity 0.3s ease;
      transition-delay: 0.5s;
    }

    .links {
      display: grid;
      grid-template-columns: repeat(auto-fill, 110px);
      gap: 10px;
    }

    .link {
      background-color: var(--card-bg);
      border-radius: var(--border-radius);
      padding: 10px;
      text-decoration: none;
      color: var(--link-color);
      box-shadow: var(--shadow-sm);
      transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
      display: flex;
      flex-direction: column;
      align-items: center;
      font-size: 12px;
      position: relative;
      height: 68px;
      aspect-ratio: 1.3 / 1;
      border: 1px solid rgba(0, 0, 0, 0.03);
      overflow: hidden;
    }

    .link:hover {
      background-color: var(--hover-color);
      transform: translateY(-1px);
      box-shadow: var(--shadow-md);
      border-color: rgba(0, 0, 0, 0.06);
    }

    .link-icon {
      display: block;
      overflow: hidden;
      width: 80%;
      text-align: center;
      align-items: center;
      justify-content: center;
      margin-top: 5px;
      margin-bottom: 13px;
      font-size: 20px;
    }

    .link-icon img,
    .link-icon span {
      width: var(--icon-size);
      height: var(--icon-size);
      font-size: 20px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
    }

    .link-name {
        display: block;
        width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        text-align: center;
        font-weight: 500;
    }

    .link-settings {
      position: absolute;
      top: 6px;
      right: 6px;
      z-index: 10;
    }

    .add-button {
      background-color: var(--card-bg);
      border-radius: var(--border-radius);
      padding: 20px;
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--text-secondary);
      font-size: 14px;
      font-weight: 500;
      cursor: pointer;
      border: 2px dashed rgba(0, 0, 0, 0.1);
      transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
      min-height: 50px;
    }

    .add-button:hover {
      background-color: var(--hover-color);
      color: var(--text-color);
      border-color: rgba(0, 0, 0, 0.15);
      transform: translateY(-1px);
      box-shadow: var(--shadow-sm);
    }

    .footer {
      position: fixed;
      bottom: 0;
      left: 0;
      right: 0;
      background-color: rgba(248, 250, 252, 0.8);
      border-top: 1px solid rgba(0, 0, 0, 0.04);
      padding: 12px 24px;
      z-index: 100;
      backdrop-filter: blur(4px);
    }

    .footer-content {
      max-width: 1600px;
      margin: 0 auto;
      display: flex;
      justify-content: space-between;
      align-items: center;
      flex-wrap: wrap;
      gap: 16px;
    }

    .footer-info {
      display: flex;
      align-items: center;
      gap: 16px;
      font-size: 12px;
      color: var(--text-secondary);
    }

    .footer-info a {
      color: var(--text-secondary);
      text-decoration: none;
      transition: color 0.2s ease;
    }

    .footer-info a:hover {
      color: var(--text-color);
    }

    .footer-controls {
      display: flex;
      gap: 12px;
      align-items: center;
      font-size: 11px;
      color: var(--text-secondary);
    }

    .footer-controls button {
      font-size: 11px;
      background: none;
      border: none;
      color: var(--text-secondary);
      cursor: pointer;
      padding: 0;
      transition: color 0.2s ease;
      text-decoration: underline;
      text-underline-offset: 2px;
    }

    .footer-controls button:hover {
      color: var(--text-secondary);
    }

    .modal {
      position: fixed;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      background-color: white;
      padding: 24px;
      border-radius: 12px;
      box-shadow: var(--shadow-lg);
      z-index: 1000;
      min-width: 320px;
      max-width: 420px;
      width: 90%;
      animation: modalShow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
      border: 1px solid rgba(0, 0, 0, 0.06);
    }

    @keyframes modalShow {
      from {
        opacity: 0;
        transform: translate(-50%, -55%) scale(0.96);
      }
      to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
      }
    }

    .modal h3 {
      margin: 0 0 20px 0;
      color: var(--text-color);
      font-size: 18px;
      font-weight: 600;
    }

    .modal input {
      width: calc(100% - 16px);
      margin: 0 0 12px 0;
      padding: 12px 8px;
      border: 1px solid rgba(0, 0, 0, 0.1);
      border-radius: 6px;
      font-size: 14px;
      transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
      background-color: var(--bg);
    }

    .modal input:focus {
      outline: none;
      border-color: var(--primary-color);
      box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
      background-color: white;
    }

    .modal-buttons {
      display: flex;
      justify-content: space-between;
      margin-top: 20px;
      gap: 12px;
    }

    .modal-buttons button {
      flex: 1;
      padding: 12px 20px;
      border: none;
      border-radius: 6px;
      cursor: pointer;
      font-size: 14px;
      font-weight: 500;
      transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .modal-buttons button:first-child {
      background: var(--primary-color);
      color: white;
    }

    .modal-buttons button:first-child:hover {
      background: #2c5aa0;
      transform: translateY(-1px);
      box-shadow: var(--shadow-sm);
    }

    .modal-buttons button:last-child {
      background: var(--hover-color);
      color: var(--text-color);
      border: 1px solid rgba(0, 0, 0, 0.1);
    }

    .modal-buttons button:last-child:hover {
      background: #e2e8f0;
      transform: translateY(-1px);
    }

    .overlay {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba(0, 0, 0, 0.4);
      backdrop-filter: blur(2px);
      z-index: 999;
      animation: overlayShow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    }

    @keyframes overlayShow {
      from { opacity: 0; }
      to { opacity: 1; }
    }

    .settings-menu {
      position: absolute;
      background: white;
      border: 1px solid rgba(0, 0, 0, 0.06);
      border-radius: 8px;
      box-shadow: var(--shadow-lg);
      font-size: 14px;
      z-index: 2000;
      min-width: 90px;
      overflow: hidden;
      animation: menuShow 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    }

    @keyframes menuShow {
      from {
        opacity: 0;
        transform: translateY(-4px) scale(0.98);
      }
      to {
        opacity: 1;
        transform: translateY(0) scale(1);
      }
    }

    .settings-menu div {
      padding: 10px 15px;
      cursor: pointer;
      white-space: nowrap;
      transition: background-color 0.15s cubic-bezier(0.4, 0, 0.2, 1);
      color: var(--text-color);
    }

    .settings-menu div:hover {
      background: var(--hover-color);
    }

    .settings-menu div.delete-option {
      color: #e53e3e;
    }

    .settings-menu div.delete-option:hover {
      background: #fed7d7;
      color: #c53030;
    }

    /* 响应式设计 */
    @media (max-width: 768px) {
      body {
        padding: 16px 16px 50px 16px;
      }

      .footer {
        padding: 8px 16px;
      }

      .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 8px;
      }

      .footer-controls {
        justify-content: center;
      }

      h1 {
        font-size: 20px;
        margin-bottom: 24px;
      }

      .container {
        gap: 16px;
      }

      .group {
        padding: 16px;
      }

      .links {
        grid-template-columns: repeat(auto-fill, minmax(85px, 1fr));
        gap: 8px;
      }

      .link {
        padding: 6px 4px 4px 4px;
        font-size: 11px;
        height: 58px;
      }

      .modal {
        min-width: 280px;
        padding: 20px;
        margin: 0 16px;
      }

      .add-button {
        padding: 16px;
        font-size: 13px;
      }
    }