:root {
  --bg: #09090b;
  --card-bg: rgba(255, 255, 255, 0.035);
  --card-bg-hover: rgba(255, 255, 255, 0.065);
  --card-border: rgba(255, 255, 255, 0.08);
  --card-border-hover: rgba(255, 255, 255, 0.18);
  --text-main: rgba(255, 255, 255, 0.96);
  --text-muted: rgba(255, 255, 255, 0.75);
  --text-sub: rgba(255, 255, 255, 0.55);
  --icon-box-bg: rgba(255, 255, 255, 0.05);
  --icon-box-border: rgba(255, 255, 255, 0.08);
  --accent-glow: rgba(255, 255, 255, 0.05);
  --badge-bg: rgba(255, 255, 255, 0.08);
  --badge-text: rgba(255, 255, 255, 0.85);
  --success: #34d399;
}

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

body {
  background-color: var(--bg);
  color: var(--text-main);
  font-family: 'Outfit', 'Zen Kaku Gothic New', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 20px 80px;
  line-height: 1.5;
  position: relative;
  overflow-x: hidden;
}

/* Organic Ambient Canvas Background like dennoko.com */
#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  opacity: 1;
}

.container {
  position: relative;
  z-index: 1;
  max-width: 640px;
  width: 100%;
  margin: 0 auto;
}

/* Header Section */
header {
  margin-bottom: 40px;
}

.category-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-sub);
  margin-bottom: 8px;
}

h1 {
  font-size: 2.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin-bottom: 8px;
}

p.description {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Sections */
section {
  margin-bottom: 32px;
}

.section-title {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-sub);
  margin-bottom: 12px;
}

/* Grid Layouts */
.grid-1 {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 580px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
  h1 {
    font-size: 1.85rem;
  }
  body {
    padding: 40px 16px 60px;
  }
}

/* Link Card Component (Exact dennoko.com aesthetic) */
.link-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  user-select: none;
}

.link-card:hover {
  background: var(--card-bg-hover);
  border-color: var(--card-border-hover);
  transform: translateY(-1px);
}

.link-card:active {
  transform: translateY(0);
}

/* Highlight Card for Primary "Add to VCC" CTA */
.link-card.primary-cta {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid #3b82f6;
  box-shadow: 0 0 16px rgba(59, 130, 246, 0.12);
}

.link-card.primary-cta:hover {
  background: rgba(255, 255, 255, 0.085);
  border-color: #60a5fa;
  box-shadow: 0 4px 24px rgba(59, 130, 246, 0.28);
}

/* Icon Box */
.icon-box {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--icon-box-bg);
  border: 1px solid var(--icon-box-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  color: #ffffff;
  flex-shrink: 0;
  transition: background 0.2s;
}

.icon-box svg {
  width: 20px;
  height: 20px;
}

.link-card:hover .icon-box {
  background: rgba(255, 255, 255, 0.09);
}

.card-info {
  flex: 1;
  min-width: 0;
}

.card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.arrow-icon {
  color: var(--text-sub);
  display: flex;
  align-items: center;
  transition: transform 0.2s, color 0.2s;
  flex-shrink: 0;
}

.link-card:hover .arrow-icon {
  color: var(--text-main);
  transform: translateX(2px);
}

/* URL Copy Row Card */
.copy-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  backdrop-filter: blur(8px);
}

.copy-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.84rem;
  outline: none;
  user-select: all;
}

.copy-btn {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
  font-family: inherit;
}

.copy-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

.copy-btn.copied {
  background: rgba(52, 211, 153, 0.15);
  border-color: var(--success);
  color: var(--success);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  background: var(--badge-bg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--badge-text);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: 6px;
}

/* Package Detail Card */
.package-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 18px 20px;
  backdrop-filter: blur(8px);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.package-card:hover {
  background: var(--card-bg-hover);
  border-color: var(--card-border-hover);
}

.package-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.package-title-group {
  display: flex;
  flex-direction: column;
}

.package-name {
  font-size: 1.05rem;
  font-weight: 600;
  color: #ffffff;
}

.package-id {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.76rem;
  color: var(--text-sub);
  margin-top: 2px;
}

.package-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 10px 0 14px;
}

.package-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 12px;
  font-size: 0.82rem;
  color: var(--text-sub);
}

.package-link {
  color: var(--text-muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.2s;
}

.package-link:hover {
  color: #ffffff;
}

/* Accordion Guide */
details.guide {
  margin-top: 12px;
}

details.guide summary {
  font-size: 0.82rem;
  color: var(--text-sub);
  cursor: pointer;
  user-select: none;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s;
}

details.guide summary:hover {
  color: var(--text-muted);
}

details.guide summary::-webkit-details-marker {
  display: none;
}

.guide-box {
  margin-top: 10px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.guide-box ol {
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Floating Toast */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(24, 24, 27, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 100;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Footer */
footer {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-sub);
}

footer a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

footer a:hover {
  color: #ffffff;
}
