:root {
  --gold: #ff2d2d;
  --gold-soft: rgba(255, 45, 45, 0.14);
  --red: #ff2d2d;
  --red-deep: #7f1010;
  --red-soft: rgba(255, 45, 45, 0.14);
  --panel: #0a0a0b;
  --panel-2: #111113;
  --line: rgba(255, 45, 45, 0.28);
  --line-soft: rgba(255, 255, 255, 0.08);
  --muted: #a1a1aa;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  min-height: 100%;
  background: #000;
  color: #fff;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

button:disabled {
  opacity: .58;
}

.text-gold,
[class*="text-gold"],
[class*="text-yellow-400"] {
  color: var(--red) !important;
}

.bg-gold,
[class*="bg-gold"],
[class*="bg-yellow-400"] {
  background-color: rgba(255, 45, 45, .12) !important;
}

[class*="border-gold"],
[class*="border-yellow-400"] {
  border-color: rgba(255, 45, 45, .34) !important;
}

.app-shell {
  width: 100%;
  max-width: 430px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  overflow-x: hidden;
  background:
    linear-gradient(180deg, rgba(255, 45, 45, .12), transparent 230px),
    radial-gradient(circle at 50% -120px, rgba(255, 45, 45, .28), transparent 310px),
    #000;
  padding-bottom: calc(98px + env(safe-area-inset-bottom));
}

.top-safe {
  padding-top: calc(18px + env(safe-area-inset-top));
}

.screen-fade {
  animation: fadeIn .28s ease-out both;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.panel,
.memory-card {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .026)),
    var(--panel);
  border: 1px solid var(--line-soft);
  border-top-color: rgba(255, 45, 45, .32);
  border-radius: 12px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, .58);
}

.panel::before,
.memory-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
}

.panel {
  padding: 20px;
}

.memory-card {
  padding: 16px;
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}

a.memory-card:active,
.memory-card:has(button:active) {
  transform: scale(.985);
}

.gold-button,
.danger-button,
.secondary-button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  width: 100%;
  border: 0;
  border-radius: 12px;
  font-weight: 800;
  line-height: 1.1;
  transition: transform .14s ease, opacity .14s ease, box-shadow .14s ease, background .14s ease;
}

.gold-button {
  background: linear-gradient(180deg, #ff3b3b, #c81414);
  color: #fff;
  box-shadow: 0 16px 38px rgba(255, 45, 45, .22);
}

.danger-button {
  background: linear-gradient(180deg, #8f1515, #4f0909);
  color: #fff;
  box-shadow: 0 12px 30px rgba(127, 16, 16, .25);
}

.secondary-button {
  background: rgba(255, 255, 255, .07);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .1);
}

.gold-button:active,
.danger-button:active,
.secondary-button:active,
.icon-btn:active,
.nav-item:active {
  transform: scale(.97);
}

.field,
.textarea,
.passcode-field {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(255, 45, 45, .26);
  background: rgba(0, 0, 0, .62);
  color: #fff;
  outline: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .035);
}

.field,
.textarea {
  padding: 16px 14px;
}

.field:focus,
.textarea:focus,
.passcode-field:focus {
  border-color: rgba(255, 45, 45, .68);
  box-shadow: 0 0 0 4px rgba(255, 45, 45, .12), inset 0 0 0 1px rgba(255, 255, 255, .05);
}

.textarea {
  min-height: 118px;
  resize: vertical;
  line-height: 1.55;
}

.passcode-field {
  height: 68px;
  text-align: center;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: .16em;
}

.passcode-field::placeholder {
  color: rgba(255, 45, 45, .38);
}

.login-orb {
  display: none;
}

.icon-btn {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 45, 45, .12);
  border: 1px solid rgba(255, 45, 45, .28);
  font-size: 22px;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  display: grid;
  gap: 6px;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  background: rgba(5, 5, 6, .92);
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 45, 45, .22);
  box-shadow: 0 -18px 60px rgba(0, 0, 0, .58);
}

.nav-item {
  min-height: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: #8f8f98;
  border-radius: 12px;
  transition: background .14s ease, color .14s ease, transform .14s ease;
}

.nav-item span {
  font-size: 20px;
  line-height: 1;
}

.nav-item small {
  font-size: 10px;
  font-weight: 700;
}

.nav-item.active {
  color: #fff;
  background: rgba(255, 45, 45, .14);
  box-shadow: inset 0 0 0 1px rgba(255, 45, 45, .22);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.status-draft,
.status-uploading,
.status-recording {
  background: rgba(255, 45, 45, .13);
  color: #ff8a8a;
}

.status-sent,
.status-delivered {
  background: rgba(255, 45, 45, .16);
  color: #ffb3b3;
}

.status-seen {
  background: rgba(255, 255, 255, .1);
  color: #f4f4f5;
}

.status-deleted,
.status-failed {
  background: rgba(127, 16, 16, .44);
  color: #fecaca;
}

.empty-state {
  margin: 28px 20px;
  padding: 30px 18px;
  border: 1px dashed rgba(255, 45, 45, .28);
  border-radius: 12px;
  text-align: center;
  color: var(--muted);
  background: rgba(255, 255, 255, .025);
}

.empty-state h2 {
  margin-top: 12px;
  color: #fff;
  font-size: 20px;
  font-weight: 800;
}

.empty-state p {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.55;
}

.vault-mark {
  color: var(--red);
  font-size: 34px;
}

.error-box {
  border: 1px solid rgba(248, 113, 113, .4);
  background: rgba(127, 16, 16, .32);
  color: #fecaca;
  border-radius: 12px;
  padding: 12px;
  line-height: 1.45;
}

.record-button {
  width: 188px;
  height: 188px;
  border: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  margin: 22px auto;
  background:
    radial-gradient(circle at 50% 38%, #ff8a8a 0%, #ff2d2d 48%, #7f1010 100%);
  color: #fff;
  font-size: 64px;
  box-shadow:
    0 0 0 16px rgba(255, 45, 45, .08),
    0 22px 72px rgba(255, 45, 45, .28);
}

.recording .record-button {
  animation: pulse 1.1s ease-in-out infinite;
}

@keyframes pulse {
  50% {
    box-shadow:
      0 0 0 30px rgba(255, 45, 45, .055),
      0 26px 88px rgba(255, 45, 45, .38);
  }
}

.waveform {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.waveform i {
  width: 5px;
  height: 18px;
  border-radius: 999px;
  background: var(--red);
  animation: wave .8s ease-in-out infinite;
  opacity: .88;
  box-shadow: 0 0 14px rgba(255, 45, 45, .28);
}

.waveform i:nth-child(2n) { animation-delay: .12s; }
.waveform i:nth-child(3n) { animation-delay: .24s; }

@keyframes wave {
  50% { height: 54px; opacity: 1; }
}

audio {
  width: 100%;
  border-radius: 12px;
  filter: grayscale(1) contrast(1.08);
}

img {
  max-width: 100%;
}

video {
  background: #050505;
}
