/* Base */
body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background: #fff7f8 url('/assets/bg-tile.gif') repeat;
  color: #333;
  font-size: 13px;
}

/* Topbar */
.topbar {
  background: #ffe6f0;
  padding: 6px 12px;
  font-size: 13px;
  border-bottom: 2px solid #ff99cc;
}

.topbar a {
  color: #cc3388;
  text-decoration: none;
  margin-right: 12px;
}

.topbar a.active {
  font-weight: bold;
  color: #880044;
}

.topbar a:hover {
  text-decoration: underline;
}

.spacer {
  display: inline-block;
  width: 24px;
}

/* Breadcrumbs */
.breadcrumbs {
  font-size: 11px;
  color: #999;
  margin: 6px 12px;
}

.breadcrumbs a {
  color: #cc3388;
  text-decoration: none;
}

/* Layout */
.layout {
  display: flex;
  width: 960px;
  margin: 20px auto;
  gap: 20px;
}

/* Sidebar */
.sidebar {
  flex: 0 0 180px;
  background: #fff0f5;
  border: 1px solid #ff99cc;
  padding: 8px;
  border-radius: 12px;
  height: fit-content;
}

.sidebar a {
  display: block;
  padding: 4px 6px;
  font-size: 13px;
  color: #cc3388;
  text-decoration: none;
  margin-bottom: 4px;
}

.sidebar a.active {
  font-weight: bold;
  color: #880044;
}

.sidebar a:hover {
  background: #ffe6f0;
  border-radius: 6px;
}

.menu-title {
  font-weight: bold;
  margin-bottom: 8px;
}

/* Content */
.content {
  flex: 1;
}

/* Profile Card */
.profile-card {
  background: #fff;
  border: 1px solid #ff99cc;
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(255,153,204,0.3);
}

.profile-header {
  background: #ffccdd;
  padding: 8px 12px;
  font-weight: bold;
  font-size: 14px;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}

.profile-body {
  padding: 16px;
}

/* Flex main */
.profile-main {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

/* Avatar */
.avatar-box {
  flex: 0 0 140px;
}

.avatar {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 3px solid #ff99cc;
  transition: all 0.2s ease;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.avatar:hover {
  box-shadow: 0 0 12px rgba(255,153,204,0.6);
  transform: translateY(-2px);
}

/* Info */
.info {
  flex: 1;
}

.info h1 {
  font-size: 20px;
  margin: 0 0 6px 0;
  color: #cc3388;
}

.rank-inline a {
  color: #880044;
  font-size: 12px;
  text-decoration: none;
  margin-left: 6px;
}

.rank-inline a:hover {
  text-decoration: underline;
}

.levelbox {
  margin-top: 12px;
  padding: 8px;
  background: #fff0f5;
  border: 1px solid #ff99cc;
  border-radius: 10px;
  width: 100%;
  box-sizing: border-box;
}

.box-title {
  font-size: 12px;
  font-weight: bold;
  margin-bottom: 4px;
  color: #cc3388;
}

.progress {
  width: 100%;
  height: 18px;
  background: #ffe6f0;
  border-radius: 12px;
  position: relative;
  border: 1px solid #ff99cc;
  margin-bottom: 4px;
}

.progress .bar {
  height: 100%;
  border-radius: 12px;
  background: linear-gradient(90deg, #ff99cc, #cc3388);
}

.progress span {
  position: absolute;
  width: 100%;
  text-align: center;
  top: 0;
  line-height: 18px;
  font-size: 12px;
  color: #fff;
  font-weight: bold;
}

.level-inline {
  font-size: 12px;
  color: #880044;
}

.balance {
  margin-top: 6px;
  font-size: 13px;
}

.joined {
  margin-top: 6px;
  font-size: 11px;
  color: #555;
  position: relative;
}

.joined .hint {
  display: none;
  position: absolute;
  left: 0;
  top: 16px;
  background: #fff0f5;
  border: 1px solid #ff99cc;
  padding: 3px 6px;
  font-size: 11px;
  color: #880044;
  white-space: nowrap;
}

.joined:hover .hint {
  display: block;
}

/* Footer */
.profile-footer {
  border-top: 1px solid #ff99cc;
  padding: 8px 12px;
  font-size: 12px;
  color: #880044;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
}

.footer {
  text-align: center;
  font-size: 11px;
  color: #cc3388;
  margin: 20px 0;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}

.tab {
  padding: 4px 10px;
  background: #ffe6f0;
  border: 1px solid #ff99cc;
  border-radius: 10px;
  font-size: 12px;
  color: #cc3388;
  text-decoration: none;
}

.tab:hover {
  background: #ffd6e8;
}

.tab.active {
  background: #ffccdd;
  color: #880044;
  font-weight: bold;
}

/* Leaderboard table */
.leaderboard {
  width: 100%;
  border-collapse: collapse;
}

.leaderboard th,
.leaderboard td {
  padding: 6px 8px;
  text-align: left;
}

.profile-body {
  width: 100%;
  box-sizing: border-box;
}

.content {
  flex: 1 1 auto;
}
