:root {
  --bg: #07110f;
  --panel: rgba(13, 24, 21, 0.82);
  --line: rgba(136, 255, 193, 0.16);
  --line-strong: rgba(136, 255, 193, 0.34);
  --text: #edf6ef;
  --muted: #a3c0b2;
  --accent: #79f8a4;
  --accent-2: #38d3ff;
  --danger: #ff7e7e;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.34);
  --radius: 24px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Rajdhani", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top, rgba(65, 172, 111, 0.22), transparent 34%),
    radial-gradient(circle at 80% 10%, rgba(56, 211, 255, 0.14), transparent 26%),
    linear-gradient(180deg, #091310 0%, #050908 100%);
  overflow-x: hidden;
}

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

button,
input,
textarea {
  font: inherit;
}

code {
  padding: 0.15rem 0.4rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  font-family: "Consolas", "Courier New", monospace;
  font-size: 0.88em;
}

.login-body,
.app-body {
  position: relative;
}

.launcher-backdrop,
.sky-layer,
.terrain-layer,
#particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.launcher-backdrop {
  overflow: hidden;
}

.backdrop-grid,
.backdrop-noise {
  position: absolute;
  inset: 0;
}

.backdrop-grid {
  background:
    linear-gradient(rgba(121, 248, 164, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(121, 248, 164, 0.06) 1px, transparent 1px),
    linear-gradient(rgba(56, 211, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 211, 255, 0.04) 1px, transparent 1px);
  background-size: 48px 48px, 48px 48px, 144px 144px, 144px 144px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), transparent 92%);
  animation: grid-drift 28s linear infinite;
}

.backdrop-noise {
  opacity: 0.04;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.18) 0, transparent 2px),
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.14) 0, transparent 1px),
    radial-gradient(circle at 30% 75%, rgba(255, 255, 255, 0.14) 0, transparent 1px),
    radial-gradient(circle at 70% 60%, rgba(255, 255, 255, 0.18) 0, transparent 2px);
  background-size: 220px 220px;
  animation: pulse-fade 12s ease-in-out infinite;
}

.backdrop-glow {
  position: absolute;
  width: 38rem;
  height: 38rem;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.12;
}

.backdrop-glow-a {
  top: -14rem;
  left: -10rem;
  background: rgba(110, 255, 166, 0.42);
}

.backdrop-glow-b {
  right: -14rem;
  bottom: -18rem;
  background: rgba(54, 190, 255, 0.28);
}

.login-body .sky-layer {
  background:
    radial-gradient(circle at 20% 18%, rgba(255, 230, 123, 0.26), transparent 14%),
    linear-gradient(180deg, rgba(25, 58, 54, 0.45), transparent 40%),
    linear-gradient(180deg, #0f1b19 0%, #09100f 100%);
}

.login-body .terrain-layer {
  background:
    linear-gradient(180deg, transparent 60%, rgba(16, 32, 27, 0.75) 60%),
    linear-gradient(135deg, transparent 0 46%, rgba(58, 130, 88, 0.38) 46% 54%, transparent 54%),
    linear-gradient(45deg, transparent 0 47%, rgba(34, 92, 65, 0.32) 47% 54%, transparent 54%);
  background-size: 100% 100%, 220px 220px, 180px 180px;
  opacity: 0.8;
}

.cloud,
.sun-glow,
.grass-strip {
  display: none;
}

.login-wrapper,
.launcher-app {
  position: relative;
  z-index: 1;
}

.login-wrapper {
  width: min(1120px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  align-items: center;
  justify-items: start;
  padding: 48px 0;
}

.logo-block {
  margin-bottom: 20px;
}

.logo-top,
.panel-header,
.topbar-label,
.feature-panel-title,
.account-meta strong,
.launcher-item-copy strong {
  font-family: "Press Start 2P", monospace;
  letter-spacing: 0.08em;
}

.logo-top {
  font-size: clamp(1.25rem, 2vw, 1.8rem);
  margin-bottom: 14px;
}

.logo-sub,
.login-footer,
.account-meta span,
.launcher-item-copy small,
.section-hint,
.viewer-status,
.upload-msg,
.empty-state,
.wip-card p {
  color: var(--muted);
}

.mc-panel,
.account-panel,
.launcher-nav,
.launcher-topbar,
.launcher-card,
.feature-panel,
.promo-card,
.wip-card {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(16, 30, 26, 0.88), rgba(8, 15, 13, 0.82));
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.mc-panel,
.launcher-card,
.feature-panel,
.promo-card,
.wip-card {
  border-radius: var(--radius);
}

.account-panel,
.launcher-nav,
.launcher-topbar {
  border-radius: calc(var(--radius) + 2px);
}

.mc-panel {
  width: min(460px, 100%);
  padding: 28px;
}

.login-panel,
.feature-panel,
.promo-card,
.launcher-card {
  position: relative;
  overflow: hidden;
}

.login-panel::before,
.feature-panel::before,
.promo-card::before,
.launcher-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(121, 248, 164, 0.12), transparent 42%, rgba(56, 211, 255, 0.08));
  pointer-events: none;
}

.panel-header {
  margin-bottom: 22px;
  font-size: 1rem;
}

.form-group {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.mc-label {
  color: #d5e7dc;
  font-size: 0.98rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mc-input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(7, 14, 12, 0.86);
  color: var(--text);
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.mc-input:focus {
  border-color: rgba(121, 248, 164, 0.46);
  box-shadow: 0 0 0 4px rgba(121, 248, 164, 0.14);
  transform: translateY(-1px);
}

.mc-btn,
.inline-link-btn,
.play-button,
.section-pill,
.mc-file-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.mc-btn:hover,
.inline-link-btn:hover,
.play-button:hover,
.section-pill:hover,
.mc-file-label:hover,
.launcher-item:hover,
.promo-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
}

.mc-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.mc-btn-green,
.play-button {
  background: linear-gradient(180deg, rgba(94, 246, 147, 0.32), rgba(30, 117, 68, 0.38));
  border-color: rgba(121, 248, 164, 0.34);
}

.mc-btn-gray,
.section-pill {
  background: rgba(255, 255, 255, 0.04);
}

.mc-btn-red {
  background: rgba(255, 126, 126, 0.14);
  border-color: rgba(255, 126, 126, 0.24);
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 10px 14px;
}

.error-msg,
.upload-msg {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 126, 126, 0.12);
  border: 1px solid rgba(255, 126, 126, 0.22);
}

.launcher-app {
  width: min(1760px, calc(100% - 28px));
  margin: 0 auto;
  padding: 18px 0 28px;
  display: grid;
  grid-template-columns: minmax(250px, 280px) minmax(0, 1fr) minmax(250px, 300px);
  gap: 18px;
  min-height: 100vh;
}

.launcher-left,
.launcher-center,
.launcher-right,
.launcher-stage,
.section-content,
.app-section,
.feature-layout,
.admin-layout,
.info-block,
.mod-request-list,
.admin-user-list,
.home-layout,
.status-grid,
.news-feed {
  display: grid;
}

.launcher-left,
.launcher-center,
.launcher-right {
  gap: 18px;
  align-content: start;
}

.account-panel {
  padding: 20px;
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 14px;
  align-items: center;
}

.account-avatar {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(121, 248, 164, 0.28), rgba(56, 211, 255, 0.18)),
    rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 1.5rem;
  font-weight: 700;
}

.launcher-nav {
  padding: 12px;
  display: grid;
  gap: 10px;
}

.launcher-item {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.launcher-item.is-active {
  background: linear-gradient(90deg, rgba(121, 248, 164, 0.18), rgba(56, 211, 255, 0.07));
  border-color: rgba(121, 248, 164, 0.26);
}

.launcher-item-icon,
.play-button-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(121, 248, 164, 0.22), rgba(56, 211, 255, 0.14)),
    rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
}

.launcher-item-icon::before,
.launcher-item-icon::after,
.play-button-icon::before,
.play-button-icon::after {
  content: "";
  position: absolute;
  background: rgba(237, 246, 239, 0.9);
}

.icon-home::before {
  inset: 10px 11px 20px;
}

.icon-home::after {
  left: 9px;
  right: 9px;
  bottom: 9px;
  height: 12px;
}

.icon-skin::before {
  inset: 8px 11px 8px;
  border-radius: 8px;
}

.icon-skin::after {
  width: 10px;
  height: 10px;
  top: 16px;
  left: 16px;
  border-radius: 2px;
  background: var(--bg);
}

.icon-mod::before,
.icon-admin::before,
.icon-updates::before,
.icon-profile::before,
.icon-settings::before {
  inset: 11px;
  border-radius: 10px;
}

.icon-mod::after {
  left: 14px;
  right: 14px;
  top: 20px;
  height: 2px;
  background: var(--bg);
}

.icon-profile::after {
  width: 14px;
  height: 14px;
  top: 10px;
  left: 14px;
  border-radius: 50%;
  background: var(--bg);
}

.icon-updates::after {
  width: 18px;
  height: 2px;
  bottom: 11px;
  left: 12px;
  background: var(--bg);
}

.icon-admin::after,
.icon-settings::after {
  width: 14px;
  height: 14px;
  top: 14px;
  left: 14px;
  transform: rotate(45deg);
  background: var(--bg);
}

.topbar-copy h1,
.launcher-card h3,
.wip-card h2,
.news-card h3 {
  margin: 0;
}

.launcher-topbar {
  padding: 18px 22px;
  display: grid;
  grid-template-columns: 1.1fr auto auto;
  gap: 16px;
  align-items: center;
}

.topbar-copy h1 {
  margin-top: 8px;
  font-size: clamp(1.2rem, 2vw, 1.75rem);
  line-height: 1.02;
}

.topbar-actions,
.topbar-meta,
.subpanel-row,
.file-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.topbar-meta {
  justify-content: flex-end;
}

.coin-pill {
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(121, 248, 164, 0.2);
  background: rgba(121, 248, 164, 0.1);
  color: #d9ffe7;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.coin-pill-subtle {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--muted);
}

.launcher-stage {
  gap: 16px;
}

.home-layout {
  grid-template-columns: 1.1fr 0.9fr;
  gap: 16px;
}

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

.status-card,
.news-card {
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.status-card span,
.news-date {
  display: block;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.84rem;
}

.status-card strong {
  display: block;
  margin-top: 10px;
  font-size: 1.5rem;
}

.status-card small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

.news-feed {
  gap: 12px;
  max-height: 540px;
  overflow: auto;
  padding-right: 4px;
}

.news-feed::-webkit-scrollbar {
  width: 8px;
}

.news-feed::-webkit-scrollbar-thumb {
  background: rgba(121, 248, 164, 0.18);
  border-radius: 999px;
}

.news-card h3 {
  margin: 10px 0 8px;
}

.news-card p {
  margin: 0;
  color: var(--muted);
}

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

.admin-layout .admin-wide {
  grid-column: 1 / -1;
}

.feature-panel {
  padding: 22px;
  gap: 16px;
}

.viewer-panel {
  min-height: 560px;
}

.viewer-wrap {
  position: relative;
  min-height: 440px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background:
    radial-gradient(circle at top, rgba(56, 211, 255, 0.12), transparent 36%),
    linear-gradient(180deg, rgba(3, 8, 7, 0.85), rgba(11, 20, 18, 0.95));
  overflow: hidden;
}

#skin-canvas {
  width: 100%;
  height: 100%;
  min-height: 440px;
  display: block;
}

.no-skin-msg {
  position: absolute;
  inset: auto 18px 18px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.info-block,
.mod-request-list,
.admin-user-list {
  gap: 10px;
}

.info-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.info-label {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.info-value {
  font-weight: 700;
}

.badge {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.badge-green {
  background: rgba(121, 248, 164, 0.12);
  color: #d6ffe5;
}

.badge-gray {
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
}

.mc-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
}

.file-input-hidden {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.mc-file-label {
  position: relative;
  justify-content: flex-start;
  width: 100%;
  min-height: 52px;
}

.btn-clear {
  min-width: 48px;
}

.preview-info,
.mod-url-box,
.empty-state,
.admin-loading,
.mod-request-item,
.admin-user-item {
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.mod-url-box {
  word-break: break-all;
}

.promo-card {
  min-height: 118px;
  display: grid;
  align-items: end;
}

.promo-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.34;
}

.promo-card span,
.promo-card-content {
  position: relative;
  z-index: 1;
  padding: 18px;
}

.promo-card span,
.promo-card strong {
  font-family: "Press Start 2P", monospace;
  font-size: 0.8rem;
}

.promo-card-dark .promo-card-content {
  display: grid;
  gap: 10px;
}

.promo-card-list {
  min-height: 158px;
}

.logout-nav {
  margin-top: auto;
}

.launcher-item-logout {
  border-color: rgba(255, 126, 126, 0.16);
}

.launcher-item-logout:hover {
  border-color: rgba(255, 126, 126, 0.3);
}

.mod-request-item,
.admin-user-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.mod-request-meta,
.admin-user-meta {
  display: grid;
  gap: 4px;
}

.admin-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

.section-actions {
  margin-top: 10px;
}

.admin-list-head,
.admin-user-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 82px 110px;
  gap: 12px;
  align-items: center;
}

.admin-list-head {
  margin: 4px 0 10px;
  padding: 0 6px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.82rem;
}

.admin-user-row {
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-user-name {
  display: grid;
  gap: 4px;
}

.admin-user-name small {
  color: var(--muted);
}

.admin-toggle {
  display: flex;
  justify-content: center;
}

.admin-toggle input {
  width: 18px;
  height: 18px;
}

.admin-row-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.admin-icon-btn {
  min-width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.admin-icon-btn:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
}

.admin-icon-btn-danger {
  background: rgba(255, 126, 126, 0.14);
  border-color: rgba(255, 126, 126, 0.24);
}

.wip-card {
  padding: 24px;
  min-height: 160px;
}

.wip-tag {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 230, 123, 0.12);
  border: 1px solid rgba(255, 230, 123, 0.24);
  color: #fff1b1;
  font-weight: 700;
}

.login-footer {
  margin-top: 18px;
}

[hidden] {
  display: none !important;
}

@keyframes grid-drift {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(0, 42px, 0);
  }
}

@keyframes pulse-fade {
  0%,
  100% {
    opacity: 0.03;
  }
  50% {
    opacity: 0.07;
  }
}

@media (max-width: 1360px) {
  .launcher-app {
    grid-template-columns: 250px minmax(0, 1fr) 250px;
  }
}

@media (max-width: 1080px) {
  .launcher-app {
    grid-template-columns: 1fr;
  }

  .launcher-left,
  .launcher-right {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .launcher-topbar,
  .home-layout,
  .feature-layout,
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .topbar-meta {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .login-wrapper,
  .launcher-app {
    width: min(100% - 20px, 100%);
  }

  .launcher-left,
  .launcher-right,
  .status-grid {
    grid-template-columns: 1fr;
  }

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

  .launcher-topbar {
    padding: 16px;
  }

  .feature-panel,
  .account-panel,
  .wip-card {
    padding: 16px;
  }

  .viewer-panel {
    min-height: 480px;
  }

  .viewer-wrap,
  #skin-canvas {
    min-height: 360px;
  }

  .logo-top {
    line-height: 1.3;
  }
}

.feature-panel-title {
  margin-bottom: 10px;
}

.status-grid,
.news-feed,
.viewer-wrap,
.info-block,
.mod-request-list,
.admin-user-list {
  margin-top: 10px;
}
