@import url('https://fonts.googleapis.com/css2?family=Exo+2:ital,wght@0,300..900;1,300..900&family=Comfortaa:wght@600;700;800;900&family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --font: 'Exo 2', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-game: 'Exo 2', 'Comfortaa', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: 'Exo 2', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --bg-darkest: #05080c;
  --bg-primary: #0a1118;
  --bg-secondary: #101923;
  --bg-card: rgba(16, 25, 36, 0.88);
  --bg-input: #080d13;
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-neon: rgba(0, 245, 160, 0.35);
  --border-neon-hover: rgba(0, 245, 160, 0.8);
  
  --accent-mint: #00f5a0;
  --accent-teal: #00d9f5;
  --accent-emerald: #10b981;
  --accent-gold: #ffbe3b;
  --accent-pink: #ff5cad;
  --accent-gradient: linear-gradient(135deg, #00f5a0 0%, #00d9f5 100%);
  --bar-gradient: linear-gradient(90deg, #10b981 0%, #00f5a0 100%);
  
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-pill: 9999px;
  
  --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.5);
  --shadow-neon: 0 0 20px rgba(0, 245, 160, 0.25);
  --transition: all 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}

html[data-theme="dark"] {
  --bg: #17151f;
  --bg-elevated: #1e1b28;
  --surface: #221f2d;
  --surface-hover: #2b2739;
  --border: rgba(255, 255, 255, 0.12);
  --text-primary: #ffffff;
  --text-secondary: #dcd4ec;
  --text-tertiary: #ada3c4;
  --pink: #ff5cad;
  --pink-soft: rgba(255, 92, 173, 0.16);
  --teal: #37e6c4;
  --gold: #ffcc4d;
  --violet: #9b6bff;
  --green: #4ce88a;
  --track: rgba(255, 255, 255, 0.08);

  --bg-card: #221f2d;
  --text-main: #ffffff;
  --text-muted: #dcd4ec;
}

html[data-theme="light"] {
  --bg: #f2eefb;
  --bg-elevated: #ffffff;
  --surface: #ffffff;
  --surface-hover: #f4eefe;
  --border: rgba(30, 20, 50, 0.09);
  --text-primary: #221a33;
  --text-secondary: #665d7d;
  --text-tertiary: #9891ab;
  --pink: #dd2585;
  --pink-soft: rgba(221, 37, 133, 0.10);
  --teal: #0ca88d;
  --gold: #b17e00;
  --violet: #6d3fe0;
  --green: #1c9a5c;
  --track: rgba(30, 20, 50, 0.06);

  --bg-card: #ffffff;
  --text-main: #221a33;
  --text-muted: #665d7d;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

a, a:hover, a:focus, a:active {
  text-decoration: none !important;
}

body {
  font-family: var(--font-body);
  background: #06090d url('/assets/menu-background.jpg') no-repeat center top / cover fixed;
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at 50% 20%, rgba(6, 9, 13, 0.45) 0%, rgba(6, 9, 13, 0.88) 100%);
  pointer-events: none;
  z-index: 0;
}

/* Dynamic ambient rhomboids background (like in-game menu) */
.ambient-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.65;
}

/* Suppress automated agent actuation overlay if injected into page */
#preact-border-shadow-host {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: hidden !important;
}

/* Headings */
h1, h2, h3, h4, .brand-text, .game-font {
  font-family: var(--font-game);
  letter-spacing: -0.5px;
}

/* Game Top Toolbar */
.navbar {
  height: 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2.5rem;
  background: rgba(8, 13, 19, 0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1.5px solid rgba(0, 245, 160, 0.18);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: #fff;
  transition: var(--transition);
}

.nav-brand:hover {
  transform: scale(1.03);
}

/* The iconic POP! logo image and fallback cookie */
.nav-logo-img {
  height: 42px;
  width: auto;
  filter: drop-shadow(0 2px 10px rgba(0, 245, 160, 0.4));
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: block;
}

.nav-brand:hover .nav-logo-img {
  transform: scale(1.08) rotate(-2deg);
}

.logo-cookie {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #00f5a0 0%, #00a870 100%);
  border: 2px solid #ffffff;
  box-shadow: 0 0 14px rgba(0, 245, 160, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-game);
  font-weight: 900;
  font-size: 0.95rem;
  color: #051015;
  user-select: none;
}

.brand-title {
  font-size: 1.35rem;
  font-weight: 800;
  background: linear-gradient(180deg, #ffffff 30%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-links a {
  font-family: var(--font-game);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  position: relative;
}

.nav-links a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.nav-links a.active {
  color: var(--accent-mint);
  background: rgba(0, 245, 160, 0.1);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* In-game Button Styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-game);
  font-weight: 800;
  font-size: 0.9rem;
  padding: 0.55rem 1.35rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: var(--transition);
  user-select: none;
}

.btn-primary {
  background: var(--accent-gradient);
  color: #041219;
  box-shadow: 0 4px 16px rgba(0, 245, 160, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 24px rgba(0, 245, 160, 0.55);
}

.btn-secondary {
  background: rgba(16, 25, 36, 0.85);
  color: var(--text-main);
  border-color: var(--border-neon);
}

.btn-secondary:hover {
  background: rgba(0, 245, 160, 0.12);
  border-color: var(--border-neon-hover);
  color: #fff;
  transform: translateY(-1px);
}

/* Main Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  position: relative;
  z-index: 1;
}

/* Hero Section with interactive pulsing logo */
.hero {
  text-align: center;
  padding: 4rem 1rem 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.big-logo-container {
  position: relative;
  margin-bottom: 2rem;
  cursor: pointer;
  display: inline-block;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
}

.big-logo-img {
  width: 280px;
  max-width: 75vw;
  height: auto;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
  filter: drop-shadow(0 0 24px rgba(0, 245, 160, 0.55)) drop-shadow(0 12px 28px rgba(0, 0, 0, 0.7));
  animation: logoDropShadowPulse 2.4s ease-in-out infinite;
  cursor: pointer;
  user-select: none;
  transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: block;
}

.big-logo-img:hover {
  transform: scale(1.06);
  filter: drop-shadow(0 0 45px rgba(0, 245, 160, 0.85)) drop-shadow(0 16px 36px rgba(0, 0, 0, 0.8));
}

.big-logo-img:active {
  transform: scale(0.96);
}

@keyframes logoDropShadowPulse {
  0%, 100% {
    filter: drop-shadow(0 0 20px rgba(0, 245, 160, 0.45)) drop-shadow(0 10px 24px rgba(0, 0, 0, 0.65));
    transform: scale(1);
  }
  50% {
    filter: drop-shadow(0 0 48px rgba(0, 245, 160, 0.85)) drop-shadow(0 15px 32px rgba(0, 0, 0, 0.8));
    transform: scale(1.028);
  }
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1.1rem;
  background: rgba(0, 245, 160, 0.12);
  border: 1.5px solid var(--border-neon);
  border-radius: var(--radius-pill);
  font-family: var(--font-game);
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--accent-mint);
  margin-bottom: 1.25rem;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 1rem;
  background: linear-gradient(180deg, #ffffff 40%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero h1 span {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 2.5rem;
}

/* Stats Ribbon */
.stats-ribbon {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin: 2.5rem 0;
}

.stat-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.75rem 1.5rem;
  text-align: center;
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-card);
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-neon);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6), 0 0 15px rgba(0, 245, 160, 0.15);
}

.stat-card .number {
  font-family: var(--font-game);
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--accent-mint);
  line-height: 1.1;
}

.stat-card .label {
  font-family: var(--font-game);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 0.4rem;
}

/* ============================================================
   AUTHENTIC IN-GAME UI COMPONENTS (CLONED DIRECTLY FROM POP.Game)
   ============================================================ */

/* 2. In-Game Section Header (with sheared diamond accent) */
.game-section-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 3.5rem 0 1.5rem;
}

.game-section-diamond {
  width: 14px;
  height: 14px;
  background: var(--accent-mint);
  transform: rotate(45deg);
  box-shadow: 0 0 10px rgba(0, 245, 160, 0.7);
}

.game-section-title {
  font-family: var(--font-game);
  font-size: 1.45rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #ffffff;
}

.game-section-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(0, 245, 160, 0.4) 0%, transparent 100%);
}

/* 3. In-Game User Grid Panel (Clone of UserGridPanel.cs) */
.in-game-user-panel {
  background: rgba(12, 19, 28, 0.94);
  border: 1.5px solid rgba(0, 245, 160, 0.28);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 1.25rem;
  align-items: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
}

.in-game-avatar-box {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  overflow: hidden;
  border: 3px solid var(--dashboard-purple, #9b62ff);
  box-shadow: 0 4px 15px rgba(155, 98, 255, 0.35);
  background: #080d13;
}

.in-game-avatar-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.in-game-user-details h3 {
  font-family: var(--font-game);
  font-weight: 900;
  font-size: 1.3rem;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.in-game-user-stats-strip {
  display: flex;
  gap: 1.5rem;
  margin-top: 0.4rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.in-game-user-stats-strip strong {
  color: var(--accent-mint);
  font-family: var(--font-game);
}

.in-game-panel-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* 4. In-Game Song Select Carousel Cards (BeatmapCards) */
.beatmap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.beatmap-card {
  background: rgba(13, 20, 29, 0.94);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
  transition: all 0.22s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
}

.beatmap-card:hover {
  transform: translateY(-4px);
  border-color: #00f5a0;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.7), 0 0 25px rgba(0, 245, 160, 0.25);
}

.beatmap-banner {
  height: 120px;
  position: relative;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
  padding: 0.85rem 1rem;
}

.beatmap-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(13, 20, 29, 0.2) 0%, rgba(13, 20, 29, 0.95) 100%);
}

.diff-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  font-family: var(--font-game);
  font-weight: 900;
  font-size: 0.78rem;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(8px);
  border: 1px solid currentColor;
  z-index: 1;
}

.diff-expert { color: #f43f5e; }
.diff-insane { color: #ec4899; }
.diff-hard { color: #eab308; }

.beatmap-content {
  padding: 1rem 1.15rem;
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.beatmap-title {
  font-family: var(--font-game);
  font-weight: 800;
  font-size: 1.15rem;
  color: #fff;
  line-height: 1.2;
}

.beatmap-artist {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.beatmap-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.78rem;
  color: var(--text-dim);
}

/* 5. In-Game Direct Connect HUD */
.direct-connect-hud {
  background: rgba(10, 16, 23, 0.95);
  border: 1.5px solid rgba(0, 245, 160, 0.35);
  border-radius: 12px;
  padding: 1.75rem 2rem;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  margin: 3rem 0;
  flex-wrap: wrap;
}

.connect-info {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.connect-pulse-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent-mint);
  box-shadow: 0 0 12px var(--accent-mint);
  animation: connectPulse 1.8s infinite;
}

@keyframes connectPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.5; }
}

.connect-details h4 {
  font-family: var(--font-game);
  font-size: 1.1rem;
  font-weight: 900;
  color: #fff;
  margin-bottom: 2px;
}

.connect-details p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.connect-url-pill {
  background: #05080c;
  border: 1px solid rgba(0, 245, 160, 0.3);
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius-sm);
  font-family: monospace;
  font-size: 0.95rem;
  color: var(--accent-mint);
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

/* In-game Style Auth Card */
.auth-wrapper {
  min-height: calc(100vh - 180px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.auth-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-neon);
  border-radius: var(--radius-lg);
  padding: 2.75rem 2.5rem;
  width: 100%;
  max-width: 440px;
  backdrop-filter: blur(24px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 30px rgba(0, 245, 160, 0.15);
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-header h2 {
  font-size: 1.85rem;
  font-weight: 900;
  margin-bottom: 0.4rem;
}

.auth-header p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.form-group {
  margin-bottom: 1.35rem;
}

.form-label {
  display: block;
  font-family: var(--font-game);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 0.45rem;
}

.form-input {
  width: 100%;
  padding: 0.8rem 1rem;
  background: var(--bg-input);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: var(--transition);
}

.form-input:focus {
  outline: none;
  border-color: var(--accent-mint);
  box-shadow: 0 0 0 3px rgba(0, 245, 160, 0.2);
  background: #0b141d;
}

.form-footer {
  margin-top: 1.75rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.form-footer a {
  color: var(--accent-mint);
  text-decoration: none;
  font-weight: 700;
}

.form-footer a:hover {
  text-decoration: none;
}

/* Alert Notification */
.alert {
  padding: 0.9rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  display: none;
  backdrop-filter: blur(12px);
}

.alert.success {
  display: block;
  background: rgba(0, 245, 160, 0.15);
  border: 1.5px solid var(--accent-mint);
  color: var(--accent-mint);
}

.alert.error {
  display: block;
  background: rgba(239, 68, 68, 0.15);
  border: 1.5px solid rgba(239, 68, 68, 0.5);
  color: #f87171;
}

/* Leaderboard Table */
.table-wrapper {
  background: var(--bg-card);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-card);
  margin: 2rem 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

th {
  background: rgba(8, 13, 19, 0.85);
  padding: 1.1rem 1.25rem;
  font-family: var(--font-game);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.75px;
  color: var(--text-muted);
  border-bottom: 1.5px solid var(--border-subtle);
}

td {
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.95rem;
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background: rgba(0, 245, 160, 0.03);
}

.rank-badge {
  font-family: var(--font-game);
  font-weight: 900;
  font-size: 1.05rem;
  display: inline-block;
  width: 32px;
}

.rank-1 { color: #ffd700; text-shadow: 0 0 12px rgba(255, 215, 0, 0.6); }
.rank-2 { color: #c0c0c0; text-shadow: 0 0 12px rgba(192, 192, 192, 0.6); }
.rank-3 { color: #cd7f32; text-shadow: 0 0 12px rgba(205, 127, 50, 0.6); }

.player-name {
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.player-flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.player-flag .flag-icon-img {
  height: 15px;
  width: 22px;
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.flag-icon-img {
  display: inline-block;
  vertical-align: middle;
  height: 15px;
  width: 22px;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

.pp-value {
  font-family: var(--font-game);
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--accent-mint);
}

/* Footer */
footer {
  text-align: center;
  padding: 3.5rem 1rem;
  border-top: 1.5px solid var(--border-subtle);
  color: var(--text-muted);
  font-family: var(--font-game);
  font-size: 0.85rem;
  margin-top: 5rem;
  position: relative;
  z-index: 1;
}

/* ========================================================
   AUTHENTIC OSU! WEB STYLE MENU & SUB-HEADER SYSTEM
   ======================================================== */

body.theme-rankings {
  --osu-nav-accent: #00f5a0;
  --osu-header-bg: #0d1f14;
  --osu-subnav-bg: #09170e;
  --osu-filter-bg: #11261a;
  background-color: #07120a;
}

body.theme-profile {
  --osu-nav-accent: #ff66ab;
  --osu-header-bg: #23121d;
  --osu-subnav-bg: #1a0b15;
  --osu-filter-bg: #2b1724;
  background-color: #120910;
}

body.theme-home, body:not(.theme-rankings):not(.theme-profile) {
  --osu-nav-accent: #ff66ab;
  --osu-header-bg: #1c1520;
  --osu-subnav-bg: #130d17;
  --osu-filter-bg: #201726;
  background-color: #0d0912;
}

/* Authentic osu! polygonal header tessellation effect */
.osu-polygonal-mesh {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 220px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.28;
  background-image: 
    radial-gradient(circle at 50% 0%, var(--osu-nav-accent) 0%, transparent 70%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.08) 25%, transparent 25%), 
    linear-gradient(225deg, rgba(255, 255, 255, 0.08) 25%, transparent 25%), 
    linear-gradient(315deg, rgba(255, 255, 255, 0.08) 25%, transparent 25%), 
    linear-gradient(45deg, rgba(255, 255, 255, 0.08) 25%, transparent 25%);
  background-size: 100% 100%, 54px 54px, 54px 54px, 54px 54px, 54px 54px;
  background-position: 0 0, 0 0, 27px 0, 27px -27px, 0px 27px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 30%, rgba(0,0,0,0) 100%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 30%, rgba(0,0,0,0) 100%);
}

/* Master Top Navigation Bar */
.osu-navbar-wrapper {
  position: sticky;
  top: 0;
  z-index: 999;
  width: 100%;
}

.osu-navbar {
  height: 52px;
  background: rgba(18, 14, 20, 0.96);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  position: relative;
  z-index: 100;
}

.osu-nav-left {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 1.5rem;
}

/* Authentic POP! logo in navbar */
.osu-cookie-brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  padding: 2px 0;
}
.osu-cookie-brand:hover {
  transform: scale(1.08);
}
.osu-nav-logo-img {
  width: 42px;
  height: 42px;
  max-width: 42px;
  object-fit: contain;
  object-position: center;
  display: block;
  flex: 0 0 42px;
  filter: drop-shadow(0 0 8px rgba(0, 245, 160, 0.5));
  transition: filter 0.2s ease, transform 0.2s ease;
}
.osu-cookie-brand:hover .osu-nav-logo-img {
  filter: drop-shadow(0 0 16px rgba(0, 245, 160, 0.85));
}
.osu-cookie-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 3px solid #ffffff;
  background: radial-gradient(circle at 35% 35%, #00f5a0 0%, #00965d 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 14px rgba(0, 245, 160, 0.6), inset 0 2px 4px rgba(255, 255, 255, 0.4);
  position: relative;
  user-select: none;
}
.osu-cookie-circle.green {
  background: radial-gradient(circle at 35% 35%, #00f5a0 0%, #00965d 100%);
  box-shadow: 0 0 14px rgba(0, 245, 160, 0.6), inset 0 2px 4px rgba(255, 255, 255, 0.4);
}
.osu-cookie-text {
  font-family: var(--font-game);
  font-weight: 900;
  font-size: 0.88rem;
  color: #ffffff;
  letter-spacing: -0.5px;
  transform: rotate(-5deg);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* Lowercase nav links */
.osu-nav-links {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 0.25rem;
}

.osu-nav-item {
  display: inline-flex;
  align-items: center;
  height: 52px;
  padding: 0 0.95rem;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  text-transform: lowercase;
  position: relative;
  transition: color 0.15s ease, background 0.15s ease;
  letter-spacing: 0.15px;
}
.osu-nav-item:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.04);
}
.osu-nav-item.active {
  color: #ffffff;
  font-weight: 700;
}
.osu-nav-item.active::after {
  display: none !important;
}

.osu-nav-item.support-btn {
  background: linear-gradient(135deg, rgba(255, 94, 91, 0.18) 0%, rgba(255, 131, 89, 0.22) 100%);
  border: 1px solid rgba(255, 94, 91, 0.45);
  color: #ff9b98 !important;
  border-radius: 6px;
  height: 32px;
  margin: auto 0.45rem;
  padding: 0 0.85rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  text-transform: lowercase;
}
.osu-nav-item.support-btn:hover {
  background: linear-gradient(135deg, #ff5e5b 0%, #ff8359 100%);
  color: #ffffff !important;
  border-color: #ff5e5b;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(255, 94, 91, 0.45);
}
.osu-nav-item.support-btn svg {
  color: inherit;
  transition: transform 0.2s ease;
}
.osu-nav-item.support-btn:hover svg {
  transform: scale(1.15);
}

/* Search button */
.osu-nav-search-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
}
.osu-nav-search-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

/* Right side toolbar */
.osu-nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.osu-social-link {
  color: rgba(255, 255, 255, 0.6);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 1rem;
  transition: color 0.15s ease, transform 0.15s ease;
}
.osu-social-link:hover {
  color: #ffffff;
  transform: scale(1.12);
}
.osu-flag-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
}
.osu-flag-icon .flag-icon-img {
  height: 15px;
  width: 22px;
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* Notification & Chat Capsule pill */
.osu-capsule-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 9999px;
  padding: 0.28rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}
.osu-capsule-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  transition: color 0.15s ease;
}

.osu-bell-icon,
.osu-search-icon {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}
.osu-capsule-item:hover {
  color: #ffffff;
}
.osu-capsule-count {
  opacity: 0.85;
}

/* User Profile in Navbar */
.osu-nav-user {
  position: relative;
  display: flex;
  align-items: center;
}
.osu-nav-avatar-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
}
.osu-nav-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #ff66ab !important;
  background: #080d13;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.osu-nav-avatar:hover {
  transform: scale(1.08);
  box-shadow: 0 0 10px #ff66ab !important;
}

body.theme-rankings .osu-nav-avatar {
  border-color: #ff66ab !important;
}
body.theme-rankings .osu-nav-avatar:hover {
  box-shadow: 0 0 10px #ff66ab !important;
}
.osu-guest-links {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.osu-guest-btn {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: all 0.15s ease;
}
.osu-guest-btn:hover {
  background: var(--osu-nav-accent, #ff66ab);
  border-color: var(--osu-nav-accent, #ff66ab);
  color: #0c0910;
}

/* Quick User Dropdown */
.osu-user-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 235px;
  background: rgba(35, 30, 43, 0.98);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-top: 3px solid var(--dashboard-purple, #9b62ff);
  border-radius: 8px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.72), 0 0 0 1px rgba(255, 255, 255, 0.05);
  padding: 0;
  display: none;
  flex-direction: column;
  z-index: 200;
  overflow: hidden;
  animation: osuDropdownSlideIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes osuDropdownSlideIn {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.osu-user-dropdown.show {
  display: flex;
}

.osu-dropdown-header {
  padding: 0.85rem 1.1rem;
  background: linear-gradient(180deg, rgba(155, 98, 255, 0.14) 0%, rgba(0, 0, 0, 0.18) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.osu-dropdown-user-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.osu-dropdown-username {
  font-family: var(--font, 'Exo 2');
  font-weight: 800;
  font-size: 0.95rem;
  color: #fff;
  letter-spacing: 0.2px;
  line-height: 1.2;
}

.osu-dropdown-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

.osu-dropdown-pp-badge {
  display: inline-block;
  font-family: var(--font-game, 'Exo 2');
  font-weight: 700;
  font-size: 0.72rem;
  color: #c89cff;
  background: rgba(155, 98, 255, 0.2);
  border: 1px solid rgba(155, 98, 255, 0.38);
  padding: 1px 8px;
  border-radius: 9999px;
  letter-spacing: 0.3px;
}

.osu-dropdown-body {
  padding: 0.35rem 0;
}

.osu-dropdown-item {
  padding: 0.65rem 1.1rem;
  font-family: var(--font, 'Exo 2');
  font-size: 0.85rem;
  font-weight: 600;
  color: #d1c7dc;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: all 0.16s ease;
  cursor: pointer;
}

.osu-dropdown-icon {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  color: #a89ab8;
  transition: color 0.16s ease, transform 0.16s ease;
  flex-shrink: 0;
}

.osu-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #ffffff;
  padding-left: 1.25rem;
}

.osu-dropdown-item:hover .osu-dropdown-icon {
  color: #c89cff;
  transform: scale(1.1);
}

.osu-dropdown-item.logout {
  color: #ff6b8b;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 0.25rem;
  padding-top: 0.75rem;
}

.osu-dropdown-item.logout .osu-dropdown-icon {
  color: #ff6b8b;
}

.osu-dropdown-item.logout:hover {
  background: rgba(255, 107, 139, 0.12);
  color: #ff85a2;
}

.osu-dropdown-item.logout:hover .osu-dropdown-icon {
  color: #ff85a2;
}

/* Interactive Search Bar Popover */
.osu-search-popover {
  position: absolute;
  top: 52px;
  left: 0;
  right: 0;
  background: rgba(14, 11, 16, 0.98);
  backdrop-filter: blur(20px);
  border-bottom: 2px solid var(--osu-nav-accent, #ff66ab);
  box-shadow: 0 10px 30px rgba(0,0,0,0.7);
  padding: 1rem 2rem;
  display: none;
  z-index: 95;
}
.osu-search-popover.show {
  display: block;
}
.osu-search-box {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  display: flex;
  align-items: center;
}
.osu-search-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.6);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  border-radius: 9999px;
  padding: 0.75rem 3rem 0.75rem 1.5rem;
  font-size: 1rem;
  color: #fff;
  outline: none;
  transition: border-color 0.2s ease;
}
.osu-search-input:focus {
  border-color: var(--osu-nav-accent, #ff66ab);
}
.osu-search-close {
  position: absolute;
  right: 1.2rem;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.2rem;
  cursor: pointer;
}

/* ========================================================
   OSU! SECONDARY PAGE HEADER (SUB-NAVBAR)
   ======================================================== */
.osu-section-header {
  background: var(--osu-header-bg, #1c1520);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  position: relative;
  z-index: 50;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.osu-section-header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.osu-header-title-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}
.osu-title-icon-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: #ffffff;
}
.osu-header-title-text {
  font-family: var(--font-game);
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  text-transform: lowercase;
  letter-spacing: -0.3px;
}

/* Subnav strip with subtabs */
.osu-subnav-strip {
  background: var(--osu-subnav-bg, #130d17);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
  z-index: 40;
}

.osu-subnav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 42px;
}

.osu-subnav-tabs {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 1.35rem;
  overflow-x: auto;
}
.osu-subnav-tab {
  height: 100%;
  display: inline-flex;
  align-items: center;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  text-transform: lowercase;
  position: relative;
  transition: color 0.15s ease;
  white-space: nowrap;
}
.osu-subnav-tab:hover {
  color: #ffffff;
}
.osu-subnav-tab.active {
  color: #ffffff;
  font-weight: 700;
}
.osu-subnav-tab.active::after {
  display: none !important;
}

/* Mode switcher circles on the right */
.osu-mode-selectors {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.osu-mode-circle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  background: rgba(0, 0, 0, 0.4);
  color: rgba(255, 255, 255, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.2, 0.8, 0.2, 1);
  padding: 0;
}
.osu-mode-circle:hover {
  border-color: #ffffff;
  color: #ffffff;
  transform: scale(1.15);
}
.osu-mode-circle.active {
  border-color: var(--osu-nav-accent, #ff66ab);
  color: var(--osu-nav-accent, #ff66ab);
  box-shadow: 0 0 10px var(--osu-nav-accent, #ff66ab);
  background: rgba(255, 255, 255, 0.08);
}

/* ========================================================
   RANKINGS FILTER STRIP (IMAGE 2)
   ======================================================== */
.osu-rankings-filterbar {
  background: var(--osu-filter-bg, #11261a);
  border-bottom: 1px solid rgba(0, 245, 160, 0.15);
  padding: 0.85rem 0;
  position: relative;
  z-index: 30;
}
.osu-filterbar-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.osu-filter-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.osu-filter-label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.55);
  text-transform: uppercase;
}
.osu-filter-select {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--pink, #ff5cad);
  box-shadow: 0 0 12px rgba(255, 92, 173, 0.4);
  color: #fff;
  border-radius: 6px;
  padding: 0.35rem 1.8rem 0.35rem 0.75rem;
  font-family: var(--font, 'Exo 2');
  font-size: 0.82rem;
  font-weight: 700;
  outline: none;
  cursor: pointer;
  transition: all 0.18s ease;
}
.osu-filter-select:hover,
.osu-filter-select:focus {
  border-color: var(--pink, #ff5cad);
  box-shadow: 0 0 14px rgba(255, 92, 173, 0.55);
}
.osu-filter-select option {
  background: #231e2b;
  color: #fff;
}
.osu-filter-toggles {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.osu-toggle-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  color: var(--text-secondary, #b6adc7);
  font-family: var(--font, 'Exo 2');
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
}
.osu-toggle-btn:hover {
  background: var(--surface-hover, #2b2739);
  color: #fff;
  border-color: var(--pink, #ff5cad);
  transform: translateY(-1px);
}
.osu-toggle-btn.active {
  background: var(--pink, #ff5cad);
  color: #fff;
  border-color: var(--pink, #ff5cad);
  font-weight: 800;
  box-shadow: 0 0 12px rgba(255, 92, 173, 0.4);
}

.osu-sort-pills {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(0, 0, 0, 0.45);
  padding: 3px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.osu-sort-pill {
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.35rem 0.95rem;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.osu-sort-pill.active {
  background: #ffffff;
  color: #0c1810;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.osu-pagination-bar {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
}

/* ========================================================
   AUTHENTIC OSU! RANKINGS TABLE (IMAGE 2)
   ======================================================== */
.osu-rankings-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 3px;
  font-size: 0.86rem;
}
.osu-rankings-table thead th {
  padding: 0.75rem 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.55);
  text-transform: capitalize;
  border: none;
  background: transparent;
}
.osu-rankings-table tbody tr {
  background: rgba(14, 25, 18, 0.82);
  transition: background 0.15s ease, transform 0.15s ease;
  cursor: pointer;
}
.osu-rankings-table tbody tr:hover {
  background: rgba(0, 245, 160, 0.12);
}
.osu-rankings-table tbody td {
  padding: 0.65rem 1rem;
  border: none;
  vertical-align: middle;
}
.osu-rankings-table tbody tr td:first-child {
  border-radius: 6px 0 0 6px;
}
.osu-rankings-table tbody tr td:last-child {
  border-radius: 0 6px 6px 0;
}

.osu-rank-col {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.8);
}
.osu-delta-up {
  color: #00f5a0;
  font-size: 0.75rem;
  font-weight: 800;
}
.osu-delta-down {
  color: #f87171;
  font-size: 0.75rem;
  font-weight: 800;
}
.osu-player-cell {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.osu-player-cell img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid rgba(0, 245, 160, 0.5);
  background: #080d13;
}
.osu-player-username {
  font-weight: 700;
  color: #ffffff;
}
.osu-grade-counts {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.7);
}

/* ========================================================
   POP! PLAYER PROFILE & UNIVERSAL THEME AESTHETICS
   ======================================================== */

.theme-toggle {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-primary);
  transition: all 0.2s ease;
}
.theme-toggle:hover {
  background: var(--surface-hover);
  border-color: var(--pink);
  transform: translateY(-1px);
}
.theme-toggle svg {
  width: 16px;
  height: 16px;
}
.theme-toggle:focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 2px;
}

.page {
  max-width: 1120px;
  margin: 0 auto;
  padding-bottom: 60px;
}

/* ---------- Cover Banner ---------- */
.cover {
  position: relative;
  height: 245px;
  background:
    radial-gradient(circle at 15% 30%, rgba(255,92,173,0.38), transparent 45%),
    radial-gradient(circle at 80% 20%, rgba(55,230,196,0.32), transparent 40%),
    radial-gradient(circle at 60% 90%, rgba(155,107,255,0.32), transparent 45%),
    linear-gradient(180deg, #241c33, #15111f);
  overflow: hidden;
  border-radius: 0 0 14px 14px;
}
.cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 35%, rgba(0,0,0,0.72) 100%);
  pointer-events: none;
}
.rank-block {
  position: absolute;
  top: 18px;
  right: 24px;
  z-index: 2;
  text-align: right;
  color: #fff;
}
.rank-block .big {
  font-size: 28px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}
.rank-block .big .delta {
  font-size: 12px;
  font-weight: 700;
  color: var(--green);
}
.rank-block .lbl {
  font-size: 11px;
  color: rgba(255,255,255,0.65);
  font-weight: 600;
  margin-top: 1px;
}
.rank-block .country {
  margin-top: 10px;
  font-size: 16px;
  font-weight: 700;
}

.cover-actions {
  position: absolute;
  top: 98px;
  right: 24px;
  z-index: 2;
  display: flex;
  gap: 8px;
}
.ghost-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.18);
  transition: all 0.18s ease;
}
.ghost-btn:hover {
  background: rgba(255,255,255,0.22);
  transform: translateY(-2px);
  border-color: #fff;
}
.ghost-btn svg {
  width: 16px;
  height: 16px;
}

/* ---------- Identity Strip (Overlaps Cover) ---------- */
.identity-strip {
  position: relative;
  padding: 0 24px;
  display: flex;
  align-items: flex-start;
  gap: 20px;
  transform: translateY(-56px);
  margin-bottom: -20px;
  z-index: 5;
}
.avatar-frame {
  width: 112px;
  height: 112px;
  border-radius: 14px;
  background: linear-gradient(140deg, var(--pink), var(--violet));
  border: 4px solid var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 34px;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 8px 24px rgba(0,0,0,0.45);
  overflow: hidden;
  position: relative;
}
.avatar-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.identity-text {
  padding-bottom: 6px;
  min-width: 0;
  flex: 1;
}
.identity-text .name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.identity-text h1 {
  font-size: 24px;
  font-weight: 800;
  margin: 0;
  color: var(--text-primary);
}
.flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 18px;
  border-radius: 3px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px var(--border);
}
.flag .flag-icon-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  box-shadow: none;
}
.founder-star {
  width: 18px;
  height: 18px;
  color: var(--gold);
  filter: drop-shadow(0 0 6px rgba(255, 204, 77, 0.6));
}
.identity-text .meta {
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--text-secondary);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.meta .status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  display: inline-block;
  box-shadow: 0 0 8px var(--green);
}
.meta .status-dot.offline {
  background: var(--text-tertiary);
  box-shadow: none;
}

/* Bio directly under player name in Identity Strip */
.header-bio {
  font-size: 14px;
  color: #f1edfa;
  font-weight: 500;
  line-height: 1.55;
  margin-top: 8px;
  max-width: 720px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

/* Badges list placed directly under user bio */
.profile-badges-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}
.profile-badge-card {
  display: inline-block;
  width: 116px;
  height: 54px;
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.2s ease;
  flex-shrink: 0;
  user-select: none;
}
.profile-badge-card:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: none !important;
  border-color: transparent !important;
  border: none !important;
  outline: none !important;
  filter: brightness(1.15);
}
.profile-badge-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.profile-badge-card-example {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #f7d8ff;
  border-color: rgba(255, 92, 173, 0.55);
  background: linear-gradient(135deg, rgba(255, 92, 173, 0.32), rgba(122, 67, 171, 0.48));
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
}

/* ---------- Mode Tabs ---------- */
.mode-tabs {
  display: flex;
  gap: 4px;
  padding: 0 24px;
  margin-top: 14px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}
.mode-tabs button {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  font-weight: 700;
  font-size: 13px;
  color: var(--text-secondary);
  padding: 10px 14px 12px;
  border-bottom: none;
  transition: all 0.18s ease;
  white-space: nowrap;
}
.mode-tabs button:hover {
  color: #ffffff;
}
.mode-tabs button.active {
  color: #ffffff;
  border-bottom: none;
}

/* ---------- Stat Bar ---------- */
.stat-bar {
  display: flex;
  background: var(--bg-elevated);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 6px;
  overflow-x: auto;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}
.stat-bar .stat {
  flex: 1;
  min-width: 128px;
  padding: 14px 18px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}
.stat-bar .stat:last-child {
  border-right: none;
}
.stat-bar .val {
  font-size: 19px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.2px;
}
.stat-bar .lbl {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-top: 3px;
}

/* ---------- Grade Counts ---------- */
.grade-counts {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 14px 24px;
  background: var(--surface);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  align-items: center;
}
.grade-count-item {
  display: flex;
  align-items: center;
  gap: 8px;
}
.grade-badge {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 11px;
  color: #10121a;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}
.grade-badge.prism {
  background: conic-gradient(from 180deg, #ff5cad, #ffcc4d, #37e6c4, #9b6bff, #ff5cad);
  color: #1a1220;
}
.grade-badge.opal {
  background: linear-gradient(140deg, var(--violet), var(--teal));
  color: #10121a;
}
.grade-badge.pearl {
  background: linear-gradient(140deg, #ffd9ec, #d7c7ff);
  color: #4a3465;
}
.grade-badge.soap {
  background: linear-gradient(140deg, var(--teal), var(--gold));
  color: #1a2420;
}
.grade-badge.glass {
  background: var(--track);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}
.grade-count-item .count {
  font-weight: 800;
  font-size: 14px;
  color: #ffffff;
}

/* ---------- 2-Column Layout Grid ---------- */
.layout-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 18px;
  padding: 20px 24px 0;
  align-items: start;
}
.side-card {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}
.side-card h3 {
  font-size: 13px;
  text-transform: none;
  margin: 0 0 12px;
  color: #ffffff;
  font-weight: 800;
  letter-spacing: 0.2px;
}

/* Rank History Graph Card */
.rank-graph-card {
  position: relative;
  overflow: hidden;
}

.rank-graph-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 6px;
}

.rank-graph-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rank-graph-title-group h3 {
  margin: 0 !important;
  font-size: 13px !important;
  color: var(--text-primary) !important;
  font-weight: 800 !important;
  letter-spacing: 0.2px;
}

.rank-pill {
  background: rgba(255, 92, 173, 0.14);
  color: var(--pink);
  border: 1px solid rgba(255, 92, 173, 0.3);
  border-radius: 9999px;
  padding: 1px 7px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.rank-badges-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.stat-badge {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 7px;
  font-size: 10.5px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.stat-badge .badge-lbl {
  color: var(--text-tertiary);
  font-weight: 600;
  font-size: 9.5px;
  text-transform: uppercase;
}

.stat-badge strong {
  color: var(--pink);
  font-weight: 800;
}

.rank-chart-container {
  position: relative;
  width: 100%;
  height: 115px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  cursor: crosshair;
  user-select: none;
  overflow: hidden;
  margin-bottom: 6px;
}

.rank-chart-container svg {
  width: 100%;
  height: 100%;
  display: block;
}

.rank-grid line {
  stroke: rgba(255, 255, 255, 0.07);
  stroke-dasharray: 4,4;
  stroke-width: 1;
}

.rank-grid text {
  fill: var(--text-tertiary);
  font-size: 9px;
  font-weight: 700;
  font-family: var(--font);
}

.rank-tooltip {
  position: absolute;
  pointer-events: none;
  z-index: 10;
  background: rgba(18, 20, 26, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 92, 173, 0.4);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.6);
  border-radius: 7px;
  padding: 5px 9px;
  color: #fff;
  transform: translate(-50%, -100%);
  margin-top: -8px;
  white-space: nowrap;
  transition: opacity 0.1s ease;
}

.tooltip-date {
  font-size: 10px;
  color: var(--text-tertiary);
  font-weight: 600;
}

.tooltip-rank {
  font-size: 12px;
  color: #fff;
  font-weight: 800;
}

.tooltip-rank strong {
  color: var(--pink);
}

.rank-empty-state {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-tertiary);
  font-size: 11.5px;
  font-weight: 600;
  padding: 12px;
  background: rgba(0, 0, 0, 0.2);
}

.rank-empty-state .empty-icon {
  font-size: 20px;
  margin-bottom: 4px;
  opacity: 0.6;
}

.rank-graph-bottom {
  margin-top: 6px;
  padding: 0 2px;
}

.rank-date-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  color: var(--text-tertiary);
  font-weight: 600;
  margin-bottom: 4px;
}

.rank-date-row .axis-lbl {
  font-weight: 600;
  font-size: 10px;
}

.rank-graph-bottom .caption {
  font-weight: 700;
  color: var(--text-secondary);
  font-size: 11px;
  text-align: left;
  line-height: 1.35;
  display: block;
}

.medal-mini-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.medal-mini {
  aspect-ratio: 1;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: var(--track);
  position: relative;
  overflow: hidden;
  text-decoration: none;
  transition: all 0.2s ease;
}
.medal-mini:hover {
  transform: scale(1.08);
  border-color: var(--pink);
  box-shadow: 0 4px 12px rgba(255, 92, 173, 0.3);
}
.medal-mini img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.medal-mini svg {
  width: 16px;
  height: 16px;
}
.medal-mini.soap {
  background: linear-gradient(140deg, var(--teal), var(--pink));
  color: #fff;
  border: none;
}
.medal-mini.pearl {
  background: linear-gradient(140deg, #ffd9ec, #d7c7ff);
  color: #4a3465;
  border: none;
}
.medal-mini.opal {
  background: linear-gradient(140deg, var(--violet), var(--teal));
  color: #fff;
  border: none;
}
.medal-mini.glass {
  color: var(--text-secondary);
}
.medal-mini.locked {
  border-style: dashed;
  color: var(--text-tertiary);
  opacity: 0.5;
}
.view-all {
  display: block;
  margin-top: 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--pink);
  text-decoration: none;
}
.view-all:hover {
  text-decoration: none;
}

/* ---------- Main Content Area ---------- */
.content-tabs {
  display: flex;
  gap: 18px;
  border-bottom: none !important;
  margin-bottom: 16px;
  overflow-x: auto;
  background: transparent !important;
}
.content-tabs button {
  background: none !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  cursor: pointer;
  font-family: var(--font);
  font-weight: 700;
  font-size: 13.5px;
  color: var(--text-secondary);
  padding: 0 0 12px;
  border-bottom: none !important;
  transition: all 0.18s ease;
  white-space: nowrap;
}
.content-tabs button:hover {
  color: #ffffff;
}
.content-tabs button.active {
  color: #ffffff;
  border-bottom: none !important;
  background: none !important;
  font-weight: 800;
}

.bio {
  font-size: 14px;
  color: #ffffff;
  line-height: 1.6;
  margin-bottom: 20px;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 14px 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}
.bio strong {
  color: var(--text-primary);
}

.section-label {
  font-size: 13px;
  font-weight: 800;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

/* ---------- Play Rows (Authentic Cards) ---------- */
.play-row {
  display: grid;
  grid-template-columns: 58px 1fr auto;
  gap: 14px;
  align-items: center;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  transition: all 0.18s ease;
}
.play-row:hover {
  background: var(--surface-hover);
  border-color: rgba(255, 92, 173, 0.5);
  transform: translateX(4px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}
.play-row.is-first-place {
  border-left: 4px solid var(--gold);
}
.thumb {
  width: 58px;
  height: 44px;
  border-radius: 7px;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  background: linear-gradient(140deg, var(--pink), var(--violet));
}
.thumb svg, .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.play-meta .title {
  font-weight: 800;
  font-size: 14.5px;
  color: #ffffff;
  letter-spacing: 0.1px;
}
.play-meta .artist {
  font-size: 12.5px;
  color: var(--text-secondary);
  font-weight: 600;
  margin-top: 1px;
}
.play-meta .diff-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
  flex-wrap: wrap;
}
.diamond {
  width: 8px;
  height: 8px;
  background: var(--violet);
  transform: rotate(45deg);
  display: inline-block;
}
.diff-val {
  font-size: 12px;
  color: #ffffff;
  font-weight: 700;
}
.mod-chip {
  font-size: 10.5px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--pink-soft);
  color: var(--pink);
  border: 1px solid rgba(255, 92, 173, 0.35);
}

.play-figures {
  text-align: right;
  display: flex;
  align-items: center;
  gap: 14px;
}
.play-figures .acc {
  color: #ffffff;
  font-weight: 800;
  font-size: 13.5px;
}
.play-figures .score-block .score {
  font-weight: 800;
  font-size: 16px;
  color: var(--text-primary);
}
.play-figures .score-block .weight {
  font-size: 10.5px;
  color: var(--text-tertiary);
  font-weight: 600;
}
.play-figures .acc {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-secondary);
  min-width: 52px;
}
.play-figures .grade-badge {
  width: 34px;
  height: 34px;
  font-size: 12px;
}

.footer-note {
  text-align: center;
  font-size: 11.5px;
  color: var(--text-tertiary);
  font-weight: 600;
  padding: 30px 0 0;
}

@media (max-width: 760px) {
  .layout-grid {
    grid-template-columns: 1fr;
    padding: 16px;
  }
  .identity-strip {
    flex-wrap: wrap;
  }
  .rank-block {
    position: static;
    text-align: left;
    margin: 10px 24px 0;
  }
  .cover-actions {
    display: none;
  }
  .play-row {
    grid-template-columns: 44px 1fr;
  }
  .play-figures {
    grid-column: 1 / -1;
    justify-content: space-between;
    margin-top: 8px;
  }
}

/* ========================================================
   NEWS & ANNOUNCEMENTS SECTION
   ======================================================== */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.news-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease, border-color 0.2s ease;
  display: flex;
  flex-direction: column;
}

.news-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #ff5cad, #a855f7);
}

.news-card.update::before {
  background: linear-gradient(90deg, #38bdf8, #818cf8);
}

.news-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  border-color: rgba(255, 92, 173, 0.45);
}

.news-card.update:hover {
  border-color: rgba(56, 189, 248, 0.45);
}

.news-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.news-badge {
  font-family: var(--font-game, 'Comfortaa');
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.5px;
  padding: 0.2rem 0.65rem;
  border-radius: 9999px;
  text-transform: uppercase;
}

.news-badge.announcement {
  background: rgba(255, 92, 173, 0.2);
  color: #ff5cad;
  border: 1px solid rgba(255, 92, 173, 0.45);
}

.news-badge.update {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.45);
}

.news-date {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
}

.news-title {
  font-family: var(--font-body, 'Exo 2');
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.65rem;
  line-height: 1.35;
}

.news-author {
  font-size: 0.8rem;
  font-weight: 700;
  color: #ff5cad;
  margin-bottom: 0.75rem;
}

.news-card.update .news-author {
  color: #38bdf8;
}

.news-preview {
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text-secondary);
  flex: 1;
}

/* ========================================================
   RANKINGS TABLE — TOP PLAYS VIEW STYLING
   ======================================================== */
.osu-beatmap-cell {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.osu-beatmap-title {
  font-weight: 700;
  color: #ffffff;
  font-size: 0.9rem;
}
.osu-beatmap-artist {
  font-size: 0.76rem;
  color: rgba(255, 255, 255, 0.6);
}
.osu-diff-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: #ff66ab;
}
.osu-star-badge {
  background: rgba(255, 215, 0, 0.15);
  border: 1px solid rgba(255, 215, 0, 0.4);
  color: #ffd700;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 800;
}
.osu-mod-pill-sm {
  background: rgba(255, 92, 173, 0.18);
  border: 1px solid rgba(255, 92, 173, 0.4);
  color: #ff66ab;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 800;
  margin-left: 4px;
}

/* ========================================================
   HOME LOGO INTERACTIVITY
   ======================================================== */
.big-logo-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 1.5rem auto 2rem;
  cursor: pointer;
  user-select: none;
  position: relative;
}
.big-logo-img {
  max-width: 280px;
  height: auto;
  filter: drop-shadow(0 8px 30px rgba(0, 245, 160, 0.35));
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.22s ease;
}
.big-logo-container:hover .big-logo-img {
  transform: scale(1.06) rotate(-1.5deg);
  filter: drop-shadow(0 12px 36px rgba(0, 245, 160, 0.55));
}
.big-logo-container:active .big-logo-img {
  transform: scale(0.96) rotate(1deg);
}

/* ========================================================
   PAGINATION CONTROLS
   ======================================================== */
.osu-pagination-bar {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: auto;
}
.osu-page-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  color: var(--text-secondary, #b6adc7);
  font-family: var(--font, 'Exo 2');
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
}
.osu-page-btn:hover:not([disabled]) {
  background: var(--surface-hover, #2b2739);
  color: #fff;
  border-color: var(--pink, #ff5cad);
  transform: translateY(-1px);
}
.osu-page-btn.active {
  background: var(--pink, #ff5cad);
  color: #fff;
  border-color: var(--pink, #ff5cad);
  font-weight: 800;
  box-shadow: 0 0 12px rgba(255, 92, 173, 0.4);
}
.osu-page-btn[disabled] {
  opacity: 0.35;
  cursor: not-allowed;
}

/* Shared dashboard theme based on the supplied frontpage reference. */
:root {
  --dashboard-bg: #17161b;
  --dashboard-panel: #28232f;
  --dashboard-panel-alt: #302936;
  --dashboard-purple: #9b62ff;
  --dashboard-text: #eeeaf2;
  --dashboard-muted: #aaa0b9;
  --dashboard-blue: #3497c8;
  --dashboard-pink: #c43d79;
  --font: Arial, Helvetica, sans-serif;
  --font-game: Arial, Helvetica, sans-serif;
  --font-body: Arial, Helvetica, sans-serif;
}

html,
html[data-theme="dark"],
html[data-theme="light"] {
  background: var(--dashboard-bg);
}

body,
body.theme-home,
body.theme-rankings,
body.theme-profile {
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 50% 0, #51428c 0, #292446 20%, #201e2e 36%, #17161b 57%),
    var(--dashboard-bg);
  color: var(--dashboard-text);
  font-family: Arial, Helvetica, sans-serif;
}

body::before {
  background:
    linear-gradient(130deg, transparent 0 8%, #28234c 8% 12%, transparent 12% 25%, #393264 25% 32%, transparent 32% 100%),
    linear-gradient(50deg, transparent 0 16%, #3b356b 16% 23%, transparent 23% 42%, #292552 42% 48%, transparent 48%);
  height: 160px;
  opacity: .65;
  z-index: 0;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 0 150px, rgba(23, 22, 27, .55) 520px, var(--dashboard-bg) 100%);
  z-index: 0;
}

.ambient-bg,
.osu-polygonal-mesh {
  opacity: .16;
  z-index: 0;
}

.osu-navbar-wrapper {
  position: relative;
  background: transparent;
  box-shadow: none;
}

.osu-navbar {
  width: min(900px, 94%);
  height: 96px;
  margin: 0 auto;
  padding: 13px 0 0;
  align-items: flex-start;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.osu-nav-left {
  gap: 14px;
}

.osu-cookie-brand {
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 0;
  justify-content: center;
  background: transparent;
}

.osu-nav-logo-img {
  width: 46px;
  height: 46px;
  max-width: none;
  filter: drop-shadow(0 0 7px rgba(155, 98, 255, .5));
}

.osu-nav-links {
  gap: 13px;
  height: 61px;
}

.osu-nav-item {
  padding: 17px 1px 13px;
  color: #eee;
  font-size: 13px;
  font-weight: 700;
  border-radius: 0;
  text-transform: lowercase;
}

.osu-nav-item:hover,
.osu-nav-item.active {
  color: #c89cff;
  background: transparent;
}

.osu-nav-item.active::after {
  display: none !important;
}

.osu-nav-search-btn {
  color: #eee;
  padding: 13px 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.osu-nav-right {
  height: 61px;
  gap: 10px;
}

.osu-capsule-pill,
.osu-guest-btn {
  height: 39px;
  border: 2px solid #eee;
  border-radius: 20px;
  padding: 0 12px;
  background: transparent;
  color: #eee;
}

.osu-guest-links {
  gap: 9px;
}

.osu-guest-btn {
  font-size: 12px;
  cursor: pointer;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.osu-sign-in-btn,
.osu-sign-in-btn:hover {
  background: transparent !important;
  border-color: #eee !important;
  color: #eee !important;
}

.osu-register-btn,
.osu-register-btn:hover {
  background: var(--dashboard-pink) !important;
  border-color: var(--dashboard-pink) !important;
  color: #fff !important;
}

.osu-sign-in-btn:hover {
  background: rgba(255, 255, 255, .1) !important;
}

.osu-register-btn:hover {
  background: #d6578e !important;
}

.osu-section-header,
.osu-subnav-strip,
.osu-rankings-filterbar {
  width: min(1000px, 100%);
  margin: 0 auto;
}

.osu-section-header {
  background: var(--dashboard-panel);
  box-shadow: none;
}

.osu-section-header-container {
  max-width: none;
  height: 55px;
  padding: 0 54px;
}

.osu-title-icon-circle {
  display: none !important;
}

.osu-header-title-text {
  font-size: 19px;
  font-weight: 700;
}

.osu-subnav-strip {
  background: linear-gradient(90deg, #3b2d43, #322b3c);
}

.osu-subnav-container {
  max-width: none;
  height: 48px;
  padding: 0 50px;
}

.osu-subnav-tabs {
  gap: 27px;
}

.osu-subnav-tab {
  color: #a89ab8;
  font-size: 13px;
}

.osu-subnav-tab.active {
  color: #fff;
}

.osu-subnav-tab.active::after {
  display: none !important;
}

.container,
.page {
  width: min(1000px, 100%);
  max-width: none;
  margin: 0 auto;
  background: var(--dashboard-panel);
  box-shadow: 0 0 80px rgba(0, 0, 0, .53);
  padding-left: 50px;
  padding-right: 50px;
  position: relative;
  z-index: 1;
}

.container {
  padding-top: 22px;
  padding-bottom: 50px;
}

.dashboard-shell {
  padding-top: 0;
}

.dashboard-page-title {
  height: 55px;
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 19px;
}

.dashboard-page-title h1 {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0;
}

.dashboard-home-icon {
  display: none !important;
}

.dashboard-tabs {
  height: 48px;
  display: flex;
  align-items: center;
  gap: 27px;
  margin: 0 -50px;
  padding: 0 50px;
  background: linear-gradient(90deg, #3b2d43, #322b3c);
}

.dashboard-tabs a {
  height: 48px;
  display: flex;
  align-items: center;
  color: #a89ab8;
  font-size: 13px;
  position: relative;
}

.dashboard-tabs a.active {
  color: #fff;
  font-weight: 700;
}

.dashboard-tabs a.active::after {
  display: none !important;
}

.dashboard-banner {
  height: 110px;
  margin: 0 -50px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  background: radial-gradient(ellipse at center, #5b3e52 0, #342b39 43%, #2b2732 72%);
}

.dashboard-banner-copy {
  max-width: min(760px, 90%);
  text-align: center;
}

.dashboard-banner-copy small {
  display: block;
  margin-top: 8px;
  color: #d9bbd1;
  font-size: 10px;
}

.dashboard-news .news-card.announcement .news-card-header {
  min-height: 128px;
  flex-wrap: wrap;
  align-content: flex-end;
}

.dashboard-news .news-card.announcement .news-card-header .news-title {
  flex-basis: 100%;
  margin: 0;
  color: #fff;
}

.dashboard-news .news-card.announcement .news-preview {
  padding-top: 18px;
}

.dashboard-banner-mark {
  color: #fff;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -2px;
  text-shadow: 0 0 18px rgba(255, 255, 255, .35);
}

.dashboard-banner span,
.dashboard-banner strong {
  display: block;
  letter-spacing: 2px;
}

.dashboard-banner span {
  color: #d9bbd1;
  font-size: 10px;
}

.dashboard-banner strong {
  margin-top: 4px;
  font-size: 15px;
}

.dashboard-dots {
  height: 22px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.dashboard-dots i {
  width: 28px;
  height: 4px;
  border-radius: 5px;
  background: #755ca7;
}

.dashboard-dots i.active {
  background: var(--dashboard-purple);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 365px;
  gap: 28px;
  padding-top: 14px;
}

.dashboard-section-title {
  color: #c9b5ed;
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 11px;
}

.dashboard-news .news-grid {
  display: block;
}

.dashboard-news .news-card {
  margin-bottom: 8px;
  min-height: 190px;
  padding: 0;
  border: 0;
  overflow: hidden;
  background: #17181d;
}

.dashboard-news .news-card::before {
  display: none;
}

.dashboard-news .news-card-header {
  min-height: 132px;
  margin: 0;
  padding: 18px;
  align-items: flex-end;
  background:
    radial-gradient(circle at 78% 45%, rgba(226, 201, 238, .7), transparent 8%),
    linear-gradient(145deg, #261a35, #725078 55%, #21182c);
}

.dashboard-news .news-card.update .news-card-header {
  background: linear-gradient(145deg, #10294d, #5b1f76 45%, #09233c);
}

.dashboard-news .news-badge {
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 15px;
  text-transform: none;
}

.dashboard-news .news-date {
  color: #dcd4e5;
}

.dashboard-news .news-title,
.dashboard-news .news-author,
.dashboard-news .news-preview {
  margin-left: 92px;
  margin-right: 12px;
}

.dashboard-news .news-title {
  margin-top: -54px;
  margin-bottom: 28px;
  position: relative;
  font-size: 15px;
}

.dashboard-news .news-author {
  display: none;
}

.dashboard-news .news-preview {
  min-height: 58px;
  margin-bottom: 0;
  padding: 8px 0;
  font-size: 12px;
}

.dashboard-sidebar {
  min-width: 0;
}

.dashboard-action {
  height: 49px;
  margin-bottom: 9px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  padding: 0 19px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.dashboard-action b {
  margin-left: auto;
  font-size: 24px;
}

.dashboard-action.blue {
  background: var(--dashboard-blue);
}

.dashboard-action.pink {
  background: var(--dashboard-pink);
}

.dashboard-action.kofi {
  background: linear-gradient(135deg, #ff5e5b 0%, #ff8359 100%);
  box-shadow: 0 4px 15px rgba(255, 94, 91, 0.3);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.dashboard-action.kofi:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 94, 91, 0.45);
}
.dashboard-action.kofi b {
  color: #fff;
  font-size: 20px;
}

.dashboard-sidebar .in-game-user-panel {
  display: block;
  margin-bottom: 18px;
  padding: 12px;
}

.dashboard-sidebar .in-game-avatar-box {
  width: 58px;
  height: 58px;
  float: left;
  margin-right: 10px;
  border: 3px solid var(--dashboard-purple);
  box-shadow: 0 4px 15px rgba(155, 98, 255, 0.35);
}

.dashboard-sidebar .in-game-user-details h3 {
  font-size: 14px;
  padding-top: 5px;
}

.dashboard-sidebar .in-game-user-stats-strip {
  display: block;
  font-size: 10px;
  line-height: 1.6;
}

.dashboard-sidebar .in-game-user-stats-strip span {
  margin-right: 7px;
}

.dashboard-sidebar .in-game-panel-actions {
  clear: both;
  padding-top: 11px;
}

.dashboard-sidebar .in-game-panel-actions .dashboard-action,
.dashboard-sidebar .in-game-panel-actions .btn {
  height: 42px;
  width: 100%;
  margin-bottom: 0;
  box-sizing: border-box;
  text-decoration: none;
  background: var(--dashboard-blue);
  color: #fff;
  border-radius: 5px;
  border: none;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  padding: 0 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dashboard-sidebar .in-game-panel-actions .dashboard-action:hover,
.dashboard-sidebar .in-game-panel-actions .btn:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
  color: #fff;
}

.dashboard-sidebar .in-game-panel-actions .dashboard-action b,
.dashboard-sidebar .in-game-panel-actions .btn b {
  margin-left: auto;
  font-size: 22px;
  line-height: 1;
}

.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.dashboard-stats div {
  padding: 12px 8px;
  text-align: center;
  background: #17181d;
}

.dashboard-stats strong,
.dashboard-stats span {
  display: block;
}

.dashboard-stats strong {
  color: #c89cff;
  font-size: 18px;
}

.dashboard-stats span {
  color: var(--dashboard-muted);
  font-size: 10px;
}

.hero {
  min-height: 120px;
  padding: 0 0 18px !important;
  justify-content: center;
}

.big-logo-container {
  display: none;
}

.game-section-header {
  margin: 22px 0 11px;
  gap: 10px;
}

.game-section-diamond {
  width: 10px;
  height: 10px;
  background: var(--dashboard-purple) !important;
  box-shadow: 0 0 10px rgba(155, 98, 255, .7) !important;
}

.game-section-title,
.section-title,
.list-title {
  color: #c9b5ed;
  font-size: 16px;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
}

.game-section-line {
  background: linear-gradient(90deg, rgba(155, 98, 255, .45), transparent) !important;
}

.in-game-user-panel,
.news-card,
.stat-card,
.auth-card,
.table-wrapper,
.profile-card,
.profile-tabs,
.profile-content {
  background: var(--dashboard-panel-alt);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 5px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .24);
}

.in-game-user-panel {
  border-top: 3px solid var(--dashboard-purple);
  box-shadow: none;
}

.in-game-user-stats-strip strong,
.news-author,
.pp-value {
  color: #c89cff;
}

.news-grid {
  grid-template-columns: 1fr;
  gap: 8px;
}

.news-card {
  padding: 14px;
  min-height: 150px;
}

.news-card::before,
.news-card.update::before {
  height: 3px;
  background: var(--dashboard-pink);
}

.news-card.update::before {
  background: var(--dashboard-blue);
}

.news-card:hover,
.news-card.update:hover {
  transform: none;
  border-color: rgba(155, 98, 255, .5);
}

.stats-ribbon {
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 18px 0 0 !important;
}

.stat-card {
  padding: 14px 10px;
  border-radius: 4px;
}

.stat-card .number {
  color: #c89cff;
  font-size: 1.7rem;
}

.stat-card .label {
  font-size: .68rem;
  color: var(--dashboard-muted);
}

.osu-rankings-filterbar {
  background: var(--dashboard-panel-alt);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.osu-filterbar-container {
  max-width: none;
  padding: 12px 50px;
}

.osu-rankings-table {
  background: var(--dashboard-panel-alt);
  border-radius: 5px;
  overflow: hidden;
}

.osu-rankings-table thead th {
  background: #3a2d3f;
  color: #c9b5ed;
  border-color: rgba(255, 255, 255, .08);
}

.osu-rankings-table tbody tr:hover {
  background: rgba(155, 98, 255, .08);
}

.osu-rankings-table tbody td {
  border-color: rgba(255, 255, 255, .06);
}

.auth-wrapper {
  min-height: calc(100vh - 96px);
  width: min(1000px, 100%);
  margin: 0 auto;
  background: var(--dashboard-panel);
  padding: 60px 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
}

.auth-wrapper .dashboard-page-title {
  width: 100%;
  margin-bottom: 18px;
}

.auth-card {
  max-width: 440px;
  padding: 32px;
  border-top: 3px solid var(--dashboard-purple);
  backdrop-filter: none;
}

.auth-header h2 {
  font-size: 22px;
}

.auth-header p,
.form-label,
.form-footer {
  color: var(--dashboard-muted);
}

.form-input {
  background: #17181d;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 4px;
  color: #fff;
}

.form-input:focus {
  border-color: var(--dashboard-purple);
  box-shadow: 0 0 0 3px rgba(155, 98, 255, .16);
}

.btn-primary {
  background: var(--dashboard-purple);
  color: #fff;
  box-shadow: none;
}

.btn-primary:hover {
  background: #ad7cff;
  box-shadow: none;
}

.form-footer a {
  color: #c89cff;
}

footer {
  width: min(1000px, 100%);
  margin: 0 auto;
  padding: 28px 25px;
  background: #24212a;
  border-top: 1px solid #332f38;
  color: #8e8794;
  font-size: 11px;
}

.profile-page-shell {
  padding-top: 0;
}

.profile-page-shell .cover {
  height: 190px;
}

.profile-page-shell .identity-strip {
  gap: 14px;
  padding: 0 18px;
  transform: translateY(-44px);
  margin-bottom: -28px;
}

.profile-page-shell .avatar-frame {
  width: 88px;
  height: 88px;
  border-width: 3px;
  border-radius: 10px;
}

.profile-page-shell .identity-text h1 {
  font-size: 21px;
}

.profile-page-shell .identity-text .meta,
.profile-page-shell .header-bio {
  font-size: 11px;
}

.profile-page-shell .header-bio {
  margin-top: 5px;
  line-height: 1.35;
}

.profile-page-shell .profile-badges-row {
  gap: 6px;
  margin-top: 6px;
}

.profile-page-shell .profile-badge-card {
  width: 84px;
  height: 40px;
}

.profile-page-shell .stat-bar {
  margin-top: 2px;
}

.profile-page-shell .stat-bar .stat {
  min-width: 0;
  padding: 9px 10px;
}

.profile-page-shell .stat-bar .val {
  font-size: 14px;
}

.profile-page-shell .stat-bar .lbl {
  font-size: 8px;
  letter-spacing: .2px;
  margin-top: 2px;
}

.profile-page-shell .grade-counts {
  gap: 6px;
  padding: 8px 14px;
}

.profile-page-shell .grade-count-item {
  gap: 4px;
  font-size: 10px;
}

.profile-page-shell .grade-badge {
  width: 22px;
  height: 22px;
  font-size: 9px;
}

.profile-page-shell .dashboard-page-title {
  margin: 0 -50px;
  padding: 0 50px;
}

.profile-page-shell .dashboard-tabs {
  margin-bottom: 20px;
}

@media (max-width: 900px) {
  .container,
  .page,
  .auth-wrapper {
    width: 100%;
  }

  .stats-ribbon {
    grid-template-columns: repeat(2, 1fr);
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 650px) {
  .osu-navbar {
    width: 94%;
    height: 75px;
  }

  .osu-nav-links .osu-nav-item {
    display: none;
  }

  .osu-nav-left {
    flex: 1;
  }

  .osu-section-header-container,
  .osu-subnav-container {
    padding-left: 20px;
    padding-right: 20px;
  }

  .container,
  .page,
  .auth-wrapper {
    padding-left: 20px;
    padding-right: 20px;
  }

  .profile-page-shell .dashboard-page-title,
  .profile-page-shell .dashboard-tabs {
    margin-left: -20px;
    margin-right: -20px;
    padding-left: 20px;
    padding-right: 20px;
  }

  .osu-filterbar-container {
    padding-left: 20px;
    padding-right: 20px;
  }

  .in-game-user-panel {
    grid-template-columns: 56px 1fr;
  }

  .in-game-panel-actions {
    grid-column: 1 / -1;
  }

  .profile-page-shell .stat-bar .stat {
    min-width: 92px;
  }

  .dashboard-grid {
    padding-top: 10px;
  }

  .dashboard-tabs,
  .dashboard-banner {
    margin-left: -20px;
    margin-right: -20px;
    padding-left: 20px;
    padding-right: 20px;
  }
}

/* Compact profile proportions: keep the information hierarchy readable
   without letting the profile stats and play rows dominate the page. */
.profile-page-shell .cover {
  height: 150px;
}

.profile-page-shell .rank-block {
  top: 12px;
  right: 18px;
}

.profile-page-shell .rank-block .big {
  font-size: 20px;
}

.profile-page-shell .rank-block .lbl,
.profile-page-shell .rank-block .country {
  font-size: 10px;
}

.profile-page-shell .identity-strip {
  gap: 10px;
  padding: 0 14px;
  transform: translateY(-32px);
  margin-bottom: -24px;
}

.profile-page-shell .avatar-frame {
  width: 64px;
  height: 64px;
  border-width: 2px;
  border-radius: 8px;
}

.profile-page-shell .identity-text h1 {
  font-size: 17px;
}

.profile-page-shell .identity-text .meta,
.profile-page-shell .header-bio {
  font-size: 9px;
}

.profile-page-shell .founder-star {
  width: 13px;
  height: 13px;
}

.profile-page-shell .flag {
  width: 20px;
  height: 14px;
}

.profile-page-shell .profile-badge-card {
  width: 64px;
  height: 30px;
}

.profile-page-shell .stat-bar .stat {
  padding: 6px 7px;
}

.profile-page-shell .stat-bar .val {
  font-size: 11px;
}

.profile-page-shell .stat-bar .lbl {
  font-size: 7px;
  white-space: nowrap;
}

.profile-page-shell .grade-counts {
  gap: 4px;
  padding: 5px 10px;
}

.profile-page-shell .grade-badge {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  font-size: 8px;
}

.profile-page-shell .grade-count-item .count {
  font-size: 10px;
}

.profile-page-shell .layout-grid {
  grid-template-columns: 210px 1fr;
  gap: 14px;
  padding: 14px 14px 0;
}

.profile-page-shell .side-card {
  padding: 11px;
  margin-bottom: 10px;
  border-radius: 8px;
}

.profile-page-shell .side-card h3,
.profile-page-shell .rank-graph-title-group h3 {
  font-size: 11px !important;
  margin-bottom: 8px !important;
}

.profile-page-shell .rank-chart-container {
  height: 82px;
  margin-bottom: 4px;
}

.profile-page-shell .rank-graph-bottom .caption {
  font-size: 9px;
}

.profile-page-shell .content-tabs {
  gap: 12px;
  margin-bottom: 10px;
}

.profile-page-shell .content-tabs button {
  font-size: 10px;
  padding-bottom: 8px;
}

.profile-page-shell .section-label {
  font-size: 10px;
  margin-bottom: 8px;
}

.profile-page-shell .play-row {
  grid-template-columns: 42px 1fr auto;
  gap: 9px;
  padding: 7px 10px;
  margin-bottom: 6px;
  border-radius: 7px;
}

.profile-page-shell .thumb {
  width: 42px;
  height: 32px;
  border-radius: 5px;
}

.profile-page-shell .play-meta .title {
  font-size: 11px;
}

.profile-page-shell .play-meta .artist,
.profile-page-shell .diff-val {
  font-size: 9px;
}

.profile-page-shell .play-meta .diff-row {
  gap: 4px;
  margin-top: 2px;
}

.profile-page-shell .mod-chip {
  font-size: 8px;
  padding: 1px 4px;
}

.profile-page-shell .play-figures {
  gap: 7px;
}

.profile-page-shell .play-figures .acc {
  min-width: 38px;
  font-size: 9px;
}

.profile-page-shell .play-figures .score-block .score {
  font-size: 12px;
}

.profile-page-shell .play-figures .score-block .weight {
  font-size: 8px;
}

.profile-page-shell .play-figures .grade-badge {
  width: 23px;
  height: 23px;
  font-size: 9px;
}

/* Readable page scale for the full profile and authentication screens. */
.dashboard-action.orange {
  background: var(--dashboard-orange);
}

.dashboard-action.green {
  background: linear-gradient(135deg, #16a36b, #08734d);
}

.dashboard-download {
  color: #fff;
  text-decoration: none;
}

.dashboard-download:hover {
  background: linear-gradient(135deg, #1bc27e, #0a8b5d);
}

.dashboard-placeholder {
  cursor: default;
  opacity: .9;
}

.dashboard-placeholder small {
  margin-left: auto;
  margin-right: 12px;
  color: rgba(255, 255, 255, .75);
  font-size: 10px;
  font-weight: 600;
}

.dashboard-placeholder b {
  margin-left: 0;
}

.auth-wrapper {
  padding-top: 42px;
  padding-bottom: 70px;
}

.auth-wrapper .dashboard-page-title {
  max-width: 560px;
  margin-bottom: 24px;
}

.auth-card {
  max-width: 520px;
  padding: 42px 40px;
}

.auth-header h2 {
  font-size: 28px;
}

.auth-header p {
  font-size: 14px;
}

.form-label {
  font-size: 14px;
}

.form-input {
  padding: 11px 13px;
  font-size: 15px;
}

.auth-card .btn {
  min-height: 46px;
  font-size: 15px;
}

.form-footer {
  font-size: 14px;
}

.profile-page-shell .cover {
  height: 220px;
}

.profile-page-shell .identity-strip {
  gap: 18px;
  padding: 0 24px;
  transform: translateY(-48px);
  margin-bottom: -22px;
}

.profile-page-shell .avatar-frame {
  width: 104px;
  height: 104px;
  border-width: 3px;
  border-radius: 12px;
}

.profile-page-shell .identity-text h1 {
  font-size: 24px;
}

.profile-page-shell .identity-text .meta,
.profile-page-shell .header-bio {
  font-size: 12px;
}

.profile-page-shell .header-bio {
  margin-top: 7px;
  line-height: 1.45;
}

.profile-page-shell .profile-badges-row {
  gap: 8px;
  margin-top: 8px;
}

.profile-page-shell .profile-badge-card {
  width: 96px;
  height: 44px;
}

.profile-page-shell .stat-bar .stat {
  padding: 12px 14px;
}

.profile-page-shell .stat-bar .val {
  font-size: 17px;
}

.profile-page-shell .stat-bar .lbl {
  font-size: 9px;
  letter-spacing: .3px;
}

.profile-page-shell .grade-counts {
  gap: 8px;
  padding: 10px 18px;
}

.profile-page-shell .grade-badge {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  font-size: 10px;
}

.profile-page-shell .grade-count-item .count {
  font-size: 12px;
}

.profile-page-shell .layout-grid {
  grid-template-columns: 245px 1fr;
  gap: 18px;
  padding: 18px 24px 0;
}

.profile-page-shell .side-card {
  padding: 14px;
  margin-bottom: 14px;
  border-radius: 10px;
}

.profile-page-shell .side-card h3,
.profile-page-shell .rank-graph-title-group h3 {
  font-size: 13px !important;
  margin-bottom: 10px !important;
}

.profile-page-shell .rank-chart-container {
  height: 108px;
}

.profile-page-shell .rank-graph-bottom .caption {
  font-size: 11px;
}

.profile-page-shell .content-tabs {
  gap: 16px;
  margin-bottom: 14px;
}

.profile-page-shell .content-tabs button {
  font-size: 12px;
  padding-bottom: 10px;
}

.profile-page-shell .section-label {
  font-size: 12px;
  margin-bottom: 10px;
}

.profile-page-shell .play-row {
  grid-template-columns: 52px 1fr auto;
  gap: 12px;
  padding: 10px 14px;
  margin-bottom: 8px;
  border-radius: 8px;
}

.profile-page-shell .thumb {
  width: 52px;
  height: 40px;
  border-radius: 6px;
}

.profile-page-shell .play-meta .title {
  font-size: 13px;
}

.profile-page-shell .play-meta .artist,
.profile-page-shell .diff-val {
  font-size: 11px;
}

.profile-page-shell .play-meta .diff-row {
  gap: 5px;
  margin-top: 4px;
}

.profile-page-shell .mod-chip {
  font-size: 9px;
  padding: 2px 6px;
}

.profile-page-shell .play-figures {
  gap: 11px;
}

.profile-page-shell .play-figures .acc {
  min-width: 48px;
  font-size: 11px;
}

.profile-page-shell .play-figures .score-block .score {
  font-size: 15px;
}

.profile-page-shell .play-figures .score-block .weight {
  font-size: 9px;
}

.profile-page-shell .play-figures .grade-badge {
  width: 30px;
  height: 30px;
  font-size: 11px;
}


.profile-page-shell {
  padding-bottom: 28px;
}

.settings-page {
  min-height: calc(100vh - 100px);
  padding-bottom: 48px;
}

.settings-page .dashboard-tabs {
  margin-bottom: 20px;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 0 12px;
}

.settings-card {
  min-width: 0;
  padding: 20px;
  background: #211e2b;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 8px;
}

.settings-card-wide {
  grid-column: 1 / -1;
}

.settings-card h2 {
  margin: 0;
  color: #f4edf7;
  font-size: 16px;
}

.settings-card p {
  margin: 5px 0 16px;
  color: #a79aa9;
  font-size: 12px;
  line-height: 1.45;
}

.settings-card .form-label {
  margin-top: 13px;
}

.settings-card .form-input {
  box-sizing: border-box;
  margin-bottom: 3px;
}

.settings-card .btn {
  margin-top: 14px;
}

.settings-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.settings-avatar {
  width: 72px;
  height: 72px;
  flex: 0 0 auto;
  border: 2px solid var(--pink);
  border-radius: 10px;
  background: #17151d;
  object-fit: cover;
}

.settings-banner-preview {
  height: 130px;
  margin-top: 12px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 6px;
  background: center / cover no-repeat;
}

.settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.settings-actions .btn {
  margin-top: 12px;
}

@media (max-width: 720px) {
  .settings-grid {
    grid-template-columns: 1fr;
    padding: 0;
  }

  .settings-card-wide {
    grid-column: auto;
  }
}

.profile-page-shell .cover {
  height: 165px;
  border-radius: 0 0 12px 12px;
  background:
    linear-gradient(110deg, rgba(176, 64, 157, .58), rgba(45, 91, 126, .62) 58%, rgba(21, 46, 50, .72)),
    linear-gradient(180deg, #443052, #111a25);
}

.profile-page-shell .cover::after {
  background: linear-gradient(180deg, transparent 30%, rgba(10, 13, 20, .82));
}

.profile-page-shell .rank-block {
  top: 18px;
  right: 22px;
}

.profile-page-shell .rank-block .big {
  font-size: 22px;
}

.profile-page-shell .rank-block .lbl,
.profile-page-shell .rank-block .country {
  font-size: 10px;
}

.profile-page-shell .identity-strip {
  gap: 13px;
  padding: 0 16px;
  transform: translateY(-34px);
  margin-bottom: -18px;
  align-items: flex-end;
}

.profile-page-shell .avatar-frame {
  width: 78px;
  height: 78px;
  border: 3px solid #f3dff7;
  border-radius: 10px;
  box-shadow: 0 5px 16px rgba(0, 0, 0, .38);
}

.profile-page-shell .identity-text {
  min-width: 0;
  padding-bottom: 2px;
}

.profile-page-shell .identity-text h1 {
  font-size: 20px;
  line-height: 1.1;
}

.profile-page-shell .identity-text .meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: #c3bacd;
}

.profile-page-shell .header-bio {
  max-width: 620px;
  margin-top: 5px;
  font-size: 11px;
  color: #e2dbe7;
}

.profile-page-shell .profile-badges-row {
  gap: 6px;
  margin-top: 6px;
}

.profile-page-shell .profile-badge-card {
  width: 78px;
  height: 34px;
  border-radius: 8px;
}

.profile-page-shell .stat-bar {
  margin-top: 0;
  background: #1b1923;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 7px 7px 0 0;
}

.profile-page-shell .stat-bar .stat {
  padding: 10px 9px;
  border-right-color: rgba(255, 255, 255, .1);
}

.profile-page-shell .stat-bar .val {
  font-size: 14px;
  line-height: 1.1;
}

.profile-page-shell .stat-bar .lbl {
  margin-top: 4px;
  font-size: 8px;
}

.profile-page-shell .grade-counts {
  padding: 7px 12px;
  background: #211e2b;
  border: 1px solid rgba(255, 255, 255, .08);
  border-top: 0;
}

.profile-page-shell .layout-grid {
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 16px;
  padding: 16px 12px 0;
}

.profile-page-shell .side-card {
  padding: 12px;
  margin-bottom: 12px;
  background: #211e2b;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 8px;
  box-shadow: none;
}

.profile-page-shell .side-card h3,
.profile-page-shell .rank-graph-title-group h3 {
  font-size: 12px !important;
  color: #f4eff7;
}

.profile-page-shell .rank-chart-container {
  height: 92px;
  background: #191821;
  border-radius: 6px;
}

.profile-page-shell .content-tabs {
  gap: 16px;
  margin-bottom: 12px;
  padding: 0 2px;
  background: transparent !important;
  border: none !important;
  border-bottom: none !important;
}

.profile-page-shell .content-tabs button {
  background: none !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  color: #a99eaf;
  font-size: 12px;
  padding: 0 0 8px;
}

.profile-page-shell .content-tabs button.active {
  color: #fff;
  background: none !important;
  border: none !important;
}

.profile-page-shell .section-label {
  margin-bottom: 8px;
  color: #f1eaf5;
  font-size: 11px;
}

.profile-page-shell .play-row {
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 10px;
  min-height: 54px;
  padding: 8px 10px;
  margin-bottom: 6px;
  background: #211e2b;
  border: 1px solid rgba(255, 255, 255, .1);
  border-left: 3px solid #f3c43e;
  border-radius: 7px;
  box-shadow: none;
}

.profile-page-shell .play-row:hover {
  background: #292536;
  transform: none;
}

.profile-page-shell .thumb {
  width: 46px;
  height: 34px;
}

.profile-page-shell .play-meta .title {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-page-shell .play-meta .artist,
.profile-page-shell .diff-val {
  font-size: 9px;
}

.profile-page-shell .play-figures {
  gap: 8px;
}

.profile-page-shell .play-figures .acc {
  min-width: 42px;
  font-size: 9px;
}

.profile-page-shell .play-figures .score-block .score {
  font-size: 13px;
}

.profile-page-shell .play-figures .score-block .weight {
  font-size: 8px;
}

.profile-page-shell .play-figures .grade-badge {
  width: 25px;
  height: 25px;
  font-size: 10px;
}

/* Reference profile layout: compact player hub with stacked score panels. */
.profile-page-shell {
  padding-left: 7px;
  padding-right: 7px;
  background: #211d27;
}

.profile-page-shell .dashboard-page-title,
.profile-page-shell .dashboard-tabs {
  margin-left: -7px;
  margin-right: -7px;
  padding-left: 15px;
  padding-right: 15px;
}

.profile-page-shell .dashboard-page-title {
  height: 42px;
  background: #28222d;
}

.profile-page-shell .dashboard-tabs {
  height: 35px;
  background: #3a3040;
}

.profile-page-shell .dashboard-tabs a {
  height: 35px;
  font-size: 11px;
}

.profile-page-shell .cover {
  height: 180px;
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(12, 16, 25, .1), rgba(12, 16, 25, .72)),
    url('/assets/menu-background.jpg') center 35% / cover,
    linear-gradient(110deg, #613251, #284c62);
  background-size: cover;
  background-position: center;
}

.profile-page-shell .rank-block {
  top: 48px;
  left: 24px;
  right: auto;
  text-align: left;
}

.profile-page-shell .rank-block .big {
  justify-content: flex-start;
  font-size: 17px;
}

.profile-page-shell .rank-block .lbl,
.profile-page-shell .rank-block .country {
  display: inline-block;
  margin-top: 2px;
  margin-right: 18px;
  font-size: 9px;
}

.profile-page-shell .cover-actions {
  top: 12px;
  right: 12px;
}

.profile-page-shell .ghost-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
}

.profile-page-shell .ghost-btn svg {
  width: 12px;
  height: 12px;
}

.profile-page-shell .identity-strip {
  gap: 10px;
  padding: 0 16px;
  transform: translateY(-75px);
  margin-bottom: -55px;
  align-items: flex-end;
}

.profile-page-shell .avatar-frame {
  width: 62px;
  height: 62px;
  border-width: 2px;
  border-radius: 7px;
}

.profile-page-shell .identity-text h1 {
  font-size: 17px;
}

.profile-page-shell .identity-text .meta {
  font-size: 8px;
  gap: 3px;
}

.profile-page-shell .header-bio {
  display: none;
}

.profile-page-shell .profile-badges-row {
  display: flex !important;
  gap: 6px;
  margin-top: 6px;
  min-height: 38px;
}

.profile-page-shell .profile-badge-card {
  width: 82px;
  height: 35px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: none;
}

.profile-page-shell .profile-badge-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

.profile-page-shell .stat-bar {
  margin: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  border-radius: 0;
  background: #1d1922;
  border: 0;
  box-shadow: none;
}

.profile-page-shell .profile-rank-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  width: 100%;
  box-sizing: border-box;
  padding: 8px 13px;
  background: #29232d;
  border-top: 1px solid rgba(255, 255, 255, .08);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.profile-page-shell .profile-rank-item {
  min-width: 0;
  padding: 0 9px;
  border-right: 1px solid rgba(255, 255, 255, .1);
}

.profile-page-shell .profile-rank-item:last-child {
  border-right: 0;
}

.profile-page-shell .profile-rank-label {
  display: block;
  margin-bottom: 2px;
  color: #a79aa9;
  font-size: 7px;
  font-weight: 700;
  text-transform: uppercase;
}

.profile-page-shell .profile-rank-item strong {
  display: block;
  overflow: hidden;
  color: #f5edf7;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-page-shell .profile-rank-item:last-child strong {
  color: #61e4b0;
}

.profile-page-shell .stat-bar .stat {
  padding: 8px 7px;
}

.profile-page-shell .stat-bar .val {
  font-size: 11px;
}

.profile-page-shell .stat-bar .lbl {
  font-size: 7px;
  white-space: nowrap;
}

.profile-page-shell .grade-counts {
  padding: 5px 12px;
  gap: 7px;
  border-radius: 0;
}

.profile-page-shell .grade-badge {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  font-size: 8px;
}

.profile-page-shell .grade-count-item {
  gap: 3px;
  font-size: 9px;
}

.profile-page-shell .layout-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  padding: 0;
}

.profile-page-shell .sidebar {
  display: flex;
  flex-direction: column;
}

.profile-page-shell .rank-graph-card {
  display: block;
  order: 1;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 9px 13px 8px;
  border: 0;
  border-radius: 0;
  background: #28222d;
  box-shadow: none;
}

.profile-page-shell .rank-graph-top {
  margin-bottom: 6px;
}

.profile-page-shell .rank-graph-title-group {
  gap: 6px;
}

.profile-page-shell .rank-graph-title-group h3 {
  font-size: 10px !important;
}

.profile-page-shell .rank-pill,
.profile-page-shell .stat-badge {
  padding: 1px 5px;
  font-size: 7px;
}

.profile-page-shell .rank-chart-container {
  width: 62%;
  height: 104px;
  margin-bottom: 4px;
  background: #1b1821;
  border-color: rgba(255, 255, 255, .08);
}

.profile-page-shell .rank-graph-bottom {
  width: 62%;
  margin-top: 3px;
}

.profile-page-shell .rank-date-row .axis-lbl,
.profile-page-shell .rank-graph-bottom .caption {
  font-size: 8px;
}

.profile-page-shell .profile-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 12px;
  position: absolute;
  top: 38px;
  right: 13px;
  width: 31%;
  padding-left: 12px;
  border-left: 1px solid rgba(255, 255, 255, .1);
}

.profile-page-shell .profile-stat-grid .stat {
  min-width: 0;
  padding: 5px 0;
}

.profile-page-shell .profile-stat-grid .val {
  overflow: hidden;
  color: #f4edf7;
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-page-shell .profile-stat-grid .lbl {
  margin-top: 2px;
  color: #a79aa9;
  font-size: 6px;
  font-weight: 700;
  line-height: 1.1;
  text-transform: uppercase;
}

.profile-page-shell .main {
  min-width: 0;
  padding: 0 9px 18px;
}

.profile-page-shell .content-tabs {
  gap: 14px;
  margin: 0 0 12px;
  padding: 0;
  background: transparent !important;
  border: none !important;
  border-bottom: none !important;
}

.profile-page-shell .content-tabs button {
  background: none !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  font-size: 12px;
  padding: 4px 0;
  color: #a99eaf;
}

.profile-page-shell .content-tabs button.active {
  color: #fff;
  background: none !important;
  border: none !important;
}

.profile-page-shell .content-tabs button:not(:first-child) {
  display: inline-flex;
}

.profile-page-shell .profile-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 8px 0 6px;
  padding: 7px 10px;
  background: #342c37;
  border-radius: 6px 6px 0 0;
  color: #f4edf5;
  font-size: 11px;
  text-transform: none;
  letter-spacing: 0;
}

.profile-page-shell .panel-caret {
  color: #aaa0ad;
  font-size: 13px;
}

.profile-page-shell .play-row {
  grid-template-columns: 28px minmax(0, 1fr) 125px;
  min-height: 39px;
  gap: 7px;
  padding: 5px 8px;
  margin-bottom: 3px;
  border: 0;
  border-left: 2px solid #e8b8ff;
  border-radius: 4px;
  background: #413747;
}

.profile-page-shell .play-row.is-first-place {
  border-left-color: #ffcf45;
}

.profile-page-shell .thumb {
  width: 28px;
  height: 26px;
  border-radius: 4px;
}

.profile-page-shell .play-meta .title {
  font-size: 9px;
}

.profile-page-shell .play-meta .artist,
.profile-page-shell .diff-val,
.profile-page-shell .mod-chip {
  font-size: 7px;
}

.profile-page-shell .play-meta .diff-row {
  gap: 3px;
  margin-top: 1px;
}

.profile-page-shell .play-figures {
  gap: 6px;
}

.profile-page-shell .play-figures .acc {
  min-width: 34px;
  font-size: 8px;
}

.profile-page-shell .play-figures .score-block .score {
  font-size: 10px;
}

.profile-page-shell .play-figures .score-block .weight {
  font-size: 7px;
}

.profile-page-shell .play-figures .grade-badge {
  width: 19px;
  height: 19px;
  font-size: 8px;
}

.profile-recent-panel {
  margin-top: 10px;
}

.recent-preview-list .play-row {
  grid-template-columns: 20px minmax(0, 1fr) auto;
  min-height: 25px;
  background: #332c38;
  border-left: 2px solid #a9e94d;
}

.recent-preview-list .thumb {
  width: 20px;
  height: 18px;
}

.recent-preview-list .play-figures {
  font-size: 8px;
}

.recent-preview-list .play-figures .score-block,
.recent-preview-list .play-figures .grade-badge,
.recent-preview-list .play-figures .acc {
  display: none;
}

@media (max-width: 600px) {
  .profile-page-shell .rank-graph-card {
    padding-bottom: 8px;
  }

  .profile-page-shell .rank-chart-container {
    width: 58%;
    height: 112px;
  }

  .profile-page-shell .profile-stat-grid {
    width: 38%;
    top: 37px;
    right: 10px;
    gap: 0 8px;
    padding-left: 8px;
  }

  .profile-page-shell .play-row {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .profile-page-shell .play-figures {
    grid-column: 2;
    justify-content: flex-start;
    margin-top: 0;
  }
}

@media (max-width: 700px) {
  .profile-page-shell .cover {
    height: 145px;
  }

  .profile-page-shell .identity-strip {
    align-items: flex-start;
    padding: 0 10px;
  }

  .profile-page-shell .avatar-frame {
    width: 64px;
    height: 64px;
  }

  .profile-page-shell .layout-grid {
    grid-template-columns: 1fr;
  }

  .profile-page-shell .sidebar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .profile-page-shell .side-card {
    margin-bottom: 0;
  }
}

/* Keep the profile a single vertical composition at every preview and mobile width. */
.profile-page-shell .layout-grid {
  display: block;
  width: 100%;
}

.profile-page-shell .sidebar,
.profile-page-shell .main {
  display: block;
  width: 100%;
}

.profile-page-shell .rank-graph-card {
  position: relative;
  width: 100%;
}

.profile-page-shell .profile-stat-grid {
  position: absolute;
}

/* Give homepage announcements a clearer editorial card hierarchy. */
.dashboard-news .news-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.dashboard-news .news-card {
  width: 100%;
  box-sizing: border-box;
  min-height: 0;
  margin: 0;
  border: 1px solid rgba(214, 185, 239, .16);
  border-radius: 12px;
  background: linear-gradient(160deg, #2b2433, #1d1924);
  box-shadow: 0 12px 28px rgba(8, 5, 14, .22);
}

.dashboard-news .news-card:first-child {
  grid-column: auto;
}

.dashboard-news .news-card-header {
  min-height: 80px;
  padding: 16px 20px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  align-items: stretch;
  background: linear-gradient(135deg, rgba(255, 92, 173, .34), rgba(105, 57, 139, .7));
}

.dashboard-news .news-card.update .news-card-header {
  background: linear-gradient(135deg, rgba(77, 171, 255, .28), rgba(83, 43, 128, .72));
}

.dashboard-news .news-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.dashboard-news .news-badge {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #fff;
}

.dashboard-news .news-date {
  font-size: 11px;
  color: #e5def0;
}

.dashboard-news .news-title,
.dashboard-news .news-card-header .news-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.35;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .45);
}

.dashboard-news .news-card-body,
.dashboard-news .news-preview {
  margin: 0;
  padding: 16px 20px 18px;
  font-size: 13px;
  line-height: 1.6;
  color: #cfc8dc;
}

@media (max-width: 760px) {
  .dashboard-news .news-grid {
    gap: 10px;
  }
}

.profile-page-shell .name-row {
  display: flex;
  align-items: center;
  gap: 7px;
}

.verified-tick {
  width: 18px;
  height: 18px;
  object-fit: contain;
  vertical-align: middle;
  flex: 0 0 auto;
}

.profile-page-shell .identity-text .verified-tick {
  width: 20px;
  height: 20px;
}

.profile-page-shell .name-row .flag,
.profile-page-shell .name-row .founder-star,
.profile-page-shell .name-row .owner-badge {
  flex: 0 0 auto;
  align-self: center;
}

.profile-page-shell .name-row .flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 701px) {
  .profile-page-shell .cover {
    height: 220px;
  }

  .profile-page-shell .identity-strip {
    gap: 13px;
    padding: 0 20px;
    transform: translateY(-95px);
    margin-bottom: -75px;
  }

  .profile-page-shell .avatar-frame {
    width: 76px;
    height: 76px;
  }

  .profile-page-shell .identity-text h1 {
    font-size: 21px;
  }

  .profile-page-shell .identity-text .meta {
    font-size: 10px;
    gap: 5px;
  }

  .profile-page-shell .profile-badges-row {
    gap: 8px;
    margin-top: 8px;
    min-height: 46px;
  }

  .profile-page-shell .profile-badge-card {
    width: 98px;
    height: 42px;
  }

  .profile-page-shell .profile-rank-strip {
    padding: 11px 17px;
  }

  .profile-page-shell .profile-rank-label {
    font-size: 8px;
  }

  .profile-page-shell .profile-rank-item strong {
    font-size: 16px;
  }

  .profile-page-shell .grade-counts {
    padding: 7px 15px;
    gap: 9px;
  }

  .profile-page-shell .grade-badge {
    width: 22px;
    height: 22px;
    font-size: 9px;
  }

  .profile-page-shell .grade-count-item {
    font-size: 10px;
  }

  .profile-page-shell .rank-graph-card {
    padding: 12px 17px 11px;
  }

  .profile-page-shell .rank-chart-container {
    height: 125px;
  }

  .profile-page-shell .rank-chart-container,
  .profile-page-shell .rank-graph-bottom {
    width: 64%;
  }

  .profile-page-shell .profile-stat-grid {
    top: 43px;
    right: 17px;
    width: 30%;
    padding-left: 16px;
  }

  .profile-page-shell .profile-stat-grid .val {
    font-size: 13px;
  }

  .profile-page-shell .profile-stat-grid .lbl {
    font-size: 7px;
  }

  .profile-page-shell .profile-panel-heading {
    font-size: 13px;
    padding: 9px 12px;
  }

  .profile-page-shell .play-row {
    grid-template-columns: 34px minmax(0, 1fr) 145px;
    min-height: 46px;
    padding: 7px 10px;
  }

  .profile-page-shell .thumb {
    width: 34px;
    height: 32px;
  }

  .profile-page-shell .play-meta .title {
    font-size: 10px;
  }
}

@media (min-width: 1001px) {
  .profile-page-shell .cover {
    height: 260px;
  }

  .profile-page-shell .identity-strip {
    gap: 15px;
    padding: 0 23px;
    transform: translateY(-115px);
    margin-bottom: -90px;
  }

  .profile-page-shell .avatar-frame {
    width: 86px;
    height: 86px;
  }

  .profile-page-shell .identity-text h1 {
    font-size: 24px;
  }

  .profile-page-shell .identity-text .meta {
    font-size: 11px;
    gap: 6px;
  }

  .profile-page-shell .profile-badges-row {
    gap: 10px;
    margin-top: 10px;
    min-height: 52px;
  }

  .profile-page-shell .profile-badge-card {
    width: 112px;
    height: 48px;
  }

  .profile-page-shell .profile-rank-strip {
    padding: 13px 20px;
  }

  .profile-page-shell .profile-rank-label {
    font-size: 9px;
  }

  .profile-page-shell .profile-rank-item strong {
    font-size: 18px;
  }

  .profile-page-shell .rank-graph-card {
    padding: 14px 20px 13px;
  }

  .profile-page-shell .rank-chart-container {
    height: 140px;
  }

  .profile-page-shell .rank-chart-container,
  .profile-page-shell .rank-graph-bottom {
    width: 65%;
  }

  .profile-page-shell .profile-stat-grid {
    top: 47px;
    right: 20px;
    width: 29%;
    padding-left: 18px;
  }

  .profile-page-shell .profile-stat-grid .val {
    font-size: 14px;
  }

  .profile-page-shell .profile-stat-grid .lbl {
    font-size: 8px;
  }

  .profile-page-shell .profile-panel-heading {
    font-size: 14px;
    padding: 10px 13px;
  }

  .profile-page-shell .play-row {
    grid-template-columns: 38px minmax(0, 1fr) 160px;
    min-height: 52px;
    gap: 9px;
    padding: 8px 12px;
  }

  .profile-page-shell .thumb {
    width: 38px;
    height: 36px;
  }

  .profile-page-shell .play-meta .title {
    font-size: 11px;
  }
}

/* Clean borderless badges on player profiles */
.profile-badge-card,
.profile-page-shell .profile-badge-card {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  border-radius: 8px !important;
  overflow: hidden !important;
}

.profile-badge-card:hover,
.profile-page-shell .profile-badge-card:hover {
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
}

.profile-badge-card img,
.profile-page-shell .profile-badge-card img {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  border-radius: 8px !important;
}

/* ==========================================================================
   Friends, Notifications & Direct Messaging System Styles
   ========================================================================== */

/* Friend Action Area on Profile */
.friend-action-area {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.btn-friend-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 9999px;
  font-family: var(--font, 'Exo 2');
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(8px);
  text-decoration: none;
}

.btn-friend-add {
  background: linear-gradient(135deg, rgba(255, 92, 173, 0.25), rgba(121, 80, 242, 0.25));
  border: 1px solid rgba(255, 92, 173, 0.5);
  color: #ffffff;
}

.btn-friend-add:hover {
  background: linear-gradient(135deg, rgba(255, 92, 173, 0.4), rgba(121, 80, 242, 0.4));
  border-color: #ff5cad;
  box-shadow: 0 0 14px rgba(255, 92, 173, 0.4);
  transform: translateY(-1px);
}

.btn-friend-pending {
  background: rgba(255, 190, 59, 0.15);
  border: 1px solid rgba(255, 190, 59, 0.5);
  color: #ffbe3b;
  cursor: default;
}

.btn-friend-friends {
  background: rgba(0, 245, 160, 0.15);
  border: 1px solid rgba(0, 245, 160, 0.5);
  color: #00f5a0;
  cursor: default;
}

.btn-friend-chat {
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.2), rgba(121, 80, 242, 0.2));
  border: 1px solid rgba(0, 229, 255, 0.5);
  color: #00e5ff;
}

.btn-friend-chat:hover {
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.35), rgba(121, 80, 242, 0.35));
  box-shadow: 0 0 14px rgba(0, 229, 255, 0.4);
  transform: translateY(-1px);
}

.btn-friend-accept {
  background: linear-gradient(135deg, #00f5a0, #00d9f5);
  border: none;
  color: #05080c;
  box-shadow: 0 0 12px rgba(0, 245, 160, 0.3);
}

.btn-friend-accept:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}

.btn-friend-decline {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #cbd5e1;
}

.btn-friend-decline:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

/* Friends Section Grid & Cards */
.friends-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  padding: 16px 0;
}

.friend-card {
  background: rgba(22, 27, 46, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all 0.22s ease;
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.friend-card:hover {
  border-color: rgba(255, 92, 173, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.friend-avatar-wrap {
  position: relative;
  width: 50px;
  height: 50px;
  flex-shrink: 0;
}

.friend-avatar-wrap img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 92, 173, 0.5);
}

.friend-status-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2px solid #161b2e;
}

.friend-status-dot.online {
  background: #00f5a0;
  box-shadow: 0 0 8px #00f5a0;
}

.friend-status-dot.offline {
  background: #64748b;
}

.friend-card-details {
  flex: 1;
  min-width: 0;
}

.friend-card-name {
  font-size: 0.98rem;
  font-weight: 800;
  color: #ffffff;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.friend-card-name:hover {
  color: #ff5cad;
}

.friend-card-meta {
  font-size: 0.78rem;
  color: var(--text-muted, #94a3b8);
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.friend-card-meta .pp-badge {
  color: #ff5cad;
  font-weight: 800;
}

.friend-card-chat-btn {
  background: rgba(0, 229, 255, 0.15);
  border: 1px solid rgba(0, 229, 255, 0.4);
  color: #00e5ff;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
  margin-top: 8px;
}

.friend-card-chat-btn:hover {
  background: rgba(0, 229, 255, 0.3);
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.4);
  transform: translateY(-1px);
}

/* ==========================================================================
   POP! Frosted Glass Direct Messaging Chat Drawer
   ========================================================================== */
.chat-drawer {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 380px;
  height: 520px;
  background: linear-gradient(180deg, rgba(16, 25, 36, 0.94) 0%, rgba(10, 17, 24, 0.97) 100%);
  border: 1px solid rgba(0, 245, 160, 0.35);
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.75), 0 0 25px rgba(0, 245, 160, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  display: flex;
  flex-direction: column;
  z-index: 99999;
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  transform: translateY(20px) scale(0.96);
  opacity: 0;
  pointer-events: none;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: var(--font, 'Exo 2');
  overflow: hidden;
}

.chat-drawer.open {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

/* Chat Header */
.chat-header {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(180deg, rgba(22, 34, 48, 0.85) 0%, rgba(14, 23, 34, 0.85) 100%);
  border-radius: 20px 20px 0 0;
  backdrop-filter: blur(16px);
}

.chat-header-user {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none !important;
  color: inherit;
  transition: opacity 0.15s ease;
}

.chat-header-user:hover {
  opacity: 0.85;
}

.chat-avatar-wrapper {
  position: relative;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
}

.chat-header-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #00f5a0;
  box-shadow: 0 0 10px rgba(0, 245, 160, 0.3);
  background: #080d13;
}

.chat-header-status-dot {
  position: absolute;
  bottom: 0px;
  right: 0px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid #0d141d;
}

.chat-header-status-dot.online {
  background: #00f5a0;
  box-shadow: 0 0 8px #00f5a0;
  animation: chatPulseOnline 2s infinite ease-in-out;
}

@keyframes chatPulseOnline {
  0%, 100% { box-shadow: 0 0 6px #00f5a0; }
  50% { box-shadow: 0 0 14px #00f5a0; }
}

.chat-header-status-dot.offline {
  background: #64748b;
}

.chat-header-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.chat-header-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.chat-header-title {
  font-size: 0.94rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.2px;
}

.chat-header-badge {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  background: rgba(0, 245, 160, 0.15);
  color: #00f5a0;
  border: 1px solid rgba(0, 245, 160, 0.3);
  border-radius: 4px;
  padding: 1px 5px;
  letter-spacing: 0.5px;
}

.chat-header-status {
  font-size: 0.72rem;
  color: #94a3b8;
}

.chat-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.chat-action-btn,
.chat-close-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  cursor: pointer;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  text-decoration: none !important;
}

.chat-action-btn:hover {
  background: rgba(0, 245, 160, 0.15);
  border-color: rgba(0, 245, 160, 0.4);
  color: #00f5a0;
  transform: translateY(-1px);
}

.chat-close-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  transform: rotate(90deg);
}

/* Chat Messages Scroll Container */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: radial-gradient(circle at 100% 0%, rgba(0, 245, 160, 0.04), transparent 60%), rgba(8, 13, 19, 0.45);
}

.chat-messages::-webkit-scrollbar {
  width: 5px;
}

.chat-messages::-webkit-scrollbar-track {
  background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: rgba(0, 245, 160, 0.25);
  border-radius: 9999px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 245, 160, 0.55);
}

/* Empty State */
.chat-empty-state {
  margin: auto;
  text-align: center;
  padding: 2rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.chat-empty-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(0, 245, 160, 0.1);
  border: 1px solid rgba(0, 245, 160, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

.chat-empty-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #ffffff;
}

.chat-empty-sub {
  font-size: 0.78rem;
  color: #94a3b8;
  max-width: 220px;
  line-height: 1.4;
}

/* Chat Bubbles */
.chat-bubble {
  max-width: 82%;
  padding: 9px 13px;
  border-radius: 14px;
  font-size: 0.86rem;
  line-height: 1.45;
  word-break: break-word;
}

.chat-bubble.sent {
  align-self: flex-end;
  background: linear-gradient(135deg, #00f5a0 0%, #00d9f5 100%);
  color: #05080c;
  font-weight: 600;
  border-bottom-right-radius: 3px;
  box-shadow: 0 4px 15px rgba(0, 245, 160, 0.25);
}

.chat-bubble.sent .chat-bubble-time {
  color: rgba(5, 8, 12, 0.7);
  font-weight: 700;
}

.chat-bubble.received {
  align-self: flex-start;
  background: rgba(22, 34, 48, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #f1f5f9;
  border-bottom-left-radius: 3px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
}

.chat-bubble.received .chat-bubble-time {
  color: #94a3b8;
}

.chat-bubble-text {
  word-break: break-word;
}

.chat-bubble-time {
  font-size: 0.67rem;
  margin-top: 4px;
  text-align: right;
  opacity: 0.85;
}

/* Chat Input Bar */
.chat-input-bar {
  padding: 12px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  gap: 8px;
  align-items: center;
  background: linear-gradient(180deg, rgba(16, 25, 36, 0.85) 0%, rgba(10, 17, 24, 0.95) 100%);
  border-radius: 0 0 20px 20px;
  backdrop-filter: blur(16px);
}

.chat-input-wrapper {
  flex: 1;
  position: relative;
}

.chat-input {
  width: 100%;
  background: rgba(6, 10, 15, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
  padding: 9px 13px;
  border-radius: 12px;
  font-family: var(--font, 'Exo 2');
  font-size: 0.86rem;
  outline: none;
  transition: all 0.2s ease;
}

.chat-input::placeholder {
  color: #64748b;
  font-size: 0.84rem;
}

.chat-input:focus {
  border-color: #00f5a0;
  box-shadow: 0 0 12px rgba(0, 245, 160, 0.3);
  background: rgba(8, 14, 21, 0.95);
}

.chat-send-btn {
  background: linear-gradient(135deg, #00f5a0 0%, #00d9f5 100%);
  border: none;
  color: #05080c;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(0, 245, 160, 0.3);
}

.chat-send-btn:hover {
  filter: brightness(1.15);
  transform: translateY(-1px) scale(1.05);
  box-shadow: 0 4px 16px rgba(0, 245, 160, 0.5);
}

.chat-send-btn:active {
  transform: translateY(0) scale(0.98);
}

/* Notification Items in Navbar */
.notif-item {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  gap: 10px;
  align-items: flex-start;
  transition: background 0.15s;
  text-align: left;
}

.notif-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

.notif-item.unread {
  background: rgba(255, 92, 173, 0.07);
}

.notif-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
  border: 1.5px solid rgba(255, 92, 173, 0.5);
}

.notif-content {
  flex: 1;
  min-width: 0;
  font-size: 0.82rem;
  color: #f1f5f9;
}

.notif-sender {
  font-weight: 700;
  color: #fff;
}

.notif-time {
  font-size: 0.72rem;
  color: #94a3b8;
  margin-top: 3px;
}

.notif-actions {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}

.notif-btn-accept {
  background: #00f5a0;
  color: #05080c;
  border: none;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  transition: filter 0.15s ease;
}

.notif-btn-accept:hover {
  filter: brightness(1.15);
}

.notif-btn-decline {
  background: rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.notif-btn-decline:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.notif-avatar-link {
  display: block;
  flex-shrink: 0;
  text-decoration: none;
  cursor: pointer;
}

.notif-avatar-link:hover .notif-avatar {
  border-color: #00f5a0;
  transform: scale(1.06);
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.notif-sender-link {
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  display: inline;
}

.notif-sender-link:hover .notif-sender {
  color: #00f5a0;
  text-decoration: underline;
}

.notif-btn-profile {
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 4px 9px;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.notif-btn-profile:hover {
  background: rgba(0, 245, 160, 0.15);
  border-color: rgba(0, 245, 160, 0.4);
  color: #00f5a0;
}

.notif-profile-link {
  color: #00f5a0;
  font-size: 0.74rem;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.notif-profile-link:hover {
  text-decoration: underline;
}

