:root {
  --red: #e11a22;
  --red-bright: #ff3a3f;
  --red-hot: #ff5b61;
  --red-deep: #720006;
  --red-glow: rgba(225, 26, 34, 0.32);
  --ink: #070303;
  --panel: rgba(12, 5, 5, 0.88);
  --panel-soft: rgba(20, 8, 8, 0.76);
  --line: rgba(255, 255, 255, 0.1);
  --line-red: rgba(255, 58, 63, 0.28);
  --text: #fff7f4;
  --muted: rgba(255, 242, 238, 0.63);
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.62);
  --shadow-3d:
    0 1px 0 rgba(255, 255, 255, 0.08) inset,
    0 -1px 0 rgba(255, 58, 63, 0.1) inset,
    0 18px 0 -12px rgba(49, 0, 2, 0.78),
    0 34px 70px rgba(0, 0, 0, 0.62);
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #050101;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: #050101;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.55;
  overflow-x: hidden;
  perspective: 1400px;
}

button,
input,
textarea {
  font: inherit;
}

a {
  color: #ff6a6e;
  text-decoration: none;
}

a:hover {
  color: #ff9b9e;
}

::selection {
  color: white;
  background: rgba(225, 26, 34, 0.78);
}

.page-background {
  position: fixed;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 50% 18%, rgba(255, 24, 31, 0.17), transparent 31%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.02) 0%, rgba(4, 0, 0, 0.3) 48%, rgba(4, 0, 0, 0.94) 100%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.4), transparent 24%, transparent 76%, rgba(0, 0, 0, 0.4)),
    url("../img/fondbotillegal.png?v=4");
  background-position: center top;
  background-repeat: no-repeat;
  background-size: cover;
  filter: saturate(1.08) contrast(1.04);
}

.page-background::before {
  content: "";
  position: absolute;
  left: -10%;
  right: -10%;
  bottom: -30%;
  height: 68%;
  opacity: 0.28;
  background-image:
    linear-gradient(rgba(255, 45, 51, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 45, 51, 0.16) 1px, transparent 1px);
  background-size: 64px 64px;
  transform: perspective(650px) rotateX(62deg);
  transform-origin: center bottom;
  mask-image: linear-gradient(to top, black, transparent 78%);
}

.page-background::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 24%, transparent 0, rgba(0, 0, 0, 0.08) 36%, rgba(0, 0, 0, 0.68) 100%),
    repeating-linear-gradient(90deg, transparent 0, transparent 79px, rgba(255, 255, 255, 0.014) 80px);
}

.topbar {
  position: fixed;
  z-index: 20;
  top: 14px;
  left: 50%;
  width: min(1320px, calc(100% - 36px));
  min-height: 68px;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 18px;
  transform: translateX(-50%) perspective(900px) rotateX(-0.8deg);
  transform-origin: center top;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  background:
    linear-gradient(110deg, rgba(133, 4, 10, 0.34), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), transparent 48%),
    rgba(7, 3, 3, 0.78);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.1) inset,
    0 -1px 0 rgba(255, 36, 42, 0.12) inset,
    0 9px 0 -6px rgba(71, 0, 3, 0.7),
    0 22px 50px rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(22px) saturate(1.28);
}

.topbar::after {
  content: "";
  position: absolute;
  left: 20px;
  right: 55%;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--red-hot), transparent);
  filter: drop-shadow(0 0 8px var(--red));
}

.brand {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: white;
}

.brand:hover {
  color: white;
}

.brand-logo {
  position: relative;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  overflow: hidden;
  border: 1px solid rgba(255, 76, 81, 0.36);
  border-radius: 13px;
  background: #100303;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.13) inset,
    0 8px 0 -5px rgba(70, 0, 4, 0.9),
    0 14px 28px rgba(238, 20, 28, 0.3);
  transform: perspective(260px) rotateY(8deg) rotateX(-3deg);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.brand:hover .brand-logo {
  transform: perspective(260px) rotateY(-7deg) rotateX(3deg) translateY(-1px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.16) inset,
    0 10px 0 -6px rgba(70, 0, 4, 0.9),
    0 18px 34px rgba(238, 20, 28, 0.42);
}

.brand-logo img,
.home-logo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: 50% 44%;
  transform: scale(1.28);
  filter: saturate(1.22) contrast(1.08);
}

.brand-copy {
  min-width: 0;
  display: grid;
  line-height: 1.15;
}

.brand-copy strong {
  font-size: 15px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.brand-copy small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.page-shell {
  position: relative;
  z-index: 1;
  width: min(1320px, calc(100% - 36px));
  min-height: calc(100vh - 110px);
  margin: 0 auto;
  padding-bottom: 28px;
}

.ticket-hero {
  padding: 104px 0 28px;
}

.hero-card {
  position: relative;
  min-height: 288px;
  padding: clamp(28px, 4vw, 48px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  align-items: center;
  gap: 34px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 28px;
  background:
    linear-gradient(125deg, rgba(150, 4, 11, 0.28), transparent 42%),
    radial-gradient(circle at 86% 50%, rgba(255, 38, 45, 0.18), transparent 30%),
    linear-gradient(155deg, rgba(18, 7, 7, 0.94), rgba(5, 2, 2, 0.9));
  box-shadow: var(--shadow-3d);
  backdrop-filter: blur(22px) saturate(1.2);
  transform: perspective(1400px) rotateX(0.7deg);
  transform-style: preserve-3d;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.075), transparent 20%, transparent 75%, rgba(255, 39, 46, 0.045)),
    repeating-linear-gradient(135deg, transparent 0 28px, rgba(255, 255, 255, 0.012) 29px 30px);
}

.hero-card::after {
  content: "";
  position: absolute;
  left: 38px;
  right: 42%;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--red-bright), transparent);
  box-shadow: 0 0 22px var(--red-glow);
}

.hero-heading {
  position: relative;
  z-index: 2;
  max-width: 860px;
  padding-left: 22px;
  border-left: 3px solid var(--red-bright);
  text-shadow: 0 4px 28px rgba(0, 0, 0, 0.9);
  transform: translateZ(34px);
}

.eyebrow {
  margin: 0 0 7px;
  color: #ff656a;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.hero-heading h1 {
  margin: 0;
  font-size: clamp(34px, 4.5vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  text-transform: uppercase;
}

.hero-heading h1 span {
  color: #ff343a;
  filter: drop-shadow(0 0 18px rgba(255, 39, 46, 0.35));
}

.hero-description {
  max-width: 620px;
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.56);
  font-size: 13px;
}

.hero-tags {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tag {
  padding: 6px 10px;
  color: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(0, 0, 0, 0.38));
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.24);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.hero-tag-accent {
  border-color: rgba(255, 58, 63, 0.38);
  background: linear-gradient(180deg, rgba(190, 9, 17, 0.55), rgba(75, 0, 4, 0.48));
}

.hero-emblem {
  position: relative;
  z-index: 1;
  width: 240px;
  height: 220px;
  display: grid;
  place-items: center;
  transform: translateZ(58px);
  transform-style: preserve-3d;
}

.hero-emblem::before {
  content: "";
  position: absolute;
  width: 152px;
  height: 152px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 52, 58, 0.25), rgba(122, 0, 6, 0.1) 46%, transparent 70%);
  filter: blur(8px);
}

.hero-orbit {
  position: absolute;
  border: 1px solid rgba(255, 88, 93, 0.2);
  border-radius: 50%;
  box-shadow: 0 0 28px rgba(231, 23, 30, 0.1);
}

.hero-orbit-outer {
  width: 214px;
  height: 108px;
  transform: rotate(-14deg) rotateX(62deg);
}

.hero-orbit-inner {
  width: 170px;
  height: 170px;
  border-style: dashed;
  transform: rotate(22deg) rotateY(68deg);
}

.hero-logo-shell {
  position: relative;
  z-index: 2;
  width: 124px;
  height: 142px;
  overflow: hidden;
  border: 1px solid rgba(255, 120, 124, 0.38);
  border-radius: 30px 15px 30px 15px;
  background: #100303;
  box-shadow:
    0 2px 0 rgba(255, 255, 255, 0.15) inset,
    -12px 18px 0 -10px rgba(68, 0, 3, 0.92),
    0 30px 58px rgba(0, 0, 0, 0.58),
    0 0 42px rgba(255, 29, 36, 0.28);
  transform: perspective(480px) rotateY(-13deg) rotateX(5deg) rotateZ(2deg);
}

.hero-logo-shell img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: 50% 44%;
  transform: scale(1.25);
  filter: saturate(1.28) contrast(1.1);
}

.hero-logo-shadow {
  position: absolute;
  z-index: 0;
  bottom: 12px;
  width: 138px;
  height: 25px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.78);
  filter: blur(9px);
  transform: rotate(-4deg);
}

.ticket-summary,
.transcript-panel,
.error-card {
  border: 1px solid rgba(255, 255, 255, 0.13);
  background:
    linear-gradient(118deg, rgba(255, 255, 255, 0.048), transparent 21%),
    radial-gradient(circle at 0 0, rgba(225, 26, 34, 0.17), transparent 36%),
    linear-gradient(145deg, rgba(19, 8, 8, 0.95), rgba(6, 2, 2, 0.93));
  box-shadow: var(--shadow-3d);
  backdrop-filter: blur(24px) saturate(1.18);
  transform-style: preserve-3d;
}

.ticket-summary {
  position: relative;
  padding: 24px;
  display: grid;
  grid-template-columns: 235px 1fr;
  gap: 24px;
  border-radius: 22px;
  overflow: hidden;
  transform: perspective(1200px) rotateX(0.35deg);
  transition: transform 220ms ease, border-color 220ms ease;
}

.ticket-summary:hover {
  border-color: rgba(255, 74, 79, 0.25);
  transform: perspective(1200px) rotateX(0) translateY(-2px);
}

.ticket-summary::after,
.transcript-panel::after {
  content: "";
  position: absolute;
  top: 0;
  left: 24px;
  right: 24px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 58, 63, 0.85), transparent);
}

.summary-title {
  display: flex;
  align-items: center;
  gap: 14px;
}

.summary-title h2,
.panel-heading h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.summary-icon,
.empty-icon {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border: 1px solid rgba(255, 71, 76, 0.42);
  border-radius: 12px;
  background:
    linear-gradient(135deg, transparent 44%, rgba(255, 255, 255, 0.7) 45% 49%, transparent 50%),
    linear-gradient(315deg, #4d0003, #d7161d);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.18) inset,
    8px 8px 0 -5px rgba(76, 0, 4, 0.86),
    0 18px 30px rgba(0, 0, 0, 0.42),
    0 0 28px rgba(225, 26, 34, 0.3);
  transform: perspective(220px) rotate(45deg) rotateX(8deg) scale(0.72);
}

.summary-grid {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.summary-item {
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.036), transparent 48%),
    rgba(0, 0, 0, 0.29);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 9px 18px rgba(0, 0, 0, 0.2);
  transition: transform 180ms ease, border-color 180ms ease;
}

.summary-item:hover {
  border-color: rgba(255, 66, 72, 0.2);
  transform: translateY(-2px);
}

.summary-item dt {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.summary-item dd {
  margin: 0;
  overflow: hidden;
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.transcript-panel {
  position: relative;
  margin-top: 26px;
  border-radius: 24px;
  overflow: hidden;
  transform: perspective(1400px) rotateX(0.25deg);
}

.panel-heading {
  padding: 23px 26px 21px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(117, 0, 6, 0.17), transparent 42%),
    rgba(0, 0, 0, 0.22);
}

.message-count {
  min-width: 38px;
  height: 30px;
  padding: 0 10px;
  display: inline-grid;
  place-items: center;
  color: #ff9b9e;
  border: 1px solid rgba(255, 58, 63, 0.26);
  border-radius: 999px;
  background: rgba(130, 0, 6, 0.24);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.08) inset,
    0 8px 18px rgba(0, 0, 0, 0.3),
    0 0 18px rgba(225, 26, 34, 0.12);
  font-size: 11px;
  font-weight: 800;
}

.message-list {
  padding: 16px 22px 26px;
}

.message {
  position: relative;
  padding: 12px 4px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 13px;
}

.message + .message {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  background:
    radial-gradient(circle at 28% 22%, rgba(255, 112, 116, 0.72), transparent 32%),
    linear-gradient(145deg, #8e0007, #220003);
  box-shadow:
    0 2px 0 rgba(255, 255, 255, 0.12) inset,
    0 7px 0 -4px rgba(80, 0, 4, 0.85),
    0 14px 28px rgba(0, 0, 0, 0.48);
  transform: perspective(220px) rotateY(5deg);
  font-size: 15px;
  font-weight: 800;
}

.avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.message-card {
  min-width: 0;
  padding: 15px 17px;
  border: 1px solid rgba(255, 255, 255, 0.085);
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.036), transparent 45%),
    rgba(7, 3, 3, 0.54);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.035) inset,
    0 12px 24px rgba(0, 0, 0, 0.2);
  transform: translateZ(8px);
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.message-card:hover {
  border-color: rgba(255, 58, 63, 0.25);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.046), transparent 45%),
    rgba(18, 5, 5, 0.7);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.05) inset,
    0 16px 30px rgba(0, 0, 0, 0.3),
    -1px 0 18px rgba(225, 26, 34, 0.06);
  transform: translateY(-2px) translateZ(12px);
}

.message-header {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.message-header strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-header time {
  margin-left: auto;
  flex: 0 0 auto;
  color: rgba(255, 255, 255, 0.4);
  font-size: 10px;
}

.bot-badge {
  padding: 2px 5px;
  color: white;
  border-radius: 4px;
  background: #b20c13;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.07em;
}

.message-content {
  margin-top: 6px;
  overflow-wrap: anywhere;
  color: rgba(255, 249, 246, 0.83);
  font-size: 13px;
  line-height: 1.58;
}

.message-content strong {
  color: white;
}

.message-content code,
.embed-description code,
.embed-field code {
  padding: 2px 5px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.5);
  color: #ffb8ba;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 0.92em;
}

.message-content pre {
  max-width: 100%;
  margin: 9px 0 0;
  padding: 11px;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.5);
}

.message-content pre code {
  padding: 0;
  border: 0;
  background: none;
}

.mention {
  display: inline-flex;
  align-items: center;
  padding: 1px 4px;
  border-radius: 4px;
  color: #ffd5d6;
  background: rgba(225, 26, 34, 0.2);
  font-weight: 700;
}

.mention.channel {
  color: #b8dcff;
  background: rgba(67, 132, 197, 0.2);
}

.mention.role {
  color: var(--role-color, #ffd5d6);
}

.discord-embeds,
.attachments {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.discord-embed {
  position: relative;
  max-width: 700px;
  padding: 15px 16px 15px 19px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-left: 3px solid var(--embed-color, var(--red));
  border-radius: 5px 14px 14px 5px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.032), transparent 42%),
    rgba(0, 0, 0, 0.34);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.035) inset,
    0 12px 28px rgba(0, 0, 0, 0.28),
    -8px 0 24px color-mix(in srgb, var(--embed-color, var(--red)) 14%, transparent);
}

.discord-embed h3 {
  margin: 0;
  font-size: 13px;
}

.embed-description {
  margin-top: 7px;
  overflow-wrap: anywhere;
  color: rgba(255, 255, 255, 0.73);
  font-size: 12px;
}

.embed-fields {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.embed-field {
  padding: 10px 11px;
  border: 1px solid rgba(255, 255, 255, 0.085);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent),
    rgba(255, 255, 255, 0.018);
  box-shadow: 0 7px 16px rgba(0, 0, 0, 0.18);
  color: rgba(255, 255, 255, 0.68);
  font-size: 11px;
}

.embed-field > strong {
  display: block;
  margin-bottom: 4px;
  color: white;
  font-size: 10px;
  letter-spacing: 0.04em;
}

.media-preview,
.attachment-image {
  max-width: min(100%, 680px);
  margin: 10px 0 0;
  padding: 0;
  display: block;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: #080303;
  cursor: zoom-in;
}

.media-preview-small {
  max-width: 280px;
}

.media-preview img,
.attachment-image img {
  max-width: 100%;
  max-height: 520px;
  display: block;
  object-fit: contain;
  transition: transform 180ms ease, filter 180ms ease;
}

.media-preview:hover img,
.attachment-image:hover img {
  transform: scale(1.008);
  filter: brightness(1.08);
}

.attachment-image {
  margin-top: 0;
}

.attachment-file {
  width: fit-content;
  max-width: 100%;
  padding: 9px 11px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.28);
  font-size: 11px;
}

.attachment-file span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-icon {
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 22px;
  border-radius: 6px;
  background: rgba(225, 26, 34, 0.25);
}

.empty-state {
  padding: 54px 20px 48px;
  display: grid;
  place-items: center;
  text-align: center;
}

.empty-state h3 {
  margin: 12px 0 3px;
  font-size: 16px;
}

.empty-state p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.lightbox {
  position: fixed;
  z-index: 100;
  inset: 0;
  padding: 28px;
  display: grid;
  place-items: center;
  visibility: hidden;
  opacity: 0;
  transition: opacity 180ms ease, visibility 180ms ease;
}

.lightbox.is-open {
  visibility: visible;
  opacity: 1;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.9);
  cursor: zoom-out;
  backdrop-filter: blur(12px);
}

.lightbox-content {
  position: relative;
  z-index: 1;
  max-width: min(1280px, 94vw);
  max-height: 92vh;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 88vh;
  display: block;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: #050101;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.8);
}

.lightbox-close {
  position: absolute;
  z-index: 2;
  top: -16px;
  right: -16px;
  width: 40px;
  height: 40px;
  padding: 0 0 3px;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: rgba(133, 0, 7, 0.86);
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.site-footer {
  position: relative;
  z-index: 1;
  width: min(1320px, calc(100% - 36px));
  margin: 0 auto;
  padding: 2px 0 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: rgba(255, 255, 255, 0.36);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-align: center;
  text-transform: uppercase;
}

.footer-line {
  width: 28px;
  height: 1px;
  background: var(--red);
  box-shadow: 0 0 12px var(--red-glow);
}

.home-stage {
  min-height: calc(100vh - 54px);
  padding: 116px 0 48px;
  display: grid;
  place-items: center;
}

.home-card {
  position: relative;
  width: min(680px, 100%);
  padding: clamp(30px, 6vw, 58px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 28px;
  background:
    linear-gradient(118deg, rgba(255, 255, 255, 0.055), transparent 22%),
    radial-gradient(circle at 50% 0, rgba(225, 26, 34, 0.24), transparent 46%),
    linear-gradient(145deg, rgba(18, 7, 7, 0.95), rgba(6, 2, 2, 0.93));
  box-shadow: var(--shadow-3d);
  text-align: center;
  backdrop-filter: blur(24px) saturate(1.18);
  transform: perspective(1100px) rotateX(1deg);
  transform-style: preserve-3d;
}

.home-card::after {
  content: "";
  position: absolute;
  left: 14%;
  right: 14%;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--red-bright), transparent);
  box-shadow: 0 0 22px var(--red-glow);
}

.home-logo {
  position: relative;
  width: 82px;
  height: 82px;
  margin: 0 auto 28px;
  overflow: hidden;
  border: 1px solid rgba(255, 76, 81, 0.34);
  border-radius: 22px;
  background: #100303;
  box-shadow:
    0 2px 0 rgba(255, 255, 255, 0.15) inset,
    0 10px 0 -6px rgba(75, 0, 4, 0.9),
    0 22px 46px rgba(0, 0, 0, 0.45),
    0 0 38px rgba(238, 20, 28, 0.38);
  transform: perspective(340px) rotateY(-8deg) rotateX(4deg) translateZ(28px);
}

.home-card h1 {
  margin: 0;
  font-size: clamp(32px, 6vw, 54px);
  line-height: 1;
  letter-spacing: -0.045em;
  text-transform: uppercase;
}

.home-description {
  max-width: 540px;
  margin: 18px auto 0;
  color: rgba(255, 255, 255, 0.68);
}

.service-status {
  max-width: 440px;
  margin: 28px auto 0;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 13px;
  text-align: left;
  border: 1px solid rgba(68, 218, 126, 0.22);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent),
    rgba(0, 0, 0, 0.34);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 12px 26px rgba(0, 0, 0, 0.25);
  transform: translateZ(20px);
}

.service-status-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  border-radius: 50%;
  background: #44da7e;
  box-shadow: 0 0 16px rgba(68, 218, 126, 0.8);
}

.service-status strong,
.service-status small {
  display: block;
}

.service-status strong {
  font-size: 13px;
}

.service-status small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.home-hint {
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.42);
  font-size: 11px;
}

.home-hint span {
  padding: 2px 5px;
  color: #ff9b9e;
  border: 1px solid rgba(255, 58, 63, 0.18);
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.3);
  font-family: "Cascadia Code", Consolas, monospace;
}

.error-stage {
  min-height: calc(100vh - 54px);
  padding: 116px 0 48px;
  display: grid;
  place-items: center;
}

.error-card {
  width: min(620px, 100%);
  padding: clamp(28px, 5vw, 52px);
  border-radius: 24px;
  text-align: center;
}

.error-code {
  margin-bottom: 12px;
  color: rgba(255, 255, 255, 0.1);
  font-size: clamp(70px, 13vw, 130px);
  font-weight: 900;
  letter-spacing: -0.08em;
  line-height: 0.78;
}

.error-card h1 {
  margin: 0;
  font-size: clamp(28px, 5vw, 44px);
  letter-spacing: -0.04em;
  text-transform: uppercase;
}

.error-message {
  max-width: 470px;
  margin: 14px auto 0;
  color: rgba(255, 255, 255, 0.72);
}

.error-hint {
  margin-top: 24px;
  padding: 12px 14px;
  color: rgba(255, 255, 255, 0.49);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.26);
  font-size: 11px;
}

@media (max-width: 900px) {
  .hero-card {
    grid-template-columns: minmax(0, 1fr) 210px;
    gap: 20px;
  }

  .hero-emblem {
    width: 190px;
    height: 190px;
  }

  .hero-orbit-outer {
    width: 188px;
  }

  .ticket-summary {
    grid-template-columns: 1fr;
  }

  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  :root {
    --radius: 16px;
  }

  .page-background {
    background-position: 50% top;
  }

  .topbar {
    top: 10px;
    width: calc(100% - 20px);
    min-height: 58px;
    padding: 8px 10px;
    border-radius: 15px;
  }

  .brand {
    gap: 10px;
  }

  .brand-logo {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }

  .brand-copy strong {
    font-size: 12px;
  }

  .brand-copy small {
    font-size: 8px;
  }

  .page-shell,
  .site-footer {
    width: calc(100% - 20px);
  }

  .ticket-hero {
    min-height: 0;
    padding: 78px 0 20px;
  }

  .hero-card {
    min-height: 245px;
    padding: 24px 18px;
    grid-template-columns: 1fr;
    gap: 0;
    border-radius: 20px;
    transform: none;
  }

  .hero-heading {
    z-index: 3;
    padding: 0 54px 0 14px;
    transform: none;
  }

  .hero-heading h1 {
    font-size: clamp(29px, 9vw, 38px);
  }

  .hero-description {
    max-width: 88%;
    font-size: 12px;
  }

  .hero-tag {
    padding: 5px 9px;
    font-size: 10px;
  }

  .hero-emblem {
    position: absolute;
    z-index: 1;
    top: 50%;
    right: -16px;
    width: 150px;
    height: 150px;
    opacity: 0.34;
    transform: translateY(-50%);
  }

  .hero-logo-shell {
    width: 82px;
    height: 96px;
  }

  .hero-orbit-outer {
    width: 146px;
    height: 82px;
  }

  .hero-orbit-inner {
    width: 118px;
    height: 118px;
  }

  .ticket-summary {
    padding: 17px;
    border-radius: 17px;
    transform: none;
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }

  .summary-item dd {
    white-space: normal;
  }

  .panel-heading {
    padding: 17px;
  }

  .transcript-panel {
    margin-top: 18px;
    border-radius: 18px;
    transform: none;
  }

  .message-list {
    padding: 7px 10px 16px;
  }

  .message {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 9px;
    padding: 10px 0;
  }

  .avatar {
    width: 34px;
    height: 34px;
    font-size: 12px;
  }

  .message-card {
    padding: 11px;
    transform: none;
  }

  .message-card:hover {
    transform: none;
  }

  .message-header {
    flex-wrap: wrap;
  }

  .message-header time {
    width: 100%;
    margin-left: 0;
  }

  .embed-fields {
    grid-template-columns: 1fr;
  }

  .lightbox {
    padding: 12px;
  }

  .lightbox-close {
    top: 8px;
    right: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
