/*
 * Counter Galaxy soft geometry layer.
 * Isolated from layout and feature styles so the treatment can be reverted safely.
 */
:root {
  --soft-radius-xs: 6px;
  --soft-radius-sm: 9px;
  --soft-radius-md: 13px;
  --soft-radius-lg: 18px;
  --soft-border: rgba(148, 177, 235, .18);
  --soft-highlight: rgba(255, 255, 255, .035);
  --soft-shadow: 0 18px 48px rgba(0, 0, 0, .24);
  --soft-shadow-hover: 0 20px 52px rgba(0, 0, 0, .31), 0 0 24px rgba(108, 247, 255, .045);
}

/* Controls */
button,
input:not([type="range"]),
select,
textarea,
.steam-login-btn,
.profile-cta {
  border-radius: var(--soft-radius-sm) !important;
}

button,
a,
input,
select,
textarea {
  transition: border-color .18s ease, background-color .18s ease, color .18s ease,
    box-shadow .18s ease, transform .18s ease, opacity .18s ease;
}

input:not([type="range"]):focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(108, 247, 255, .58) !important;
  box-shadow: 0 0 0 3px rgba(108, 247, 255, .08), 0 0 22px rgba(108, 247, 255, .07);
}

button:not(:disabled):hover {
  box-shadow: 0 8px 22px rgba(0, 0, 0, .2);
}

/* Shared shell */
.product-page .player,
.product-page .personal-state,
.analytics-launchpad > a,
.login-card,
.hero-picker,
.hero-picker-card,
.hero-picker-search,
.hero-picker-sort,
.pool-history-summary,
.loading-status,
.tooltip {
  border-radius: var(--soft-radius-md) !important;
}

.login-card,
.hero-picker,
.tooltip {
  box-shadow: var(--soft-shadow), inset 0 1px var(--soft-highlight) !important;
}

.analytics-launchpad > a,
.hero-picker-card {
  box-shadow: inset 0 1px var(--soft-highlight);
}

.analytics-launchpad > a:hover,
.hero-picker-card:hover {
  border-color: rgba(108, 247, 255, .32);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .18), inset 0 1px rgba(255, 255, 255, .055);
}

/* Pool */
.pool-flat-zone,
.pool-flat-center,
.pool-guide-section,
.hero-consult,
.personal-ai,
.match-consult-panel,
.match-auto-analysis,
.match-view-panel,
.personal-ai-card {
  border-radius: var(--soft-radius-lg) !important;
}

.pool-flat-zone,
.pool-flat-center,
.pool-guide-section,
.hero-consult,
.personal-ai {
  box-shadow: var(--soft-shadow), inset 0 1px var(--soft-highlight) !important;
}

.pool-flat-node,
.pool-guide-card,
.pool-flat-main-glow,
.match-consult-item,
.match-selected-indicator,
.match-auto-progress,
.match-question-progress,
.match-consult-state,
.match-auto-answer,
.match-consult-answer,
.analysis-section,
.personal-ai-recommendation {
  border-radius: var(--soft-radius-md) !important;
}

.pool-flat-portrait,
.pool-guide-card-head img,
.hero-consult-head img,
.tooltip-head img {
  border-radius: var(--soft-radius-sm) !important;
}

.pool-flat-node:hover,
.pool-guide-card:hover {
  box-shadow: var(--soft-shadow-hover) !important;
}

/* Heroes */
.heroes-hero,
.heroes-controls,
.hero-summary-card,
.meta-hero-card,
.detail-metric,
.detail-section,
.patch-history-item,
.relation-row {
  border-radius: var(--soft-radius-md) !important;
}

.heroes-hero,
.heroes-controls,
.meta-hero-card {
  box-shadow: var(--soft-shadow), inset 0 1px var(--soft-highlight);
}

.meta-hero-card:hover {
  box-shadow: var(--soft-shadow-hover) !important;
}

.meta-hero-image {
  border-radius: var(--soft-radius-md) var(--soft-radius-md) 0 0;
}

.hero-detail-panel {
  border-radius: var(--soft-radius-lg) 0 0 var(--soft-radius-lg);
}

.hero-detail-title img,
.relation-row img {
  border-radius: var(--soft-radius-sm);
}

/* Matches and profile */
.matches-hero,
.matches-summary article,
.match-analysis-box,
.match-analysis-state,
.analysis-toast,
.profile-card,
.profile-metric,
.profile-section-nav,
.profile-hero-row,
.profile-match,
.performance-note,
.consultation-item,
.report-columns article,
.profile-private-note,
.profile-no-report,
.match-team,
.match-ai-box,
.match-events,
.match-demo-summary,
.match-demo-facts li,
.match-demo-vision,
.match-demo-vision-grid article,
.match-demo-world {
  border-radius: var(--soft-radius-md) !important;
}

.matches-hero,
.match-analysis-box,
.profile-card,
.analysis-toast {
  box-shadow: var(--soft-shadow), inset 0 1px var(--soft-highlight) !important;
}

.profile-avatar-wrap,
.matches-player img,
.profile-hero-row img,
.match-player-row img {
  border-radius: var(--soft-radius-sm) !important;
}

.profile-match:hover,
.profile-hero-row:hover,
.consultation-item:hover {
  box-shadow: 0 10px 28px rgba(0, 0, 0, .2);
}

.match-drawer-panel {
  border-radius: var(--soft-radius-lg) 0 0 var(--soft-radius-lg);
}

.match-drawer-backdrop,
.hero-detail-backdrop {
  border-radius: 0 !important;
}

.analysis-orbit,
.winrate-orbit,
.profile-avatar-wrap i {
  border-radius: 50% !important;
}

/* Patch analytics */
.intro-card,
.chart-card,
.patch-browser-item,
.personal-state,
.lc-tooltip {
  border-radius: var(--soft-radius-md) !important;
}

.intro-card,
.chart-card {
  box-shadow: var(--soft-shadow), inset 0 1px var(--soft-highlight) !important;
}

.patch-browser-item:hover {
  border-color: rgba(108, 247, 255, .3);
  background: rgba(108, 247, 255, .035);
  transform: translateY(-1px);
}

/* Skill lab */
.challenge-hero,
.challenge-game-card,
.challenge-board-main,
.achievement-panel,
.roadmap-list article,
.leader-row,
.personal-rank,
.steam-save-note,
.arena-result,
.game-data-error,
.quiz-portrait,
.quiz-copy,
.roshan-emblem,
.roshan-question,
.build-hero,
.build-items button,
.invoker-hero-card,
.invoker-training {
  border-radius: var(--soft-radius-lg) !important;
}

.challenge-hero,
.challenge-game-card,
.challenge-board-main,
.achievement-panel {
  box-shadow: var(--soft-shadow), inset 0 1px var(--soft-highlight) !important;
}

.challenge-game-card:hover {
  box-shadow: var(--soft-shadow-hover) !important;
}

.leader-row,
.roadmap-list article,
.achievement-list article,
.result-achievements span,
.invoker-target,
.combo-sequence i,
.invoker-keys button {
  border-radius: var(--soft-radius-sm) !important;
}

/* Galaxy */
.galaxy-page .panel,
.galaxy-page .search,
.galaxy-page .metrics div,
.galaxy-page .role-tags span,
.galaxy-page .relation-highlight,
.galaxy-page .relation-tab,
.galaxy-page .relation-tools input,
.galaxy-page .relation-tools select,
.galaxy-page .personal-rec,
.galaxy-page .personal-actions a,
.galaxy-page .personal-actions button,
.galaxy-page .zoom-tools button {
  border-radius: var(--soft-radius-sm) !important;
}

.galaxy-page .panel {
  border-radius: var(--soft-radius-lg) !important;
  box-shadow: var(--soft-shadow), inset 0 1px var(--soft-highlight) !important;
}

.galaxy-page .relation,
.galaxy-page .layer {
  border-radius: var(--soft-radius-xs);
}

.galaxy-page .relation:hover,
.galaxy-page .layer:hover,
.galaxy-page .personal-rec:hover {
  background: rgba(108, 247, 255, .05);
}

.galaxy-page .inspector-head img,
.galaxy-page .personal-head img,
.galaxy-page .personal-hero,
.galaxy-page .personal-rec img {
  border-radius: var(--soft-radius-sm) !important;
}

@media (max-width: 800px) {
  :root {
    --soft-radius-md: 12px;
    --soft-radius-lg: 15px;
  }

  .product-page .page-nav,
  .galaxy-page .topbar > nav {
    border-radius: var(--soft-radius-lg) var(--soft-radius-lg) 0 0;
  }

  .hero-detail-panel,
  .match-drawer-panel {
    border-radius: 0;
  }

  .pool-flat-zone,
  .pool-flat-center,
  .challenge-hero,
  .matches-hero,
  .profile-identity,
  .heroes-hero {
    border-radius: var(--soft-radius-md) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  button,
  a,
  input,
  select,
  textarea {
    transition: none !important;
  }
}
