.role-detail-page {
  position: relative;
  min-height: 100%;
  color: #fff;
  overflow: hidden;
}

.role-detail-bg {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 20% 18%, color-mix(in srgb,var(--theme-color) 48%,transparent), transparent 34%),
    radial-gradient(circle at 76% 12%, rgba(106,151,255,.34), transparent 32%),
    linear-gradient(145deg,#151a5c 0%,#0a0e35 72%);
  z-index: 0;
}

.role-detail-bg::after {
  content:'';
  position:absolute;
  inset:0;
  opacity:.3;
  background-image:radial-gradient(circle,#fff 0 1px,transparent 1.4px);
  background-size:38px 38px;
  mask-image:linear-gradient(to bottom,#000,transparent 78%);
}

.role-detail-page::after {
  content: '';
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, rgba(20,18,60,0.55) 0%, rgba(45,30,90,0.45) 100%);
  z-index: 0;
}

.role-detail-header {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px 0;
}

.role-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: rgba(255,255,255,0.7);
}

.role-breadcrumb a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
}

.role-breadcrumb a:hover { color: #fff; }

.role-breadcrumb .current { color: #fff; font-weight: 500; }

.role-join-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  background: linear-gradient(135deg, #FFD166 0%, #F5B65A 100%);
  border-radius: 999px;
  color: #2d1e5a;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(245,182,90,0.35);
}

.role-join-btn .star { font-size: 16px; }

.role-detail-scroll {
  position: relative;
  z-index: 1;
  height: calc(100vh - 130px);
  overflow-y: auto;
  padding: 20px 24px 100px;
}

.role-detail-hero {
  display: grid;
  grid-template-columns: 260px 1fr 320px;
  gap: 28px;
  align-items: center;
  margin-bottom: 24px;
}

.role-hero-visual {
  position: relative;
  height: 320px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.role-hero-image {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,0.25));
}

.role-hero-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.role-hero-title {
  font-size: 42px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 12px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

.role-hero-title .crown { font-size: 32px; display: inline-flex; align-items: center; vertical-align: middle; margin-left: 6px; }
.role-hero-title .crown img { width: 28px; height: 28px; object-fit: contain; }

.role-hero-tags {
  display: flex;
  gap: 10px;
}

.role-hero-tag {
  padding: 6px 16px;
  border-radius: 999px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.25);
  font-size: 14px;
}

.role-hero-desc {
  font-size: 15px;
  line-height: 1.7;
  color: rgba(255,255,255,0.85);
  max-width: 520px;
}

.role-hero-level {
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 18px;
  padding: 18px 20px;
}

.level-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
}

.level-header .level-exp {
  margin-left: auto;
  font-weight: 500;
  color: rgba(255,255,255,0.8);
}

.level-progress-bar {
  height: 10px;
  background: rgba(255,255,255,0.15);
  border-radius: 999px;
  margin: 12px 0 8px;
  overflow: hidden;
}

.level-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #FFD166, #ff9ecd);
  border-radius: 999px;
}

.level-next {
  font-size: 13px;
  color: rgba(255,255,255,0.75);
}

.role-detail-grid {
  display: grid;
  grid-template-columns: 320px 1fr 1fr 300px;
  grid-template-rows: auto auto;
  gap: 20px;
}

.role-card {
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 20px;
  padding: 18px;
}

.card-title {
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.role-story-card {
  grid-row: span 2;
  display: flex;
  flex-direction: column;
}

.story-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.story-thumb {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 14px;
}

.story-name {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
}

.story-desc {
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255,255,255,0.75);
}

.story-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 12px;
  padding: 10px;
  background: rgba(255,255,255,0.12);
  border-radius: 12px;
  color: #fff;
  text-decoration: none;
  font-size: 14px;
}

.profile-list > div {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  font-size: 14px;
}

.profile-list dt { color: rgba(255,255,255,0.65); }
.profile-list dd { font-weight: 500; }

.abilities-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.ability-item {
  text-align: center;
}

.ability-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border-radius: 0;
}
.ability-icon img {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.ability-name { font-size: 13px; margin-bottom: 2px; }
.ability-level { font-size: 12px; color: rgba(255,255,255,0.65); }

.task-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.task-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: rgba(255,255,255,0.08);
  border-radius: 14px;
}

.task-info { flex: 1; }
.task-name { font-size: 14px; margin-bottom: 6px; }

.task-progress-bar {
  height: 6px;
  background: rgba(255,255,255,0.12);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 4px;
}

.task-progress-fill {
  height: 100%;
  background: #FFD166;
  border-radius: 999px;
}

.task-progress-text {
  font-size: 12px;
  color: rgba(255,255,255,0.65);
}

.task-reward {
  font-size: 13px;
  color: #FFD166;
  font-weight: 700;
  white-space: nowrap;
}

.task-btn {
  padding: 7px 16px;
  border: none;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  font-size: 13px;
}

.task-btn.claim {
  background: linear-gradient(135deg, #ff9ecd, #E879A8);
  color: #fff;
}

.task-btn.go {
  background: rgba(255,255,255,0.2);
  color: #fff;
}

.task-refresh {
  margin-top: 12px;
  font-size: 12px;
  color: rgba(255,255,255,0.65);
}

.badges-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.badge-item {
  text-align: center;
}

.badge-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
}
.badge-icon img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.badge-empty .badge-icon {
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.5);
}

.badge-name { font-size: 12px; color: rgba(255,255,255,0.8); }

.badges-link {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  background: rgba(255,255,255,0.1);
  border-radius: 12px;
  color: #fff;
  text-decoration: none;
  font-size: 13px;
}

.role-detail-actions {
  position: fixed;
  bottom: 0;
  left: 88px;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 16px 24px 24px;
  background: linear-gradient(0deg, rgba(20,18,60,0.95), transparent);
}

.action-back {
  position: absolute;
  left: 24px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  background: rgba(255,255,255,0.12);
  border-radius: 999px;
  color: #fff;
  text-decoration: none;
  font-size: 14px;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 42px;
  border: none;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
}

.action-interact {
  background: linear-gradient(135deg, #ff9ecd 0%, #E879A8 100%);
}

.action-story {
  background: linear-gradient(135deg, #9B7BFF 0%, #7B6CDB 100%);
}

.action-btn .icon { font-size: 18px; }

/* 滚动条 */
.role-detail-scroll::-webkit-scrollbar { width: 6px; }
.role-detail-scroll::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.2);
  border-radius: 999px;
}
