* {
  box-sizing: border-box;
}

:root {
  --accent: #2EC4B6;
  --accent-hover: #4FD1C5;
  --accent-soft: rgba(46, 196, 182, 0.18);
  --board-dark: #238a7f;
  --board-light: #f4f7fb;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  min-height: 100vh;
  color: #eef4ff;
  background: #0f1b2d;
}

.top-tab {
  width: 100%;
  background: #12233b;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.top-tab-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 24px 20px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 24px;
}

.site-nav {
  background: #0e1f35;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.site-nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: stretch;
  gap: 2px;
}

.nav-tab {
  padding: 11px 22px;
  color: #b8c9e4;
  text-decoration: none;
  font-size: 0.93rem;
  font-weight: 600;
  border-bottom: 3px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  letter-spacing: 0.01em;
}

.nav-tab:hover {
  color: #eef4ff;
  border-bottom-color: rgba(46, 196, 182, 0.45);
}

.nav-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.login-btn {
  margin-left: auto;
  padding: 11px 22px;
  color: var(--accent);
  text-decoration: none;
  font-size: 0.93rem;
  font-weight: 700;
  border-bottom: 3px solid transparent;
  transition: color 0.15s, border-bottom-color 0.15s;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.login-btn:hover {
  color: var(--accent-hover);
  border-bottom-color: var(--accent);
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.site-logo {
  display: block;
  height: 160px;
  width: auto;
}

.brand-tagline {
  margin: 6px 0 0;
  font-size: 0.9rem;
  line-height: 1.4;
  color: #b8c9e4;
}

.home-search-wrap {
  width: 100%;
  justify-self: stretch;
  align-self: center;
}

.search-input-group {
  display: flex;
  align-items: stretch;
  width: 100%;
  max-width: 100%;
  background: #1a2c47;
  border: 1px solid rgba(210, 225, 255, 0.12);
  border-radius: 14px;
  overflow: hidden;
}

.search-input-group input {
  flex: 1;
  min-width: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 16px 18px;
  font-size: 1.05rem;
  color: #eef4ff;
}

.search-input-group input:focus {
  box-shadow: none;
}

.search-input-group button {
  border-radius: 0;
  min-width: 160px;
  flex: 0 0 auto;
}

.search-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.search-controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.limit-wrap {
  max-width: 260px;
}

.limit-wrap input {
  width: 100%;
}

input,
select {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(210, 225, 255, 0.12);
  background: #1a2c47;
  color: #eef4ff;
  font-size: 1rem;
  outline: none;
}

input::placeholder {
  color: #93a8c7;
}

input:focus,
select:focus {
  border-color: rgba(129, 177, 255, 0.8);
  box-shadow: 0 0 0 3px rgba(129, 177, 255, 0.15);
}

button {
  border: none;
  border-radius: 12px;
  padding: 14px 20px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  background: var(--accent);
  color: #0f1b2d;
  transition: transform 0.15s ease, background 0.15s ease;
}

button:hover {
  transform: translateY(-1px);
  background: var(--accent-hover);
}

button:active {
  transform: translateY(0);
}

.container {
  padding: 28px 24px 40px;
}

.card,
.sidebar-card,
.main-content-card {
  border-radius: 22px;
  background: #16263d;
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
  overflow: hidden;
}

.card {
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px;
}

.landing-card {
  min-height: 120px;
}

.profile-layout {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

/* ── Profile page with section nav (My Profile) ─────────── */
.profile-page-wrap {
  max-width: 1440px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 168px 280px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

/* Hide sidebar when not on the overview tab */
.profile-page-wrap:has(.profile-pane.active:not(#tab-overview)) {
  grid-template-columns: 168px minmax(0, 1fr);
}

.profile-page-wrap:has(.profile-pane.active:not(#tab-overview)) .sidebar-card {
  display: none;
}

.profile-section-nav {
  background: #16263d;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
  padding: 16px 0 20px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  position: sticky;
  top: 24px;
}

.section-nav-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #5a7a9e;
  padding: 0 18px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 6px;
}

.section-nav-btn {
  background: transparent;
  border: none;
  color: #a8bddc;
  text-align: left;
  padding: 10px 14px 10px 12px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 10px;
  margin: 0 8px;
  transition: background 0.15s, color 0.15s;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.snav-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.65;
  transition: opacity 0.15s;
}

.section-nav-btn:hover .snav-icon,
.section-nav-btn.active .snav-icon {
  opacity: 1;
}

.section-nav-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #eef4ff;
}

.section-nav-btn.active {
  background: var(--accent-soft);
  color: var(--accent);
}

.profile-tab-content {
  min-width: 0;
}

.profile-pane {
  display: none;
}

.profile-pane.active {
  display: block;
}

/* Coming-soon placeholder panes */
.coming-soon-pane {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 40px;
  min-height: 360px;
  color: #7a9abf;
}

.coming-soon-pane h2 {
  color: #c4d8f0;
  font-size: 1.5rem;
  margin: 16px 0 12px;
}

.coming-soon-pane p {
  max-width: 480px;
  line-height: 1.65;
  color: #7a9abf;
  margin: 0;
}

.coming-soon-icon {
  font-size: 2.8rem;
  line-height: 1;
  margin-bottom: 4px;
  filter: grayscale(0.3) opacity(0.7);
}

.sidebar-card {
  padding: 24px;
}

.main-content-card {
  padding: 0;
}

.main-content-inner {
  padding: 28px;
}

.mode-tab-bar {
  display: flex;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: #12233b;
}

.mode-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: #a8bddc;
  font-size: 1rem;
  font-weight: 700;
  padding: 16px 0;
  cursor: pointer;
  letter-spacing: 0.03em;
  transition: background 0.15s, color 0.15s;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
}

.mode-tab-btn:hover {
  background: rgba(255, 255, 255, 0.03);
  color: #d8e6fb;
}

.mode-tab-btn.active {
  color: var(--accent);
  background: rgba(79, 140, 255, 0.07);
  border-bottom: 3px solid var(--accent);
}

.profile-overview {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.profile-avatar {
  width: 120px;
  height: 120px;
  border-radius: 18px;
  object-fit: cover;
  border: 3px solid var(--accent-soft);
  background: #1d314f;
  background-image: url("avatar-placeholder.png");
  background-position: center;
  background-size: cover;
  margin-bottom: 16px;
}

.profile-text {
  width: 100%;
}

.profile-text h2 {
  margin: 0 0 8px;
  font-size: 1.35rem;
  color: #f3f7ff;
  word-break: break-word;
}

.profile-subtext {
  margin: 0;
  color: #a8bddc;
  font-size: 0.95rem;
}

.mode-records {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 14px;
}

.mode-record {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  transition: background 0.15s;
}

.mode-record:hover {
  background: rgba(255, 255, 255, 0.07);
}

.mode-label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mode-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.mode-name {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8fa8c8;
  width: auto;
}

.mode-rating {
  font-size: 1.2rem;
  font-weight: 800;
  color: #eef4ff;
  letter-spacing: -0.02em;
  min-width: auto;
  text-align: right;
}

.mode-score {
  font-weight: 600;
}

.mode-score .wins {
  color: #3fc08a;
}

.mode-score .draws {
  color: #c6d5ea;
}

.mode-score .losses {
  color: #e04f4f;
}

.sidebar-controls {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sidebar-controls button,
.sidebar-controls input,
.sidebar-controls select {
  width: 100%;
}

.sidebar-controls button {
  margin-bottom: 4px;
}

.status {
  min-height: 24px;
  margin: 0 0 20px;
  color: #c6d5ea;
}

.hidden {
  display: none !important;
}

.header-row {
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.header-row h2 {
  margin: 0 0 6px;
  font-size: 1.5rem;
}

.header-row p {
  margin: 0 0 4px;
  color: #a8bddc;
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: start;
}

.stats-column,
.analytics-column {
  min-width: 0;
}

.analytics-column,
.right-stats,
.analytics-card {
  width: 100%;
}

.analytics-column {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
}

.right-stats {
  display: block;
  width: 100%;
}

.stats-grid {
  width: 100%;
}

.stat-card {
  width: 100%;
}

.timeline-chart-wrap {
  width: 100%;
}

.section-title {
  margin: 28px 0 14px;
  font-size: 1.1rem;
  color: #d8e6fb;
}

.section-title:first-child {
  margin-top: 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.stat-card {
  padding: 20px;
  border-radius: 18px;
  background: #1d314f;
  border: 1px solid var(--accent-soft);
}

.stat-row {
  display: flex;
  gap: 0;
  width: 100%;
  background: #1d314f;
  border: 1px solid rgba(210,225,255,0.06);
  border-radius: 14px;
  overflow: hidden;
}

.stat-segment {
  flex: 1 1 0;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  min-width: 0;
}

.stat-segment + .stat-segment {
  border-left: 1px solid rgba(255,255,255,0.04);
}

.stat-row .label {
  font-size: 0.9rem;
  color: #b8c9e4;
  margin-bottom: 6px;
}

.stat-row .value {
  font-size: 1.6rem;
  font-weight: 800;
}

.stat-wins { color: #3fc08a; }
.stat-losses { color: #e04f4f; }
.stat-draws { color: #c6d5ea; }
.stat-score { color: var(--accent); }

.label {
  display: block;
  font-size: 0.95rem;
  color: #b8c9e4;
  margin-bottom: 8px;
}

.value {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
}

.stat-row .value.stat-wins { color: #3fc08a; }
.stat-row .value.stat-losses { color: #e04f4f; }
.stat-row .value.stat-draws { color: #c6d5ea; }
.stat-row .value.stat-score { color: var(--accent); }

.analytics-card {
  padding: 20px;
  border-radius: 20px;
  background: #1d314f;
  border: 1px solid rgba(210, 225, 255, 0.08);
}

.analytics-header {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 16px;
}

.analytics-header h3 {
  margin: 0 0 6px;
  font-size: 1.15rem;
  color: #eef4ff;
}

.analytics-header p {
  margin: 0;
  color: #a8bddc;
  font-size: 0.9rem;
}

.timeline-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.timeline-controls {
  display: flex;
  gap: 12px;
  align-items: center;
}

.segmented-control {
  display: inline-flex;
  background: #12233b;
  border: 1px solid rgba(210,225,255,0.06);
  border-radius: 12px;
  overflow: hidden;
}

.segmented-btn {
  background: transparent;
  color: #d8e6fb;
  border: none;
  padding: 8px 12px;
  font-weight: 700;
  cursor: pointer;
  font-size: 0.9rem;
}

.segmented-btn:hover {
  background: rgba(255,255,255,0.02);
}

.segmented-btn.active {
  background: var(--accent);
  color: #0f1b2d;
}

.timeline-tab {
  background: #16263d;
  color: #d8e6fb;
  border: 1px solid rgba(210, 225, 255, 0.1);
  padding: 10px 14px;
  font-size: 0.92rem;
}

.timeline-tab:hover {
  background: #223654;
}

.timeline-tab.active {
  background: var(--accent);
  color: #0f1b2d;
  border-color: transparent;
}

.timeline-chart-wrap {
  height: 420px;
  position: relative;
}

.right-stats {
  margin-bottom: 18px;
}

.timeline-empty {
  margin-bottom: 10px;
  color: #93a8c7;
  font-size: 0.95rem;
}

.game-history-section {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-bottom: 0;
}

.game-history-header h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
  color: #eef4ff;
}

.game-history-header p {
  margin: 0 0 14px;
  font-size: 0.9rem;
  color: #a8bddc;
}

.game-history-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
  padding: 0;
  max-height: 1700px;
  overflow-y: auto;
  transition: max-height 0.22s ease;
  border: 1px solid rgba(255,255,255,0.04);
  background: #12233b;
  width: 100%;
}

.game-history-section .game-history-list,
.game-history-section .load-more-btn {
  box-sizing: border-box;
  width: calc(100% + 48px);
  margin-left: -24px;
  margin-right: -24px;
}

.game-history-section .game-history-list {
  flex: 1 1 auto;
  padding-bottom: 0;
}

.game-history-list::-webkit-scrollbar {
  width: 10px;
}

.game-history-list::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.06);
  border-radius: 6px;
}

.empty-history {
  margin: 0;
  color: #93a8c7;
  font-size: 0.95rem;
}

.game-history-item {
  position: relative;
  border-radius: 0;
  background: #1d314f;
  border-top: 1px solid rgba(210, 225, 255, 0.06);
  border-left: none;
  border-right: none;
  border-bottom: none;
  overflow: hidden;
  width: 100%;
  margin: 0;
  height: 84px;
  flex: 0 0 84px;
}

.game-history-item:first-child {
  border-top: none;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}

.game-history-item:first-child .game-history-link-zone {
  border-top-right-radius: 12px;
}

.game-history-row {
  position: relative;
  min-height: 74px;
}

.game-history-content {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 10px 40px 10px 12px;
}

.game-history-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 4px;
}

.game-history-date,
.game-history-mode,
.game-history-result {
  font-size: 0.82rem;
  line-height: 1.2;
  display: inline-block;
}

.game-history-date {
  color: #93a8c7;
  text-align: left;
}

.game-history-mode {
  color: #a8bddc;
  text-transform: capitalize;
  text-align: right;
  white-space: nowrap;
}

.game-history-opponent {
  font-size: 0.95rem;
  color: #eef4ff;
  margin-bottom: 4px;
  word-break: break-word;
}

.game-history-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 10px;
}

.game-history-meta {
  font-size: 0.82rem;
  line-height: 1.2;
  color: #93a8c7;
}

.game-history-result {
  margin-left: auto;
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
}

.game-history-result.win {
  color: #3fc08a;
}

.game-history-result.loss {
  color: #e04f4f;
}

.game-history-result.draw {
  color: #c6d5ea;
}

.game-history-link-zone {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-left: 1px solid rgba(255, 255, 255, 0.06);
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  opacity: 0.72;
  transition: background 0.15s ease, opacity 0.15s ease;
  background: transparent;
  color: inherit;
  padding: 0;
}

.game-history-link-zone:hover {
  background: rgba(255, 255, 255, 0.045);
  opacity: 1;
}

.arrow-icon {
  width: 13px;
  height: 13px;
  stroke: #d6e3ff;
  stroke-width: 2;
  fill: none;
}

.under-construction-card {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.under-construction-card h2 {
  margin: 0 0 12px;
  font-size: 2rem;
  color: #eef4ff;
}

.under-construction-card p {
  margin: 0 0 10px;
  color: #a8bddc;
  font-size: 1rem;
}

.load-more-btn {
  width: 100%;
  margin-top: 12px;
  background: #1d314f;
  color: #eef4ff;
  border: 1px solid rgba(210, 225, 255, 0.12);
}

.game-history-section .load-more-btn {
  border-radius: 0 0 12px 12px;
  padding: 14px 20px;
  margin-bottom: -24px;
  margin-top: 0;
  border-top: 1px solid rgba(255,255,255,0.04);
}

.load-more-btn:hover {
  background: #243a5d;
}

.bar-chart-wrap {
  height: 420px;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
}

.opening-chart-wrap {
  height: 420px;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
}

#timeOfDayChartTabControl {
  display: inline-flex;
  margin: 0;
}

#timeOfDayModeControl,
#openingModeControl,
#openingColorControl {
  display: inline-flex;
  width: max-content;
  align-self: flex-start;
}

/* CHESSBOARD */
.board-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
}

.chessboard {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  width: min(640px, 100%);
  aspect-ratio: 1 / 1;
  grid-auto-rows: 1fr;
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
  background: var(--board-dark);
  position: relative;
}

.chessboard .square {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0.5px solid rgba(0,0,0,0.07);
  aspect-ratio: 1 / 1;
  overflow: hidden;
  min-width: 0;
  min-height: 0;
}

.chessboard .square.light {
  background: var(--board-light);
}

.chessboard .square.dark {
  background: var(--board-dark);
}

/* GAME VIEW PAGE */
.game-view-card {
  padding: 28px;
  min-height: 68vh;
}

.game-view-header {
  margin-bottom: 20px;
}

.game-view-header h2 {
  margin: 0 0 6px;
}

.game-view-layout {
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.moves-panel,
.board-panel {
  min-width: 0;
}

.game-meta-card,
.move-grid-card {
  background: #1d314f;
  border: 1px solid rgba(210, 225, 255, 0.08);
  border-radius: 18px;
}

.game-meta-card {
  padding: 16px 18px;
  margin-bottom: 16px;
}

.game-meta-line {
  font-size: 0.98rem;
  color: #eef4ff;
}

.game-meta-line.subtle {
  margin-top: 6px;
  color: #a8bddc;
  font-size: 0.9rem;
}

.move-grid-card {
  overflow: hidden;
}

.move-grid-header,
.move-grid-row {
  display: grid;
  grid-template-columns: 72px 1fr 1fr;
  gap: 0;
  align-items: center;
}

.move-grid-header {
  background: #12233b;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.move-grid-header span {
  padding: 14px 16px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #d8e6fb;
}

.move-grid-body {
  max-height: 620px;
  overflow-y: auto;
}

.move-grid-body::-webkit-scrollbar {
  width: 10px;
}

.move-grid-body::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.08);
  border-radius: 6px;
}

.move-grid-row {
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.move-grid-row:last-child {
  border-bottom: none;
}

.move-grid-row span {
  padding: 12px 16px;
}

.move-number-cell {
  color: #93a8c7;
  font-weight: 700;
}

.move-cell {
  color: #eef4ff;
  font-family: Arial, Helvetica, sans-serif;
}

.move-grid-empty {
  padding: 24px 18px;
  color: #93a8c7;
  font-size: 0.95rem;
}

.game-analysis-layout {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
  justify-content: center;
}

.eval-column {
  display: flex;
  justify-content: center;
}

.eval-bar-card {
  width: 100px;
  background: #1d314f;
  border: 1px solid rgba(210, 225, 255, 0.08);
  border-radius: 18px;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.eval-label-top,
.eval-label-bottom {
  font-size: 0.76rem;
  font-weight: 700;
  color: #a8bddc;
  line-height: 1;
}

.eval-bar {
  position: relative;
  width: 40px;
  height: min(640px, 70vw);
  max-height: 640px;
  min-height: 360px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.1);
  background: #0f1725;
}

.eval-black,
.eval-white {
  position: absolute;
  left: 0;
  width: 100%;
  transition: height 0.25s ease;
}

.eval-black {
  top: 0;
  height: 50%;
  background: #111318;
}

.eval-white {
  bottom: 0;
  height: 50%;
  background: #f5f7fb;
}

.eval-marker {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  top: calc(50% - 1px);
  background: var(--accent);
  opacity: 0.95;
}

.eval-text {
  min-height: 20px;
  font-size: 0.95rem;
  font-weight: 800;
  color: #eef4ff;
  text-align: center;
}

.eval-depth {
  min-height: 30px;
  font-size: 0.72rem;
  line-height: 1.2;
  color: #93a8c7;
  text-align: center;
}

.piece-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1;
  user-select: none;
}

.floating-piece {
  position: absolute;
  z-index: 60;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 300ms cubic-bezier(.2,.9,.2,1);
}

.white-piece {
  color: #ffffff;
  text-shadow:
    0 1px 2px rgba(0,0,0,0.6),
    0 0 6px rgba(0,0,0,0.25);
}

.black-piece {
  color: #0a0f18;
  text-shadow:
    0 1px 2px rgba(255,255,255,0.25);
}

.move-btn {
  background: transparent;
  border: none;
  color: #eef4ff;
  text-align: left;
  padding: 12px 16px;
  border-radius: 0;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s ease;
}

.move-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  transform: none;
}

.active-move {
  background: rgba(46, 196, 182, 0.18) !important;
  color: #ffffff;
}

@media (max-width: 1180px) {
  .content-grid {
    grid-template-columns: 1fr;
  }

  .timeline-chart-wrap,
  .bar-chart-wrap,
  .opening-chart-wrap {
    height: 320px;
  }
}

@media (max-width: 1280px) {
  .profile-page-wrap {
    grid-template-columns: 148px 260px minmax(0, 1fr);
    gap: 16px;
  }
}

@media (max-width: 1050px) {
  .profile-layout {
    grid-template-columns: 1fr;
  }

  .profile-page-wrap {
    grid-template-columns: 1fr;
  }

  .profile-section-nav {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    padding: 12px;
    gap: 6px;
    border-radius: 14px;
  }

  .section-nav-label {
    display: none;
  }

  .section-nav-btn {
    margin: 0;
    padding: 9px 14px;
    font-size: 0.82rem;
  }

  .game-history-section {
    width: 100%;
  }

  .profile-overview {
    flex-direction: row;
    text-align: left;
    align-items: center;
    gap: 16px;
  }

  .profile-avatar {
    width: 88px;
    height: 88px;
    margin-bottom: 0;
  }

  .game-view-layout {
    grid-template-columns: 1fr;
  }

  .move-grid-body {
    max-height: 420px;
  }

  .game-analysis-layout {
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 14px;
  }

  .eval-bar-card {
    width: 80px;
    padding: 10px 8px;
  }

  .eval-bar {
    min-height: 280px;
    height: min(480px, 70vw);
    width: 32px;
  }
}

@media (max-width: 900px) {
  .top-tab-inner {
    gap: 20px;
  }

  .site-logo {
    height: 130px;
  }
}

@media (max-width: 640px) {
  .top-tab-inner {
    padding: 16px;
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .site-nav-inner {
    padding: 0 12px;
    flex-wrap: wrap;
  }

  .nav-tab {
    padding: 9px 14px;
    font-size: 0.88rem;
  }

  .brand {
    align-items: center;
    text-align: center;
  }

  .site-logo {
    height: 115px;
  }

  .brand-tagline {
    text-align: center;
  }

  .home-search-wrap {
    justify-self: stretch;
  }

  .search-input-group {
    max-width: 100%;
    flex-direction: column;
  }

  .search-input-group button {
    min-width: 100%;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .timeline-chart-wrap,
  .bar-chart-wrap,
  .opening-chart-wrap {
    height: 260px;
  }

  .move-grid-header,
  .move-grid-row {
    grid-template-columns: 62px 1fr 1fr;
  }

  .move-grid-header span,
  .move-grid-row span {
    padding: 11px 12px;
    font-size: 0.88rem;
  }

  .game-analysis-layout {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 10px;
  }

  .eval-bar-card {
    width: 64px;
    padding: 8px 6px;
    border-radius: 14px;
  }

  .eval-bar {
    width: 24px;
    min-height: 220px;
  }

  .eval-text {
    font-size: 0.82rem;
  }

  .eval-depth {
    font-size: 0.64rem;
  }
}

/* =====================================================
   AUTH MODAL
   ===================================================== */

/* Backdrop overlay */
.auth-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(8, 15, 26, 0.78);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-backdrop.open {
  display: flex;
}

/* Modal card */
.auth-modal {
  position: relative;
  width: 100%;
  max-width: 460px;
  background: #16263d;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.55);
  animation: authModalIn 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes authModalIn {
  from { opacity: 0; transform: scale(0.93) translateY(14px); }
  to   { opacity: 1; transform: scale(1)    translateY(0);    }
}

/* Close button */
.auth-modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 32px;
  height: 32px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.07);
  border: none;
  border-radius: 8px;
  color: #8fa8c8;
  font-size: 1rem;
  cursor: pointer;
  line-height: 1;
  transition: background 0.15s, color 0.15s;
  transform: none;
}

.auth-modal-close:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #eef4ff;
  transform: none;
}

/* Tabs */
.auth-tabs {
  display: flex;
  padding: 0 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-tab-btn {
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  color: #7a94b5;
  font-size: 0.97rem;
  font-weight: 600;
  padding: 20px 16px 17px;
  cursor: pointer;
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
  transform: none;
}

.auth-tab-btn:hover {
  color: #eef4ff;
  background: transparent;
  transform: none;
}

.auth-tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* Forms */
.auth-form {
  padding: 26px 28px 28px;
  display: flex;
  flex-direction: column;
  gap: 17px;
}

.auth-form[hidden] {
  display: none !important;
}

.auth-form-header {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 2px;
}

.auth-modal-title {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 800;
  color: #eef4ff;
  letter-spacing: -0.02em;
}

.auth-modal-sub {
  margin: 0;
  color: #7a94b5;
  font-size: 0.88rem;
}

/* Two-column row (username + full name) */
.auth-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.auth-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-form-group label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #a8bddc;
  letter-spacing: 0.01em;
}

.auth-form-group input {
  width: 100%;
  padding: 12px 14px;
  background: #0f1b2d;
  border: 1px solid rgba(210, 225, 255, 0.1);
  border-radius: 10px;
  color: #eef4ff;
  font-size: 0.95rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.auth-form-group input:focus {
  border-color: rgba(46, 196, 182, 0.6);
  box-shadow: 0 0 0 3px rgba(46, 196, 182, 0.12);
}

/* Error / success banners */
.auth-message {
  font-size: 0.875rem;
  border-radius: 10px;
  padding: 11px 14px;
  font-weight: 500;
  line-height: 1.5;
}

.auth-error {
  background: rgba(224, 92, 110, 0.14);
  border: 1px solid rgba(224, 92, 110, 0.32);
  color: #f5a5b0;
}

.auth-success {
  background: rgba(46, 196, 182, 0.12);
  border: 1px solid rgba(46, 196, 182, 0.3);
  color: var(--accent);
}

/* Submit button */
.auth-submit-btn {
  width: 100%;
  padding: 14px;
  background: var(--accent);
  color: #0f1b2d;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.15s, transform 0.12s;
  letter-spacing: 0.01em;
}

.auth-submit-btn:hover:not(:disabled) {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.auth-submit-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

/* Switch hint */
.auth-switch-hint {
  text-align: center;
  font-size: 0.84rem;
  color: #637b99;
  margin: -4px 0 0;
}

.auth-switch-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.auth-switch-link:hover {
  color: var(--accent-hover);
}

/* Chess.com username validation status */
.su-username-status {
  font-size: 0.82rem;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 8px;
  margin-top: 4px;
}

.su-status-checking {
  background: rgba(255, 255, 255, 0.05);
  color: #7a94b5;
}

.su-status-ok {
  background: rgba(46, 196, 182, 0.12);
  border: 1px solid rgba(46, 196, 182, 0.3);
  color: var(--accent);
}

.su-status-error {
  background: rgba(224, 92, 110, 0.12);
  border: 1px solid rgba(224, 92, 110, 0.28);
  color: #f5a5b0;
}

/* ── Auth user menu in nav (logged-in state) ────────────── */
.auth-user-menu {
  position: relative;
  margin-left: auto;           /* push to right side of nav */
}

.auth-user-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: transparent;
  border: none;
  border-radius: 0;
  color: var(--accent);
  font-size: 0.93rem;
  font-weight: 700;
  cursor: pointer;
  transition: color 0.15s;
  transform: none;
  height: 100%;
}

.auth-user-btn:hover {
  background: transparent;
  color: var(--accent-hover);
  transform: none;
}

.auth-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: #0f1b2d;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 900;
  flex-shrink: 0;
}

.auth-chevron {
  font-size: 0.72rem;
  opacity: 0.7;
  transition: transform 0.15s;
}

.auth-user-menu.open .auth-chevron {
  transform: rotate(180deg);
}

/* Dropdown */
.auth-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  min-width: 210px;
  background: #1a2c47;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.38);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 300;
  animation: authDropIn 0.14s ease;
}

@keyframes authDropIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0);    }
}

.auth-user-menu.open .auth-dropdown {
  display: flex;
}

.auth-dropdown-info {
  padding: 14px 16px 12px;
}

.auth-dropdown-name {
  color: #eef4ff;
  font-weight: 700;
  font-size: 0.91rem;
}

.auth-dropdown-email {
  color: #637b99;
  font-size: 0.79rem;
  margin-top: 2px;
  word-break: break-all;
}

.auth-dropdown-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.07);
}

.auth-signout-btn {
  background: transparent;
  border: none;
  border-radius: 0;
  color: #e05c6e;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 13px 16px;
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: background 0.15s;
  transform: none;
}

.auth-signout-btn:hover {
  background: rgba(224, 92, 110, 0.1);
  transform: none;
}

.auth-dropdown-link {
  display: block;
  background: transparent;
  color: #a8bddc;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 13px 16px;
  width: 100%;
  transition: background 0.15s, color 0.15s;
}

.auth-dropdown-link:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #eef4ff;
}

/* Modal responsive */
@media (max-width: 500px) {
  .auth-modal {
    border-radius: 16px;
  }

  .auth-form {
    padding: 20px 20px 24px;
  }

  .auth-form-row {
    grid-template-columns: 1fr;
  }

  .auth-tabs {
    padding: 0 20px;
  }
}

/* =====================================================
   LANDING PAGE
   ===================================================== */

/* --- Hero ------------------------------------------ */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, #0f2540 0%, #0f1b2d 60%);
  padding: 90px 24px 100px;
  text-align: center;
}

.hero-glow {
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 500px;
  background: radial-gradient(ellipse at center, rgba(46,196,182,0.18) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
  z-index: 1;
}

.hero-eyebrow {
  display: inline-block;
  background: rgba(46,196,182,0.15);
  border: 1px solid rgba(46,196,182,0.35);
  color: var(--accent);
  border-radius: 999px;
  padding: 6px 18px;
  font-size: 0.83rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 28px;
}

.hero-headline {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 1.15;
  color: #eef4ff;
  margin: 0 0 22px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.hero-accent {
  color: var(--accent);
}

.hero-sub {
  font-size: 1.1rem;
  color: #a8bddc;
  max-width: 560px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

.hero-search {
  max-width: 560px;
  margin: 0 auto 16px;
}

.hero-search-group {
  font-size: 1.05rem;
}

.hero-search-group button {
  min-width: 200px;
}

.hero-note {
  font-size: 0.83rem;
  color: #637b99;
  margin: 0;
}

/* --- Shared section layout ------------------------- */
.section-row {
  padding: 80px 24px;
}

.section-alt {
  background: #0c1929;
}

.section-inner {
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}

.section-label {
  display: inline-block;
  background: rgba(46,196,182,0.12);
  border: 1px solid rgba(46,196,182,0.3);
  color: var(--accent);
  border-radius: 999px;
  padding: 5px 16px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.section-title {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 800;
  color: #eef4ff;
  margin: 0 0 16px;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.section-sub {
  font-size: 1rem;
  color: #a8bddc;
  max-width: 560px;
  margin: 0 auto 52px;
  line-height: 1.7;
}

/* --- Insight Teaser cards -------------------------- */
.teaser-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  text-align: left;
  margin-top: 0;
}

.teaser-card {
  background: #16263d;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.teaser-card h3 {
  margin: 0;
  font-size: 1.05rem;
  color: #eef4ff;
  font-weight: 700;
}

.teaser-card p {
  margin: 0;
  color: #8fa8c8;
  font-size: 0.92rem;
  line-height: 1.6;
}

.teaser-icon {
  font-size: 2rem;
  line-height: 1;
}

/* Sample opening rows */
.teaser-sample {
  background: #0f1b2d;
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
}

.teaser-sample-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

.tsample-label {
  color: #a8bddc;
}

.tsample-val {
  font-weight: 700;
  font-size: 0.9rem;
}

.tsample-val.loss { color: #e05c6e; }
.tsample-val.win  { color: var(--accent); }

/* Phase bars */
.teaser-phase-bars {
  background: #0f1b2d;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: auto;
}

.tphase-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.84rem;
  color: #a8bddc;
}

.tphase-row > span:first-child {
  width: 90px;
  flex-shrink: 0;
}

.tphase-bar-bg {
  flex: 1;
  height: 10px;
  background: rgba(255,255,255,0.07);
  border-radius: 99px;
  overflow: hidden;
}

.tphase-bar {
  height: 100%;
  border-radius: 99px;
  transition: width 0.6s ease;
}

.tphase-pct {
  width: 36px;
  text-align: right;
  font-weight: 600;
  color: #eef4ff;
}

/* Locked card */
.teaser-card-locked {
  position: relative;
  overflow: hidden;
  border-color: rgba(46,196,182,0.25);
}

.lock-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  z-index: 2;
  background: rgba(12,25,41,0.82);
  backdrop-filter: blur(6px);
  border-radius: 20px;
  padding: 28px;
  text-align: center;
}

.lock-icon {
  font-size: 2rem;
}

.lock-overlay p {
  margin: 0;
  color: #eef4ff;
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.5;
}

.teaser-lock-bg {
  opacity: 0.5;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.btn-accent {
  display: inline-block;
  background: var(--accent);
  color: #0f1b2d;
  font-weight: 800;
  font-size: 0.92rem;
  border-radius: 10px;
  padding: 11px 24px;
  text-decoration: none;
  transition: background 0.15s, transform 0.12s;
}

.btn-accent:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

/* --- Features grid --------------------------------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  text-align: left;
}

.feature-card {
  background: #16263d;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 18px;
  padding: 26px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.2s, transform 0.2s;
}

.feature-card:hover {
  border-color: rgba(46,196,182,0.3);
  transform: translateY(-3px);
}

.feature-icon {
  font-size: 1.8rem;
  line-height: 1;
}

.feature-card h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #eef4ff;
}

.feature-card p {
  margin: 0;
  font-size: 0.88rem;
  color: #8fa8c8;
  line-height: 1.65;
}

/* --- Rank tiers ------------------------------------ */
.ranks-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
  margin-top: 48px;
}

.rank-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.rank-badge {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 900;
  box-shadow: 0 4px 18px rgba(0,0,0,0.3);
  border: 3px solid rgba(255,255,255,0.12);
  transition: transform 0.2s;
}

.rank-badge:hover {
  transform: scale(1.12);
}

.rank-name {
  font-size: 0.78rem;
  font-weight: 700;
  color: #8fa8c8;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.rank-grey     { background: #4a5568; color: #cbd5e0; }
.rank-bronze   { background: linear-gradient(135deg,#7c4c1e,#c68642); color: #fde3c0; }
.rank-silver   { background: linear-gradient(135deg,#6b7280,#c0c0c0); color: #f0f4f8; }
.rank-gold     { background: linear-gradient(135deg,#b7791f,#f6c90e); color: #fff8dc; }
.rank-platinum { background: linear-gradient(135deg,#319795,#81e6d9); color: #0f1b2d; }
.rank-master   { background: linear-gradient(135deg,#553c9a,#b794f4); color: #faf5ff; }
.rank-gm       { background: linear-gradient(135deg,#c05621,#ed8936); color: #fff8f0; box-shadow: 0 0 22px rgba(237,137,54,0.45); }

.rank-divider {
  flex: 0 0 28px;
  height: 2px;
  background: linear-gradient(90deg, rgba(46,196,182,0.2), rgba(46,196,182,0.05));
  margin-bottom: 30px;
}

/* --- How it works steps ---------------------------- */
.steps-row {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  margin-top: 48px;
}

.step-card {
  flex: 1;
  max-width: 280px;
  background: #16263d;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 18px;
  padding: 28px 24px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.step-num {
  width: 40px;
  height: 40px;
  background: var(--accent);
  color: #0f1b2d;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 900;
  flex-shrink: 0;
}

.step-card h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #eef4ff;
}

.step-card p {
  margin: 0;
  font-size: 0.88rem;
  color: #8fa8c8;
  line-height: 1.65;
}

.step-arrow {
  font-size: 1.6rem;
  color: rgba(46,196,182,0.4);
  padding: 0 10px;
  align-self: center;
  margin-bottom: 0;
  flex-shrink: 0;
}

/* --- Bottom CTA ------------------------------------ */
.cta-section {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, #0d2035 0%, #0f1b2d 80%);
  padding: 90px 24px;
  text-align: center;
}

.cta-glow {
  position: absolute;
  bottom: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 300px;
  background: radial-gradient(ellipse at center, rgba(46,196,182,0.15) 0%, transparent 70%);
  pointer-events: none;
}

.cta-inner {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.cta-inner h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 800;
  color: #eef4ff;
  margin: 0;
  letter-spacing: -0.02em;
}

.cta-inner p {
  color: #a8bddc;
  font-size: 1rem;
  margin: 0;
  line-height: 1.6;
}

.cta-search-group {
  width: 100%;
}

/* --- Footer ---------------------------------------- */
.site-footer {
  background: #080f1a;
  border-top: 1px solid rgba(255,255,255,0.06);
  text-align: center;
  padding: 22px 24px;
}

.site-footer p {
  margin: 0;
  color: #4a5e7a;
  font-size: 0.83rem;
}

/* --- Landing responsive ---------------------------- */
@media (max-width: 900px) {
  .teaser-grid {
    grid-template-columns: 1fr 1fr;
  }

  .teaser-card-locked {
    grid-column: 1 / -1;
    min-height: 160px;
  }

  .features-grid {
    grid-template-columns: 1fr 1fr;
  }

  .steps-row {
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }

  .step-card {
    max-width: 100%;
    width: 100%;
  }

  .step-arrow {
    transform: rotate(90deg);
  }
}

@media (max-width: 640px) {
  .hero {
    padding: 60px 20px 70px;
  }

  .teaser-grid {
    grid-template-columns: 1fr;
  }

  .teaser-card-locked {
    grid-column: auto;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .ranks-row {
    gap: 0;
  }

  .rank-badge {
    width: 54px;
    height: 54px;
    font-size: 1.4rem;
  }

  .rank-divider {
    flex: 0 0 16px;
  }

  .rank-name {
    font-size: 0.68rem;
  }
}