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

body {
  font-family: "Atkinson Hyperlegible", system-ui, -apple-system, sans-serif;
  background: #212327;
  color: #ffffff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

header {
  text-align: center;
  padding: 4rem 1rem 2rem;
}

header h1 {
  font-size: 2.5rem;
  color: #f8fafc;
  margin-bottom: 0.5rem;
  position: relative;
  display: inline-block;
}

.drpepper-gif {
  position: absolute;
  top: 0;
  left: 0;
  width: 2.5rem;
  height: 2.5rem;
  object-fit: contain;
  cursor: grab;
  z-index: 900;
  user-select: none;
  visibility: hidden;
  touch-action: none;
  will-change: transform;
  -webkit-user-drag: none;
}
.drpepper-gif.positioned {
  visibility: visible;
}
.drpepper-gif.dragging {
  cursor: grabbing;
}

header #tagline {
  font-size: 1.1rem;
  color: #94a3b8;
}

.hamburger {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 1000;
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.35rem 0.5rem;
  border-radius: 0.25rem;
  transition: color 0.2s, background 0.2s;
  line-height: 1;
}
.hamburger:hover {
  color: #f8fafc;
  background: #332b37;
}


.sidebar-login {
  display: block;
  color: #94a3b8;
  text-decoration: none;
  font-size: 1rem;
  padding: 0.5rem 0;
  transition: color 0.15s;
}
.sidebar-login:hover {
  color: #f8fafc;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 0;
}

.sidebar-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.sidebar-username {
  flex: 1;
  font-size: 1rem;
  color: #e2e8f0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-logout {
  all: unset;
  font-size: 0.8rem;
  color: #64748b;
  cursor: pointer;
  transition: color 0.15s;
  flex-shrink: 0;
}
.sidebar-logout:hover {
  color: #e74c3c;
}

.sidebar-divider {
  height: 1px;
  background: #4a4b56;
  margin: 0.25rem 0 0.5rem;
}

.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.sidebar-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 240px;
  height: 100vh;
  background: #1a1c1f;
  z-index: 999;
  transform: translateX(-100%);
  transition: transform 0.2s ease;
  display: flex;
  flex-direction: column;
  padding: 4rem 1.5rem 2rem;
  gap: 0.25rem;
}
.sidebar.open {
  transform: translateX(0);
}

.sidebar a {
  color: #94a3b8;
  text-decoration: none;
  font-size: 1.05rem;
  padding: 0.5rem 0;
  transition: color 0.15s;
}
.sidebar a:hover,
.sidebar a.active {
  color: #f8fafc;
}

.sidebar-expand {
  all: unset;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  font-size: 1.05rem;
  color: #94a3b8;
  padding: 0.5rem 0;
  cursor: pointer;
  transition: color 0.15s;
}
.sidebar-expand:hover {
  color: #f8fafc;
}

.sidebar-arrow::after {
  content: "\25B8";
  font-size: 0.85rem;
  transition: transform 0.2s;
  display: inline-block;
}
.sidebar-expand.expanded .sidebar-arrow::after {
  transform: rotate(90deg);
  color: #94a3b8;
}

.sidebar-subs {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
  padding-left: 0.5rem;
}
.sidebar-subs.expanded {
  max-height: 6rem;
}

.sidebar-subs .sidebar-sub {
  display: block;
  font-size: 0.95rem;
  color: #94a3b8;
  text-decoration: none;
  padding: 0.35rem 0;
  transition: color 0.15s;
}
.sidebar-subs .sidebar-sub:hover {
  color: #f8fafc;
}



main {
  width: 100%;
  max-width: 640px;
  padding: 0 1rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.tab-bar {
  display: flex;
  justify-content: center;
  gap: 0;
  margin-bottom: 0.5rem;
  overflow: visible;
}

#now-playing {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid #4a4b56;
}
#now-playing.hidden {
  display: none;
}

#now-playing .np-cover {
  width: 64px;
  height: 64px;
  border-radius: 0.2rem;
  flex-shrink: 0;
  object-fit: cover;
}

#now-playing .np-cover.placeholder {
  background: #243133;
}

#now-playing .np-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

#now-playing .np-label {
  font-size: 0.75rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

#now-playing .np-track {
  font-size: 0.95rem;
  color: #e2e8f0;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#now-playing .np-artist {
  font-size: 0.85rem;
  color: #94a3b8;
}

#now-playing .np-plays {
  font-size: 0.75rem;
  color: #64748b;
}

#now-playing .np-loved {
  color: #e74c3c;
  font-size: 0.85rem;
}

.tab-btn {
  padding: 0.6rem 1.25rem;
  font-size: 0.95rem;
  font-family: inherit;
  color: #94a3b8;
  background: #332b37;
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, background 0.2s;
}

.tab-btn:first-child {
  border-radius: 0.25rem 0 0 0.25rem;
}

.tab-bar > :last-child {
  border-radius: 0 0.25rem 0.25rem 0;
}

.tab-btn:only-child {
  border-radius: 0.25rem;
}

.tab-btn.active {
  color: #f8fafc;
  background: #232b2e;
}

.tab-btn:not(.active):hover {
  color: #cbd5e1;
  background: #232b2e;
}

.tab-btn.disabled {
  color: #4a4b56;
  cursor: default;
  pointer-events: none;
}

.tab-btn.nav-link:hover {
  background: #232b2e;
}

.dropdown-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 0.6rem 1.25rem;
  font-size: 0.95rem;
  font-family: inherit;
  color: #94a3b8;
  background: #332b37;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}
.dropdown-wrapper:hover:not(.dropdown-open) {
  color: #cbd5e1;
  background: #232b2e;
}
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #332b37;
  border-radius: 0 0 0.25rem 0.25rem;
  z-index: 50;
  flex-direction: column;
}
.dropdown-open > .dropdown-menu {
  display: flex;
}
.dropdown-menu a {
  display: block;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  color: #94a3b8;
  text-decoration: none;
  white-space: nowrap;
}
.dropdown-menu a:hover {
  color: #cbd5e1;
  background: #232b2e;
}
.dropdown-menu a:last-child {
  border-radius: 0 0 0.25rem 0.25rem;
}

.tab-panel.hidden {
  display: none;
}

.tab-panel h2 {
  font-size: 1.25rem;
  color: #336058;
  margin-bottom: 0.75rem;
}

#bio {
  line-height: 1.7;
  white-space: pre-line;
  color: #cbd5e1;
}
#bio a {
  color: #ffffff;
  text-decoration: none;
  font-style: italic;
}

#bio a:hover {
  text-decoration: underline;
}

#socials {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #4a4b56;
  font-size: 0.9rem;
  color: #94a3b8;
  text-align: center;
}

.social-link {
  color: #94a3b8;
  text-decoration: none;
  transition: color 0.2s;
}

.social-link:hover {
  color: #f8fafc;
  text-decoration: underline;
}

.social-link[data-copy] {
  position: relative;
}

.social-link[data-copy]::after {
  content: "Copied email";
  position: absolute;
  left: 50%;
  bottom: calc(100% + 0.5rem);
  z-index: 5;
  padding: 0.3rem 0.5rem;
  border-radius: 0.25rem;
  color: #f8fafc;
  background: #232b2e;
  font-size: 0.75rem;
  font-style: normal;
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 0.25rem);
  transition:
    opacity 0.15s,
    transform 0.15s;
}

.social-link[data-copy].copied::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

#project-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

#project-list li {
  background: #243133;
  padding: 0.75rem 2rem 0.75rem 1rem;
  border-radius: 0.25rem;
  cursor: pointer;
  position: relative;
  transition: background 0.2s;
}

#project-list li::after {
  content: "\25B8";
  position: absolute;
  right: 0.75rem;
  top: 0.75rem;
  transform: rotate(0deg);
  color: #64748b;
  font-size: 0.85rem;
  transition: transform 0.2s, color 0.2s;
}

#project-list li.expanded::after {
  transform: rotate(90deg);
  color: #64748b;
}

#project-list li .project-detail {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  margin-top: 0;
  font-size: 0.9rem;
  color: #94a3b8;
  line-height: 1.5;
  white-space: pre-line;
  transition: max-height 0.25s ease, opacity 0.2s ease, margin-top 0.25s ease;
}

#project-list li .project-detail a {
  color: #ffffff;
  text-decoration: none;
}

#project-list li .project-detail a:hover {
  text-decoration: underline;
}

#project-list li.expanded .project-detail {
  max-height: 600px;
  opacity: 1;
  margin-top: 0.5rem;
}
footer {
  margin-top: auto;
  padding: 2rem 1rem;
  color: #64748b;
  font-size: 0.85rem;
}

/* ── Videos ─────────────────────────────────────────── */
#video-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.video-card {
  background: #212327;
  border-radius: 0.25rem;
  overflow: hidden;
}

.video-card .thumb {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  background: #243133;
}
.video-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.video-card .thumb iframe {
  width: 100%;
  height: 100%;
  border: none;
}
.video-card .thumb .play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.3);
  transition: background 0.2s;
}
.video-card .thumb .play-overlay::after {
  content: "\25B6";
  font-size: 2.5rem;
  color: rgba(255, 255, 255, 0.85);
  transition: transform 0.2s, color 0.2s;
}
.video-card .thumb:hover .play-overlay {
  background: rgba(0, 0, 0, 0.5);
}
.video-card .thumb:hover .play-overlay::after {
  transform: scale(1.15);
  color: #fff;
}

.video-card .video-info {
  padding: 0.75rem 1rem;
}

.video-card .video-title {
  font-size: 0.9rem;
  color: #e2e8f0;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-card .video-stats {
  font-size: 0.8rem;
  color: #64748b;
  margin-top: 0.35rem;
}

.account-status {
  text-align: center;
  color: #94a3b8;
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}
.discord-login-btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  background: #5865f2;
  color: #fff;
  text-decoration: none;
  border-radius: 0.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  transition: background 0.15s;
  margin: 0 auto;
}
.discord-login-btn:hover {
  background: #4752c4;
}
.account-card {
  text-align: center;
  padding: 1rem;
}
.account-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  margin-bottom: 1rem;
}
.account-card h2 {
  color: #f8fafc;
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}
.account-id {
  color: #64748b;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}
.account-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}
.account-actions button {
  padding: 0.5rem 1.25rem;
  font-size: 0.85rem;
  font-family: inherit;
  color: #94a3b8;
  background: #332b37;
  border: none;
  border-radius: 0.25rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.account-actions button:hover {
  background: #232b2e;
  color: #cbd5e1;
}
.account-actions button.danger {
  color: #ef4444;
}
.account-actions button.danger:hover {
  background: #3b1a1a;
  color: #f87171;
}
#delete-status {
  text-align: center;
  color: #94a3b8;
  font-size: 0.85rem;
  margin-top: 0.75rem;
}

@media (max-width: 640px) {
  .tab-btn,
  .dropdown-wrapper {
    padding: 0.4rem 0.65rem;
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  header {
    padding: 2rem 1rem 1.25rem;
  }
  header h1 {
    font-size: 1.75rem;
  }

  .tab-bar {
    flex-wrap: wrap;
    gap: 0.2rem;
  }
  .tab-btn,
  .tab-bar .dropdown-wrapper {
    padding: 0.4rem 0.65rem;
    font-size: 0.8rem;
    border-radius: 0.25rem;
  }

  .dropdown-menu {
    left: auto;
    right: 0;
  }

  #video-list {
    grid-template-columns: 1fr;
  }

  #results-grid.avatar-grid {
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  }
  .modal-content img {
    max-width: 95vw;
    max-height: 70vh;
  }
}
