:root {
  --bg: #121212;
  --fg: #fff;
  --card: #2a2a2a;
  --card-hover: #333;
  --desc: #bbb;
  --emoji-anim: bounce 1s infinite alternate;
  --terminal-font: "Courier New", monospace;
}

[data-theme="light"] {
  --bg: #dddddd;
  --fg: #111;
  --card: #fff;
  --card-hover: #eee;
  --desc: #555;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: system-ui, sans-serif;
  margin: 0;
  overflow-x: hidden;
}

main {
  max-width: 600px;
  margin: auto;
  padding: 2rem;
  position: relative;
  z-index: 1;
}

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

#avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 2px solid var(--fg);
  object-fit: cover;
}

#themeToggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 48px;
  height: 48px;
  background-color: var(--card);
  color: var(--fg);
  border: 2px solid var(--fg);
  border-radius: 50%;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s ease;
}
#themeToggle:hover {
  background-color: var(--card-hover);
  transform: scale(1.1);
}

.link-category-title {
  font-size: 1.2rem;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--fg);
}

.link-card {
  background: var(--card);
  border-radius: 10px;
  margin: 1rem 0;
  padding: 1rem;
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
  transition: 0.2s ease;
  gap: 1rem;
}

.link-card:hover {
  background: var(--card-hover);
  transform: scale(1.02);
}

.link-emoji {
  font-size: 1.5rem;
  animation: var(--emoji-anim);
}

.link-preview {
  display: block;
  font-size: 0.8rem;
  color: var(--desc);
}

.link-card:hover .link-preview {
  display: block;
}

footer {
  text-align: center;
  margin-top: 2rem;
  font-size: 0.85rem;
  color: var(--desc);
}

@keyframes bounce {
  0% { transform: translateY(0); }
  100% { transform: translateY(-5px); }
}

.terminal {
  font-family: var(--terminal-font);
  color: #0f0;
  background: #000;
  padding: 1rem;
  border-radius: 10px;
  text-align: left;
}

canvas#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.discord-card {
  background: #2b2d31;
  color: #fff;
  border-radius: 8px;
  padding: 1rem;
  margin-top: 1rem;
  font-family: "Segoe UI", sans-serif;
  max-width: 100%;
  box-shadow: 0 0 5px rgba(0,0,0,0.3);
}

.dc-header {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.avatar-wrapper {
  position: relative;
  width: 48px;
  height: 48px;
}
.dc-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #5865f2;
}
.dc-deco {
  position: absolute;
  top: -6px;
  left: -6px;
  width: 60px;
  height: 60px;
  pointer-events: none;
}

.dc-name {
  font-weight: 600;
  font-size: 1rem;
}
.dc-server-tag {
  font-size: 0.8rem;
  color: #aaa;
}
.dc-statusline {
  display: flex;
  align-items: center;
  margin: 4px 0;
}
.dc-status-badge {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
}
.dc-status-text {
  font-size: 0.9rem;
  color: #aaa;
}
.dc-badges-inline img.badge {
  height: 22px;
  margin-left: 4px;
  vertical-align: middle;
  transform: translateY(-1px);
}

.dc-activity {
  background: #232428;
  padding: 0.5rem;
  border-radius: 6px;
  margin-top: 0.75rem;
}
.dc-label {
  font-size: 0.85rem;
  color: #aaa;
  margin-bottom: 0.25rem;
}
.dc-content {
  font-size: 0.95rem;
  display: block;
  align-items: center;
  gap: 0.5rem;
}
.emoji {
  height: 20px;
  vertical-align: middle;
}
