#boot-loader {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: #000000;
  z-index: 100;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

html[data-session="guest"] #home-profile-link,
html[data-session="guest"] #home-message-link,
html[data-session="guest"] [data-logout] {
  display: none !important;
}

html[data-session="connected"] #login-link,
html[data-session="connected"] #register-link {
  display: none !important;
}

body.ready #boot-loader {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.boot-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  padding: 28px 36px;
  border: 4px solid #0BFF01;
  background: #000000;
  box-shadow: 0 0 0 6px rgba(11, 255, 1, 0.2), 0 0 30px rgba(11, 255, 1, 0.15);
}

.boot-logo {
  font-family: "VT323", monospace;
  font-size: 1.1rem;
  letter-spacing: 0.2em;
  color: #0BFF01;
  text-shadow: 0 0 10px rgba(11, 255, 1, 0.8);
}

.loading-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.dot {
  width: 14px;
  height: 14px;
  background: #FEFCE5;
  box-shadow: 0 0 0 2px rgba(254, 252, 229, 0.35), 0 0 10px rgba(254, 252, 229, 0.8);
  opacity: 0;
  animation: pixelBlink 0.8s steps(1, end) infinite;
}

.dot:nth-child(1) {
  animation-delay: 0.1s;
}

.dot:nth-child(2) {
  animation-delay: 0.3s;
}

.dot:nth-child(3) {
  animation-delay: 0.5s;
}

@keyframes pixelBlink {
  0%, 100% {
    opacity: 0;
    transform: scale(0.7);
  }
  30%, 70% {
    opacity: 1;
    transform: scale(1);
  }
}

.site-shell {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

body.ready .site-shell {
  opacity: 1;
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  width: min(1200px, calc(100% - 24px));
  margin: 24px auto 28px;
  border: 4px solid #0BFF01;
  background: rgba(0, 0, 0, 0.9);
  box-shadow: 10px 10px 0 rgba(11, 255, 1, 0.16);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  padding: 14px 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #FEFCE5;
  font-family: "VT323", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 3px solid #0BFF01;
  background: #000000;
  color: #0BFF01;
  font-family: "VT323", monospace;
  font-size: 0.72rem;
  box-shadow: 4px 4px 0 #FEFCE5;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-links a {
  color: #FEFCE5;
  font-family: "VT323", monospace;
  text-transform: uppercase;
  font-size: 0.52rem;
  letter-spacing: 0.08em;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

.nav-links a:hover {
  color: #0BFF01;
  text-shadow: 0 0 8px rgba(11, 255, 1, 0.5);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-actions [data-message-navigation] {
  margin-left: 16px;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 76px 0 28px;
  background: linear-gradient(180deg, #000000 0%, #0b0b0b 100%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(11, 255, 1, 0.08), transparent 30%, rgba(254, 252, 229, 0.04));
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 48px;
}

.hero-copy {
  color: white;
}

.hero-copy h1 {
  margin: 18px 0 20px;
  font-family: "VT323", monospace;
  font-size: clamp(1.7rem, 3vw, 3.3rem);
  line-height: 1.4;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #FEFCE5;
  text-shadow: 4px 4px 0 rgba(11, 255, 1, 0.8);
}

.hero-copy p {
  max-width: 586px;
  margin: 0 0 30px;
  color: rgba(254, 252, 229, 0.8);
  font-size: 1.25rem;
  line-height: 1.6;
  font-family: "VT323", monospace;
}

.hero-cta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 32px;
}

.hero-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.metric {
  min-width: 130px;
}

.metric strong {
  display: block;
  font-size: clamp(1.4rem, 2vw, 2.1rem);
  letter-spacing: -0.05em;
}

.metric span {
  color: rgba(228, 234, 255, 0.7);
  font-size: 0.92rem;
}

.hero-visual {
  position: relative;
  display: grid;
  place-items: center;
}

.welcome-terminal {
  width: min(100%, 520px);
  border: 4px solid #0BFF01;
  background: #000000;
  box-shadow: 10px 10px 0 rgba(254, 252, 229, 0.18);
  animation: terminalBoot 0.8s steps(4, end) both;
}

.terminal-bar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 2px solid #0BFF01;
  color: #FEFCE5;
  font-family: "VT323", monospace;
  font-size: 0.55rem;
}

.terminal-screen {
  min-height: 310px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 24px;
  padding: 28px;
  background: repeating-linear-gradient(0deg, rgba(11, 255, 1, 0.04) 0 2px, transparent 2px 6px);
  color: #0BFF01;
  text-align: center;
  font-family: "VT323", monospace;
  font-size: 0.72rem;
  line-height: 1.8;
}

.terminal-symbol {
  font-size: 2.8rem;
  color: #FEFCE5;
  text-shadow: 5px 5px 0 #0BFF01;
  animation: terminalPulse 1.3s steps(2, end) infinite;
}

.terminal-cursor { animation: terminalPulse 0.75s steps(2, end) infinite; }

.promotion-media { padding: 12px; border-top: 2px solid #0BFF01; }
.promotion-media img, .promotion-media video { width: 100%; max-height: 260px; object-fit: contain; }

@keyframes terminalBoot { from { opacity: 0; transform: scaleY(0.1); } to { opacity: 1; transform: scaleY(1); } }
@keyframes terminalPulse { 50% { opacity: 0.35; } }

.dashboard-card {
  position: relative;
  width: min(100%, 520px);
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  background: rgba(16, 24, 40, 0.9);
  box-shadow: 0 24px 60px rgba(6, 10, 20, 0.45);
}

.app-window {
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(180deg, #f7f9ff 0%, #eef4ff 100%);
}

.window-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  background: rgba(15, 23, 42, 0.03);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.dots {
  display: flex;
  gap: 8px;
}

.dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: block;
}

.dots span:nth-child(1) { background: #ff7f6a; }
.dots span:nth-child(2) { background: #f9c75a; }
.dots span:nth-child(3) { background: #53d08a; }

.window-title {
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 700;
}

.window-body {
  display: grid;
  grid-template-columns: 180px 1fr;
  min-height: 420px;
}

.sidebar {
  background: #ffffff;
  padding: 18px 14px;
  border-right: 1px solid rgba(15, 23, 42, 0.08);
}

.room {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--text);
  font-weight: 600;
}

.room.active {
  background: linear-gradient(135deg, rgba(91, 124, 255, 0.12), rgba(124, 231, 199, 0.2));
  color: var(--primary-dark);
}

.room-badge {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--secondary);
}

.chat {
  padding: 20px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.message {
  display: flex;
  gap: 12px;
  max-width: 84%;
}

.message.me {
  margin-left: auto;
  flex-direction: row-reverse;
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary) 0%, #8d9cff 100%);
  color: white;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 800;
}

.message-box {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.06);
  color: var(--text);
  line-height: 1.5;
  font-size: 0.9rem;
}

.message.me .message-box {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
}

.floating-card {
  position: absolute;
  right: -18px;
  bottom: 24px;
  width: 220px;
  padding: 16px 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: var(--shadow);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.floating-card strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
  font-size: 1.1rem;
}

.floating-card span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
}

.features,
.steps,
.cta-band {
  padding: 120px 0 0;
}

.features-wrap,
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 40px;
}

.feature-card,
.step-card,
.feature-card,
.step-card {
  background: #FEFCE5;
  border: 4px solid #000000;
  box-shadow: 8px 8px 0 rgba(11, 255, 1, 0.25);
}

.feature-card {
  padding: 28px 24px;
}

.feature-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(91, 124, 255, 0.12), rgba(124, 231, 199, 0.18));
  color: var(--primary-dark);
  font-size: 1.45rem;
  margin-bottom: 18px;
}

.feature-card h3,
.step-card h3 {
  margin: 0 0 12px;
  font-family: "VT323", monospace;
  font-size: 0.9rem;
  line-height: 1.6;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
}

.feature-card p,
.step-card p {
  margin: 0;
  color: var(--muted);
  font-size: 1.18rem;
  line-height: 1.5;
  font-family: "VT323", monospace;
}

.steps-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.step-card {
  padding: 28px 22px;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  margin-bottom: 18px;
  background: linear-gradient(135deg, #0f172a, #23314d);
  color: white;
  font-weight: 800;
}

.cta-band {
  padding-bottom: 120px;
}

.cta-card {
  padding: 48px 42px;
  border: 4px solid #0BFF01;
  background: #000000;
  color: #FEFCE5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  box-shadow: 10px 10px 0 rgba(11, 255, 1, 0.3);
}

.cta-card h2 {
  margin: 0 0 10px;
  font-family: "VT323", monospace;
  font-size: clamp(1.2rem, 2.5vw, 2.4rem);
  line-height: 1.5;
  text-transform: uppercase;
  color: #FEFCE5;
}

.cta-card p {
  margin: 0;
  color: rgba(254, 252, 229, 0.8);
  font-size: 1.25rem;
  line-height: 1.5;
  font-family: "VT323", monospace;
}

.site-footer {
  padding: 28px 0 60px;
  color: rgba(228, 234, 255, 0.65);
  background: #090d18;
  border-top: 4px solid #7ef9ff;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.footer-links a {
  color: rgba(228, 234, 255, 0.75);
  font-family: "VT323", monospace;
  font-size: 0.54rem;
  text-transform: uppercase;
}

@media (max-width: 980px) {
  .hero-grid,
  .features-wrap,
  .steps-grid,
  .cta-card {
    grid-template-columns: 1fr;
    display: grid;
  }

  .nav-links {
    display: none;
  }

  .hero {
    padding-top: 52px;
  }

  .cta-card {
    display: grid;
    align-items: start;
  }
}

@media (max-width: 640px) {
  .hero-cta,
  .nav-actions,
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .dashboard-card {
    padding: 14px;
  }

  .window-body {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-right: none;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  }

  .floating-card {
    position: static;
    margin-top: 16px;
    width: 100%;
  }
}
