:root {
  color-scheme: dark;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  background: #08090d;
  color: #f2f4f8;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 0%, rgba(148, 54, 255, 0.22), transparent 36%),
    linear-gradient(180deg, #11131a 0%, #08090d 100%);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.phone-shell {
  width: min(100%, 440px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 18px 16px 24px;
}

.topbar,
.stats,
.tabs,
.tweet,
.dm-card,
.message,
.reply-form {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(17, 19, 27, 0.88);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  margin-top: 3px;
  font-size: 20px;
}

h2 {
  font-size: 17px;
}

.eyebrow,
.section-heading span,
.stats span,
.meta {
  color: #aeb4c3;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.connection {
  border-radius: 999px;
  padding: 6px 9px;
  background: rgba(240, 177, 64, 0.16);
  color: #ffd88a;
  font-size: 11px;
}

.connection.online {
  background: rgba(49, 198, 119, 0.16);
  color: #7eecac;
}

.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 16px;
}

.stats div {
  display: grid;
  gap: 5px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.025);
}

.stats strong {
  overflow: hidden;
  color: #ffffff;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin: 12px 0;
  padding: 4px;
  border-radius: 14px;
}

.tab,
.back-button,
.reply-form button {
  border: 0;
  border-radius: 10px;
  padding: 10px 12px;
  background: transparent;
  color: #aeb4c3;
}

.tab.active,
.tab:focus,
.back-button,
.reply-form button {
  background: #8138f4;
  color: #ffffff;
}

button:focus,
input:focus {
  outline: 2px solid #dfc7ff;
  outline-offset: 2px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.section-heading,
.thread-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 15px 2px 10px;
}

.thread-heading {
  justify-content: flex-start;
}

.card-list,
.message-list {
  display: grid;
  gap: 9px;
}

.tweet,
.dm-card,
.message {
  border-radius: 14px;
  padding: 12px;
}

.tweet.player {
  border-color: rgba(143, 81, 255, 0.62);
}

.tweet-head,
.dm-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.handle {
  color: #b995ff;
  font-size: 12px;
}

.body,
.preview {
  margin-top: 7px;
  color: #e2e5ee;
  font-size: 14px;
  line-height: 1.42;
  white-space: pre-wrap;
}

.tweet-foot {
  margin-top: 9px;
  color: #aeb4c3;
  font-size: 12px;
}

.tweet-photo-frame {
  margin: 10px 0 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 13px;
  background: #05060a;
}

.tweet-photo {
  display: block;
  width: 100%;
  max-height: 270px;
  object-fit: cover;
  background: #05060a;
}

.tweet-photo-caption {
  padding: 7px 9px 8px;
  color: #aeb4c3;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dm-card {
  display: block;
  width: 100%;
  color: inherit;
  text-align: left;
}

.dm-card:hover,
.dm-card:focus {
  border-color: rgba(143, 81, 255, 0.8);
  background: rgba(35, 30, 49, 0.94);
}

.badge {
  min-width: 24px;
  border-radius: 999px;
  padding: 3px 7px;
  background: #8138f4;
  color: #ffffff;
  font-size: 11px;
  text-align: center;
}

.message-list {
  max-height: calc(100vh - 345px);
  overflow-y: auto;
  padding: 2px 0 8px;
}

.message {
  max-width: 84%;
  justify-self: start;
  color: #e2e5ee;
  font-size: 14px;
  line-height: 1.42;
  white-space: pre-wrap;
}

.message.player {
  justify-self: end;
  border-color: rgba(143, 81, 255, 0.6);
  background: #5f25bd;
  color: #ffffff;
}

.message .meta {
  display: block;
  margin-top: 7px;
}

.reply-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 8px;
  padding: 8px;
  border-radius: 14px;
}

.reply-form input {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9px;
  padding: 10px;
  background: #0e1017;
  color: #ffffff;
}

.empty {
  padding: 22px 12px;
  color: #aeb4c3;
  font-size: 13px;
  text-align: center;
}

.hidden {
  display: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
