@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --example-orange: #ff4a08;
  --example-white: #ffffff;
  --example-muted: rgba(255, 255, 255, 0.72);
  --example-border: rgba(255, 255, 255, 0.16);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--example-white);
  background: #050505;
  overflow-x: hidden;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.page {
  min-height: 100vh;
  background: #050505;
}

.page-backdrop,
.public-layout,
.login-layout,
.admin-layout,
.brand-block,
.public-panel {
  all: unset;
  box-sizing: border-box;
}

.landing-page {
  min-height: 100vh;
  position: relative;
  display: grid;
  justify-items: center;
  align-items: start;
  padding: clamp(2.25rem, 5vw, 5rem) clamp(1rem, 4vw, 3rem) clamp(1.25rem, 3vw, 2.25rem);
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 48% 22%, rgba(255, 255, 255, 0.16), transparent 17rem),
    radial-gradient(circle at 55% 60%, rgba(255, 255, 255, 0.08), transparent 28rem),
    linear-gradient(180deg, #090909 0%, #151515 52%, #030303 100%);
  color: #ffffff;
}

.landing-page::before {
  content: '';
  position: absolute;
  inset: -12%;
  z-index: -4;
  background:
    radial-gradient(ellipse at 42% 45%, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0.06) 26%, transparent 52%),
    radial-gradient(ellipse at 64% 40%, rgba(255, 255, 255, 0.12) 0%, transparent 34%),
    radial-gradient(ellipse at 34% 72%, rgba(0, 0, 0, 0.85) 0%, transparent 45%);
  filter: grayscale(1) contrast(1.2);
  opacity: 0.9;
}

.landing-page::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 42px 42px;
  mix-blend-mode: screen;
  opacity: 0.35;
}

.landing-marble-shape {
  position: absolute;
  width: min(70vw, 760px);
  aspect-ratio: 1;
  left: 50%;
  top: 49%;
  z-index: -3;
  border-radius: 47% 53% 42% 58%;
  transform: translate(-50%, -50%) rotate(-8deg);
  background:
    radial-gradient(circle at 42% 31%, rgba(255, 255, 255, 0.24), transparent 18%),
    radial-gradient(circle at 56% 45%, rgba(255, 255, 255, 0.12), transparent 35%),
    radial-gradient(circle at 46% 62%, rgba(0, 0, 0, 0.92), transparent 48%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.09), rgba(0, 0, 0, 0.6));
  filter: blur(1px) grayscale(1) contrast(1.25);
  opacity: 0.78;
}

.landing-line-field {
  position: absolute;
  width: clamp(250px, 42vw, 620px);
  aspect-ratio: 1;
  z-index: -2;
  border-radius: 50%;
  background: repeating-radial-gradient(ellipse at center, transparent 0 30px, rgba(255, 255, 255, 0.38) 31px 32px, transparent 33px 52px);
  opacity: 0.42;
}

.landing-line-field-left {
  left: -12%;
  bottom: -16%;
  transform: rotate(-8deg);
}

.landing-line-field-right {
  right: -10%;
  top: -18%;
  transform: rotate(18deg);
}

.landing-poster {
  width: min(1180px, 100%);
  text-align: center;
  z-index: 1;
  padding-top: clamp(0.5rem, 2vw, 1.5rem);
}

.landing-logo-block {
  display: grid;
  justify-items: center;
  text-transform: uppercase;
}

.landing-title {
  display: grid;
  justify-items: center;
  margin: 0;
  font-size: clamp(4.2rem, 14vw, 11.2rem);
  font-weight: 900;
  line-height: 0.76;
  letter-spacing: -0.105em;
  transform: skew(-9deg) scaleX(1.08);
  text-transform: uppercase;
  color: #ffffff;
  text-shadow:
    0 1px 0 #bfbfbf,
    0 8px 24px rgba(255, 255, 255, 0.22),
    0 24px 60px rgba(0, 0, 0, 0.85);
}

.landing-title span {
  letter-spacing: -0.08em;
}

.landing-tagline {
  margin: clamp(1.6rem, 4vw, 2.8rem) auto 0;
  max-width: 720px;
  color: rgba(255, 255, 255, 0.72);
  font-size: clamp(0.72rem, 1.4vw, 1rem);
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.landing-cta {
  margin-top: clamp(2.6rem, 7vw, 5rem);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: min(520px, 92vw);
  padding: clamp(0.85rem, 2vw, 1.2rem) clamp(1.4rem, 5vw, 3.2rem);
  border: 0;
  background: #ff4a08;
  color: #ffffff;
  text-decoration: none;
  text-transform: uppercase;
  font-size: clamp(1.25rem, 4.4vw, 3rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.045em;
  box-shadow:
    0 18px 50px rgba(255, 74, 8, 0.22),
    0 2px 0 rgba(0, 0, 0, 0.55);
  transition: background 0.2s ease, transform 0.2s ease;
}

.landing-cta:hover {
  background: #ff5a18;
}

.landing-cta:active {
  transform: scale(0.97);
}

.landing-anon-form {
  margin-top: 0;
}

.landing-content-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(0.9rem, 2vw, 1.35rem);
  margin: clamp(3rem, 7vw, 5.6rem) auto 0;
  text-align: left;
}

.landing-form-grid {
  margin-top: clamp(2rem, 5vw, 3.8rem);
}

.landing-content-card,
.landing-bot-note {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.025)),
    rgba(0, 0, 0, 0.42);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(10px);
}

.landing-content-card::before,
.landing-bot-note::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent),
    repeating-linear-gradient(135deg, transparent 0 12px, rgba(255, 255, 255, 0.025) 13px 14px);
  opacity: 0.7;
}

.landing-content-card {
  padding: clamp(1.1rem, 2.6vw, 1.65rem);
}

.landing-content-card > *,
.landing-bot-note > * {
  position: relative;
}

.landing-content-card h2,
.landing-bot-note h2,
.messages-header h2 {
  position: relative;
  margin: 0 0 0.8rem;
  color: #ffffff;
  font-size: clamp(1rem, 1.9vw, 1.35rem);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.landing-content-card h2::after,
.landing-bot-note h2::after,
.messages-header h2::after {
  content: '';
  display: block;
  width: 52px;
  height: 3px;
  margin-top: 0.65rem;
  background: #ff4a08;
}

.landing-content-card p,
.landing-bot-note p {
  position: relative;
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: clamp(0.88rem, 1.25vw, 1rem);
  line-height: 1.72;
}

.landing-bot-note {
  margin: clamp(1rem, 2vw, 1.4rem) auto 0;
  padding: clamp(1.2rem, 2.8vw, 1.9rem);
  text-align: left;
  border-color: rgba(255, 74, 8, 0.38);
}

.landing-message-card {
  display: grid;
  gap: 1rem;
}

.landing-captcha-card {
  display: grid;
  justify-items: start;
  gap: 1rem;
}

.landing-submit-button {
  width: min(560px, 100%);
}

.stack-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.text-input,
.message-editor,
.note-input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 0;
  background: rgba(0, 0, 0, 0.46);
  color: #ffffff;
  padding: 0.9rem 1rem;
  outline: none;
  font-size: 0.95rem;
  line-height: 1.5;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.text-input:focus,
.message-editor:focus,
.note-input:focus {
  border-color: rgba(255, 74, 8, 0.72);
  box-shadow: 0 0 0 3px rgba(255, 74, 8, 0.12);
  background: rgba(0, 0, 0, 0.62);
}

input::placeholder,
textarea::placeholder {
  color: rgba(255, 255, 255, 0.42);
}

#nicknameInput {
  text-align: left;
  margin-bottom: 0.85rem;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.toolbar-button,
.filter-button,
.flag-button,
.ghost-button,
.danger-button {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 0;
  background: rgba(0, 0, 0, 0.42);
  color: #ffffff;
  padding: 0.7rem 0.9rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.toolbar-button:hover,
.filter-button:hover,
.flag-button:hover,
.ghost-button:hover {
  border-color: rgba(255, 74, 8, 0.65);
  background: rgba(255, 74, 8, 0.12);
}

.toolbar-button.is-active,
.toolbar-button[aria-pressed='true'],
.filter-active,
.flag-selected {
  border-color: #ff4a08;
  background: #ff4a08;
  color: #ffffff;
}

.toolbar-meta {
  margin-top: 0.8rem;
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.78rem;
}

.toolbar-help,
.preview-label,
.field-label,
.eyebrow {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.message-textarea {
  min-height: 260px;
  resize: vertical;
}

.preview-panel {
  display: grid;
  gap: 0.5rem;
}

.preview-panel.is-empty {
  display: none;
}

.message-preview,
.message-body {
  min-height: 78px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.3);
  padding: 1rem;
  color: rgba(255, 255, 255, 0.84);
  line-height: 1.65;
  word-break: break-word;
}

.message-preview:empty::before {
  content: attr(data-placeholder);
  color: rgba(255, 255, 255, 0.36);
}

.message-preview p,
.message-body p {
  margin: 0 0 0.8rem;
}

.message-preview p:last-child,
.message-body p:last-child {
  margin-bottom: 0;
}

.captcha-grid {
  display: flex;
  justify-content: flex-start;
  min-height: 65px;
  margin: 0;
}

.status-box,
.thanks-box {
  min-height: 1.2rem;
  margin-top: 1rem;
  color: rgba(255, 255, 255, 0.74);
  text-align: center;
  font-size: 0.9rem;
}

.status-box:empty {
  display: none;
}

.status-error {
  color: #ffb0a0;
}

.status-success {
  color: #ffffff;
}

.status-info {
  color: rgba(255, 255, 255, 0.74);
}

.thanks-box {
  padding: 1rem;
  border: 1px solid rgba(255, 74, 8, 0.55);
  background: rgba(255, 74, 8, 0.12);
}

.hidden {
  display: none !important;
}

.login-poster {
  width: min(720px, 100%);
}

.login-title {
  font-size: clamp(3.4rem, 13vw, 8.2rem);
}

.login-card {
  max-width: 460px;
}

.admin-login-page {
  align-items: center;
}

.admin-cta {
  width: 100%;
  min-width: 0;
  margin-top: 0;
  font-size: clamp(1rem, 2.5vw, 1.45rem);
}

.admin-page {
  align-items: start;
  overflow: visible;
}

.admin-poster {
  width: min(1440px, 100%);
  text-align: left;
}

.admin-topbar {
  width: 100%;
  margin: 0 0 clamp(1rem, 2vw, 1.4rem);
  padding: clamp(1.1rem, 2.6vw, 1.65rem);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.admin-brand {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: center;
  column-gap: clamp(5rem, 10vw, 10rem);
  min-width: 0;
  width: 100%;
}

.admin-logo-title {
  display: block;
  flex-shrink: 0;
  margin: 0;
  font-size: clamp(2.4rem, 5.8vw, 4.9rem);
  font-weight: 900;
  line-height: 0.85;
  letter-spacing: -0.09em;
  transform: skew(-8deg) scaleX(1.02);
  text-transform: uppercase;
  color: #ffffff;
  text-shadow: 0 1px 0 #bfbfbf, 0 8px 24px rgba(255, 255, 255, 0.2), 0 24px 60px rgba(0, 0, 0, 0.85);
  white-space: nowrap;
  transform-origin: left center;
}

.admin-logo-title span {
  letter-spacing: -0.08em;
}

.admin-brand-copy {
  min-width: 220px;
}

.admin-title {
  margin: 0;
  color: #ffffff;
  font-size: clamp(1.4rem, 3vw, 2.4rem);
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  max-width: 720px;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.38fr);
  gap: clamp(0.9rem, 2vw, 1.35rem);
}

.messages-panel,
.settings-panel {
  padding: clamp(1.1rem, 2.6vw, 1.65rem);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.025)),
    rgba(0, 0, 0, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

.settings-panel {
  position: sticky;
  top: 1rem;
  align-self: start;
  margin-top: 0;
}

.messages-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.messages-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: calc(100vh - 280px);
  min-height: 360px;
  overflow-y: auto;
  padding-right: 0.3rem;
}

.message-card {
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.36);
}

.message-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.9rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.message-title {
  margin: 0;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.message-meta,
.message-delivery {
  margin: 0.4rem 0 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.76rem;
  line-height: 1.5;
}

.message-badge {
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.07);
  padding: 0.35rem 0.55rem;
  color: rgba(255, 255, 255, 0.84);
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.message-body {
  margin: 0 0 0.85rem;
  white-space: pre-wrap;
}

.flag-row,
.card-actions,
.button-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.button-stack {
  flex-direction: column;
}

.note-wrap {
  margin-top: 1rem;
}

.note-input {
  min-height: 90px;
  resize: vertical;
}

.card-actions {
  margin-top: 0.8rem;
}

.danger-button {
  border-color: rgba(255, 74, 8, 0.55);
  background: rgba(255, 74, 8, 0.12);
}

.danger-button:hover {
  background: rgba(255, 74, 8, 0.22);
}

.empty-state {
  padding: 1.2rem;
  border: 1px dashed rgba(255, 255, 255, 0.22);
  color: rgba(255, 255, 255, 0.66);
  text-align: center;
}

@media (max-width: 1100px) {
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .settings-panel {
    position: static;
  }

  .messages-list {
    max-height: none;
    min-height: 0;
  }
}

@media (max-width: 900px) {
  .admin-brand {
    align-items: flex-start;
    grid-template-columns: 1fr;
    row-gap: 1rem;
  }

  .admin-brand-copy {
    min-width: 0;
    margin-left: 0;
    padding-left: 0;
  }

  .admin-logo-title {
    transform-origin: left center;
  }
}

@media (max-width: 640px) {
  .landing-page {
    padding: 2.25rem 1rem 1.25rem;
  }

  .landing-title {
    font-size: clamp(3.45rem, 20vw, 5.3rem);
  }

  .landing-tagline {
    letter-spacing: 0.14em;
  }

  .landing-line-field-right {
    opacity: 0.25;
  }

  .landing-content-grid {
    grid-template-columns: 1fr;
  }

  .toolbar,
  .toolbar-meta,
  .admin-topbar,
  .messages-header,
  .message-card-header,
  .flag-row,
  .card-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .toolbar-button,
  .filter-button,
  .flag-button,
  .ghost-button,
  .danger-button,
  .card-actions button,
  .button-stack button {
    width: 100%;
  }

  .message-textarea {
    min-height: 190px;
  }

  .admin-logo-title {
    font-size: clamp(2rem, 16vw, 3.6rem);
  }
}

@media (max-width: 380px) {
  #turnstileWidget {
    transform: scale(0.94);
    transform-origin: left top;
  }

  .captcha-grid {
    min-height: 58px;
  }
}
