:root {
  --bg: #0d0a1f;
  --text: #e8dcff;
  --accent: #d3a7ff;
  --muted: #a78fd4;
  --tab-bg: #1d1449;
  --tab-border: #321f68;
}

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

body {
  font-family: "Comic Sans MS", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  background: radial-gradient(circle at 20% 15%, #2a1a5e 0%, transparent 55%),
              radial-gradient(circle at 80% 85%, #1b1445 0%, transparent 55%),
              linear-gradient(180deg, #0d0a1f 0%, #120d2b 60%, #0d0a1f 100%);
  background-attachment: fixed;
}

/* Layout */
.layout {
  display: flex;
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
  min-height: 100vh;
  align-items: stretch;
}

main {
  flex: 1;
}

/* Tabs */
.tabs {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  width: 160px;
  padding-right: 1.5rem;
  border-right: 1px solid var(--tab-border);
  height: fit-content;
  position: sticky;
  top: 3rem;
}

.tab {
  background: var(--tab-bg);
  color: var(--muted);
  border: 1px solid var(--tab-border);
  border-radius: 8px;
  padding: 0.9rem;
  font-size: 1rem;
  cursor: pointer;
  text-align: left;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  white-space: nowrap;
  width: 44px;
}

.tab:hover {
  background: #241a55;
  color: var(--text);
  transform: translateY(-2px);
  width: 130px;
}

.tab.active {
  background: #e0a7f0;
  color: #0d0a1f;
  border-color: #e0a7f0;
  box-shadow: 0 0 18px rgba(224, 167, 240, 0.5);
  width: 130px;
}

.tab.dyn {
  height: 44px;
  flex-shrink: 0;
  padding: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  position: relative;
}

.tab.dyn .tab-icon {
  width: 20px;
  height: 20px;
  margin: 0;
  flex-shrink: 0;
}

.tab.dyn .label {
  font-size: 0.9rem;
}

.tab-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.label {
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.tab:hover .label,
.tab.active .label {
  opacity: 1;
  transform: translateX(0);
}

.tab.active .label {
  font-weight: 700;
  color: #0d0a1f;
}

@media (max-width: 700px) {
  .layout {
    flex-direction: column;
    gap: 1rem;
  }
  .tabs {
    flex-direction: row;
    flex-wrap: wrap;
    min-width: 0;
    border-right: none;
    border-bottom: 1px solid var(--tab-border);
    padding-right: 0;
    padding-bottom: 1rem;
    position: static;
  }
  .tab {
    border-radius: 999px;
    width: auto;
  }
  .tab:hover {
    width: auto;
  }
  .tab.active {
    width: auto;
  }
  .label {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Panels */
.panels {
  position: relative;
  min-height: 320px;
}

.panel {
  display: none;
}

.panel.active {
  display: block;
  animation: panelIn 0.4s ease;
}

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

.panel h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 0.75rem;
}

.panel h1::after {
  content: "";
  display: block;
  width: 3rem;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  margin-top: 0.5rem;
}

.panel p {
  color: var(--muted);
  font-size: 1.15rem;
}

.info {
  margin-top: 1rem;
}

.info p {
  margin-bottom: 0.75rem;
}

.info strong {
  color: var(--accent);
}

.like-list {
  list-style: none;
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.like-list li {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.2rem 1.4rem;
  flex-wrap: wrap;
  background: var(--tab-bg);
  border: 1px solid var(--tab-border);
  border-radius: 12px;
  transition: all 0.3s ease;
}

.like-list li:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.like-list li span {
  flex: 1 1 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.05rem;
}

.like-list li .like-sub {
  flex: 1 1 100%;
}

.add-like {
  margin-left: auto;
  background: var(--tab-bg);
  color: var(--muted);
  border: 1px solid var(--tab-border);
  border-radius: 6px;
  padding: 0.2rem 0.6rem;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.add-like:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.add-like.expand {
  margin-left: 0.25rem;
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 1.1rem;
  line-height: 1;
  transition: all 0.3s ease;
}

.add-like.expand::before {
  content: "＋";
}

.add-like.expand:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.add-like.expand.open {
  color: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 12px rgba(196, 167, 255, 0.4);
}

.like-sub {
  width: 100%;
  color: var(--muted);
  font-size: 0.9rem;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.4s ease;
}

.like-sub.open {
  max-height: none;
  opacity: 1;
  margin-top: 0.5rem;
}

.like-content {
  background: var(--tab-bg);
  border: 1px dashed var(--tab-border);
  border-radius: 8px;
  padding: 0.8rem 1rem;
  outline: none;
  min-height: 40px;
}

.like-content:focus {
  border-color: var(--accent);
  border-style: solid;
}

.like-input {
  flex: 1;
  background: var(--tab-bg);
  color: var(--text);
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 0.3rem 0.5rem;
  font-size: 0.95rem;
  margin-top: 0.5rem;
}

/* Socials */
.socials {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.social {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 110px;
  height: 110px;
  border-radius: 16px;
  background: var(--tab-bg);
  border: 1px solid var(--tab-border);
  color: var(--muted);
  text-decoration: none;
  position: relative;
  transition: all 0.3s ease;
}

.social svg {
  width: 52px;
  height: 52px;
  transition: transform 0.3s ease;
}

.social:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(196, 167, 255, 0.3);
}

.social:hover svg {
  transform: scale(1.08);
}

.popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.85);
  background: var(--tab-bg);
  border: 1px solid var(--accent);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.4rem;
  width: 60vw;
  max-width: 900px;
  max-height: 90vh;
  padding: 3rem 3.5rem;
  border-radius: 24px;
  box-shadow: 0 14px 60px rgba(196, 167, 255, 0.5);
  opacity: 0;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 100;
}

.popup svg {
  width: 56px;
  height: 56px;
}

.popup-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(196, 167, 255, 0.12);
  border: 1px solid var(--accent);
  border-radius: 50%;
  color: var(--text);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.popup-close svg {
  width: 16px;
  height: 16px;
}

.popup-close:hover {
  background: #e0a7f0;
  color: #0d0a1f;
}

.popup.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: auto;
}

.popup-anim .popup-img,
.popup-anim .popup-title,
.popup-anim .popup-song-list {
  animation: popup-slide 0.35s ease;
  animation-fill-mode: both;
}

.popup-anim .popup-title {
  animation-delay: 0.08s;
}

.popup-anim .popup-song-list {
  animation-delay: 0.16s;
}

@keyframes popup-slide {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.popup-title {
  color: var(--muted);
  font-size: 1.3rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.popup-img {
  width: 160px;
  height: 160px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--tab-border);
  background: linear-gradient(135deg, #2a1a5e, #0d0a1f);
}

.popup-img.no-img {
  display: flex;
  align-items: center;
  justify-content: center;
}

.popup-text {
  color: var(--text);
  font-weight: 700;
  font-size: 2rem;
  text-align: center;
  word-break: break-word;
  user-select: text;
  -webkit-user-select: text;
  cursor: text;
}

.popup-song-list {
  width: 100%;
  max-height: 60vh;
  overflow-y: auto;
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.popup-song {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-radius: 10px;
  color: var(--text);
}

.popup-song:nth-child(odd) {
  background: var(--tab-bg);
}

.popup-song-num {
  color: var(--muted);
  font-size: 0.95rem;
  min-width: 1.4rem;
  text-align: right;
}

.popup-song-name {
  font-size: 1.25rem;
  font-weight: 500;
}

.popup-link {
  color: var(--accent);
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
  padding: 0.6rem 1.6rem;
  border: 1px solid var(--accent);
  border-radius: 999px;
  transition: all 0.3s ease;
  margin-top: 0.5rem;
}

.popup-link:hover {
  background: var(--accent);
  color: #0d0a1f;
}

.audio-tile {
  cursor: pointer;
}

.flower-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-top: 1.25rem;
  user-select: none;
  -webkit-user-select: none;
  pointer-events: auto;
}

.flower-gallery img {
  -webkit-user-drag: none;
  user-drag: none;
}

.flower-card {
  background: var(--tab-bg);
  border: 1px solid var(--tab-border);
  border-radius: 14px;
  overflow: hidden;
  text-align: center;
  transition: all 0.3s ease;
}

.flower-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(196, 167, 255, 0.25);
}

.flower-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.flower-name {
  padding: 0.7rem;
  color: var(--text);
  font-weight: 600;
  font-size: 1.05rem;
}

.like-content .flower-gallery {
  margin-top: 0;
}

.game-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-top: 1.25rem;
  user-select: none;
  -webkit-user-select: none;
  pointer-events: auto;
}

.game-card {
  background: var(--tab-bg);
  border: 1px solid var(--tab-border);
  border-radius: 14px;
  padding: 1.2rem 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  text-align: center;
  transition: all 0.3s ease;
}

.game-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(196, 167, 255, 0.25);
}

.game-logo {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.6rem;
  font-weight: 800;
  color: #0d0a1f;
  border: 2px solid var(--accent);
  flex-shrink: 0;
}

.game-mc { background: linear-gradient(135deg, #7ed957, #3a8f2f); }
.game-rbx { background: linear-gradient(135deg, #ff7b9c, #c6375e); }
.game-val { background: linear-gradient(135deg, #ff5f6d, #b3273a); }
.game-lol { background: linear-gradient(135deg, #c8a24a, #8a6d1f); }
.game-beam { background: linear-gradient(135deg, #80b7ff, #2a6db8); }
.game-ac { background: linear-gradient(135deg, #c084fc, #6d28d9); }
.game-peak { background: linear-gradient(135deg, #e0a7f0, #7a5fc0); }
.game-cs2 { background: linear-gradient(135deg, #ffb066, #c4681f); }

.game-name {
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.25;
}

.like-content .game-gallery {
  margin-top: 0;
}

.music-sample {
  user-select: none;
  -webkit-user-select: none;
}

.sample-label {
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 1.1rem 0 0.5rem;
}

.sample-label:first-child {
  margin-top: 0;
}

.artist-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 1rem;
}

.artist-card {
  background: var(--tab-bg);
  border: 1px solid var(--tab-border);
  border-radius: 10px;
  overflow: hidden;
  text-align: center;
  transition: all 0.3s ease;
}

.artist-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}

.artist-cover {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2a1a5e, #0d0a1f);
  color: var(--muted);
  font-weight: 700;
  font-size: 1.6rem;
}

.artist-name {
  padding: 0.5rem;
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
}

.audio-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(142px, 1fr));
  gap: 0.7rem;
}

.audio-tile {
  background: var(--tab-bg);
  border: 1px solid var(--tab-border);
  border-radius: 12px;
  padding: 0.75rem 0.65rem 0.85rem;
  color: var(--text);
  text-align: center;
  font-weight: 600;
  font-size: 0.88rem;
  height: 142px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.52rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.audio-tile-img {
  width: 55px;
  height: 55px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent);
  background: linear-gradient(135deg, #2a1a5e, #0d0a1f);
  flex-shrink: 0;
}

.audio-tile-img.no-img {
  background: linear-gradient(135deg, #e0a7f0, #7a5fc0);
}

.audio-tile-name {
  line-height: 1.25;
  font-family: "Comic Sans MS", "Segoe UI", -apple-system, sans-serif;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.audio-tile:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.artist-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.artist-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  background: var(--tab-bg);
  border: 1px solid var(--tab-border);
  border-radius: 8px;
  padding: 0.7rem 1rem;
}

.artist-row:hover {
  border-color: var(--accent);
}

.row-num {
  color: var(--muted);
  font-size: 0.85rem;
  min-width: 1.5rem;
}

.row-name {
  color: var(--text);
  font-weight: 600;
}

.like-content {
  width: 100%;
}

.like-sub.like-content {
  flex: 1 1 100%;
  width: 100%;
}

.site-footer {
  margin-top: 2.5rem;
  padding: 1rem 1rem 1.8rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
}

.footer-line {
  width: 140px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), #e0a7f0, var(--accent), transparent);
  box-shadow: 0 0 10px rgba(196, 167, 255, 0.4);
}

.footer-moon {
  width: 52px;
  height: 52px;
  opacity: 0.85;
  filter: drop-shadow(0 0 12px rgba(196, 167, 255, 0.45));
}
