:root {
  color-scheme: light dark;
  --bg: #0a0a0f;
  --ink: #e4e4e7;
  --accent: #8b5cf6;
  --accent-hover: #a78bfa;
  --card: #18181b;
  --card-hover: #27272a;
  --border: #3f3f46;
  --shadow: rgba(0, 0, 0, 0.5);
  --link-hover: rgba(139, 92, 246, 0.12);
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #fafafa;
    --ink: #18181b;
    --accent: #8b5cf6;
    --accent-hover: #7c3aed;
    --card: #ffffff;
    --card-hover: #f4f4f5;
    --border: #e4e4e7;
    --shadow: rgba(0, 0, 0, 0.1);
    --link-hover: rgba(139, 92, 246, 0.08);
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: linear-gradient(135deg, var(--bg) 0%, #1a1a2e 100%);
  color: var(--ink);
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  line-height: 1.6;
}

@media (prefers-color-scheme: light) {
  body {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0e7ff 100%);
  }
}

.card {
  max-width: 720px;
  width: 100%;
  padding: 48px;
  border-radius: 24px;
  background: var(--card);
  box-shadow: 0 25px 50px -12px var(--shadow);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
  animation: slideUp 600ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

h1 {
  font-size: 3rem;
  font-weight: 800;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
  text-align: center;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subtitle {
  font-size: 1rem;
  color: #999;
  margin: 0 0 32px;
  text-align: center;
  font-weight: 400;
}

h2 {
  font-size: 0.875rem;
  margin: 32px 0 16px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 12px;
}

h2:before {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

h2:after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.links-container {
  display: grid;
  gap: 24px;
}

.category {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.link-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  text-decoration: none;
  color: var(--ink);
  transition: all 250ms cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.link-card:hover {
  background: var(--card-hover);
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -8px var(--shadow);
}

.link-card:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: var(--accent);
  transform: scaleY(0);
  transition: transform 250ms cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: bottom;
}

.link-card:hover:before {
  transform: scaleY(1);
}

.link-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
}

.link-content {
  flex: 1;
  min-width: 0;
}

.link-content strong {
  display: block;
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 4px;
  word-break: break-word;
}

.link-content p {
  margin: 0;
  font-size: 0.9rem;
  color: #888;
  line-height: 1.5;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.boost-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  color: white;
  font-size: 0.75rem;
  padding: 6px 12px;
  border-radius: 20px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  .card {
    padding: 32px 24px;
  }

  h1 {
    font-size: 2.25rem;
  }

  h2:before, h2:after {
    flex: 0.5;
  }
}

@media (max-width: 480px) {
  .card {
    padding: 24px 20px;
  }

  h1 {
    font-size: 1.875rem;
  }

  .link-card {
    padding: 14px 16px;
    gap: 12px;
  }

  .link-icon {
    width: 36px;
    height: 36px;
  }

  .link-content strong {
    font-size: 0.95rem;
  }

  .link-content p {
    font-size: 0.85rem;
  }
}

.info-section {
  margin-top: 32px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.info-section details {
  cursor: pointer;
}

.info-section summary {
  font-size: 0.95rem;
  color: #888;
  font-weight: 500;
  padding: 12px 0;
  user-select: none;
  transition: color 200ms;
}

.info-section summary:hover {
  color: var(--accent);
}

.info-section ul {
  margin: 16px 0 0;
  padding-left: 24px;
  font-size: 0.9rem;
  line-height: 1.8;
  color: #888;
}

.info-section li {
  margin-bottom: 8px;
}

.info-section code {
  background: var(--border);
  padding: 3px 8px;
  border-radius: 6px;
  font-family: 'SF Mono', 'Monaco', 'Cascadia Code', 'Courier New', monospace;
  font-size: 0.85rem;
  color: var(--accent);
}

.copy-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  padding: 2px 6px;
  margin-left: 4px;
  vertical-align: middle;
  transition: background 0.15s;
}

.copy-btn:hover {
  background: var(--link-hover);
}
