.profile-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 14% 8%, rgba(229, 59, 51, .12), transparent 25rem),
    linear-gradient(180deg, #0b0d0f 0, #090a0b 38rem);
}

.profile-page .site-header {
  position: relative;
  left: auto;
  transform: none;
  margin: 0 auto;
}

.profile-page .main-nav .active { color: #fff; }
.profile-page .main-nav .active::after { content: ""; display: block; height: 2px; margin-top: 5px; background: var(--red); }
.profile-page .nav-cta { color: #fff; background: transparent; cursor: pointer; font: inherit; }
.steam-login svg, .steam-profile-button svg { width: 19px; height: 19px; fill: currentColor; flex: 0 0 auto; }

.profile-shell {
  width: min(calc(100% - 48px), 1120px);
  margin: 0 auto;
  padding: 42px 0 110px;
}

.demo-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
  padding: 12px 16px;
  border: 1px solid rgba(229, 59, 51, .25);
  background: rgba(229, 59, 51, .06);
  color: #aeb2b6;
  font-size: .86rem;
}

.demo-banner span {
  flex: 0 0 auto;
  padding: 4px 8px;
  background: var(--red);
  color: #fff;
  font-size: .68rem;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.player-header {
  display: grid;
  grid-template-columns: 104px 1fr auto;
  gap: 26px;
  align-items: center;
  padding: 34px 0 42px;
  border-bottom: 1px solid var(--line);
}

.player-avatar {
  width: 104px;
  height: 104px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .12);
  background: linear-gradient(145deg, #1b1f22, #0d0f11);
  box-shadow: inset 0 0 40px rgba(229, 59, 51, .08);
}

.player-avatar .brand-mark { width: 45px; height: 45px; opacity: .9; }
.player-avatar .brand-mark i { height: 56px; left: 20px; top: -7px; }
.player-avatar .brand-mark b { width: 56px; top: 20px; left: -7px; }
.player-tags { display: flex; gap: 8px; margin-bottom: 8px; }
.player-tags span { padding: 4px 9px; border: 1px solid var(--line); color: #969ca1; font-size: .68rem; font-weight: 650; letter-spacing: .11em; text-transform: uppercase; }
.player-tags .vip-tag { border-color: rgba(229, 59, 51, .48); color: #ff665e; }
.player-identity h1 { font-family: Inter, "Segoe UI", Arial, sans-serif; font-size: clamp(2rem, 4vw, 3.45rem); font-weight: 750; line-height: 1.02; letter-spacing: -.025em; }
.player-identity p { display: flex; align-items: center; gap: 10px; margin: 10px 0 0; color: #6f777e; font-size: .8rem; }
.player-identity p i { width: 3px; height: 3px; border-radius: 50%; background: #53595e; }

.steam-profile-button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 17px;
  border: 1px solid #30353a;
  background: #14171a;
  font-size: .78rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}

.steam-profile-button:hover { border-color: #fff; background: #1b1f23; }
.statistics { padding-top: 65px; }
.statistics-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; margin-bottom: 25px; }
.statistics-heading .kicker { margin-bottom: 9px; }
.statistics-heading h2 { font-family: Inter, "Segoe UI", Arial, sans-serif; font-size: clamp(2.35rem, 4.2vw, 4rem); font-weight: 750; line-height: .98; letter-spacing: -.035em; text-transform: uppercase; }

.period-switch { display: inline-flex; padding: 4px; border: 1px solid var(--line); background: #0d0f11; }
.period-switch button { min-height: 38px; padding: 0 15px; border: 0; background: transparent; color: #747c83; font-size: .74rem; font-weight: 700; text-transform: uppercase; cursor: pointer; }
.period-switch button:hover { color: #fff; }
.period-switch button.active { background: #24282c; color: #fff; box-shadow: inset 0 -2px var(--red); }

.stats-panel { border: 1px solid var(--line); background: rgba(16, 18, 20, .88); backdrop-filter: blur(12px); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat-card { min-height: 145px; padding: 26px 24px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat-card:nth-child(4n) { border-right: 0; }
.stat-card:nth-child(n+5) { border-bottom: 0; }
.stat-card span { display: block; color: #65717b; font-size: .67rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.stat-card strong { display: block; margin-top: 10px; font-family: Inter, "Segoe UI", Arial, sans-serif; font-size: 1.62rem; font-weight: 720; letter-spacing: -.02em; line-height: 1.12; }
.stat-card strong b { font: inherit; }
.stat-card small { display: block; margin-top: 7px; color: #596168; font-size: .72rem; }
.stat-primary { position: relative; overflow: hidden; background: linear-gradient(135deg, rgba(229, 59, 51, .15), transparent 70%); }
.stat-primary::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--red); }

.activity-panel, .sessions-panel { padding: 30px 24px; border-top: 1px solid var(--line); }
.panel-title { display: flex; justify-content: space-between; align-items: start; gap: 20px; }
.panel-title span { color: #899198; font-size: .72rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.panel-title p { margin: 5px 0 0; color: #5f676e; font-size: .76rem; }
.panel-title > strong { color: #899198; font-size: .78rem; font-weight: 650; }

.chart { height: 190px; display: grid; grid-template-columns: repeat(12, 1fr); align-items: end; gap: 9px; margin-top: 28px; padding-top: 16px; border-bottom: 1px solid #2a2e32; background: repeating-linear-gradient(to bottom, rgba(255,255,255,.05) 0, rgba(255,255,255,.05) 1px, transparent 1px, transparent 48px); }
.activity-bar { position: relative; height: var(--bar); min-height: 8px; border: 0; background: linear-gradient(180deg, #ee4c43, #8f211c); cursor: help; transition: height .35s ease, filter .2s; }
.activity-bar::after { content: attr(data-hours); position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); padding: 4px 7px; background: #f3f4f4; color: #111; font-size: .68rem; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .15s; }
.activity-bar:hover, .activity-bar:focus-visible { filter: brightness(1.25); outline: 1px solid #fff; outline-offset: 2px; }
.activity-bar:hover::after, .activity-bar:focus-visible::after { opacity: 1; }
.chart-axis { display: flex; justify-content: space-between; margin-top: 8px; color: #515a62; font-size: .66rem; }

.sessions-panel { border-top-color: var(--line); }
.session-list { margin-top: 20px; }
.session-list article { min-height: 70px; display: grid; grid-template-columns: 1.3fr .8fr .45fr; gap: 24px; align-items: center; border-top: 1px solid rgba(255,255,255,.07); }
.session-list div { display: grid; gap: 3px; }
.session-list b { font-size: .86rem; font-weight: 650; }
.session-list span, .session-list time { color: #606970; font-size: .72rem; }
.session-list strong { text-align: right; font-size: .84rem; font-weight: 700; }

.connection-card { display: flex; justify-content: space-between; align-items: center; gap: 30px; margin-top: 22px; padding: 20px 22px; border: 1px solid rgba(255,255,255,.1); background: #0d0f11; }
.connection-card > div { display: flex; align-items: center; gap: 15px; }
.connection-icon { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--red); color: var(--red); font-weight: 900; }
.connection-card p { margin: 0; color: #686f75; font-size: .78rem; }
.connection-card p strong { display: block; color: #d7d9da; font-size: .84rem; }
.connection-card a { flex: 0 0 auto; font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.connection-card a span { color: var(--red); margin-left: 8px; }
.profile-page footer { border-top: 1px solid var(--line); }

@media (max-width: 1000px) {
  .profile-page .main-nav { gap: 22px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-card:nth-child(4n) { border-right: 1px solid var(--line); }
  .stat-card:nth-child(2n) { border-right: 0; }
  .stat-card:nth-child(n+5) { border-bottom: 1px solid var(--line); }
  .stat-card:last-child { border-bottom: 0; }
}

@media (max-width: 760px) {
  .profile-shell { width: calc(100% - 32px); padding-top: 24px; }
  .profile-page .main-nav { gap: 28px; }
  .demo-banner { align-items: flex-start; flex-direction: column; }
  .player-header { grid-template-columns: 76px 1fr; gap: 17px; padding-top: 25px; }
  .player-avatar { width: 76px; height: 76px; }
  .player-avatar .brand-mark { transform: rotate(45deg) scale(.72); }
  .player-identity h1 { font-size: clamp(2rem, 10vw, 3rem); }
  .player-identity p { display: block; }
  .player-identity p i { display: none; }
  .steam-profile-button { grid-column: 1 / -1; justify-content: center; width: 100%; }
  .statistics { padding-top: 48px; }
  .statistics-heading { align-items: stretch; flex-direction: column; }
  .period-switch { align-self: stretch; }
  .period-switch button { flex: 1; padding: 0 8px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat-card { min-height: 132px; padding: 21px 17px; }
  .stat-card strong { font-size: 1.55rem; }
  .activity-panel, .sessions-panel { padding: 24px 16px; }
  .panel-title > strong { display: none; }
  .chart { height: 155px; gap: 4px; }
  .activity-bar::after { display: none; }
  .session-list article { grid-template-columns: 1fr auto; gap: 8px 18px; padding: 14px 0; }
  .session-list time { grid-column: 1; }
  .session-list strong { grid-column: 2; grid-row: 1 / span 2; }
  .connection-card { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 430px) {
  .stats-grid { grid-template-columns: 1fr; }
  .stat-card { min-height: 120px; border-right: 0 !important; }
  .stat-card:nth-last-child(-n+2) { border-bottom: 1px solid var(--line); }
  .stat-card:last-child { border-bottom: 0; }
}
