:root {
  --background: #111215;
  --foreground: #F3F4F6;
  --card: #18191E;
  --primary: #8B6CF6;
  --primary-foreground: #0E0F12;
  --secondary: #22232A;
  --destructive: #EF4444;
  --muted: #1C1D22;
  --muted-foreground: #9CA3AF;
  --border: #2B2D37;
}

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

body {
  background: var(--background);
  color: var(--foreground);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  min-height: 100vh;
  padding: 1rem;
}

main {
  background: var(--card);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 0 auto;
  max-width: 480px;
  padding: 0.875rem;
  width: 100%;
}

header, .rowSetting, #sessionList li {
  align-items: center;
  display: flex;
  justify-content: space-between;
  width: 100%;
}

header h1 {
  font-size: 1.125rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}

#statusText {
  color: var(--muted-foreground);
  font-size: 0.75rem;
}

nav {
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 1.25rem;
  margin-bottom: 0.25rem;
  width: 100%;
}

nav button {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--muted-foreground);
  cursor: pointer;
  font-size: 0.8125rem;
  padding: 0.4rem 0.1rem;
}

nav button.active {
  border-bottom-color: var(--primary);
  color: var(--foreground);
  font-weight: 500;
}

section, form, #viewHome, #viewAccount {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
}

#formSend {
  flex-direction: row;
}

[hidden] {
  display: none !important;
}

h2 {
  color: var(--foreground);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-align: left;
  width: 100%;
}

#viewAccount h2:not(:first-child) {
  margin-top: 1.5rem;
}

.rowSetting {
  min-height: 2.25rem;
  padding: 0.35rem 0;
}

.rowSetting + .rowSetting,
#sessionList li + li {
  border-top: 1px solid var(--border);
}

.rowSetting > span {
  color: var(--foreground);
  font-size: 0.8125rem;
}

ul {
  display: flex;
  flex-direction: column;
  list-style: none;
  width: 100%;
}

#textList {
  gap: 0.5rem;
  margin-top: 0.25rem;
}

#textList li {
  align-items: center;
  background: var(--muted);
  border: 1px solid var(--border);
  display: flex;
  font-size: 0.8125rem;
  justify-content: space-between;
  min-height: 1.75rem;
  padding: 0.35rem 0.5rem;
  width: 100%;
}

#textList li span {
  flex: 1;
}

#sessionList {
  margin-top: 0.25rem;
}

#sessionList li {
  min-height: 2.5rem;
  padding: 0.35rem 0;
}

#sessionList li > div {
  align-items: center;
  display: flex;
  gap: 0.5rem;
}

#sessionList li span,
#codeDisplay {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

#sessionList li span {
  color: var(--foreground);
  font-size: 0.8125rem;
}

.badgeCurrent {
  background: #0f2744;
  border: 1px solid #1e3a8a;
  color: #60a5fa;
  font-family: sans-serif;
  font-size: 0.7rem;
  padding: 0.1rem 0.4rem;
}

input, button {
  background: var(--secondary);
  border: 1px solid var(--border);
  color: var(--foreground);
  cursor: pointer;
  font-size: 0.8125rem;
  min-height: 2rem;
  padding: 0.5rem;
  width: 100%;
}

input {
  background: var(--muted);
  cursor: text;
}

#formSend input {
  flex: 1;
  width: auto;
}

#formSend button {
  width: auto;
}

#boxCode {
  align-items: center;
  background: var(--muted);
  border: 1px solid var(--border);
  display: inline-flex;
  gap: 0.5rem;
  min-height: 1.85rem;
  padding: 0.2rem 0.5rem;
}

#codeDisplay {
  color: var(--foreground);
  font-size: 0.75rem;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

li button, #btnCopy, #btnLeave, #btnDelete {
  background: transparent;
  border: none;
  color: var(--muted-foreground);
  cursor: pointer;
  font-size: 0.75rem;
  min-height: auto;
  padding: 0.2rem 0.4rem;
  width: auto;
}

#btnCopy {
  display: inline-flex;
  justify-content: center;
  min-width: 3.25rem;
  text-align: center;
}

li button:hover, #btnCopy:hover, #btnLeave:hover {
  color: var(--foreground);
}

#btnDelete {
  color: var(--destructive);
}

#btnDelete:hover {
  color: #f87171;
}

#btnLogin, #btnSignup {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-foreground);
  font-weight: 500;
}

@media (max-width: 480px) {
  body, main {
    padding: 0.5rem;
  }
}
