* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background: #101114;
  color: white;
}

.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
}

.login-card {
  width: 100%;
  max-width: 380px;
  background: #191b20;
  border: 1px solid #2d3038;
  border-radius: 24px;
  padding: 28px;
  box-shadow: 0 20px 80px rgba(0,0,0,.35);
}

.logo {
  font-size: 46px;
  margin-bottom: 10px;
}

h1 {
  margin: 0;
  font-size: 28px;
}

.muted {
  color: #9ca3af;
  font-size: 14px;
}

input, button {
  font: inherit;
}

.login-card input {
  width: 100%;
  display: block;
  margin-top: 14px;
  padding: 14px 15px;
  border-radius: 14px;
  border: 1px solid #343844;
  background: #0f1115;
  color: white;
  outline: none;
}

.login-card button,
.composer button,
.small-btn {
  border: 0;
  border-radius: 14px;
  background: #ffffff;
  color: #111;
  font-weight: 700;
  cursor: pointer;
}

.login-card button {
  width: 100%;
  margin-top: 18px;
  padding: 14px 15px;
}

.error {
  color: #ff6b6b;
  min-height: 20px;
}

.chat-body {
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: 58px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  border-bottom: 1px solid #272a33;
  background: #17191f;
}

.small-btn {
  padding: 8px 12px;
  font-size: 14px;
}

.messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.msg {
  max-width: 82%;
  padding: 10px 12px;
  border-radius: 18px;
  word-break: break-word;
}

.msg.mine {
  align-self: flex-end;
  background: #e8e8e8;
  color: #111;
  border-bottom-right-radius: 6px;
}

.msg.other {
  align-self: flex-start;
  background: #242833;
  color: #fff;
  border-bottom-left-radius: 6px;
}

.sender {
  font-size: 11px;
  opacity: .65;
  margin-bottom: 4px;
}

.text {
  white-space: pre-wrap;
}

.media-img,
.media-video {
  margin-top: 8px;
  max-width: 100%;
  max-height: 360px;
  border-radius: 14px;
  display: block;
}

.composer {
  flex: 0 0 auto;
  display: flex;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid #272a33;
  background: #17191f;
}

.composer input[type="text"] {
  flex: 1;
  min-width: 0;
  border: 1px solid #343844;
  border-radius: 14px;
  background: #0f1115;
  color: white;
  padding: 12px 14px;
  outline: none;
}

.composer button {
  padding: 0 16px;
}

.file-btn {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: #242833;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex: 0 0 auto;
}

.file-btn input {
  display: none;
}

.file-preview {
  min-height: 20px;
  padding: 0 12px 8px;
  color: #9ca3af;
  font-size: 12px;
  background: #17191f;
}

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

#notifyBtn {
  min-width: 42px;
}

.privacy-screen {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #101114;
  display: grid;
  place-items: center;
}

.privacy-screen.hidden {
  display: none;
}

.privacy-card {
  width: min(82vw, 340px);
  background: #191b20;
  border: 1px solid #2d3038;
  border-radius: 28px;
  padding: 34px 24px;
  text-align: center;
  box-shadow: 0 20px 80px rgba(0,0,0,.4);
}

.privacy-icon {
  width: 82px;
  height: 82px;
  margin: 0 auto 18px;
  border-radius: 26px;
  display: grid;
  place-items: center;
  background: #24283a;
  color: white;
  font-size: 42px;
}

.privacy-card h1 {
  margin: 0;
  font-size: 28px;
}

.privacy-card p {
  color: #9ca3af;
  margin: 8px 0 0;
}

/* Privacy screen forced v2 */
.privacy-screen {
  position: fixed !important;
  inset: 0 !important;
  z-index: 2147483647 !important;
  background: #101114 !important;
  display: grid;
  place-items: center;
}

.privacy-screen.hidden {
  display: none !important;
}

.privacy-card {
  width: min(82vw, 340px);
  background: #191b20;
  border: 1px solid #2d3038;
  border-radius: 28px;
  padding: 34px 24px;
  text-align: center;
  box-shadow: 0 20px 80px rgba(0,0,0,.4);
}

.privacy-icon {
  width: 82px;
  height: 82px;
  margin: 0 auto 18px;
  border-radius: 26px;
  display: grid;
  place-items: center;
  background: #24283a;
  color: white;
  font-size: 42px;
}

.privacy-card h1 {
  margin: 0;
  font-size: 28px;
}

.privacy-card p {
  color: #9ca3af;
  margin: 8px 0 0;
}

/* HARD PRIVACY MODE v3 */
.privacy-screen {
  position: fixed !important;
  inset: 0 !important;
  z-index: 2147483647 !important;
  background: #101114 !important;
  display: grid;
  place-items: center;
}

.privacy-screen.hidden {
  display: none !important;
}

.privacy-card {
  width: min(82vw, 340px);
  background: #191b20;
  border: 1px solid #2d3038;
  border-radius: 28px;
  padding: 34px 24px;
  text-align: center;
  box-shadow: 0 20px 80px rgba(0,0,0,.4);
}

.privacy-icon {
  width: 82px;
  height: 82px;
  margin: 0 auto 18px;
  border-radius: 26px;
  display: grid;
  place-items: center;
  background: #24283a;
  color: white;
  font-size: 42px;
}

.privacy-card h1 {
  margin: 0;
  font-size: 28px;
}

.privacy-card p {
  color: #9ca3af;
  margin: 8px 0 0;
}

body.privacy-active .messages,
body.privacy-active .composer,
body.privacy-active .file-preview,
body.privacy-active .topbar {
  filter: blur(18px);
  pointer-events: none;
  user-select: none;
}

/* ARCADE LOGIN PASSWORD ONLY */
.arcade-login-body {
  min-height: 100vh;
  margin: 0;
  overflow: hidden;
  background: #090d1f;
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

.arcade-bg {
  position: fixed;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10,15,35,.88), rgba(5,7,15,.96)),
    radial-gradient(circle at 50% 0%, rgba(96,165,250,.2), transparent 35%);
  z-index: 0;
}

.arcade-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 34px 34px;
  opacity: .7;
  transform: perspective(500px) rotateX(58deg) scale(1.7);
  transform-origin: bottom;
  bottom: -40%;
}

.orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(8px);
  opacity: .55;
}

.orb-one {
  width: 180px;
  height: 180px;
  background: #22d3ee;
  top: 8%;
  left: -40px;
}

.orb-two {
  width: 220px;
  height: 220px;
  background: #a855f7;
  right: -70px;
  top: 12%;
}

.orb-three {
  width: 150px;
  height: 150px;
  background: #22c55e;
  bottom: 8%;
  left: 30%;
}

.arcade-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 22px;
}

.arcade-card {
  width: 100%;
  max-width: 430px;
  border-radius: 34px;
  padding: 24px;
  background:
    linear-gradient(180deg, rgba(31, 41, 75, .96), rgba(11, 15, 32, .97));
  border: 1px solid rgba(255,255,255,.14);
  box-shadow:
    0 28px 90px rgba(0,0,0,.55),
    inset 0 1px 0 rgba(255,255,255,.12);
  position: relative;
}

.arcade-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.arcade-icon {
  width: 82px;
  height: 82px;
  border-radius: 26px;
  background: #202845;
  display: grid;
  place-items: center;
}

.arcade-icon span {
  font-size: 42px;
}

.arcade-stats {
  display: flex;
  gap: 8px;
}

.arcade-stats div {
  min-width: 66px;
  padding: 9px 10px;
  border-radius: 18px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.1);
  text-align: center;
}

.arcade-stats span {
  display: block;
  font-size: 10px;
  color: #9ca3af;
  letter-spacing: .18em;
}

.arcade-stats strong {
  display: block;
  font-size: 22px;
  margin-top: 3px;
}

.arcade-title p {
  margin: 0 0 6px;
  color: #67e8f9;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .16em;
}

.arcade-title h1 {
  margin: 0;
  font-size: 36px;
  line-height: 1;
  letter-spacing: -.05em;
}

.arcade-title span {
  display: block;
  margin-top: 8px;
  color: #aeb7c8;
}

.player-loaded {
  margin-top: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px;
  border-radius: 22px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.1);
}

.player-avatar {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #22d3ee, #a78bfa);
  color: #08111f;
  font-weight: 900;
}

.player-loaded div {
  flex: 1;
}

.player-loaded span {
  display: block;
  font-size: 10px;
  color: #9ca3af;
  letter-spacing: .16em;
  font-weight: 800;
}

.player-loaded strong {
  display: block;
  margin-top: 3px;
  font-size: 16px;
}

.player-loaded em {
  font-style: normal;
  color: #22c55e;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .1em;
}

.arcade-progress {
  margin: 22px 0;
  height: 13px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255,255,255,.08);
}

.arcade-progress div {
  width: 72%;
  height: 100%;
  background: linear-gradient(90deg, #22d3ee, #a78bfa, #22c55e);
}

.arcade-form {
  display: grid;
  gap: 14px;
}

.arcade-form label {
  display: grid;
  gap: 7px;
}

.arcade-form label span {
  font-size: 11px;
  color: #aeb7c8;
  font-weight: 800;
  letter-spacing: .12em;
}

.arcade-form input {
  width: 100%;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(3, 7, 18, .74);
  color: white;
  padding: 15px 16px;
  border-radius: 18px;
  outline: none;
  text-align: center;
  font-size: 18px;
  letter-spacing: .12em;
}

.arcade-form button {
  margin-top: 6px;
  border: 0;
  border-radius: 20px;
  padding: 16px 18px;
  background: linear-gradient(90deg, #22d3ee, #a78bfa);
  color: #07111f;
  font-weight: 950;
  letter-spacing: .04em;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 9px;
}

.arcade-error {
  min-height: 20px;
  margin: 12px 0 0;
  color: #fb7185;
  font-weight: 700;
  text-align: center;
}

.arcade-footer {
  margin-top: 18px;
  display: flex;
  justify-content: space-between;
  color: #7f8aa3;
  font-size: 11px;
  letter-spacing: .08em;
}

.msg-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  justify-content: flex-end;
}

.msg-action {
  border: 0;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  background: rgba(0,0,0,.12);
  color: inherit;
}

.msg.mine .msg-action {
  background: rgba(0,0,0,.1);
  color: #111;
}

.msg.other .msg-action {
  background: rgba(255,255,255,.1);
  color: #fff;
}

.edited-label {
  opacity: .7;
  font-size: 10px;
  margin-left: 4px;
}
