:root {
  --bg-gradient-1: rgba(180, 215, 255, 0.801);
  --bg-gradient-2: rgba(240, 208, 255, 0.945);
  --bg-gradient-3: rgba(255, 185, 226, 0.986);
  --bg-solid-1: #d4e0ff;
  --bg-solid-2: #ffd9e5;
  --bg-solid-3: #f3d4ff;
  --glass-bg: rgba(255, 255, 255, 0.38);
  --glass-bg-hover: rgba(255, 255, 255, 0.6);
  --glass-border: rgba(255, 255, 255, 0.7);
  --glass-border-hover: rgba(255, 255, 255, 0.95);
  --blur-amount: 24px;
  --card-radius: 20px;
  --text-primary: #1a1a2e;
  --text-secondary: rgba(60, 60, 80, 0.7);
  --text-muted: rgba(40, 40, 60, 0.75);
  --text-hover: #000;
  --glow-color-1: #b2c6ff;
  --glow-color-2: #f9cbff;
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.04);
  --shadow-card-hover: 0 12px 48px rgba(0, 0, 0, 0.08);
  --shadow-btn-main: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-btn-main-hover: 0 8px 28px rgba(0, 0, 0, 0.25);
  --space-xs: 8px;
  --space-sm: 14px;
  --space-md: 24px;
  --space-lg: 40px;
  --space-xl: 80px;
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 30%, var(--bg-gradient-1) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, var(--bg-gradient-2) 0%, transparent 50%),
    radial-gradient(circle at 50% 100%, var(--bg-gradient-3) 0%, transparent 40%),
    linear-gradient(135deg, var(--bg-solid-1) 0%, var(--bg-solid-2) 50%, var(--bg-solid-3) 100%);
  background-attachment: fixed;
  background-size: 200% 200%;
  animation: gradientFlow 5s ease-in-out infinite alternate;
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-y: auto;
}

::-webkit-scrollbar {
  display: none;
}

body::before,
body::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.3;
  z-index: -1;
  pointer-events: none;
  animation: floatOrb 20s ease-in-out infinite alternate;
}

body::before {
  width: 500px;
  height: 500px;
  background: var(--glow-color-1);
  top: -10%;
  left: -10%;
}

body::after {
  width: 600px;
  height: 600px;
  background: var(--glow-color-2);
  bottom: -10%;
  right: -10%;
  animation-duration: 25s;
  animation-delay: -5s;
}

@keyframes gradientFlow {
  0% { background-position: 0% 0%; }
  100% { background-position: 100% 100%; }
}

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(80px, 60px) scale(1.2); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

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

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes floatIcon {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

@keyframes underlineShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

header {
  padding: var(--space-xl) var(--space-md) var(--space-lg);
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
  animation: fadeUp 0.8s var(--ease-smooth) forwards;
}

header h1 {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.8px;
  margin-bottom: 12px;
  display: inline-block;
  position: relative;
  color: #1a1a2e;
  background: linear-gradient(135deg, #1a1a2e 0%, #4a4a8a 40%, #2d1b4e 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% 200%;
  animation: gradientFlow 6s ease-in-out infinite alternate, slideDown 0.6s var(--ease-smooth) 0.1s both;
}

header h1::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--glow-color-1), var(--glow-color-2), var(--glow-color-1));
  background-size: 200% 100%;
  border-radius: 4px;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.6s var(--ease-smooth);
  animation: underlineShimmer 3s linear infinite;
}

@media (hover: hover) {
  header h1:hover::after {
    transform: scaleX(1);
  }
}

header p {
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 450;
  letter-spacing: 0.3px;
  animation: fadeIn 0.6s ease 0.3s both;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 var(--space-md) var(--space-xl);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

@media (max-width: 800px) {
  .container {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

.plugin {
  --card-padding: 28px;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--blur-amount));
  -webkit-backdrop-filter: blur(var(--blur-amount));
  border-radius: var(--card-radius);
  padding: var(--card-padding);
  border: 1px solid var(--glass-border);
  box-shadow:
    var(--shadow-card),
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -1px 0 rgba(255, 255, 255, 0.2);
  transition: transform 0.4s var(--ease-smooth), box-shadow 0.4s var(--ease-smooth),
              background 0.4s var(--ease-smooth), border-color 0.4s var(--ease-smooth);
  opacity: 0;
  animation: fadeUp 0.7s var(--ease-smooth) forwards;
  position: relative;
  overflow: hidden;
  will-change: transform, opacity;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.plugin:nth-child(1)  { animation-delay: 0.1s; }
.plugin:nth-child(2)  { animation-delay: 0.2s; }
.plugin:nth-child(3)  { animation-delay: 0.3s; }
.plugin:nth-child(4)  { animation-delay: 0.4s; }
.plugin:nth-child(5)  { animation-delay: 0.5s; }
.plugin:nth-child(6)  { animation-delay: 0.6s; }
.plugin:nth-child(7)  { animation-delay: 0.7s; }
.plugin:nth-child(8)  { animation-delay: 0.8s; }
.plugin:nth-child(9)  { animation-delay: 0.9s; }
.plugin:nth-child(10) { animation-delay: 1.0s; }

.plugin:nth-child(n+11) {
  animation-delay: 1.1s;
}

.plugin::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: radial-gradient(circle, rgba(178, 198, 255, 0.3) 0%, rgba(249, 203, 255, 0.2) 40%, transparent 70%);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.8s var(--ease-smooth), height 0.8s var(--ease-smooth), opacity 0.6s ease;
  opacity: 0;
  pointer-events: none;
  z-index: 1;
}

.plugin::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
  opacity: 0;
  transition: opacity 0.5s ease 0.1s;
  z-index: 3;
  pointer-events: none;
}

@media (hover: hover) {
  .plugin:hover {
    background: var(--glass-bg-hover);
    border-color: var(--glass-border-hover);
    box-shadow:
      var(--shadow-card-hover),
      inset 0 1px 0 rgba(255, 255, 255, 1),
      0 0 0 1px rgba(255, 255, 255, 0.5);
    transform: translateY(-4px) scale(1.003);
  }

  .plugin:hover::before {
    width: 400%;
    height: 400%;
    opacity: 1;
  }

  .plugin:hover::after {
    opacity: 1;
  }

  .plugin-header {
    transition: transform 0.4s var(--ease-smooth) 0.05s;
  }
  .plugin:hover .plugin-header {
    transform: translateX(4px);
  }

  .plugin-desc {
    transition: color 0.4s var(--ease-smooth) 0.08s, transform 0.4s var(--ease-smooth) 0.08s;
  }
  .plugin:hover .plugin-desc {
    color: rgba(20, 20, 40, 0.85);
    transform: translateX(2px);
  }

  .plugin-tags {
    transition: transform 0.4s var(--ease-smooth) 0.12s;
  }
  .plugin:hover .plugin-tags {
    transform: translateX(2px);
  }

  .plugin-actions {
    transition: transform 0.4s var(--ease-smooth) 0.16s;
  }
  .plugin:hover .plugin-actions {
    transform: translateX(2px);
  }

  .plugin-icon {
    transition: transform 0.4s var(--ease-smooth), background 0.4s var(--ease-smooth), box-shadow 0.4s var(--ease-smooth);
  }
  .plugin:hover .plugin-icon {
    animation-play-state: paused;
    transform: scale(1.12) rotate(-6deg) translateY(-4px);
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  }

  .plugin-name {
    transition: color 0.3s ease 0.1s;
  }
  .plugin:hover .plugin-name {
    color: var(--text-hover);
  }

  .plugin-ver {
    transition: color 0.3s ease 0.12s;
  }
  .plugin:hover .plugin-ver {
    color: rgba(0, 0, 0, 0.6);
  }

  .tag {
    transition: transform 0.3s var(--ease-spring), background 0.3s var(--ease-spring),
                box-shadow 0.3s var(--ease-spring), border-color 0.3s var(--ease-spring),
                color 0.3s var(--ease-spring);
  }
  .tag:hover {
    background: rgba(255, 255, 255, 0.85);
    color: var(--text-primary);
    transform: translateY(-1px) scale(1.03);
    box-shadow: 0 5px 16px rgba(0, 0, 0, 0.08);
    border-color: rgba(255, 255, 255, 0.9);
  }

  .btn-main:hover {
    background: #1a1a2e;
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: var(--shadow-btn-main-hover), 0 0 0 1px rgba(255, 255, 255, 0.1);
    transform: translateY(-2px) scale(1.02);
    color: #fff;
  }

  .btn-sub:hover {
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    transform: translateY(-2px);
    color: #000;
  }
}

.plugin-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
  position: relative;
  z-index: 2;
}

.plugin-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
  animation: floatIcon 3.2s ease-in-out infinite;
}

.plugin-name {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.plugin-ver {
  font-size: 12px;
  color: rgba(0, 0, 0, 0.35);
  margin-top: 2px;
  font-weight: 450;
  letter-spacing: 0.2px;
}

.plugin-desc {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 16px;
  position: relative;
  z-index: 2;
  flex: 1;
}

.plugin-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  position: relative;
  z-index: 2;
}

.tag {
  font-size: 12px;
  padding: 4px 14px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: rgba(40, 40, 60, 0.7);
  font-weight: 500;
  cursor: default;
}

.plugin-actions {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  position: relative;
  z-index: 2;
  margin-top: auto;
  justify-content: flex-end;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: 8px 20px;
  border-radius: 40px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: transform 0.3s var(--ease-smooth), background 0.3s var(--ease-smooth),
              border-color 0.3s var(--ease-smooth), box-shadow 0.3s var(--ease-smooth),
              color 0.3s var(--ease-smooth);
  border: 1px solid transparent;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  letter-spacing: 0.2px;
  user-select: none;
}

.btn:focus-visible {
  outline: 2px solid rgba(30, 30, 50, 0.7);
  outline-offset: 2px;
}

.btn-main {
  background: rgba(20, 20, 35, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: var(--shadow-btn-main);
}

.btn-main::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 40px;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.3), transparent 50%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.btn-main:active {
  transform: translateY(1px) scale(0.96);
  transition-duration: 0.08s;
}

.btn-sub {
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.btn-sub:active {
  transform: translateY(1px) scale(0.96);
  transition-duration: 0.08s;
}

.plugin:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

footer {
  text-align: center;
  padding: var(--space-lg) var(--space-md);
  color: rgba(60, 60, 80, 0.5);
  font-size: 13px;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  opacity: 0;
  animation: fadeIn 0.6s ease 0.8s forwards;
  backdrop-filter: blur(4px);
  letter-spacing: 0.5px;
  transition: color 0.4s ease;
  margin-top: 10px;
}

@media (max-width: 820px) {
  .container {
    gap: 18px;
    padding: 0 20px var(--space-xl);
  }
  .plugin {
    --card-padding: 24px;
  }
}

@media (max-width: 640px) {
  header {
    padding: 60px 20px 32px;
  }

  header h1 {
    font-size: 26px;
    letter-spacing: -0.4px;
  }

  .container {
    grid-template-columns: 1fr;
    padding: 0 16px 60px;
    gap: 16px;
  }

  .plugin {
    --card-padding: 20px;
    border-radius: 16px;
    margin-bottom: 0;
  }

  .plugin::before {
    display: none;
  }

  .plugin-actions {
    flex-direction: column;
    align-items: stretch;
    justify-content: stretch;
  }

  .btn {
    width: 100%;
    justify-content: center;
    padding: 12px 20px;
    min-height: 48px;
  }

  body::before,
  body::after {
    width: 300px;
    height: 300px;
    filter: blur(80px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    background-attachment: scroll !important;
  }
}

.btn {
  overflow: visible;
}

.click-ripple {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%) scale(0);
  animation: rippleExpand 0.9s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

.click-ripple::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 12px 3px rgba(200, 180, 255, 0.8), 0 0 24px 6px rgba(180, 200, 255, 0.5);
  transform: translate(-50%, -50%) scale(0);
  animation: coreFlash 0.6s ease-out forwards;
}

.click-ripple::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.6);
  background: radial-gradient(circle, rgba(200, 180, 255, 0.4) 0%, transparent 70%);
  box-shadow: 0 0 20px rgba(180, 200, 255, 0.5);
  transform: translate(-50%, -50%) scale(0);
  animation: ringExpand 0.9s cubic-bezier(0.22, 0.61, 0.36, 1) 0.05s forwards;
}

.click-ripple .outer-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0px;
  height: 0px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(220, 200, 255, 0.3) 0%, transparent 70%);
  transform: translate(-50%, -50%) scale(0);
  animation: glowExpand 1s ease-out 0.1s forwards;
}

@keyframes rippleExpand {
  0% { transform: translate(-50%, -50%) scale(0); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

@keyframes coreFlash {
  0% { transform: translate(-50%, -50%) scale(0); opacity: 0.9; }
  30% { transform: translate(-50%, -50%) scale(1.8); opacity: 0.7; }
  100% { transform: translate(-50%, -50%) scale(3); opacity: 0; }
}

@keyframes ringExpand {
  0% { transform: translate(-50%, -50%) scale(0.2); opacity: 0.8; }
  60% { transform: translate(-50%, -50%) scale(1.8); opacity: 0.4; }
  100% { transform: translate(-50%, -50%) scale(2.8); opacity: 0; }
}

@keyframes glowExpand {
  0% { transform: translate(-50%, -50%) scale(0.3); opacity: 0.5; }
  100% { transform: translate(-50%, -50%) scale(2.5); opacity: 0; }
}

.btn-main .click-ripple::before {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 16px 4px rgba(200, 180, 255, 0.9), 0 0 32px 8px rgba(180, 200, 255, 0.6);
}

.btn-main .click-ripple::after {
  border-color: rgba(255, 255, 255, 0.8);
  background: radial-gradient(circle, rgba(200, 180, 255, 0.5) 0%, transparent 70%);
}