/* Base */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #050505;
  color: #f5f5f5;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow: hidden;
}

/* Login */

.login-layer {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at top, #202020 0, #050505 55%);
  z-index: 20;
}

.login-layer.active {
  display: flex;
}

.login-card {
  background: #111;
  border-radius: 16px;
  padding: 24px;
  width: 90%;
  max-width: 420px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.7);
}

.login-card h1 {
  margin: 0 0 8px 0;
}

.primary-button {
  background: linear-gradient(135deg, #2f7cff, #00b3ff);
  color: #fff;
  border: none;
  padding: 12px;
  margin: 10px 0;
  width: 100%;
  font-size: 16px;
  border-radius: 999px;
  cursor: pointer;
}

.primary-button:active {
  transform: translateY(1px);
  filter: brightness(0.9);
}

/* App shell */

.app-shell {
  position: fixed;
  inset: 0;
  overflow: hidden;
}

.app-shell.hidden {
  display: none;
}

/* Layer track (vertical swipe) */

.layer-track {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* Each layer */

.layer {
  min-height: 100vh;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Card track (horizontal swipe) */

.card-track {
  display: flex;
  flex-direction: row;
  gap: 16px;
  width: 100%;
  max-width: 960px;
  transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* Cards (wallet style) */

.card {
  background: radial-gradient(circle at top left, #1f1f1f 0, #101010 55%);
  border-radius: 18px;
  padding: 16px 16px 20px 16px;
  min-width: 100%;
  max-width: 100%;
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.8),
    0 0 0 1px rgba(255, 255, 255, 0.02);
  position: relative;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.card-header h2 {
  margin: 0;
  font-size: 20px;
}

.card-subtitle {
  margin-left: auto;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.7;
}

.card-body {
  margin-top: 8px;
}

/* Back chip */

.back-chip {
  border-radius: 999px;
  border: none;
  padding: 6px 10px;
  font-size: 13px;
  background: #1b1b1b;
  color: #f5f5f5;
  cursor: pointer;
}

/* Buttons */

.menu-button {
  background: #181818;
  color: #f5f5f5;
  border: 1px solid #2a2a2a;
  padding: 10px;
  margin: 6px 0;
  width: 100%;
  font-size: 15px;
  border-radius: 999px;
  text-align: left;
  cursor: pointer;
}

.menu-button:active {
  background: #222;
}

/* Sections */

.section-label {
  margin-top: 12px;
  font-size: 11px;
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Info box */

.info-box {
  background: #111;
  padding: 10px;
  margin-top: 8px;
  border-radius: 10px;
  font-size: 14px;
  max-height: 40vh;
  overflow-y: auto;
}

.hidden {
  display: none;
}

/* Inputs */

input,
select {
  width: 100%;
  padding: 8px;
  margin-top: 6px;
  border-radius: 999px;
  border: 1px solid #333;
  background: #0b0b0b;
  color: #f5f5f5;
  font-size: 14px;
}

.text-input {
  width: 100%;
  min-height: 80px;
  margin-top: 8px;
  padding: 8px;
  border-radius: 10px;
  border: 1px solid #333;
  background: #0b0b0b;
  color: #f5f5f5;
  box-sizing: border-box;
}

/* Video */

video {
  width: 100%;
  height: auto;
  background: black;
  border-radius: 10px;
  margin-top: 8px;
}

/* Chat */

.chat-log {
  background: #0b0b0b;
  border-radius: 10px;
  padding: 8px;
  max-height: 40vh;
  overflow-y: auto;
  margin-bottom: 8px;
  font-size: 14px;
}

.chat-entry-user {
  margin-bottom: 6px;
  color: #9ad0ff;
}

.chat-entry-other {
  margin-bottom: 10px;
  color: #f5f5f5;
}

/* Matrix table */

.matrix-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.matrix-table th,
.matrix-table td {
  border: 1px solid #333;
  padding: 4px 6px;
  text-align: left;
}

.matrix-table th {
  background: #181818;
  position: sticky;
  top: 0;
  z-index: 1;
}

.matrix-row {
  cursor: pointer;
}

.matrix-row:hover {
  background: #222;
}

/* High contrast */

.high-contrast body {
  background: #000;
  color: #fff;
}

/* Scrollbars (subtle) */

.info-box::-webkit-scrollbar,
.chat-log::-webkit-scrollbar {
  width: 6px;
}

.info-box::-webkit-scrollbar-thumb,
.chat-log::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 3px;
}
