/* ==========================================================================
   233Play.net — Portal Stylesheet
   Modern Editorial Indie HTML5 Arcade Aesthetic
   ========================================================================== */

/* --- Reset & Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background-color: var(--bg-canvas);
  overflow-x: hidden;
}

img,
svg {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: none;
  box-shadow: var(--ring-focus);
}

/* Custom sleek scrollbars */
::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border-default);
  border-radius: var(--radius-pill);
  border: 2px solid transparent;
  background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--border-strong);
  border: 2px solid transparent;
  background-clip: content-box;
}

/* ==========================================================================
   App Shell & Ambient Backdrop
   ========================================================================== */
.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  isolation: isolate;
  background-color: var(--bg-canvas);
  background-image:
    radial-gradient(960px 540px at 8% -8%, var(--canvas-glow-gold), transparent 62%),
    radial-gradient(840px 520px at 94% -4%, var(--canvas-glow-cyan), transparent 60%),
    radial-gradient(640px 440px at 54% 16%, var(--canvas-glow-coral), transparent 66%),
    radial-gradient(circle at 1px 1px, var(--canvas-grid-dot) 1px, transparent 0);
  background-size: 100% 100%, 100% 100%, 100% 100%, 28px 28px;
  background-attachment: fixed, fixed, fixed, scroll;
}

.app-shell > main,
#app-main {
  flex: 1;
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--space-6) var(--space-6) var(--space-12);
}

.site-footer {
  border-top: 1px solid var(--border-subtle);
  color: var(--text-muted);
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.14) 100%);
}

[data-theme="light"] .site-footer {
  background: linear-gradient(180deg, transparent 0%, rgba(15, 23, 42, 0.03) 100%);
}

/* ==========================================================================
   Top Navigation Bar
   ========================================================================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: var(--z-topbar);
  background: var(--bg-glass);
  backdrop-filter: blur(var(--blur-md)) saturate(165%);
  -webkit-backdrop-filter: blur(var(--blur-md)) saturate(165%);
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color var(--dur-normal) ease, border-color var(--dur-normal) ease;
}

.topbar-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  min-height: var(--topbar-height);
  padding: var(--space-2) var(--space-6);
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  padding: 4px 6px 4px 2px;
  border-radius: var(--radius-md);
  transition: transform var(--dur-fast) var(--ease-out), opacity var(--dur-fast) ease;
}

.brand-link:hover {
  transform: translateY(-1px);
}

.brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 12px rgba(245, 176, 65, 0.25));
}

.brand-text {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  display: inline-flex;
  align-items: baseline;
  line-height: 1;
}

.brand-text small {
  font-size: 0.78em;
  font-weight: 700;
  color: var(--accent-gold);
  margin-left: 1px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.nav-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 13px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: 600;
  white-space: nowrap;
  transition:
    color var(--dur-fast) ease,
    background-color var(--dur-fast) ease,
    border-color var(--dur-fast) ease;
}

.nav-btn:hover {
  color: var(--text-primary);
  background: var(--bg-elevated);
}

.nav-btn.is-active {
  color: var(--text-primary);
  background: var(--accent-gold-soft);
  border-color: var(--accent-gold-border);
}

.nav-btn.is-active::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: var(--grad-primary);
}

.search-box {
  flex: 1 1 240px;
  max-width: 340px;
  min-width: 170px;
  margin-left: auto;
  position: relative;
}

.search-input {
  width: 100%;
  height: 38px;
  padding: 0 14px 0 38px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-default);
  background-color: var(--bg-input);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237487a4' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 13px center;
  background-size: 15px 15px;
  color: var(--text-primary);
  font-size: var(--text-sm);
  transition:
    border-color var(--dur-fast) ease,
    background-color var(--dur-fast) ease,
    box-shadow var(--dur-fast) ease;
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-input:hover {
  border-color: var(--border-strong);
}

.search-input:focus {
  outline: none;
  border-color: var(--accent-cyan);
  background-color: var(--bg-surface);
  box-shadow: var(--ring-focus);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

#topbar-user-area {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
  font-size: 1rem;
}

.theme-toggle:hover {
  border-color: var(--accent-gold-border);
  background: var(--accent-gold-soft);
}

.user-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 5px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-default);
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-size: var(--text-sm);
  font-weight: 600;
  transition:
    border-color var(--dur-fast) ease,
    background-color var(--dur-fast) ease,
    transform var(--dur-fast) var(--ease-out);
}

.user-pill:hover {
  border-color: var(--accent-gold-border);
  background: var(--bg-elevated-2);
  transform: translateY(-1px);
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 800;
  color: #080c16;
  background: var(--grad-primary);
  flex-shrink: 0;
  text-transform: uppercase;
  box-shadow: 0 2px 8px rgba(245, 176, 65, 0.28);
}

.role-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.4;
  background: var(--accent-cyan-soft);
  color: var(--accent-cyan-bright);
  border: 1px solid var(--accent-cyan-border);
  white-space: nowrap;
}

[data-theme="light"] .role-badge {
  color: var(--accent-cyan-deep);
}

.role-badge--admin {
  background: linear-gradient(135deg, rgba(245, 176, 65, 0.22), rgba(255, 94, 98, 0.2));
  color: var(--accent-gold-bright);
  border-color: var(--accent-gold-border);
}

[data-theme="light"] .role-badge--admin {
  color: var(--accent-gold-deep);
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  user-select: none;
  transition:
    transform var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-fast) ease,
    background-color var(--dur-fast) ease,
    border-color var(--dur-fast) ease,
    color var(--dur-fast) ease,
    opacity var(--dur-fast) ease;
}

.btn:active:not(:disabled) {
  transform: translateY(0) scale(0.98);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-primary {
  background: var(--grad-primary);
  color: #090d17;
  font-weight: 700;
  box-shadow: var(--shadow-glow-gold), inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

.btn-primary:hover:not(:disabled) {
  background: var(--grad-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(255, 94, 98, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border-color: var(--border-default);
  box-shadow: var(--shadow-xs);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--bg-elevated-2);
  border-color: var(--accent-cyan-border);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
}

.btn-ghost:hover:not(:disabled) {
  color: var(--text-primary);
  background: var(--bg-elevated);
}

.btn-danger {
  background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 6px 20px rgba(244, 63, 94, 0.25);
}

.btn-danger:hover:not(:disabled) {
  background: linear-gradient(135deg, #fb7185 0%, #f43f5e 100%);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(244, 63, 94, 0.34);
}

.btn-success {
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 6px 20px rgba(22, 163, 74, 0.24);
}

.btn-success:hover:not(:disabled) {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(34, 197, 94, 0.32);
}

.btn-sm {
  padding: 6px 11px;
  font-size: var(--text-xs);
  border-radius: var(--radius-sm);
  gap: 5px;
}

.btn-lg {
  padding: 12px 24px;
  font-size: var(--text-md);
  border-radius: var(--radius-md);
  gap: 9px;
}

.btn-icon {
  padding: 0;
  width: 36px;
  height: 36px;
  justify-content: center;
}

.btn-icon.btn-sm {
  width: 30px;
  height: 30px;
}

/* ==========================================================================
   Hero Spotlight (Editorial Feature Banner + Side Spotlight)
   ========================================================================== */
.hero-section {
  margin-bottom: var(--space-8);
  animation: p233-slide-up var(--dur-slow) var(--ease-out);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.32fr) minmax(300px, 1fr);
  gap: var(--space-6);
  align-items: stretch;
}

.hero-main {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-2xl);
  padding: var(--space-8);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 15px;
  background: var(--bg-surface);
  background-image:
    radial-gradient(540px 300px at 0% 0%, rgba(245, 176, 65, 0.14), transparent 68%),
    radial-gradient(460px 280px at 100% 100%, rgba(56, 189, 248, 0.12), transparent 68%),
    var(--grad-surface-sheen);
  border: 1px solid var(--border-default);
  box-shadow: var(--shadow-lg);
  isolation: isolate;
}

.hero-main::before {
  content: "";
  position: absolute;
  top: 0;
  left: 28px;
  right: 28px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-gold), var(--accent-coral), var(--accent-cyan), transparent);
  opacity: 0.72;
  pointer-events: none;
}

.hero-visual {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.hero-visual > a {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border-default);
  box-shadow: var(--shadow-md);
  background: var(--bg-canvas-deep);
  transition:
    transform var(--dur-normal) var(--ease-out),
    border-color var(--dur-normal) ease,
    box-shadow var(--dur-normal) ease;
}

.hero-visual > a:hover {
  transform: translateY(-3px);
  border-color: var(--accent-gold-border);
  box-shadow: var(--shadow-card-hover);
}

.hero-visual > a:hover img {
  transform: scale(1.035);
}

.hero-visual > a img {
  transition: transform 0.6s var(--ease-out);
}

.hero-badge-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 2.9vw, 2.45rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: var(--leading-tight);
  color: var(--text-primary);
}

.hero-subtitle {
  margin: 0;
  font-size: var(--text-md);
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 52ch;
}

.hero-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: var(--text-sm);
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 4px;
}

.hero-side-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 15px 16px;
  border-radius: var(--radius-xl);
  background: var(--bg-surface);
  background-image: var(--grad-surface-sheen);
  border: 1px solid var(--border-default);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  overflow: hidden;
  transition:
    border-color var(--dur-normal) ease,
    transform var(--dur-normal) var(--ease-out),
    box-shadow var(--dur-normal) ease;
}

.hero-side-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-gold-border);
  box-shadow: var(--shadow-card-hover);
}

.hero-side-card img {
  border: 1px solid var(--border-subtle);
  background: var(--bg-canvas-deep);
}

.hero-side-card h2,
.hero-side-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-weight: 700;
  line-height: var(--leading-snug);
}

.hero-stats-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: var(--space-2);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border-subtle);
}

.stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: var(--radius-pill);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  font-size: var(--text-xs);
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.stat-chip strong,
.stat-chip b,
.stat-chip .stat-chip-value {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--accent-gold);
  line-height: 1;
}

/* ==========================================================================
   Discovery & Ranking Bar
   ========================================================================== */
.discover-bar {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px 18px;
  margin-bottom: var(--space-6);
  border-radius: var(--radius-xl);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
}

.sort-tabs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.sort-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: 600;
  white-space: nowrap;
  transition:
    background-color var(--dur-fast) ease,
    color var(--dur-fast) ease,
    border-color var(--dur-fast) ease,
    box-shadow var(--dur-fast) ease;
}

.sort-tab:hover {
  color: var(--text-primary);
  background: var(--bg-elevated);
}

.sort-tab.is-active {
  color: #090d17;
  font-weight: 700;
  background: var(--grad-primary);
  box-shadow: 0 4px 16px rgba(245, 176, 65, 0.28);
}

.category-pills {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

.cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 13px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-default);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-size: var(--text-xs);
  font-weight: 600;
  white-space: nowrap;
  transition:
    background-color var(--dur-fast) ease,
    color var(--dur-fast) ease,
    border-color var(--dur-fast) ease;
}

.cat-pill:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
  background: var(--bg-elevated-2);
}

.cat-pill.is-active {
  background: var(--accent-cyan-soft);
  color: var(--accent-cyan-bright);
  border-color: var(--accent-cyan-border);
}

[data-theme="light"] .cat-pill.is-active {
  color: var(--accent-cyan-deep);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: var(--space-4);
}

.section-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 800;
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.section-title::before {
  content: "";
  width: 4px;
  height: 1.05em;
  border-radius: 4px;
  background: var(--grad-primary);
  flex-shrink: 0;
}

/* ==========================================================================
   Game Cards Grid
   ========================================================================== */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(312px, 1fr));
  gap: 22px;
}

.game-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-xl);
  background: var(--bg-surface);
  background-image: var(--grad-surface-sheen);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition:
    transform var(--dur-normal) var(--ease-out),
    box-shadow var(--dur-normal) var(--ease-out),
    border-color var(--dur-normal) ease;
}

.game-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-gold-border);
  box-shadow: var(--shadow-card-hover);
}

.game-card-media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-canvas-deep);
  border-bottom: 1px solid var(--border-subtle);
}

.game-card-media > a {
  display: block;
  width: 100%;
  height: 100%;
}

.game-card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 10, 19, 0.36) 0%, transparent 40%, rgba(6, 10, 19, 0.45) 100%);
  pointer-events: none;
  z-index: 1;
}

.game-card-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.55s var(--ease-out);
}

.game-card:hover .game-card-cover {
  transform: scale(1.05);
}

.game-card-badges {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  flex-wrap: wrap;
  pointer-events: none;
}

.game-card-badges .heat-badge {
  margin-right: auto;
}

/* Heat Tier Badges */
.heat-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(15, 22, 38, 0.76);
  color: #f8fafc;
  white-space: nowrap;
}

.heat-badge--blazing {
  background: linear-gradient(135deg, rgba(255, 94, 98, 0.94), rgba(245, 176, 65, 0.94));
  color: #090d17;
  border-color: rgba(255, 224, 150, 0.65);
  animation: p233-heat-pulse 2.8s ease-in-out infinite;
}

.heat-badge--rising {
  background: rgba(245, 176, 65, 0.22);
  color: #ffd17a;
  border-color: rgba(245, 176, 65, 0.52);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.28);
}

[data-theme="light"] .game-card-body .heat-badge--rising,
[data-theme="light"] .panel-card .heat-badge--rising {
  background: var(--accent-gold-soft);
  color: var(--accent-gold-deep);
}

.heat-badge--steady {
  background: rgba(12, 26, 46, 0.8);
  color: #7dd3fc;
  border-color: rgba(56, 189, 248, 0.45);
}

[data-theme="light"] .game-card-body .heat-badge--steady,
[data-theme="light"] .panel-card .heat-badge--steady {
  background: var(--accent-cyan-soft);
  color: var(--accent-cyan-deep);
}

.heat-badge--new {
  background: rgba(10, 36, 26, 0.82);
  color: #4ade80;
  border-color: rgba(34, 197, 94, 0.46);
}

[data-theme="light"] .game-card-body .heat-badge--new,
[data-theme="light"] .panel-card .heat-badge--new {
  background: var(--status-success-soft);
  color: var(--status-success-text);
}

.version-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.35;
  background: rgba(8, 12, 22, 0.74);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  white-space: nowrap;
}

.panel-card .version-pill,
.hero-main .version-pill,
.hero-side-card .version-pill,
.game-card-body .version-pill,
.data-table .version-pill {
  background: var(--bg-elevated);
  color: var(--text-secondary);
  border-color: var(--border-default);
}

[data-theme="light"] .hero-main .heat-badge--rising,
[data-theme="light"] .hero-side-card .heat-badge--rising {
  background: var(--accent-gold-soft);
  color: var(--accent-gold-deep);
}

[data-theme="light"] .hero-main .heat-badge--steady,
[data-theme="light"] .hero-side-card .heat-badge--steady {
  background: var(--accent-cyan-soft);
  color: var(--accent-cyan-deep);
}

[data-theme="light"] .hero-main .heat-badge--new,
[data-theme="light"] .hero-side-card .heat-badge--new {
  background: var(--status-success-soft);
  color: var(--status-success-text);
}

.game-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 18px 14px;
}

.game-card-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 700;
  line-height: var(--leading-snug);
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color var(--dur-fast) ease;
}

.game-card:hover .game-card-title {
  color: var(--accent-gold);
}

.game-card-sub {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.95em;
}

.game-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 12px;
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.rating-inline {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--accent-gold);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.game-card-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--bg-elevated);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  transition: border-color var(--dur-fast) ease, color var(--dur-fast) ease;
}

.tag-chip:hover {
  color: var(--text-primary);
  border-color: var(--accent-cyan-border);
}

.game-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px 16px;
  border-top: 1px solid var(--border-subtle);
  margin-top: auto;
}

.game-card-body .game-card-footer {
  padding: 12px 0 0;
}

.author-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-secondary);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ==========================================================================
   Play Cinema & Game Detail View
   ========================================================================== */
.play-view {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  animation: p233-fade-in var(--dur-normal) ease;
}

.play-cinema {
  position: relative;
  border-radius: var(--radius-2xl);
  overflow: hidden;
  background: #060a14;
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: 0 26px 64px rgba(0, 0, 0, 0.56), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  color: #f1f5f9;
}

.play-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 18px;
  background: linear-gradient(180deg, #101829 0%, #0b1120 100%);
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.play-toolbar-left,
.play-toolbar-right {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
}

.play-toolbar-left {
  min-width: 0;
}

.play-toolbar .btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  border-color: rgba(148, 163, 184, 0.24);
}

.play-toolbar .btn-secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(56, 189, 248, 0.48);
}

.play-toolbar .btn-ghost {
  color: #cbd5e1;
}

.play-toolbar .btn-ghost:hover:not(:disabled) {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.play-toolbar .author-chip {
  color: #cbd5e1;
}

.play-toolbar .form-select {
  height: 32px;
  padding: 0 28px 0 10px;
  font-size: var(--text-xs);
  font-family: var(--font-mono);
  background-color: rgba(15, 22, 38, 0.9);
  color: #f1f5f9;
  border-color: rgba(148, 163, 184, 0.26);
  width: auto;
  min-width: 112px;
}

.play-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 500px;
  max-height: 78vh;
  background: #020409;
  overflow: hidden;
}

.play-iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #000000;
}

.play-stage.is-fullscreen,
.play-stage:fullscreen {
  position: fixed;
  inset: 0;
  z-index: var(--z-fullscreen);
  width: 100vw;
  height: 100vh;
  max-height: none;
  min-height: 100vh;
  aspect-ratio: auto;
  border-radius: 0;
  background: #000000;
}

/* Cloud Save Slide-over Drawer */
.cloud-save-drawer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: var(--z-drawer);
  width: min(390px, 94%);
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
  background: rgba(10, 16, 30, 0.94);
  backdrop-filter: blur(var(--blur-lg)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--blur-lg)) saturate(160%);
  border-left: 1px solid rgba(56, 189, 248, 0.28);
  box-shadow: -20px 0 54px rgba(0, 0, 0, 0.62);
  color: #f1f5f9;
  overflow-y: auto;
  transform: translateX(104%);
  opacity: 0;
  pointer-events: none;
  transition:
    transform var(--dur-slow) var(--ease-out),
    opacity var(--dur-normal) ease;
}

.cloud-save-drawer.is-open {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

.cloud-save-drawer .form-input,
.cloud-save-drawer .form-select {
  background-color: rgba(15, 22, 38, 0.92);
  color: #f1f5f9;
  border-color: rgba(148, 163, 184, 0.26);
}

.cloud-save-drawer .btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #f1f5f9;
  border-color: rgba(148, 163, 184, 0.24);
}

.cloud-save-drawer .btn-ghost {
  color: #cbd5e1;
}

.cloud-save-drawer .empty-state {
  background: rgba(22, 32, 54, 0.6);
  border-color: rgba(148, 163, 184, 0.25);
  color: #cbd5e1;
}

.save-slot-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.save-slot-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 13px 14px;
  border-radius: var(--radius-md);
  background: rgba(22, 32, 54, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.18);
  transition: border-color var(--dur-fast) ease, background-color var(--dur-fast) ease;
}

.save-slot-card:hover {
  border-color: rgba(56, 189, 248, 0.42);
  background: rgba(28, 41, 68, 0.88);
}

/* When save-slot-card is rendered inside Profile page (light/dark theme aware) */
.profile-view .save-slot-card,
.panel-card .save-slot-card {
  background: var(--bg-elevated);
  border-color: var(--border-subtle);
  color: var(--text-primary);
}

.profile-view .save-slot-card:hover,
.panel-card .save-slot-card:hover {
  border-color: var(--accent-cyan-border);
  background: var(--bg-elevated-2);
}

/* Detail 2-Column Layout */
.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.72fr) minmax(300px, 1fr);
  gap: var(--space-6);
  align-items: start;
}

.detail-main,
.detail-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  min-width: 0;
}

.panel-card {
  padding: 22px;
  border-radius: var(--radius-xl);
  background: var(--bg-surface);
  background-image: var(--grad-surface-sheen);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
}

.panel-title {
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

/* Version Timeline */
.version-timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-left: 18px;
}

.version-timeline::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 5px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--accent-gold) 0%, var(--border-default) 100%);
}

.version-item {
  position: relative;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color var(--dur-fast) ease;
}

.version-item::before {
  content: "";
  position: absolute;
  left: -17px;
  top: 17px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 2px solid var(--accent-cyan);
  box-shadow: 0 0 0 3px var(--bg-surface);
}

.version-item:first-child::before,
.version-item.is-active::before {
  background: var(--accent-gold);
  border-color: var(--accent-gold-bright);
  box-shadow: 0 0 0 3px var(--bg-surface), 0 0 10px rgba(245, 176, 65, 0.55);
}

.version-item:hover {
  border-color: var(--border-strong);
}

/* Hotness Analytics Breakdown */
.heat-breakdown {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.heat-bar-row {
  display: grid;
  grid-template-columns: minmax(76px, auto) 1fr auto;
  align-items: center;
  gap: 10px;
  font-size: var(--text-xs);
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

.heat-bar-track {
  width: 100%;
  height: 8px;
  border-radius: var(--radius-pill);
  background: var(--bg-elevated-2);
  overflow: hidden;
}

.heat-bar-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  background: var(--grad-primary);
  transition: width 0.6s var(--ease-out);
}

.heat-bar-row:nth-child(2) .heat-bar-fill {
  background: var(--grad-cyan);
}

.heat-bar-row:nth-child(3) .heat-bar-fill {
  background: linear-gradient(90deg, #22c55e, #38bdf8);
}

.heat-bar-row:nth-child(4) .heat-bar-fill {
  background: var(--grad-gold);
}

/* Ratings & Star Picker */
.rating-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 24px;
  align-items: center;
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  margin-bottom: 18px;
}

.rating-big {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
  color: var(--accent-gold);
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.rating-dist-row {
  display: grid;
  grid-template-columns: 38px 1fr 34px;
  align-items: center;
  gap: 8px;
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  margin-bottom: 5px;
}

.rating-dist-row .heat-bar-fill {
  background: var(--grad-gold);
}

.rating-dist-row:last-child {
  margin-bottom: 0;
}

.star-picker {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.star-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  color: var(--text-subtle);
  font-size: 1.15rem;
  line-height: 1;
  transition:
    transform var(--dur-fast) var(--ease-spring),
    color var(--dur-fast) ease,
    border-color var(--dur-fast) ease,
    background-color var(--dur-fast) ease;
}

.star-btn:hover {
  transform: scale(1.12);
  color: var(--accent-gold-bright);
  border-color: var(--accent-gold-border);
  background: var(--accent-gold-soft);
}

.star-btn.is-active {
  color: var(--accent-gold);
  border-color: var(--accent-gold-border);
  background: var(--accent-gold-soft);
  text-shadow: 0 0 10px rgba(245, 176, 65, 0.45);
}

/* Comments & Threaded Replies */
.comment-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  margin-bottom: 18px;
}

.comment-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.comment-item {
  padding: 16px;
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color var(--dur-fast) ease;
}

.comment-item:hover {
  border-color: var(--border-default);
}

.comment-item.is-pinned {
  border-color: var(--accent-gold-border);
  border-left: 3px solid var(--accent-gold);
  background: linear-gradient(90deg, var(--accent-gold-soft) 0%, var(--bg-elevated) 38%);
}

.comment-reply {
  margin-top: 8px;
  margin-left: 20px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-left: 2px solid var(--accent-cyan-border);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.comment-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}

/* ==========================================================================
   Modals & Forms
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: var(--bg-overlay);
  backdrop-filter: blur(var(--blur-sm));
  -webkit-backdrop-filter: blur(var(--blur-sm));
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--dur-normal) ease, visibility var(--dur-normal) ease;
}

.modal-backdrop.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal-dialog {
  width: 100%;
  max-width: 520px;
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-2xl);
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: p233-modal-in var(--dur-normal) var(--ease-out);
}

.modal-dialog--lg {
  max-width: 780px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
}

.modal-header h2,
.modal-header h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
}

.modal-body {
  padding: 22px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 22px;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
}

/* Form Controls */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 10px 13px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-default);
  background-color: var(--bg-input);
  color: var(--text-primary);
  font-size: var(--text-sm);
  line-height: 1.45;
  transition:
    border-color var(--dur-fast) ease,
    box-shadow var(--dur-fast) ease,
    background-color var(--dur-fast) ease;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-muted);
}

.form-input:hover,
.form-textarea:hover,
.form-select:hover {
  border-color: var(--border-strong);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--accent-cyan);
  background-color: var(--bg-surface);
  box-shadow: var(--ring-focus);
}

.form-textarea {
  min-height: 96px;
  resize: vertical;
}

.form-select {
  appearance: none;
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px 16px;
}

.dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 26px 18px;
  text-align: center;
  border-radius: var(--radius-lg);
  border: 2px dashed var(--border-strong);
  background: var(--bg-input);
  color: var(--text-secondary);
  cursor: pointer;
  transition:
    border-color var(--dur-fast) ease,
    background-color var(--dur-fast) ease,
    transform var(--dur-fast) var(--ease-out);
}

.dropzone:hover {
  border-color: var(--accent-cyan);
  background: var(--accent-cyan-soft);
}

.dropzone.is-dragover {
  border-color: var(--accent-gold);
  background: var(--accent-gold-soft);
  transform: scale(1.01);
  box-shadow: var(--ring-focus-gold);
}

.form-hint {
  font-size: var(--text-xs);
  color: var(--text-muted);
  line-height: 1.45;
}

.form-error {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--status-danger-text);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--status-danger-soft);
  border: 1px solid var(--status-danger-border);
}

/* ==========================================================================
   Admin Studio & Profile View
   ========================================================================== */
.admin-view,
.profile-view {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  animation: p233-fade-in var(--dur-normal) ease;
}

.admin-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
  gap: 16px;
}

.kpi-card {
  position: relative;
  overflow: hidden;
  padding: 18px 20px;
  border-radius: var(--radius-xl);
  background: var(--bg-surface);
  background-image: var(--grad-surface-sheen);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-variant-numeric: tabular-nums;
  transition: transform var(--dur-fast) var(--ease-out), border-color var(--dur-fast) ease;
}

.kpi-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--grad-primary);
  opacity: 0.85;
}

.kpi-card:nth-child(2n)::before {
  background: var(--grad-cyan);
}

.kpi-card:nth-child(3n)::before {
  background: linear-gradient(90deg, #22c55e, #38bdf8);
}

.kpi-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
}

.kpi-card strong,
.kpi-card .kpi-value {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.15;
  color: var(--text-primary);
}

.kpi-card span,
.kpi-card .kpi-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-muted);
}

.admin-tabs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px;
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
}

.admin-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: 600;
  transition:
    background-color var(--dur-fast) ease,
    color var(--dur-fast) ease,
    border-color var(--dur-fast) ease;
}

.admin-tab:hover {
  color: var(--text-primary);
  background: var(--bg-elevated);
}

.admin-tab.is-active {
  color: #090d17;
  font-weight: 700;
  background: var(--grad-primary);
  box-shadow: 0 4px 14px rgba(245, 176, 65, 0.25);
}

.data-table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-xl);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
  font-variant-numeric: tabular-nums;
}

.data-table thead th {
  position: sticky;
  top: 0;
  padding: 13px 16px;
  text-align: left;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-default);
  white-space: nowrap;
}

.data-table tbody td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
  vertical-align: middle;
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr {
  transition: background-color var(--dur-fast) ease;
}

.data-table tbody tr:hover {
  background: var(--bg-surface-hover);
}

/* Status Pills */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
  border: 1px solid var(--border-default);
  background: var(--bg-elevated);
  color: var(--text-secondary);
}

.status-pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.status-pill--approved {
  background: var(--status-success-soft);
  color: var(--status-success-text);
  border-color: var(--status-success-border);
}

.status-pill--pending {
  background: var(--status-warning-soft);
  color: var(--status-warning-text);
  border-color: var(--status-warning-border);
}

.status-pill--rejected {
  background: var(--status-danger-soft);
  color: var(--status-danger-text);
  border-color: var(--status-danger-border);
}

/* Profile Header */
.profile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  padding: 24px 26px;
  border-radius: var(--radius-2xl);
  background: var(--bg-surface);
  background-image:
    radial-gradient(480px 220px at 0% 0%, var(--accent-gold-soft), transparent 70%),
    radial-gradient(420px 220px at 100% 100%, var(--accent-cyan-soft), transparent 70%);
  border: 1px solid var(--border-default);
  box-shadow: var(--shadow-md);
}

.profile-header .user-avatar {
  width: 56px;
  height: 56px;
  font-size: 1.35rem;
}

/* ==========================================================================
   Toasts, Empty States & Skeletons
   ========================================================================== */
.toast-stack {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 16px;
  border-radius: var(--radius-lg);
  background: var(--bg-glass-strong);
  backdrop-filter: blur(var(--blur-md));
  -webkit-backdrop-filter: blur(var(--blur-md));
  border: 1px solid var(--border-default);
  border-left: 4px solid var(--accent-cyan);
  color: var(--text-primary);
  font-size: var(--text-sm);
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: p233-toast-in var(--dur-normal) var(--ease-out);
}

.toast--success {
  border-left-color: var(--status-success);
}

.toast--error {
  border-left-color: var(--status-danger);
}

.toast--info {
  border-left-color: var(--status-info);
}

.empty-state {
  padding: 46px 24px;
  text-align: center;
  border-radius: var(--radius-xl);
  background: var(--bg-surface);
  border: 1px dashed var(--border-default);
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.skeleton {
  display: block;
  border-radius: var(--radius-md);
  background: linear-gradient(
    90deg,
    var(--skeleton-base) 20%,
    var(--skeleton-shine) 50%,
    var(--skeleton-base) 80%
  );
  background-size: 200% 100%;
  animation: p233-shimmer 1.5s linear infinite;
}

/* ==========================================================================
   Helpful Layout & Editorial Utility Classes (Available for frontend-app)
   ========================================================================== */
.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.controls-box {
  padding: 12px 15px;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--accent-cyan);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-secondary);
  line-height: 1.6;
}

.inline-actions {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.muted-text {
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.mono-text {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.divider {
  height: 1px;
  background: var(--border-subtle);
  border: 0;
  margin: 14px 0;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1120px) {
  .topbar-inner {
    padding-inline: var(--space-4);
    gap: 12px;
  }

  .search-box {
    max-width: 240px;
    min-width: 150px;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1.4fr) minmax(270px, 1fr);
  }

  .detail-grid {
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, 1fr);
  }
}

@media (max-width: 960px) {
  .app-shell > main,
  #app-main {
    padding: var(--space-5) var(--space-4) var(--space-10);
  }

  .hero-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .hero-main {
    padding: var(--space-6);
  }

  .play-stage {
    min-height: 380px;
    max-height: 70vh;
  }
}

@media (max-width: 760px) {
  .topbar-inner {
    flex-wrap: wrap;
    padding-top: 10px;
    padding-bottom: 10px;
    gap: 10px;
  }

  .topbar-actions {
    margin-left: auto;
  }

  .nav-links {
    order: 3;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .nav-links::-webkit-scrollbar {
    display: none;
  }

  .search-box {
    order: 4;
    flex: 1 1 100%;
    max-width: none;
    margin-left: 0;
  }

  .games-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .hero-main {
    padding: var(--space-5);
  }

  .play-toolbar {
    padding: 10px 12px;
  }

  .play-stage {
    min-height: 280px;
    aspect-ratio: 16 / 10;
  }

  .cloud-save-drawer {
    width: 100%;
    border-left: none;
  }

  .rating-summary {
    flex-direction: column;
    align-items: stretch;
  }

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

  .comment-reply {
    margin-left: 10px;
  }

  .modal-backdrop {
    padding: 12px;
  }

  .modal-header,
  .modal-body,
  .modal-footer {
    padding-inline: 16px;
  }

  .profile-header {
    padding: 18px;
  }
}
