:root {
  --bg: #0a0a0a;
  --fg: #e6e6e6;
  --dim: #888;
  --accent: #00ff66;
  --border: #1f1f1f;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.7;
  scrollbar-gutter: stable;
}

::selection { background: var(--accent); color: #000; }

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

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

main {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin: 0 auto;
  padding: 64px 24px 64px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  opacity: 0;
  animation: fadeInUp 1.2s ease-out 0.5s forwards;
}

.skin-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

.skin-viewer {
  cursor: grab;
  touch-action: pan-y;
  max-width: 100%;
  height: auto;
}

.skin-viewer:active { cursor: grabbing; }

header {
  margin-bottom: 24px;
  text-align: center;
}

.page-header {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  text-align: left;
  padding-bottom: 16px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

.page-header h1 {
  font-size: 18px;
  margin: 0;
}

.page-header h1 a {
  color: inherit;
  border-bottom: none;
  text-decoration: none;
  cursor: pointer;
}

.page-header h1 a:hover {
  border-bottom: none;
}

.page-header .page-nav {
  margin-top: 0;
}

h1 {
  width: fit-content;
  font-size: 24px;
  font-weight: 700;
  margin: 0 auto 8px;
  letter-spacing: -0.01em;
  background-image: 
    url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='10' cy='10' r='1.5' fill='%23fff'/%3E%3Ccircle cx='30' cy='25' r='1' fill='%23fff'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg width='30' height='30' viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='5' cy='20' r='1' fill='%23fff'/%3E%3Ccircle cx='20' cy='5' r='1.5' fill='%23fff'/%3E%3C/svg%3E"),
    linear-gradient(to right, var(--fg) 0%, var(--accent) 50%, var(--fg) 100%);
  background-size: 40px 40px, 30px 30px, 200% auto;
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  animation: shine 3s linear infinite;
  filter: drop-shadow(0 0 8px rgba(0, 255, 102, 0.4));
}

@keyframes shine {
  from {
    background-position: 0 0, 0 0, 0% center;
  }
  to {
    background-position: 0 -40px, 0 -60px, 200% center;
  }
}

.tagline {
  color: var(--dim);
  margin: 0;
  display: inline-block;
  position: relative;
}

section { margin-bottom: 40px; }

section:last-of-type {
  margin-bottom: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}

section:last-of-type ul {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
}

h2 {
  font-size: 14px;
  font-weight: 500;
  color: var(--dim);
  text-transform: lowercase;
  letter-spacing: 0.04em;
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

p { margin: 0 0 12px; }
p:last-child { margin-bottom: 0; }

ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

li { padding: 2px 0; }

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease;
}

a:hover { border-bottom-color: var(--accent); }


section ul li a,
.modal-links a {
  position: relative;
  display: inline-block;
  border-bottom: none;
}

section ul li a:hover,
.modal-links a:hover {
  border-bottom: none;
}

section ul li a::before,
section ul li a::after,
.modal-links a::before,
.modal-links a::after {
  position: absolute;
  opacity: 0;
  color: var(--dim);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

section ul li a::before,
.modal-links a::before {
  content: ">";
  left: -1.5ch;
  transform: translateX(8px);
}

section ul li a::after,
.modal-links a::after {
  content: "<";
  right: -1.5ch;
  transform: translateX(-8px);
}

section ul li a:hover::before,
section ul li a:hover::after,
.modal-links a:hover::before,
.modal-links a:hover::after {
  opacity: 1;
  transform: translateX(0);
}


.typing-cursor::after {
  content: "█";
  position: absolute;
  left: 100%;
  margin-left: 4px;
  color: var(--dim);
  animation: blink 1s step-start infinite;
}

.typing-cursor.typing-done::after {
  opacity: 0;
  animation: none;
}

@keyframes blink {
  50% { opacity: 0; }
}

footer {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--dim);
  font-size: 13px;
}

footer p { margin: 0; }


.lastfm-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  background: rgba(10, 10, 10, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color 0.15s ease, background 0.15s ease;
  z-index: 100;
  max-width: 300px;
}

.lastfm-widget:hover {
  border-color: var(--dim);
  background: rgba(255, 255, 255, 0.04);
}

.lastfm-cover {
  width: 48px;
  height: 48px;
  border-radius: 4px;
  object-fit: cover;
  background: var(--border);
  flex-shrink: 0;
}

.lastfm-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.lastfm-header {
  font-size: 11px;
  color: var(--dim);
  margin-bottom: 4px;
  text-transform: lowercase;
}

#lastfm-track {
  font-weight: 500;
  color: var(--fg);
  border: none;
  font-size: 14px;
  margin-bottom: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

#lastfm-track:hover {
  color: var(--accent);
}

#lastfm-artist {
  color: var(--dim);
  font-size: 13px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

#lastfm-status {
  font-size: 11px;
  color: var(--dim);
  margin-top: 6px;
  text-transform: lowercase;
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-indicator {
  display: inline-block;
  width: 6px;
  height: 6px;
  background-color: var(--dim);
  border-radius: 50%;
}

.status-indicator.playing {
  background-color: var(--accent);
  box-shadow: 0 0 6px rgba(124, 92, 255, 0.6);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 1; }
  50% { transform: scale(1.1); opacity: 0.6; }
  100% { transform: scale(0.95); opacity: 1; }
}

.page-nav {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.page-nav a {
  font-family: var(--mono);
  font-size: 0.95rem;
  color: var(--dim);
  text-decoration: none;
}

.page-nav a:hover {
  color: var(--fg);
}

.page-nav a.active {
  color: var(--accent);
}

p.dim {
  color: var(--dim);
}


.card-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card {
  all: unset;
  cursor: pointer;
  display: block;
  width: 100%;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 6px;
  text-align: left;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.card:hover {
  border-color: var(--dim);
  background: rgba(255, 255, 255, 0.02);
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.tag {
  font-size: 11px;
  color: var(--dim);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 6px;
  text-transform: lowercase;
}

.card-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--fg);
  margin-bottom: 4px;
}

.card-summary {
  font-size: 13px;
  color: var(--dim);
}


.book-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 5px;
}

.book-card-sub {
  font-size: 12px;
  color: var(--dim);
}

.stars {
  display: inline-flex;
  gap: 1px;
  flex-shrink: 0;
}

.star {
  font-size: 14px;
  position: relative;
  display: inline-block;
  color: var(--dim);
}

.star.full { color: var(--accent); }

.star.half::before {
  content: '★';
  position: absolute;
  left: 0;
  top: 0;
  width: 50%;
  overflow: hidden;
  color: var(--accent);
  pointer-events: none;
}

.modal-author {
  font-size: 13px;
  color: var(--dim);
  margin: 0 0 14px;
}


.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  position: relative;
  background: #111;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 28px;
  max-width: 520px;
  width: 100%;
  transform: translateY(12px);
  transition: transform 0.2s ease;
}

.modal-overlay.open .modal {
  transform: translateY(0);
}

.modal-close {
  all: unset;
  cursor: pointer;
  position: absolute;
  top: 16px;
  right: 18px;
  font-size: 20px;
  color: var(--dim);
  line-height: 1;
  transition: color 0.15s ease;
}

.modal-close:hover { color: var(--fg); }

.modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--fg);
  margin: 0 0 14px;
}

.modal-desc {
  font-size: 14px;
  color: var(--dim);
  line-height: 1.7;
  margin: 0 0 20px;
  max-height: 60vh;
  overflow-y: auto;
}

.modal-desc p {
  margin: 0 0 12px;
}

.modal-desc p:last-child {
  margin-bottom: 0;
}

.modal-links {
  display: flex;
  gap: 16px;
}

.modal-links a {
  font-size: 13px;
  color: var(--accent);
}

#clipboard-toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(0.5rem);
  background: var(--border);
  color: var(--dim);
  font-family: var(--mono);
  font-size: 0.7rem;
  padding: 0.35rem 0.75rem;
  border-radius: 4px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

@media (max-width: 600px) {
  main {
    padding: 32px 16px 32px;
  }

  .page-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
  }

  .page-header h1 {
    margin: 0;
  }

  .lastfm-widget {
    bottom: 16px;
    right: 16px;
    left: 16px;
    max-width: none;
    padding: 12px;
  }

  footer {
    padding-bottom: 60px;
  }

  .modal-overlay {
    padding: 16px;
  }

  .modal {
    padding: 20px;
  }
}

