:root {
  --bg-main: #11151c;
  --bg-panel: #1b222c;
  --bg-panel-hover: #242c38;
  --bg-card: #202733;
  --nav-bg: rgba(20, 25, 35, 0.92);
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-soft: #93c5fd;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dark: #64748b;
  --border-color: #2e3b4e;
  --green: #10b981;
  --yellow: #f59e0b;
  --red: #ef4444;
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.32);
  --shadow-md: 0 16px 36px rgba(0, 0, 0, 0.22);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg-main);
  color: var(--text-main);
  font-family: "Inter", sans-serif;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

#app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

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

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

button {
  cursor: pointer;
}

img,
svg,
iframe {
  display: block;
}

.bg-geometry {
  height: 100vh;
  inset: 0;
  pointer-events: none;
  position: fixed;
  width: 100vw;
  z-index: -1;
}

.is-hidden {
  display: none !important;
}

header {
  align-items: center;
  backdrop-filter: blur(14px);
  background: var(--nav-bg);
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  display: flex;
  justify-content: space-between;
  left: 0;
  padding: 0 1.5rem;
  position: sticky;
  right: 0;
  top: 0;
  z-index: 40;
}

.header-left,
.header-right {
  align-items: center;
  display: flex;
  gap: 1.2rem;
}

.logo {
  align-items: center;
  display: flex;
  gap: 0.8rem;
  padding: 0.9rem 0;
}

.logo-copy {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.logo-copy span {
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
}

.logo-copy small {
  color: var(--text-dark);
  font-size: 0.72rem;
}

.nav-links {
  display: flex;
  gap: 0.25rem;
}

.nav-item,
.user-profile {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--text-muted);
  display: inline-flex;
  font-size: 0.85rem;
  font-weight: 600;
  gap: 0.5rem;
  min-height: 42px;
  padding: 0.65rem 0.9rem;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-item:hover,
.nav-item.active,
.user-profile:hover,
.user-profile.active {
  background: rgba(37, 99, 235, 0.12);
  border-color: rgba(147, 197, 253, 0.18);
  color: var(--text-main);
  transform: translateY(-1px);
}

.nav-icon,
.inline-icon {
  height: 16px;
  width: 16px;
}

.lang-switcher {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 999px;
  display: inline-flex;
  gap: 0.2rem;
  padding: 0.25rem;
}

.lang-btn {
  background: transparent;
  border: 0;
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 800;
  min-width: 46px;
  padding: 0.35rem 0.8rem;
}

.lang-btn.active {
  background: var(--accent);
  color: #fff;
}

.user-profile-avatar,
.avatar-circle,
.lb-mini-avatar,
.lb-avatar,
.account-avatar {
  align-items: center;
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.26), rgba(29, 78, 216, 0.14));
  border: 1px solid rgba(147, 197, 253, 0.16);
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  flex-shrink: 0;
  font-size: 0.85rem;
  font-weight: 800;
  justify-content: center;
  overflow: hidden;
}

.user-profile-avatar,
.avatar-circle,
.lb-mini-avatar {
  height: 34px;
  width: 34px;
}

.lb-avatar,
.account-avatar {
  border-radius: 18px;
  font-size: 1.25rem;
  height: 76px;
  width: 76px;
}

.user-profile-avatar img,
.avatar-circle img,
.lb-mini-avatar img,
.lb-avatar img,
.account-avatar img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.container {
  flex: 1;
  margin: 0 auto;
  max-width: 1140px;
  padding: 2rem 1.5rem 4rem;
  width: 100%;
}

.page-view {
  animation: fadeIn 0.24s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.panel,
.state-panel,
.empty-panel {
  background: rgba(27, 34, 44, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 14px;
  box-shadow: var(--shadow-md);
}

.panel {
  padding: 1.35rem;
}

.state-panel,
.empty-panel {
  color: var(--text-muted);
  padding: 1.5rem;
  text-align: center;
}

.state-panel.error {
  border-color: rgba(239, 68, 68, 0.18);
  color: #fecaca;
}

.empty-hint {
  color: var(--text-dark);
  font-size: 0.86rem;
  margin-top: 0.45rem;
}

.panel-title {
  align-items: center;
  color: #fff;
  display: flex;
  font-size: 1rem;
  font-weight: 700;
  gap: 0.55rem;
  margin-bottom: 1rem;
}

.hero {
  margin: 1rem 0 2.75rem;
  text-align: center;
}

.hero h1 {
  color: #fff;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.06;
}

.hero-subcopy,
.submission-intro,
.rules-intro,
.rule-body,
.lb-detail-text,
.level-desc,
.level-meta-line,
.moderation-card p,
.submission-mini p,
.two-factor-status span,
.footer-desc,
.footer-subdesc {
  color: var(--text-muted);
}

.hero-subcopy {
  font-size: 1rem;
  margin: 1rem auto 0;
  max-width: 760px;
}

.stats-grid,
.stats-grid-box {
  display: grid;
  gap: 1rem;
}

.stats-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 2rem auto 0;
  max-width: 760px;
}

.stat-item,
.stat-box,
.metric-box,
.side-rule,
.two-factor-card {
  background: rgba(14, 19, 27, 0.76);
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: 12px;
}

.stat-item {
  padding: 1rem;
}

.stat-value {
  color: #fff;
  font-size: 1.55rem;
  font-weight: 800;
}

.stat-label,
.stat-box .label,
.submission-form label span,
.metric-box span {
  color: var(--text-dark);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-buttons,
.level-actions,
.moderation-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.moderation-action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.mod-note-input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 8px;
  color: #e2e8f0;
  font-size: 0.85rem;
}
.mod-note-input:focus {
  border-color: rgba(147, 197, 253, 0.4);
  outline: none;
}
.moderation-links,
.record-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-buttons {
  justify-content: center;
  margin-top: 1.5rem;
}

.btn {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 9px;
  display: inline-flex;
  font-size: 0.9rem;
  font-weight: 700;
  gap: 0.5rem;
  justify-content: center;
  min-height: 44px;
  padding: 0.75rem 1.05rem;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

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

.btn:disabled,
.control-chip:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(148, 163, 184, 0.14);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: var(--bg-panel-hover);
}

.home-grid,
.submission-layout,
.account-layout {
  display: grid;
  gap: 1.5rem;
}

.home-grid {
  grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr);
}

.submission-layout,
.account-layout {
  grid-template-columns: minmax(0, 1.65fr) minmax(290px, 1fr);
}

.side-stack,
.moderation-main {
  display: grid;
  gap: 1.5rem;
}

.feature-item {
  display: flex;
  gap: 0.9rem;
  margin-bottom: 1rem;
}

.feature-item:last-child {
  margin-bottom: 0;
}

.feature-icon {
  align-items: center;
  background: rgba(37, 99, 235, 0.12);
  border: 1px solid rgba(147, 197, 253, 0.18);
  border-radius: 10px;
  color: var(--accent-soft);
  display: flex;
  flex-shrink: 0;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.feature-text h4 {
  color: #fff;
  font-size: 0.94rem;
  margin-bottom: 0.2rem;
}

.feature-text p {
  color: var(--text-dark);
  font-size: 0.84rem;
}

.recent-changes-list,
.rule-points {
  list-style: none;
}

.recent-change-item,
.rule-points li {
  align-items: center;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
  display: flex;
  gap: 0.6rem;
  padding: 0.85rem 0;
}

.recent-change-item:last-child,
.rule-points li:last-child {
  border-bottom: 0;
}

.change-dot {
  background: var(--green);
  border-radius: 999px;
  display: inline-block;
  flex-shrink: 0;
  height: 9px;
  width: 9px;
}

.highlight,
.white,
.moderation-card h3,
.submission-mini strong,
.account-chip strong,
.user-management-head strong {
  color: #fff;
}

.date-divider {
  color: var(--text-dark);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  margin: 1rem 0 0.4rem;
  text-align: center;
  text-transform: uppercase;
}

.list-controls,
.submit-switcher,
.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.search-bar {
  align-items: center;
  background: rgba(27, 34, 44, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 10px;
  color: var(--text-muted);
  display: flex;
  flex: 1;
  gap: 0.6rem;
  min-height: 46px;
  min-width: min(100%, 250px);
  padding: 0 0.9rem;
}

.search-bar-inline {
  width: 100%;
}

.search-bar input {
  background: transparent;
  border: 0;
  color: #fff;
  outline: 0;
  width: 100%;
}

.control-chip {
  align-items: center;
  background: rgba(27, 34, 44, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 10px;
  color: var(--text-muted);
  display: inline-flex;
  font-size: 0.84rem;
  font-weight: 700;
  min-height: 46px;
  padding: 0.75rem 1rem;
}

.control-chip.active {
  background: rgba(37, 99, 235, 0.16);
  border-color: rgba(147, 197, 253, 0.22);
  color: #fff;
}

.level-list,
.metrics-grid,
.moderation-list,
.submission-mini-list,
.user-management-list {
  display: grid;
  gap: 1rem;
}

.level-card {
  align-items: center;
  background: rgba(27, 34, 44, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 14px;
  display: flex;
  gap: 1rem;
  overflow: hidden;
  padding: 1rem;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.level-card:hover {
  border-color: rgba(147, 197, 253, 0.18);
  transform: translateY(-2px);
}

.level-cover-img,
.level-detail-image,
.submission-preview img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.level-cover-fallback {
  align-items: center;
  background: linear-gradient(180deg, #10151f, #1d2633);
  color: var(--text-dark);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  height: 100%;
  justify-content: center;
}

.level-new-badge {
  background: var(--yellow);
  border-radius: 999px;
  color: #111827;
  font-size: 0.66rem;
  font-weight: 900;
  left: 0.65rem;
  padding: 0.25rem 0.55rem;
  position: absolute;
  top: 0.65rem;
}

.level-info {
  flex: 1;
}

.level-title {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  font-size: 1.15rem;
  font-weight: 800;
  gap: 0.4rem;
  margin-bottom: 0.45rem;
}

.level-rank,
.level-rank-big,
.blue {
  color: var(--accent-soft);
}

.green {
  color: var(--green);
}

.level-stats,
.level-subline {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.level-subline {
  margin-top: 0.35rem;
}

.back-link {
  align-items: center;
  color: var(--accent-soft);
  display: inline-flex;
  font-size: 0.9rem;
  font-weight: 700;
  gap: 0.5rem;
  margin-bottom: 1.2rem;
}

.back-link .inline-icon {
  transform: rotate(180deg);
}

.level-showcase {
  display: grid;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.level-rank-line {
  align-items: center;
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.8rem;
}

.level-rank-big {
  font-size: 1.4rem;
  font-weight: 800;
}

.level-meta-line {
  font-size: 0.94rem;
  margin-top: 0.4rem;
}

.level-desc {
  margin-top: 0.9rem;
}

.verified-badge,
.status-pill {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.76rem;
  font-weight: 800;
  gap: 0.35rem;
  letter-spacing: 0.05em;
  padding: 0.38rem 0.75rem;
  text-transform: uppercase;
}

.verified-badge {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.18);
  color: #6ee7b7;
  margin: 1rem 0;
}

.stats-grid-box {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 1rem;
}

.stats-grid-box.three,
.metrics-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stats-grid-box.compact {
  margin-top: 1.2rem;
}

.stat-box,
.metric-box {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1rem;
  text-align: center;
}

.stat-box .val,
.metric-box strong {
  color: #fff;
  font-size: 1.02rem;
  font-weight: 800;
}

.copy-chip {
  background: transparent;
  border: 0;
  color: var(--accent-soft);
  font-size: 0.8rem;
  font-weight: 700;
  margin: 0.45rem auto 0;
}

.video-container {
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 16px;
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.iframe-container {
  aspect-ratio: 16 / 9;
}

.iframe-container iframe {
  border: 0;
  height: 100%;
  width: 100%;
}

.level-detail-grid,
.leaderboard-layout,
.rules-layout,
.moderation-layout,
.account-auth-layout {
  display: grid;
  gap: 1.5rem;
}

.level-detail-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.record-list,
.history-list {
  display: grid;
  gap: 0.8rem;
}

.record-item,
.history-item,
.moderation-card,
.submission-mini,
.user-management-card {
  background: rgba(14, 19, 27, 0.76);
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: 12px;
  padding: 1rem;
}

.record-item,
.history-item,
.submission-mini {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.record-item span,
.history-item span,
.submission-reviewed-by,
.moderation-note,
.user-management-head span {
  color: var(--text-muted);
  font-size: 0.86rem;
}

.leaderboard-layout {
  grid-template-columns: 360px minmax(0, 1fr);
}

.lb-sidebar,
.lb-main {
  background: rgba(27, 34, 44, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 14px;
  box-shadow: var(--shadow-md);
}

.lb-sidebar {
  overflow: hidden;
}

.lb-header {
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  display: grid;
  gap: 0.9rem;
  padding: 1rem;
}

.board-tabs {
  display: flex;
  gap: 0.65rem;
}

.board-tabs .btn {
  flex: 1;
}

.lb-list {
  display: grid;
}

.lb-item {
  align-items: center;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
  color: inherit;
  display: grid;
  gap: 0.65rem;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  padding: 0.95rem 1rem;
  text-align: left;
  width: 100%;
}

.lb-item:hover,
.lb-item.active {
  background: rgba(37, 99, 235, 0.08);
}

.lb-rank {
  color: var(--accent-soft);
  font-size: 0.9rem;
  font-weight: 800;
}

.lb-name-wrap,
.account-chip,
.account-head,
.lb-profile-head,
.user-management-head,
.user-management-controls {
  align-items: center;
  display: flex;
  gap: 0.75rem;
}

.lb-name {
  color: #fff;
  font-size: 0.92rem;
  font-weight: 700;
}

.lb-score {
  color: var(--text-muted);
  font-size: 0.84rem;
}

.lb-main {
  display: flex;
  min-height: 580px;
  padding: 1.5rem;
}

.lb-profile-card {
  width: 100%;
}

.lb-profile-head h2,
.account-meta h2 {
  color: #fff;
  font-size: 1.5rem;
  margin-bottom: 0.2rem;
}

.lb-flag-avatar,
.country-badge {
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 999px;
  display: inline-flex;
  font-size: 1.1rem;
  justify-content: center;
}

.lb-flag-avatar {
  height: 76px;
  width: 76px;
}

.country-badge {
  font-size: 0.95rem;
  height: 32px;
  width: 32px;
}

.lb-main-title {
  color: var(--text-muted);
  font-weight: 700;
  text-align: center;
}

.lb-placeholder-icon {
  color: var(--text-dark);
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}

.lb-placeholder-icon .nav-icon {
  height: 56px;
  width: 56px;
}

.rules-layout {
  align-items: start;
  grid-template-columns: 280px minmax(0, 1fr);
}

.rules-sidebar {
  position: sticky;
  top: 88px;
}

.rules-nav {
  display: grid;
  gap: 0.55rem;
}

.rules-link {
  background: rgba(14, 19, 27, 0.76);
  border: 1px solid rgba(148, 163, 184, 0.08);
  border-radius: 10px;
  color: var(--text-muted);
  padding: 0.78rem 0.9rem;
}

.rules-link:hover {
  background: rgba(37, 99, 235, 0.08);
  border-color: rgba(147, 197, 253, 0.18);
  color: #fff;
}

.submission-form {
  display: grid;
  gap: 1rem;
}

.submission-form label span {
  display: block;
  margin-bottom: 0.45rem;
}

.submission-form input,
.submission-form select,
.submission-form textarea {
  background: rgba(14, 19, 27, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 10px;
  color: #fff;
  outline: 0;
  padding: 0.82rem 0.9rem;
  width: 100%;
}

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

.form-grid,
.two-factor-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-message {
  font-size: 0.88rem;
  min-height: 1.2rem;
}

.form-message.success {
  color: #6ee7b7;
}

.form-message.error {
  color: #fecaca;
}

.inline-note {
  color: var(--text-dark);
  font-size: 0.84rem;
}

.checkbox-line {
  align-items: center;
  color: var(--text-muted);
  display: flex;
  gap: 0.65rem;
}

.checkbox-line input {
  width: auto;
}

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

.submission-preview {
  border-radius: 12px;
  margin: 0.85rem 0;
  overflow: hidden;
}

.moderation-meta,
.moderation-links {
  color: var(--text-dark);
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.moderation-links a,
.record-meta a {
  color: var(--accent-soft);
  font-size: 0.84rem;
  font-weight: 700;
}

.moderation-note {
  margin-top: 0.8rem;
}

.moderation-note-strong {
  color: #dbeafe;
}

.status-pill.pending {
  background: rgba(245, 158, 11, 0.12);
  color: #fcd34d;
}

.status-pill.approved {
  background: rgba(16, 185, 129, 0.12);
  color: #6ee7b7;
}

.status-pill.rejected {
  background: rgba(239, 68, 68, 0.12);
  color: #fca5a5;
}

.status-pill.banned {
  background: rgba(190, 24, 93, 0.12);
  color: #f9a8d4;
}

.danger-warn {
  border-color: rgba(245, 158, 11, 0.2);
  color: #fcd34d;
}

.danger-ban {
  border-color: rgba(239, 68, 68, 0.2);
  color: #fda4af;
}

.user-management-controls {
  flex-wrap: wrap;
  justify-content: space-between;
  margin-top: 0.9rem;
}

.user-management-controls select {
  background: rgba(14, 19, 27, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 10px;
  color: #fff;
  padding: 0.72rem 0.85rem;
}

.account-auth-layout {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.account-card {
  display: grid;
  gap: 1rem;
}

.account-chip span,
.account-meta p,
.user-management-head span {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.two-factor-block {
  display: grid;
  gap: 1rem;
}

.two-factor-status {
  display: flex;
  justify-content: space-between;
}

.two-factor-status strong,
.two-factor-card strong {
  color: #fff;
}

.two-factor-card {
  padding: 1rem;
}

.two-factor-card code,
.code-list code {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 8px;
  color: #fff;
  display: inline-block;
  font-size: 0.85rem;
  padding: 0.45rem 0.65rem;
}

.code-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.6rem;
}

.compact-form textarea {
  min-height: auto;
}

footer {
  align-items: center;
  background: rgba(20, 25, 35, 0.96);
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  display: flex;
  justify-content: space-between;
  margin-top: auto;
  padding: 1.4rem 1.5rem;
}

.footer-logo {
  align-items: center;
  color: #fff;
  display: flex;
  font-size: 0.95rem;
  font-weight: 800;
  gap: 0.55rem;
  margin-bottom: 0.35rem;
}

.footer-socials {
  display: flex;
  gap: 0.6rem;
}

.footer-social {
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 999px;
  color: var(--text-muted);
  display: flex;
  height: 40px;
  justify-content: center;
  width: 40px;
}

.footer-social:hover {
  color: #fff;
}

@media (max-width: 1040px) {
  .home-grid,
  .submission-layout,
  .account-layout,
  .leaderboard-layout,
  .rules-layout,
  .moderation-layout,
  .level-showcase,
  .level-detail-grid,
  .account-auth-layout {
    grid-template-columns: 1fr;
  }

  .rules-sidebar {
    position: static;
  }
}

@media (max-width: 860px) {
  header {
    align-items: stretch;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.85rem 1rem 1rem;
  }

  .header-left,
  .header-right {
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .nav-links {
    overflow-x: auto;
    padding-bottom: 0.2rem;
    width: 100%;
  }

  .container {
    padding: 1.35rem 1rem 3rem;
  }

  .level-card {
    align-items: stretch;
    flex-direction: column;
  }

  .level-thumb {
    height: 190px;
    width: 100%;
  }

  .stats-grid,
  .stats-grid-box,
  .stats-grid-box.three,
  .metrics-grid,
  .form-grid,
  .two-factor-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .hero-buttons,
  .level-actions,
  .moderation-actions,
  .moderation-links,
  .record-meta,
  footer,
  .board-tabs,
  .submission-mini,
  .record-item,
  .history-item,
  .two-factor-status {
    flex-direction: column;
  }

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

  footer {
    align-items: flex-start;
  }
}

/* ========== FLAG ICONS ========== */
.flag-icon {
  display: inline-block;
  height: 14px;
  vertical-align: middle;
  width: 20px;
  border-radius: 2px;
  object-fit: cover;
}

/* ========== TOAST NOTIFICATIONS ========== */
.toast-notification {
  position: fixed;
  top: 80px;
  right: 20px;
  padding: 0.85rem 1.25rem;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 700;
  z-index: 100;
  transform: translateX(120%);
  transition: transform 0.3s ease;
  max-width: 400px;
  box-shadow: var(--shadow-lg);
}

.toast-notification.show {
  transform: translateX(0);
}

.toast-success {
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
}

.toast-error {
  background: rgba(239, 68, 68, 0.18);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

/* ========== FILE UPLOAD ========== */
.file-upload-area > span {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--text-dark);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.file-drop-zone {
  background: rgba(14, 19, 27, 0.8);
  border: 2px dashed rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  cursor: pointer;
  min-height: 100px;
  padding: 1rem;
  position: relative;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.file-drop-zone:hover,
.file-drop-zone.drag-over {
  border-color: var(--accent-soft);
  background: rgba(37, 99, 235, 0.06);
}

.file-drop-content {
  align-items: center;
  color: var(--text-dark);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  justify-content: center;
  padding: 1rem;
  text-align: center;
}

.file-drop-content .nav-icon {
  height: 28px;
  width: 28px;
}

.file-drop-content span {
  font-size: 0.82rem;
}

.file-input-hidden {
  cursor: pointer;
  height: 100%;
  left: 0;
  opacity: 0;
  position: absolute;
  top: 0;
  width: 100%;
}

.file-preview {
  border-radius: 10px;
  overflow: hidden;
  max-height: 200px;
}

.file-preview img {
  border-radius: 10px;
  height: auto;
  max-height: 200px;
  object-fit: contain;
  width: 100%;
}

/* ========== USER SEARCH DROPDOWN ========== */
.user-search-wrap {
  position: relative;
}

.user-search-input {
  background: rgba(14, 19, 27, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 10px;
  color: #fff;
  outline: 0;
  padding: 0.82rem 0.9rem;
  width: 100%;
}

.user-search-dropdown {
  background: var(--bg-panel);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  display: none;
  left: 0;
  max-height: 240px;
  overflow-y: auto;
  position: absolute;
  right: 0;
  top: 100%;
  z-index: 50;
}

.user-search-option {
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  gap: 0.65rem;
  padding: 0.7rem 0.85rem;
  text-align: left;
  width: 100%;
}

.user-search-option:hover {
  background: rgba(37, 99, 235, 0.1);
}

.user-search-country {
  margin-left: auto;
}

.user-search-empty {
  color: var(--text-dark);
  padding: 0.85rem;
  text-align: center;
}

/* ========== SMALL AVATARS ========== */
.avatar-circle-sm {
  align-items: center;
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.26), rgba(29, 78, 216, 0.14));
  border: 1px solid rgba(147, 197, 253, 0.16);
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  flex-shrink: 0;
  font-size: 0.65rem;
  font-weight: 800;
  height: 26px;
  justify-content: center;
  overflow: hidden;
  width: 26px;
}

.avatar-circle-sm img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.default-avatar-icon {
  width: 60%;
  height: 60%;
  opacity: 0.7;
}

.avatar-upload-wrap {
  position: relative;
  cursor: pointer;
}

.avatar-upload-wrap:hover .avatar-upload-overlay {
  opacity: 1;
}

.avatar-upload-overlay {
  align-items: center;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 18px;
  display: flex;
  height: 100%;
  justify-content: center;
  left: 0;
  opacity: 0;
  position: absolute;
  top: 0;
  transition: opacity 0.2s ease;
  width: 100%;
}

.avatar-upload-overlay .nav-icon {
  color: #fff;
  height: 24px;
  width: 24px;
}

.avatar-upload-input {
  cursor: pointer;
  height: 100%;
  left: 0;
  opacity: 0;
  position: absolute;
  top: 0;
  width: 100%;
}

.user-link {
  text-decoration: none;
  transition: opacity 0.15s;
}
.user-link:hover {
  opacity: 0.8;
  text-decoration: underline;
}
.user-link.green strong {
  color: #4ade80;
}

/* ========== LEVEL PAGE REDESIGN ========== */
.level-info-full {
  margin-bottom: 1.5rem;
}

.level-page-title {
  color: #fff;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 800;
  line-height: 1.1;
  margin: 0.5rem 0;
}

.level-stats-grid {
  margin-top: 1.2rem;
}

.level-stats-grid .stats-grid-box {
  margin-bottom: 0.75rem;
}

.record-player {
  align-items: center;
  display: flex;
  gap: 0.6rem;
}

.record-count {
  background: rgba(37, 99, 235, 0.16);
  border-radius: 999px;
  color: var(--accent-soft);
  font-size: 0.72rem;
  font-weight: 800;
  margin-left: 0.5rem;
  padding: 0.2rem 0.55rem;
}

/* ========== LEVEL LIST THUMB HOVER ========== */
.level-thumb {
  border-radius: 10px;
  flex-shrink: 0;
  height: 120px;
  overflow: hidden;
  position: relative;
  width: 220px;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.level-thumb:hover {
  transform: scale(1.08);
  z-index: 2;
}

.level-thumb-overlay {
  align-items: center;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  height: 100%;
  justify-content: center;
  left: 0;
  opacity: 0;
  position: absolute;
  top: 0;
  transition: opacity 0.2s ease;
  width: 100%;
}

.level-thumb:hover .level-thumb-overlay {
  opacity: 1;
}

.level-thumb-overlay svg {
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4));
}

/* ========== MODERATION LAYOUT ========== */
.moderation-layout-new {
  display: grid;
  gap: 1.5rem;
}

.metrics-panel-wide {
  background: rgba(27, 34, 44, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 14px;
  box-shadow: var(--shadow-md);
  padding: 1.35rem;
}

.metrics-grid-wide {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric-pending strong {
  color: var(--yellow);
}

/* ========== USER PROFILE PAGE ========== */
.user-profile-page {
  margin-bottom: 1.5rem;
}

.user-profile-header {
  align-items: center;
  display: flex;
  gap: 1.25rem;
  margin-bottom: 1rem;
}

.user-profile-meta h1 {
  color: #fff;
  font-size: 1.8rem;
  font-weight: 800;
}

.user-profile-meta p {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.user-joined {
  color: var(--text-dark);
  font-size: 0.82rem;
  margin-top: 0.3rem;
}

.user-bio {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.mini-level-list {
  display: grid;
  gap: 0.5rem;
}

.mini-level-item {
  background: rgba(14, 19, 27, 0.76);
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: 10px;
  color: var(--text-main);
  display: block;
  font-weight: 600;
  padding: 0.7rem 0.9rem;
  transition: background 0.15s ease;
}

.mini-level-item:hover {
  background: rgba(37, 99, 235, 0.08);
}

.user-flag {
  margin-left: auto;
  white-space: nowrap;
}

/* ========== LB EMPTY STATE ========== */
.lb-empty-state {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: center;
  width: 100%;
}

/* ========== RESPONSIVE FIXES ========== */
@media (max-width: 860px) {
  .metrics-grid-wide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .level-thumb {
    height: 190px;
    width: 100%;
  }

  .user-profile-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 620px) {
  .metrics-grid-wide {
    grid-template-columns: 1fr;
  }
}

/* API Documentation */
.api-docs {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.api-docs .panel-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.api-section {
  margin-top: 1.2rem;
}

.api-section h3 {
  color: var(--text-light);
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.api-docs h4 {
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin: 1.2rem 0 0.5rem;
  text-transform: uppercase;
}

.api-code-block {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: 10px;
  color: var(--accent-soft);
  font-family: "Courier New", Courier, monospace;
  font-size: 0.82rem;
  line-height: 1.6;
  overflow-x: auto;
  padding: 1rem 1.2rem;
  white-space: pre;
}

.api-method {
  border-radius: 6px;
  font-family: "Courier New", Courier, monospace;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.55rem;
}

.api-method.get {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
}

.api-table {
  border-collapse: collapse;
  font-size: 0.85rem;
  width: 100%;
}

.api-table thead th {
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0.6rem 0.8rem;
  text-align: left;
  text-transform: uppercase;
}

.api-table tbody td {
  border-bottom: 1px solid rgba(148, 163, 184, 0.06);
  color: var(--text-light);
  padding: 0.6rem 0.8rem;
}

.api-table code {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 4px;
  color: var(--accent-soft);
  font-size: 0.82rem;
  padding: 0.15rem 0.4rem;
}

.api-guidelines {
  color: var(--text-light);
  display: flex;
  flex-direction: column;
  font-size: 0.88rem;
  gap: 0.6rem;
  line-height: 1.6;
  list-style: none;
  margin: 0;
  padding: 0;
}

.api-guidelines li::before {
  color: var(--accent);
  content: "\2022";
  font-weight: 800;
  margin-right: 0.5rem;
}

.footer-api-link {
  color: var(--accent-soft);
  font-size: 0.78rem;
  margin-top: 0.5rem;
  opacity: 0.7;
  text-decoration: none;
  transition: opacity 0.2s;
}

.footer-api-link:hover {
  opacity: 1;
}

/* ===== Pagination ===== */
.pagination-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1rem 0 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ===== Accounts & Submissions management ===== */
.mgmt-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1rem;
  align-items: center;
}
.mgmt-controls .search-bar {
  flex: 1 1 200px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.45rem 0.7rem;
}
.mgmt-controls .search-bar input {
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 0.85rem;
  width: 100%;
  outline: none;
}
.mgmt-controls select {
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.45rem 0.6rem;
  font-size: 0.82rem;
  cursor: pointer;
}
.mgmt-controls .btn {
  font-size: 0.82rem;
  padding: 0.45rem 0.7rem;
}

.user-mgmt-card {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.7rem 0.9rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}
.user-mgmt-card .user-mgmt-info {
  flex: 1 1 200px;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.user-mgmt-card .user-mgmt-info strong a {
  color: var(--text-main);
  text-decoration: none;
}
.user-mgmt-card .user-mgmt-info strong a:hover {
  color: var(--accent-soft);
}
.user-mgmt-card .user-id-short {
  font-size: 0.72rem;
  color: var(--text-dark);
  font-family: monospace;
}
.user-mgmt-card .user-mgmt-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  align-items: center;
}
.user-mgmt-card .user-mgmt-actions {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  flex-wrap: wrap;
}
.user-mgmt-card .user-mgmt-actions select {
  background: var(--bg-panel);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.35rem 0.5rem;
  font-size: 0.8rem;
}

/* Submission cards in queue */
.sub-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.8rem 1rem;
  margin-bottom: 0.6rem;
}
.sub-card-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}
.sub-card-header .sub-number {
  font-size: 0.75rem;
  color: var(--text-dark);
  font-family: monospace;
  min-width: 2.5rem;
}
.sub-card-body {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.sub-card-body div {
  margin-bottom: 0.2rem;
}
.sub-card-actions {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  flex-wrap: wrap;
}

/* Small button variant */
.btn-sm {
  font-size: 0.78rem;
  padding: 0.3rem 0.55rem;
}
.btn-danger {
  background: var(--red);
  color: #fff;
  border: none;
  cursor: pointer;
  border-radius: 6px;
  font-size: 0.8rem;
  padding: 0.3rem 0.55rem;
  transition: opacity 0.2s;
}
.btn-danger:hover {
  opacity: 0.85;
}

/* Type / status badges */
.type-badge {
  display: inline-block;
  font-size: 0.72rem;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: var(--accent);
  color: #fff;
  text-transform: uppercase;
  font-weight: 600;
}
.type-badge.level-type {
  background: #7c3aed;
}

/* Record delete button in level page */
.record-delete-btn {
  margin-left: 0.5rem;
}
