* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: sans-serif;
  background: #f5f5f5;
  color: #222;
}

a {
  color: inherit;
}

.page-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 20px 56px;
}

.top-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.top-links a {
  color: #2563eb;
  text-decoration: none;
  font-size: 15px;
}

.top-links a:hover {
  text-decoration: underline;
}

.profile-panel {
  background: #fff;
  border-radius: 28px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  margin-bottom: 28px;
}

.profile-top {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 28px;
  padding: 30px;
}

.avatar-wrap {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.avatar-image-wrap {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: inset 0 0 0 4px rgba(255,255,255,0.12), 0 10px 24px rgba(0,0,0,0.14);
  background: #ddd;
}

.avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-main {
  min-width: 0;
}

.profile-head {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  align-items: center;
  margin-bottom: 12px;
}

.profile-name {
  margin: 0;
  font-size: 34px;
  line-height: 1.2;
  font-weight: 800;
  color: #111;
}

.type-badge {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.profile-sub {
  color: #666;
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 18px;
}

.profile-follow-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.profile-follow-summary {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.profile-follow-stat {
  min-width: 120px;
  padding: 12px 14px;
  border-radius: 16px;
  background: #fafafa;
  border: 1px solid #ececec;
}

.profile-follow-stat-label {
  display: block;
  font-size: 12px;
  color: #666;
  font-weight: 700;
  margin-bottom: 6px;
}

.profile-follow-stat-value {
  display: block;
  font-size: 20px;
  line-height: 1.2;
  color: #111;
  font-weight: 800;
}

.profile-follow-stat-link {
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.profile-follow-stat-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.06);
  background: #f5f5f5;
}

.profile-follow-action {
  display: flex;
  align-items: center;
}

.follow-toggle-button {
  appearance: none;
  border: none;
  border-radius: 999px;
  min-height: 44px;
  padding: 0 18px;
  background: #111;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.18s ease, opacity 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.follow-toggle-button:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.follow-toggle-button:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.follow-toggle-button.is-following {
  background: #e5e7eb;
  color: #111;
}

.profile-follow-login-note {
  font-size: 13px;
  color: #666;
  font-weight: 700;
}

.bio-block {
  padding-top: 4px;
}

.block-title {
  font-size: 14px;
  font-weight: 800;
  color: #111;
  margin-bottom: 12px;
  letter-spacing: 0.02em;
}

.bio {
  background: #f8f8f8;
  border: 1px solid #ececec;
  border-radius: 18px;
  padding: 14px 16px;
  color: #333;
  text-align: left;
  line-height: 1.7;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.empty-text {
  color: #777;
}

.profile-divider {
  height: 1px;
  background: #ececec;
}

.profile-sections {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.panel-block {
  padding: 26px 28px;
  border-right: 1px solid #ececec;
  border-bottom: 1px solid #ececec;
}

.panel-block:nth-child(2n) {
  border-right: none;
}

.panel-block-full {
  grid-column: 1 / -1;
  border-right: none;
}

.info-stack,
.software-list {
  display: grid;
  gap: 12px;
}

.info-item,
.software-item,
.trophy-item {
  padding: 14px 16px;
  border-radius: 16px;
  background: #f8f8f8;
  border: 1px solid #ececec;
}

.info-label {
  font-size: 12px;
  font-weight: 700;
  color: #666;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.tag:hover {
  opacity: 0.92;
}

.selected-trophy-single-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.selected-trophy-single-title {
  font-size: 22px;
  font-weight: 800;
  color: #111;
  line-height: 1.3;
}

.selected-trophy-single-image-button {
  display: block;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
}

.selected-trophy-single-image-frame {
  width: 112px;
  height: 112px;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(180deg, #ffffff 0%, #f2f2f2 100%);
  border: 1px solid #e5e7eb;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
}

.selected-trophy-single-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.selected-trophy-single-no-image {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #777;
  font-size: 12px;
  font-weight: 700;
  background: #f3f4f6;
}

.selected-trophy-single-note {
  font-size: 13px;
  color: #666;
  line-height: 1.8;
  font-weight: 700;
}

.show-trophy-glow-soft {
  filter: drop-shadow(0 0 8px rgba(255, 220, 120, 0.45));
}

.show-trophy-glow-gold {
  filter:
    drop-shadow(0 0 6px rgba(255, 210, 80, 0.55))
    drop-shadow(0 0 14px rgba(255, 180, 40, 0.45));
}

.show-trophy-glow-rainbow {
  animation: showTrophyRainbowGlow 2.8s linear infinite;
}

@keyframes showTrophyRainbowGlow {
  0%   { filter: drop-shadow(0 0 8px #ff5a5a); }
  25%  { filter: drop-shadow(0 0 8px #ffd95a); }
  50%  { filter: drop-shadow(0 0 8px #62ff9b); }
  75%  { filter: drop-shadow(0 0 8px #62a8ff); }
  100% { filter: drop-shadow(0 0 8px #ff5aef); }
}

.show-detail-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.42);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 3000;
}

.show-detail-overlay.show {
  display: flex;
}

.show-detail-modal {
  width: min(720px, 100%);
  background: #fff;
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
  position: relative;
}

.show-detail-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 999px;
  background: #f3f4f6;
  color: #222;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
}

.show-detail-title {
  font-size: 28px;
  font-weight: 800;
  color: #111;
  margin-bottom: 16px;
  line-height: 1.3;
  padding-right: 48px;
}

.show-detail-image-wrap {
  width: 180px;
  height: 180px;
  border-radius: 22px;
  overflow: hidden;
  background: linear-gradient(180deg, #ffffff 0%, #f2f2f2 100%);
  border: 1px solid #e5e7eb;
  margin-bottom: 16px;
}

.show-detail-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.show-detail-no-image {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #777;
  font-size: 12px;
  font-weight: 700;
  background: #f3f4f6;
}

.show-detail-description {
  background: #fafafa;
  border: 1px solid #ececec;
  border-radius: 16px;
  padding: 16px 18px;
  color: #333;
  line-height: 1.9;
  margin-bottom: 14px;
  word-break: break-word;
}

.show-detail-meta {
  font-size: 14px;
  color: #555;
  line-height: 1.9;
}

.tracks-section {
  background: #fff;
  border-radius: 28px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 26px 28px 18px;
}

.section-head h2 {
  margin: 0;
  font-size: 26px;
  color: #111;
}

.track-count {
  font-size: 14px;
  color: #666;
  font-weight: 700;
}

.empty-box {
  margin: 0 28px 28px;
  background: #f8f8f8;
  border: 1px dashed #d1d5db;
  border-radius: 16px;
  padding: 22px;
  color: #666;
  font-size: 14px;
  line-height: 1.7;
}

.track-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  padding: 0 28px 28px;
}

.track-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: #fafafa;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.track-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.09);
}

.track-cover {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #e5e5e5;
  overflow: hidden;
}

.track-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.track-cover-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #d9d9d9, #bdbdbd);
  color: #444;
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  padding: 12px;
}

.track-meta {
  padding: 16px 16px 18px;
}

.track-title {
  margin: 0 0 10px;
  font-size: 20px;
  line-height: 1.35;
  color: #111;
  word-break: break-word;
}

.track-genre {
  margin-bottom: 10px;
  font-size: 13px;
  color: #444;
  font-weight: 700;
}

.track-stats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;
  color: #666;
  line-height: 1.5;
}

@media (max-width: 900px) {
  .profile-top {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .avatar-wrap {
    justify-content: flex-start;
  }

  .profile-sections {
    grid-template-columns: 1fr;
  }

  .panel-block {
    border-right: none;
  }

  .track-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .page-wrap {
    padding: 24px 14px 40px;
  }

  .profile-panel,
  .tracks-section {
    border-radius: 22px;
  }

  .profile-top {
    padding: 20px;
  }

  .panel-block {
    padding: 20px;
  }

  .section-head {
    padding: 20px 20px 16px;
  }

  .track-grid {
    padding: 0 20px 20px;
    grid-template-columns: 1fr;
  }

  .empty-box {
    margin: 0 20px 20px;
  }

  .avatar-image-wrap {
    width: 110px;
    height: 110px;
  }

  .profile-name {
    font-size: 28px;
  }

  .profile-follow-row {
    align-items: stretch;
  }

  .profile-follow-summary {
    width: 100%;
  }

  .profile-follow-stat {
    flex: 1 1 140px;
  }

  .profile-follow-action {
    width: 100%;
  }

  .follow-toggle-button {
    width: 100%;
    justify-content: center;
  }

  .selected-trophy-single-title {
    font-size: 20px;
  }

  .selected-trophy-single-image-frame {
    width: 96px;
    height: 96px;
    border-radius: 16px;
  }

  .show-detail-modal {
    padding: 18px;
    border-radius: 18px;
  }

  .show-detail-title {
    font-size: 22px;
  }

  .show-detail-image-wrap {
    width: 140px;
    height: 140px;
    border-radius: 18px;
  }

  .section-head h2 {
    font-size: 22px;
  }

  .top-links a,
  .profile-sub,
  .bio,
  .software-item,
  .track-count,
  .empty-box,
  .track-stats,
  .track-genre,
  .profile-follow-login-note,
  .selected-trophy-single-note,
  .show-detail-meta {
    font-size: 13px;
  }

  .track-title {
    font-size: 18px;
  }
}