html, body {
  margin: 0;
  background: black;
  color: white;
  overflow: hidden;
  overflow-x: hidden;
  font-family: 'Alan Sans';
}

html {
    scrollbar-gutter: stable;
}

#intro video {
  width: 100%;
  height: 100vh;
  object-fit: cover;
  transition: filter 2s ease;
  position: relative;
  z-index: 0;
}

/* Blur after video ends */
#intro video.blur {
  filter: blur(12px);
}

/* Profile container */
#profile {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;

  /* container stays in place; animate the inner card */
  opacity: 0;
  pointer-events: none;
  transition: opacity 350ms ease;
}

/* Slide into place */
#profile.show {
  opacity: 1;
  pointer-events: auto;
}

/* Animate the card sliding from above */
.profile-card-shell {
  transform: translateY(-28vh);
  opacity: 0;
  transition: transform 700ms cubic-bezier(.2,.9,.2,1), opacity 400ms ease;
}

#profile.show .profile-card-shell {
  transform: translateY(0);
  opacity: 1;
}

/* Hidden helper */
.hidden {
  display: none;
}

/* Profile card styling */
.profile-card {
  background: rgba(20,20,20,0.95);
  backdrop-filter: blur(6px);
  padding: 28px 26px;
  border-radius: 18px;
  text-align: center;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 30px rgba(0,0,0,0.6);
  border: 1px solid rgba(255,255,255,0.04);
  scroll-behavior: smooth;
  width: 100%;
}

.profile-card-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.profile-card-shell {
  position: relative;
  max-width: 720px;
  width: min(92%, 720px);
}

.profile-card {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.profile-card::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.avatar {
  width: 190px;
  height: 190px;
  border-radius: 50%;
  margin-bottom: 6px;
  object-fit: cover;
  display: block;
}

/* Avatar wrapper with radial status ring */
.avatar-wrap {
  position: relative;
  width: 190px;
  height: 190px;
  display: inline-block;
}

.status-ring {
  position: absolute;
  left: -6px;
  top: -6px;
  width: calc(100% + 12px);
  height: calc(100% + 12px);
  border-radius: 50%;
  border: 4.5px solid rgba(116,127,141,0.6); /* default (offline-ish) */
  box-sizing: border-box;
  pointer-events: none;
  transition: border-color 220ms ease, box-shadow 220ms ease, transform 220ms ease;
}

/* subtle glow for online/dnd/idle */
.status-ring.glow { box-shadow: 0 6px 18px rgba(0,0,0,0.45); }

.profile-card h1 {
  margin: 6px 0 0 0;
  font-size: 30px;
}

.profile-card h2 {
  margin: 6px 0 0 0;
  font-size: 22px;
  word-break: break-word;
  text-align: left;
}


h3 {
  margin-top: 0px;
  font-size: 18px;
}

/* Container */
.PCstats,
.info-section {
  width: 100%;
  max-width: calc(100% - 8px);
  margin-top: 24px;
  align-self: stretch;
}

/* Main header */
.pc-header,
.section-header {
  width: 100%;
  padding: 4px 40px 4px 0;
  text-align: left;
  font-size: 22px;
  color: white;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: color 0.2s ease, opacity 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  font-family: inherit;
  position: relative;
}

.pc-header:hover,
.section-header:hover {
  color: rgba(255,255,255,0.9);
  opacity: 0.95;
}

.pc-header::before,
.section-header::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 5px;
  width: 10px;
  height: 10px;
  border-right: 2px solid rgba(255,255,255,0.92);
  border-bottom: 2px solid rgba(255,255,255,0.92);
  transform: translateY(-62%) rotate(45deg);
  transform-origin: center;
  transition: transform 0.32s ease, border-color 0.2s ease;
}

.PCstats.active .pc-header::before,
.info-section.active .section-header::before {
  transform: translateY(-38%) rotate(-135deg);
}

/* Dropdown content */
.pc-content,
.section-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
  text-align: left;
}

/* When open */
.PCstats.active .pc-content,
.info-section.active .section-content {
  max-height: 2600px;
  margin-top: 8px;
}

/* Inner blocks */
.pc-block {
  background:
    radial-gradient(circle at top right, rgba(151, 210, 255, 0.16), transparent 45%),
    rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  padding: 10px;
  border-radius: 10px;
  margin-top: 8px;
  text-align: left;
  box-shadow: 0 14px 24px rgba(0,0,0,0.18);
}

/* Lists */
.pc-block ul {
  margin: 0;
  padding-left: 18px;
}

.pc-block li {
  text-align: left;
}

.section-note {
  margin: 0 0 12px 0;
  color: rgba(255,255,255,0.7);
  line-height: 1.35;
}

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

.anime-block {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  background:
    radial-gradient(circle at top right, rgba(151, 210, 255, 0.16), transparent 45%),
    rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  padding: 12px;
  border-radius: 12px;
  box-shadow: 0 14px 24px rgba(0,0,0,0.18);
}

.anime-block-featured {
  grid-template-columns: 1fr;
}

.anime-list-split {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  align-items: stretch;
}

.anime-list-column {
  padding: 8px 18px 4px;
}

.anime-list-column + .anime-list-column {
  border-left: 1px solid rgba(255,255,255,0.08);
}

.anime-visual {
  width: 100%;
  min-height: 132px;
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
  position: relative;
}

.anime-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(0.92) contrast(1.02);
  transition: opacity 0.38s ease, transform 0.38s ease, filter 0.38s ease;
}

.anime-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.04), rgba(0,0,0,0.24));
  pointer-events: none;
}

.anime-visual-featured {
  width: calc(100% - 72px);
  aspect-ratio: 16 / 9;
  min-height: 0;
  margin: 0 auto;
}

.anime-visual img.is-switching {
  opacity: 0.34;
  transform: scale(1.035);
  filter: saturate(0.84) contrast(1) blur(0.6px);
}

.anime-block:not(.anime-block-featured) .anime-visual {
  aspect-ratio: 3 / 5;
  min-height: 0;
  margin-top: 15px;
  margin-left: 8px;
}

.anime-copy {
  min-width: 0;
  text-align: left;
  padding-left: 14px;
  padding-top: 8px;
}

.anime-copy-featured {
  padding-left: 0;
  padding-top: 0;
}

.anime-copy h3 {
  margin: 0 0 8px 0;
  line-height: 1.2;
  word-break: break-word;
}

.anime-copy p {
  margin: 0;
  color: rgba(255,255,255,0.8);
  line-height: 1.45;
}

.anime-copy ul {
  margin: 0;
  padding-left: 20px;
}

.anime-copy li {
  margin-bottom: 4px;
  text-align: left;
}

.introduction {
  margin: 8px 0 0 0;
  word-break: break-word;
  text-align: left;
  line-height: 1.2;
}

.profile-card .status {
  margin: 4px 0 0 0;
  font-size: 20px;
  opacity: 0.9;
}

.profile-card .activity, .profile-card .about {
  margin: 6px 0 0 0;
  font-size: 20px;
  color: #ddd;
}

.current {
  width: 100%;
  text-align: left;
  margin-top: 10px;
}

#current-text {
  transition: opacity 0.3s ease;
  margin: 6px 0 0 0;
  font-size: 18px;
  color: #ccc;
}

@media (max-height: 520px), (max-width: 420px) {
  .profile-card { max-height: 88vh; overflow: auto; }
  .avatar { width: 120px; height: 120px; }
  .anime-block { grid-template-columns: 1fr; }
  .anime-list-column + .anime-list-column { border-left: 0; border-top: 1px solid rgba(255,255,255,0.08); }
  .anime-visual { min-height: 160px; }
}

@media (max-width: 620px) {
  .anime-block {
    grid-template-columns: 1fr;
  }

  .anime-list-column + .anime-list-column {
    border-left: 0;
    border-top: 1px solid rgba(255,255,255,0.08);
  }

  .anime-visual {
    min-height: 150px;
  }

}

/* Top music (monthly Spotify snapshot) */
.top-music-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.top-music-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background:
    linear-gradient(135deg, rgba(84, 197, 124, 0.144), rgba(255, 255, 255, 0.082)),
    rgba(255, 255, 255, 0.055);
  box-shadow: 0 14px 24px rgba(0,0,0,0.18);
  text-decoration: none;
  color: inherit;
}

.top-music-art {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  background: rgba(255,255,255,0.06);
  box-shadow: 0 6px 18px rgba(0,0,0,0.22);
}

.top-music-artist-art {
  border-radius: 50%;
}

.top-music-info {
  min-width: 0;
}

.top-music-label {
  margin: 0 0 4px 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
}

.top-music-name {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.top-music-sub {
  margin: 4px 0 0 0;
  font-size: 13px;
  color: rgba(255,255,255,0.68);
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.top-music-count {
  margin: 4px 0 0 0;
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  line-height: 1.3;
}

.top-music-updated {
  grid-column: 1 / -1;
  margin: 2px 0 0 0;
  font-size: 12px;
  color: rgba(255,255,255,0.45);
  text-align: left;
}

@media (max-width: 620px) {
  .top-music-grid {
    grid-template-columns: 1fr;
  }
}

/* Presence widgets (activity / Spotify) */
.presence-widgets {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 10px;
  width: 100%;
  margin-top: 12px;
  flex-wrap: wrap;
}

.presence-widgets.has-single > * {
  max-width: 420px;
}

.activity-section,
.spotify-section {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: min(100%, 310px);
  margin-top: 0;
  padding: 12px;
  gap: 4px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 16px 28px rgba(0,0,0,0.18);
}

.activity-section {
  background:
    linear-gradient(135deg, rgba(99, 136, 214, 0.24) 0%, rgba(134, 145, 202, 0.1) 100%),
    rgba(255,255,255,0.03);
}

.spotify-section {
  background:
    linear-gradient(135deg, rgba(84, 197, 124, 0.144), rgba(255, 255, 255, 0.082)),
    rgba(255, 255, 255, 0.055);
}

.presence-widgets.has-single :is(.activity-section, .spotify-section) {
  width: min(100%, 390px);
  padding: 14px;
}

.activity-row,
.spotify-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.activity-icon,
.spotify-art {
  display: block;
  width: 94px;
  height: 94px;
  object-fit: cover;
  border-radius: 12px;
  flex-shrink: 0;
  box-shadow: 0 6px 18px rgba(0,0,0,0.22);
}

.presence-widgets.has-single :is(.activity-icon, .spotify-art) {
  width: 110px;
  height: 110px;
}

.activity-icon {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
}

.spotify-art {
  box-shadow: 0 6px 18px rgba(0,0,0,0.32);
}

.activity-icon[hidden] {
  display: none;
}

.activity-info,
.spotify-info {
  flex: 1;
  min-width: 0;
  align-self: center;
}

.activity-info {
  transform: translate(7px, -12px);
}

.spotify-info {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0;
}

.activity-section--no-icon .activity-row {
  gap: 0;
}

.activity-section--no-icon .activity-info {
  transform: translateY(10px);
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  line-height: 1.2;
  color: rgba(255,255,255,0.78);
  font-weight: 600;
  padding: 3px 9px;
  transform: translateY(-4px);
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.08);
}

.presence-widgets.has-single .section-label {
  font-size: 12px;
}

.spotify-logo {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.activity-name,
.spotify-track {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  text-align: left;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.presence-widgets.has-single .activity-name {
  font-size: 22px;
}

.presence-widgets.has-single .spotify-track {
  font-size: 18px;
}

.activity-details,
.activity-last-detail,
.spotify-artist {
  color: rgba(255,255,255,0.68);
  text-align: left;
  line-height: 1.38;
  word-break: break-word;
}

.activity-details {
  margin: 6px 0 0;
  font-size: 15px;
}

.activity-meta-line {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  margin-top: 6px;
  min-width: 0;
}

.activity-last-detail {
  font-size: 13px;
  min-width: 0;
  overflow-wrap: anywhere;
  display: block;
}

.activity-time {
  display: block;
  font-size: 13px;
  color: rgba(255,255,255,0.911);
  text-align: left;
  line-height: 1.2;
  font-weight: 595;
}

.activity-meta-line[hidden],
.activity-last-detail[hidden],
.activity-time[hidden] {
  display: none;
}

.presence-widgets.has-single :is(.activity-details, .activity-last-detail) {
  font-size: 19px;
}

.presence-widgets.has-single .activity-time {
  font-size: 18px;
}

.spotify-artist {
  margin: 10px 0 0;
  font-size: 15px;
}

.presence-widgets.has-single .spotify-artist {
  font-size: 16px;
}

.spotify-progress-container {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin-top: 10px;
}

.spotify-time {
  font-size: 13px;
  color: rgba(255,255,255,0.56);
  text-align: center;
  width: 44px;
  min-width: 44px;
  display: inline-block;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  box-sizing: border-box;
}

.presence-widgets.has-single .spotify-time {
  font-size: 14px;
}

.spotify-progress {
  width: 100%;
  min-width: 0;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  border-radius: 2px;
  outline: none;
}

/* WebKit thumb: pull up to center over track */
.spotify-progress::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  background: #e7e7e7;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
  margin-top: -5px;
}

/* Firefox thumb: translate up to center */
.spotify-progress::-moz-range-thumb {
  width: 12px;
  height: 12px;
  background: rgba(248, 248, 248, 0.178);
  border-radius: 50%;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
  transform: translateY(-5px);
}

/* Non-interactive style when disabled */
.spotify-progress[disabled] {
  pointer-events: none;
}

.spotify-progress[disabled]::-webkit-slider-thumb,
.spotify-progress[disabled]::-moz-range-thumb {
  pointer-events: none;
  opacity: 0.95;
}

.spotify-progress::-webkit-slider-runnable-track {
  background: transparent;
  height: 2px;
  border-radius: 1px;
}

.spotify-progress::-moz-range-track {
  background: transparent;
  height: 2px;
  border-radius: 1px;
  border: none;
}

@media (max-width: 760px) {
  .presence-widgets {
    gap: 12px;
  }

  .activity-section,
  .spotify-section {
    width: min(100%, 340px);
  }
}
