:root {
  --bg: #000000;
  --white: #ffffff;
  --nav-height: 90px;
  --font: "Space Grotesk", "Cabinet Grotesk", Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--white);
  font-family: var(--font);
  min-height: 100vh;
}

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

/* ---------- Nav ---------- */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  padding: 20px 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 1000;
  transition: background 0.4s ease, border-color 0.4s ease;
}

.nav.scrolled {
  background: rgba(0, 0, 0, 0.8);
  border-bottom-color: rgba(255, 255, 255, 0.18);
}

.nav-glow {
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: min(1268px, 90%);
  height: 1px;
  overflow: hidden;
  pointer-events: none;
}

.nav-glow::before {
  content: '';
  position: absolute;
  top: 0;
  left: -30%;
  width: 30%;
  height: 100%;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0));
  animation: glow-sweep 3.5s ease-in-out infinite alternate;
}

@keyframes glow-sweep {
  from { left: -30%; }
  to { left: 100%; }
}

.nav-container {
  max-width: 1800px;
  height: 100%;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */

.nav-logo {
  display: flex;
  align-items: center;
  gap: 15px;
}

.logo-mark {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(255, 255, 255, 0.18);
  flex-shrink: 0;
  /* empty on purpose — drop the real logo in here whenever it's ready */
}

.logo-ring {
  position: absolute;
  inset: -5px;
  border-radius: 13px;
  padding: 1px;
  background: conic-gradient(from var(--ring-angle, 0deg), rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: ring-spin 4s linear infinite;
  pointer-events: none;
}

@keyframes ring-spin {
  to { --ring-angle: 360deg; }
}

@property --ring-angle {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}

.logo-text {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 2px;
  white-space: nowrap;
  background: linear-gradient(110deg, #fff 30%, rgba(255, 255, 255, 0.45) 50%, #fff 70%);
  background-size: 220% 100%;
  background-position: 200% 0;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 18px rgba(255, 255, 255, 0.25);
  transition: background-position 0.9s ease, text-shadow 0.4s ease;
}

.nav-logo:hover .logo-text {
  background-position: 0 0;
  text-shadow: 0 0 26px rgba(255, 255, 255, 0.45);
}

/* Right-hand cluster: links + actions, all pushed to the right of the logo */

.nav-right {
  display: flex;
  align-items: center;
  gap: 48px;
}

.nav-menu {
  display: flex;
  align-items: center;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 40px;
  list-style: none;
}

.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  padding: 10px 0;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  transition: color 0.25s ease, transform 0.25s ease, text-shadow 0.25s ease;
}

.nav-link:hover {
  color: var(--white);
  transform: translateY(-2px);
  text-shadow: 0 0 16px rgba(255, 255, 255, 0.5);
}

/* Actions */

.nav-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-signin {
  position: relative;
  padding: 12px 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.06));
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: var(--white);
  overflow: hidden;
  box-shadow: 0 0 0 rgba(255, 255, 255, 0);
}

.btn-signin span {
  position: relative;
  z-index: 1;
}

.btn-signin::before {
  content: '';
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.5) 50%, rgba(255, 255, 255, 0) 100%);
  transform: skewX(-20deg);
  transition: left 0.6s ease;
}

.btn-signin:hover {
  border-color: rgba(255, 255, 255, 0.45);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 255, 255, 0.12), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.btn-signin:hover::before {
  left: 125%;
}

.btn-signin:active {
  transform: translateY(0);
}

/* Mobile toggle (hidden on desktop) */

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--white);
  transition: 0.3s ease;
}

.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 860px) {
  .nav-container { padding: 0 20px; }

  .nav-toggle { display: flex; }

  .nav-menu {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
  }

  .nav-menu.open {
    max-height: 400px;
  }

  .nav-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 10px 20px 20px;
  }

  .nav-link {
    width: 100%;
    align-items: flex-start;
    padding: 14px 0;
  }

  .nav-link:hover {
    transform: none;
  }

  .logo-text { font-size: 19px; }
}

main {
  padding-top: var(--nav-height);
}

/* ---------- Reveal-on-scroll ---------- */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding: 160px 24px 100px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(circle at 25% 20%, rgba(255, 255, 255, 0.07), transparent 55%),
    radial-gradient(circle at 78% 65%, rgba(255, 255, 255, 0.05), transparent 50%),
    #000;
  /* reserved for a background video/image later — swap this div for a <video> or <img> */
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  animation: hero-in 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes hero-in {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-title {
  font-size: clamp(40px, 7vw, 92px);
  font-weight: 900;
  letter-spacing: 1px;
  line-height: 1.05;
  text-transform: uppercase;
  background: linear-gradient(110deg, #fff 30%, rgba(255, 255, 255, 0.5) 50%, #fff 70%);
  background-size: 220% 100%;
  background-position: 200% 0;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 50px rgba(255, 255, 255, 0.15);
  animation: hero-shimmer 7s ease-in-out infinite;
}

@keyframes hero-shimmer {
  0%, 100% { background-position: 200% 0; }
  50% { background-position: 0% 0; }
}

.hero-subtitle {
  margin-top: 20px;
  font-size: 18px;
  color: rgba(255, 255, 255, 0.6);
}

.hero-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 36px;
}

.btn-hero-primary,
.btn-hero-secondary {
  padding: 16px 34px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 15px;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

.btn-hero-primary,
.btn-hero-secondary,
.social-pill {
  isolation: isolate;
}

.btn-hero-primary { background: #fff; color: #000; }

.btn-hero-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(255, 255, 255, 0.25);
}

.btn-hero-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
}

.btn-hero-secondary span,
.btn-hero-primary span {
  position: relative;
  z-index: 1;
}

.btn-hero-secondary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.45) 50%, rgba(255, 255, 255, 0) 100%);
  transform: skewX(-20deg);
  transition: left 0.6s ease;
}

.btn-hero-secondary:hover {
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-3px);
}

.btn-hero-secondary:hover::before {
  left: 125%;
}

/* Stats */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 60px;
}

.stat-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 28px 16px;
  opacity: 0;
  animation: stat-in 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.07);
}

@keyframes stat-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Cards are already on screen at load — this is a quick load-in stagger,
   not a scroll trigger, so it can't feel laggy waiting to be noticed */
.stat-card:nth-child(1) { animation-delay: 0.3s; }
.stat-card:nth-child(2) { animation-delay: 0.36s; }
.stat-card:nth-child(3) { animation-delay: 0.42s; }
.stat-card:nth-child(4) { animation-delay: 0.48s; }

.stat-value {
  display: block;
  font-size: 32px;
  font-weight: 900;
}

.stat-label {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}

@media (max-width: 700px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Shared section title ---------- */

.section-title {
  font-size: clamp(30px, 5vw, 48px);
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-align: center;
}

/* ---------- Studio ---------- */

.studio {
  padding: 100px 24px;
}

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

.studio-text {
  margin-top: 20px;
  font-size: 16px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.65);
}

/* ---------- Shared pill components ---------- */

.pill-badge {
  display: inline-block;
  padding: 8px 20px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 16px;
}

.pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 40px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

.pill-btn.primary {
  color: var(--white);
  border: 2px solid var(--white);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.05));
}

.pill-btn.primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(255, 255, 255, 0.2);
}

.pill-btn.secondary {
  color: rgba(255, 255, 255, 0.8);
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.pill-btn.secondary:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.6);
  color: var(--white);
}

/* ---------- Featured game ---------- */

.featured-game {
  padding: 80px 24px;
  max-width: 1400px;
  margin: 0 auto;
}

.featured-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 60px;
}

.featured-title {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 900;
  letter-spacing: -0.5px;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.featured-desc {
  font-size: 17px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 28px;
}

.mini-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 28px;
}

.mini-stat {
  padding: 18px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  text-align: center;
}

.mini-stat-value {
  display: block;
  font-size: 22px;
  font-weight: 900;
}

.mini-stat-label {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

.featured-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.featured-media {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
  aspect-ratio: 4 / 3;
}

.featured-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
}

@media (max-width: 860px) {
  .featured-grid { grid-template-columns: 1fr; }
  .featured-media { order: -1; }
  .mini-stats { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 500px) {
  .mini-stats { grid-template-columns: 1fr; }
}

/* ---------- Game library ---------- */

.game-library {
  padding: 40px 24px 100px;
  max-width: 1400px;
  margin: 0 auto;
}

.library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  margin-top: 48px;
}

.library-card.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  border-radius: 20px;
  border: 1px dashed rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.4);
  font-size: 14px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* ---------- Join section ---------- */

.join {
  padding: 120px 24px;
  text-align: center;
}

.join-title {
  font-size: clamp(30px, 5vw, 52px);
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.join-subtitle {
  margin-top: 16px;
  font-size: 16px;
  color: rgba(255, 255, 255, 0.6);
  transition-delay: 0.1s;
}

.social-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 40px;
  transition-delay: 0.2s;
}

.social-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.03);
  font-weight: 600;
  font-size: 15px;
  transition: border-color 0.3s ease, background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
}

.social-pill svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.social-pill:hover {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.09);
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(255, 255, 255, 0.08);
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 32px 40px;
}

.footer-bar {
  max-width: 1800px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-self: start;
}

.footer-logo {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.02));
  flex-shrink: 0;
}

.footer-copy {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
}

/* single row: brand left, links centered, icons right — all lined up together */
.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  justify-self: center;
}

.footer-links a {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
  transition: color 0.25s ease;
}

.footer-links a:hover {
  color: var(--white);
}

.footer-social-icons {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
  justify-self: end;
}

.footer-social-icons a {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.75);
  transition: border-color 0.25s ease, color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.footer-social-icons svg {
  width: 16px;
  height: 16px;
}

.footer-social-icons a:hover {
  border-color: rgba(255, 255, 255, 0.4);
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
}

@media (max-width: 700px) {
  .footer-bar {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .footer-brand,
  .footer-links,
  .footer-social-icons {
    justify-self: center;
  }
}

/* ---------- Games page ---------- */

.games-hero {
  padding: 180px 24px 60px;
  text-align: center;
}

.games-hero-title {
  font-size: clamp(40px, 8vw, 88px);
  font-weight: 900;
  letter-spacing: -1px;
  text-transform: uppercase;
  text-shadow: 0 0 40px rgba(255, 255, 255, 0.35);
}

.games-hero-subtitle {
  margin-top: 16px;
  font-size: 19px;
  color: rgba(255, 255, 255, 0.65);
}

.portal-section {
  padding: 20px 24px 120px;
  max-width: 1400px;
  margin: 0 auto;
}

.portal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 32px;
}

.game-portal {
  position: relative;
  aspect-ratio: 1 / 1;
  display: block;
}

.portal-inner {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 24px;
  overflow: hidden;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s ease;
}

.game-portal:hover .portal-inner {
  transform: translateY(-6px) scale(1.01);
  border-color: rgba(255, 255, 255, 0.3);
}

.portal-inner img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
  transition: transform 0.6s ease;
}

.game-portal:hover .portal-inner img {
  transform: scale(1.06);
}

.portal-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 32px;
  background: linear-gradient(rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0.95) 100%);
}

.portal-content h2 {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.portal-tagline {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 12px;
}

.portal-desc {
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.portal-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
}

.pill-badge.dev {
  background: rgba(94, 197, 224, 0.9);
  color: #001318;
}

.arrow-indicator {
  position: absolute;
  bottom: 32px;
  right: 32px;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: background 0.3s ease, transform 0.3s ease;
}

.arrow-indicator svg {
  width: 20px;
  height: 20px;
}

.game-portal:hover .arrow-indicator {
  background: var(--white);
  color: #000;
  transform: rotate(45deg);
}

.portal-glow {
  position: absolute;
  inset: -30%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0) 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.game-portal:hover .portal-glow {
  opacity: 1;
}

.game-portal.placeholder .portal-inner.placeholder-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  box-shadow: none;
  color: rgba(255, 255, 255, 0.4);
  font-size: 14px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* ---------- Sign in ---------- */

.signin-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 140px 24px 80px;
}

.signin-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #000;
}

.signin-blob {
  position: absolute;
  width: 50vw;
  height: 50vw;
  max-width: 600px;
  max-height: 600px;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
}

.signin-blob-1 {
  top: -10%;
  left: -10%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.12), transparent 70%);
  animation: blob-drift-1 16s ease-in-out infinite;
}

.signin-blob-2 {
  bottom: -15%;
  right: -10%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08), transparent 70%);
  animation: blob-drift-2 20s ease-in-out infinite;
}

@keyframes blob-drift-1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(6vw, 5vh) scale(1.15); }
}

@keyframes blob-drift-2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-5vw, -4vh) scale(1.1); }
}

.signin-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  padding: 48px 40px;
  border-radius: 20px;
  background: rgba(10, 10, 10, 0.7);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  text-align: center;
  overflow: hidden;
}

.signin-card-ring {
  position: absolute;
  inset: -1px;
  border-radius: 20px;
  padding: 1.5px;
  background: conic-gradient(from var(--ring-angle, 0deg), rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: ring-spin 5s linear infinite;
  pointer-events: none;
  z-index: 2;
}

/* entrance animation lives on the inner content, not the card itself — the
   card also gets .shake toggled on it, and if both used `animation` the
   entrance would replay every time shake finishes */
.signin-form-state {
  animation: signin-in 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes signin-in {
  from { opacity: 0; transform: translateY(24px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.signin-card.shake {
  animation: signin-shake 0.4s ease;
}

.apply-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 140px 24px 80px;
}

.apply-card {
  max-width: 480px;
  text-align: left;
}

.apply-card .signin-title,
.apply-card .signin-subtitle,
.apply-card .pill-badge {
  text-align: center;
}

@keyframes signin-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-10px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(4px); }
}

.signin-title {
  margin-top: 14px;
  font-size: 28px;
  font-weight: 900;
}

.signin-subtitle {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.6);
}

#signin-form {
  margin-top: 32px;
  text-align: left;
}

.field {
  margin-bottom: 18px;
}

.field label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.7);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 13px 16px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--white);
  font-family: var(--font);
  font-size: 15px;
  resize: vertical;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  padding-right: 40px;
}

.field select option {
  background: #111;
  color: var(--white);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.6);
  background-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.08);
}

.field-hint {
  font-weight: 400;
  color: rgba(255, 255, 255, 0.45);
}

.signin-error {
  min-height: 18px;
  margin: -6px 0 14px;
  font-size: 13px;
  color: #ff8080;
}

.signin-submit {
  position: relative;
  width: 100%;
  padding: 14px;
  border-radius: 10px;
  border: none;
  background: var(--white);
  color: #000;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease;
}

.signin-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(255, 255, 255, 0.2);
}

.signin-submit:disabled {
  cursor: default;
  opacity: 0.5;
  transform: none !important;
  box-shadow: none !important;
}

.field input:disabled {
  opacity: 0.5;
}

.signin-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.18);
  transform: scale(0);
  animation: signin-ripple 0.6s ease-out forwards;
  pointer-events: none;
}

@keyframes signin-ripple {
  to { transform: scale(1); opacity: 0; }
}

.signin-lockout {
  margin-top: 14px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
}

.signin-lockout strong {
  color: #ffb480;
}

.signin-submit::before {
  content: '';
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(115deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.15) 50%, rgba(0, 0, 0, 0) 100%);
  transform: skewX(-20deg);
  transition: left 0.6s ease;
}

.signin-submit:hover::before {
  left: 125%;
}

.signin-spinner {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border: 2px solid rgba(0, 0, 0, 0.2);
  border-top-color: #000;
  border-radius: 50%;
}

.signin-submit.loading .signin-submit-text {
  opacity: 0;
}

.signin-submit.loading .signin-spinner {
  display: block;
  animation: signin-spin 0.7s linear infinite;
}

@keyframes signin-spin {
  to { transform: rotate(360deg); }
}

.signin-form-state {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.signin-form-state.fade-out {
  opacity: 0;
  transform: scale(0.97);
  pointer-events: none;
}

.signin-success-state {
  display: none;
  padding: 20px 0;
}

.signin-success-state.show {
  display: block;
  animation: signin-in 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.signin-check {
  position: relative;
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(120, 255, 180, 0.12);
  border: 1px solid rgba(120, 255, 180, 0.4);
  color: #78ffb4;
  box-shadow: 0 0 40px rgba(120, 255, 180, 0.25);
  animation: check-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s both;
}

@keyframes check-pop {
  from { transform: scale(0.4); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.signin-check-burst {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1.5px solid rgba(120, 255, 180, 0.7);
  animation: check-burst 1s ease-out 0.2s;
}

@keyframes check-burst {
  from { transform: scale(1); opacity: 1; }
  to { transform: scale(2.4); opacity: 0; }
}

.signin-check svg {
  width: 30px;
  height: 30px;
  stroke-dasharray: 30;
  stroke-dashoffset: 30;
  animation: check-draw 0.4s ease-out 0.35s forwards;
}

@keyframes check-draw {
  to { stroke-dashoffset: 0; }
}

.signin-success-state h2 {
  font-size: 22px;
  font-weight: 900;
}

.signin-success-state p {
  margin-top: 8px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
}

/* ---------- Dashboard ---------- */

.dashboard-main {
  min-height: 100vh;
  padding: 140px 24px 100px;
  max-width: 1100px;
  margin: 0 auto;
}

.dashboard-gate {
  text-align: center;
  padding: 100px 0;
  color: rgba(255, 255, 255, 0.5);
}

.dash-header {
  margin-bottom: 48px;
  text-align: left;
}

.dash-title {
  text-align: left;
  font-size: clamp(28px, 4vw, 40px);
}

.dash-welcome {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 14px;
}

.dash-section {
  margin-bottom: 56px;
  animation: signin-in 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.dash-section-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.dash-section-head h2 {
  font-size: 22px;
  font-weight: 900;
}

.dash-badge {
  min-width: 26px;
  height: 26px;
  padding: 0 8px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
}

.dash-small-btn {
  margin-left: auto;
  padding: 10px 20px;
  font-size: 13px;
}

.dash-empty {
  color: rgba(255, 255, 255, 0.45);
  font-size: 14px;
}

/* Panel tabs */

.panel-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  flex-wrap: wrap;
}

.panel-tab {
  padding: 12px 20px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: rgba(255, 255, 255, 0.5);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.panel-tab:hover {
  color: rgba(255, 255, 255, 0.85);
}

.panel-tab.active {
  color: var(--white);
  border-bottom-color: #ffb480;
}

.panel-view {
  animation: signin-in 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Directories (Developer / Staff lists) */

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

.directory-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.directory-row .role-badge {
  margin-left: auto;
}

/* Placeholder cards — features from the spec without a working backend yet */

.panel-placeholders {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 8px;
}

.panel-placeholder-card {
  padding: 20px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.15);
}

.panel-placeholder-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.panel-placeholder-head h3 {
  font-size: 15px;
  font-weight: 700;
}

.panel-placeholder-badge {
  flex-shrink: 0;
  padding: 3px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.55);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.panel-placeholder-card p {
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.5);
}

/* Generic inline forms (automod, member search, slowmode, rank editor) */

.inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
  align-items: center;
}

.inline-form input[type="text"],
.inline-form input[type="number"],
.inline-form select {
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--white);
  font-family: var(--font);
  font-size: 14px;
}

.inline-form .pill-btn {
  padding: 10px 18px;
  font-size: 13px;
}

.rank-derank-check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
}

#rules-form textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--white);
  font-family: var(--font);
  font-size: 14px;
  resize: vertical;
  margin-bottom: 12px;
}

.ticket-filter {
  margin-left: auto;
  padding: 8px 32px 8px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--white);
  font-family: var(--font);
  font-size: 12px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 14px;
}

/* Shared row list styling (breaks, payments, tickets, logs, shop, giveaways, members) */

.break-list, .payments-list, .messages-list, .tickets-list, .log-list,
.automod-list, .members-list, .shop-list, .giveaways-list, .rank-editor-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.break-row, .payment-row, .message-row, .ticket-row, .log-row,
.automod-row, .member-row, .shop-row, .giveaway-row, .rank-editor-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  flex-wrap: wrap;
}

.ticket-row, .message-row {
  flex-direction: column;
  align-items: stretch;
}

.break-row .app-message, .log-row .app-message {
  width: 100%;
  margin-top: 4px;
}

.ticket-row-head {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
}

.message-row.unread {
  border-color: rgba(255, 180, 128, 0.4);
}

.break-row > div:first-child, .payment-row > div:first-child, .member-row > div:first-child, .shop-row > div:first-child, .giveaway-row > div:first-child {
  flex: 1;
  min-width: 200px;
}

.break-row .app-actions, .member-row .app-actions, .giveaway-row .app-actions {
  margin-left: auto;
}

.automod-row {
  justify-content: space-between;
}

.automod-delete, .rank-delete {
  margin-left: auto;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}

.automod-delete:hover, .rank-delete:hover {
  background: rgba(255, 100, 100, 0.15);
  color: #ff8080;
  border-color: rgba(255, 100, 100, 0.3);
}

.member-currency-input {
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--white);
  font-family: var(--font);
  font-size: 13px;
}

.account-discord-input {
  width: 140px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--white);
  font-family: var(--font);
  font-size: 12px;
}

.account-reset-btn {
  padding: 8px 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.75);
  font-family: var(--font);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.account-reset-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Server status tiles */

.status-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
}

.status-tile {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}

.status-tile-value {
  font-size: 28px;
  font-weight: 900;
}

.status-tile-label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

/* Applications */

.applications-list {
  display: grid;
  gap: 16px;
}

.app-card {
  padding: 24px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.app-card-resolving {
  opacity: 0.5;
  pointer-events: none;
}

.app-card-gone {
  opacity: 0;
  transform: scale(0.96);
}

.app-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.app-card-head h3 {
  margin-top: 8px;
  font-size: 18px;
  font-weight: 700;
}

.group-check {
  flex-shrink: 0;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.group-check.in {
  background: rgba(120, 255, 180, 0.14);
  color: #78ffb4;
  border: 1px solid rgba(120, 255, 180, 0.3);
}

.group-check.out {
  background: rgba(255, 128, 128, 0.14);
  color: #ff8080;
  border: 1px solid rgba(255, 128, 128, 0.3);
}

.app-message {
  margin-top: 14px;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.7);
}

.app-links {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.app-links a {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
  text-decoration: underline;
  word-break: break-all;
}

.app-links a:hover {
  color: var(--white);
}

.app-actions {
  display: flex;
  gap: 12px;
  margin-top: 18px;
}

.app-actions .pill-btn {
  padding: 10px 24px;
  font-size: 13px;
}

/* Tasks */

.tasks-list {
  display: grid;
  gap: 16px;
}

.task-card {
  padding: 24px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: opacity 0.35s ease;
}

.task-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.task-number {
  margin-left: 10px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.45);
}

.task-status {
  flex-shrink: 0;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.task-status-open { background: rgba(255, 255, 255, 0.1); color: rgba(255, 255, 255, 0.8); }
.task-status-claimed { background: rgba(128, 200, 255, 0.14); color: #80c8ff; }
.task-status-price_pending { background: rgba(255, 200, 100, 0.16); color: #ffc864; }
.task-status-in_progress { background: rgba(180, 255, 128, 0.16); color: #b4ff80; }
.task-status-submitted { background: rgba(200, 150, 255, 0.16); color: #c896ff; }
.task-status-completed { background: rgba(120, 255, 180, 0.16); color: #78ffb4; }
.task-status-cancelled { background: rgba(255, 128, 128, 0.14); color: #ff8080; }

.task-meta {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
}

.task-price-reason {
  margin-top: 10px;
  font-size: 13px;
  color: #ff8080;
}

/* Accounts table */

.accounts-table {
  display: grid;
  gap: 10px;
}

.account-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.account-delete-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(255, 128, 128, 0.3);
  background: rgba(255, 128, 128, 0.1);
  color: #ff8080;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.account-delete-btn:hover {
  background: rgba(255, 128, 128, 0.2);
  border-color: rgba(255, 128, 128, 0.5);
  transform: scale(1.08);
}

.account-row-name {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 140px;
}

.account-row-username {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
}

.account-row-manager {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
}

.role-badge {
  justify-self: start;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

/* Fallback coloring by track for the wider rank list — sits before the
   specific overrides below so owner/co-owner/etc keep their own colors */
.role-badge[data-track="top"] { background: rgba(255, 180, 128, 0.16); color: #ffb480; }
.role-badge[data-track="staff"] { background: rgba(180, 255, 128, 0.16); color: #b4ff80; }
.role-badge[data-track="development"] { background: rgba(128, 200, 255, 0.16); color: #80c8ff; }

.role-owner { background: rgba(255, 180, 128, 0.16); color: #ffb480; }
.role-co-owner { background: rgba(255, 128, 200, 0.16); color: #ff80c8; }
.role-project-manager { background: rgba(128, 200, 255, 0.16); color: #80c8ff; }
.role-staff { background: rgba(180, 255, 128, 0.16); color: #b4ff80; }
.role-developer { background: rgba(255, 255, 255, 0.12); color: rgba(255, 255, 255, 0.85); }

.pyramid-node-rank {
  display: block;
  font-size: 10px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.45);
}

.account-role-select {
  justify-self: end;
  padding: 8px 32px 8px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--white);
  font-family: var(--font);
  font-size: 12px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 12px;
}

.account-role-select:disabled {
  opacity: 0.5;
  cursor: default;
}

@media (max-width: 700px) {
  .account-row {
    grid-template-columns: 1fr;
    justify-items: start;
  }
  .account-role-select { justify-self: start; }
}

/* Org pyramid */

.pyramid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  padding: 40px 20px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.pyramid-tier {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.pyramid-tier-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
}

.pyramid-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.pyramid-node {
  padding: 10px 20px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 14px;
  font-weight: 700;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.pyramid-node:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.4);
}

.pyramid-node.empty {
  background: transparent;
  border-style: dashed;
  color: rgba(255, 255, 255, 0.35);
  font-weight: 400;
}

.pyramid-node.pm {
  background: rgba(128, 200, 255, 0.14);
  border-color: rgba(128, 200, 255, 0.35);
  color: #80c8ff;
}

.pyramid-node.dev {
  font-size: 13px;
  padding: 8px 16px;
}

.pyramid-branches {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 48px;
}

.pyramid-branch {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.pyramid-branch-line {
  width: 1px;
  height: 20px;
  background: rgba(255, 255, 255, 0.15);
}

.pyramid-branch-devs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  max-width: 260px;
}

/* Modals */

.modal-backdrop[hidden] {
  display: none;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  padding: 24px;
  animation: signin-in 0.25s ease both;
}

.modal-card {
  width: 100%;
  max-width: 420px;
  padding: 40px;
  border-radius: 20px;
  background: rgba(15, 15, 15, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  text-align: center;
}

.modal-card h2 {
  font-size: 22px;
  font-weight: 900;
}

.modal-note {
  margin-top: 8px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
}

.modal-card form {
  text-align: left;
  margin-top: 24px;
}

.modal-cancel {
  width: 100%;
  margin-top: 10px;
  padding: 12px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-family: var(--font);
  font-size: 13px;
  cursor: pointer;
}

.modal-cancel:hover {
  color: var(--white);
}

.password-reveal {
  margin: 24px 0;
  padding: 20px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.password-reveal strong {
  display: block;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 8px;
}

.password-reveal code {
  display: block;
  font-size: 16px;
  font-family: 'Courier New', monospace;
  word-break: break-all;
  color: #78ffb4;
}
