:root {
  color-scheme: dark;
  --bg: #0b0f14;
  --bg-2: #111820;
  --panel: rgba(18, 24, 31, 0.88);
  --panel-solid: #151b22;
  --panel-soft: rgba(255, 255, 255, 0.055);
  --text: #eef3f7;
  --muted: #9aa7b2;
  --line: rgba(228, 238, 246, 0.16);
  --line-strong: rgba(228, 238, 246, 0.28);
  --primary: #00d4ff;
  --primary-dark: #0097b7;
  --warning: #f7c948;
  --danger: #ff4d5b;
  --black: #05070a;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
  --radius: 6px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(115deg, rgba(0, 212, 255, 0.09), transparent 34%),
    linear-gradient(245deg, rgba(247, 201, 72, 0.08), transparent 30%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 72px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.02) 0 1px, transparent 1px 72px),
    linear-gradient(135deg, var(--bg) 0%, var(--bg-2) 55%, #080b0f 100%);
  color: var(--text);
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  line-height: 1.6;
}

body::before {
  content: "";
  position: fixed;
  inset: -28px;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(5, 7, 10, 0.72), rgba(5, 7, 10, 0.24), rgba(5, 7, 10, 0.78)),
    url("../img/pages/notes/bg5.jpeg") center / cover;
  filter: blur(18px) saturate(0.86);
  opacity: 0.72;
  transform: scale(1.04);
  pointer-events: none;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(120deg, transparent 0 58%, rgba(0, 212, 255, 0.1) 58% 58.3%, transparent 58.3%),
    linear-gradient(120deg, transparent 0 72%, rgba(247, 201, 72, 0.1) 72% 72.2%, transparent 72.2%),
    rgba(5, 7, 10, 0.38);
  pointer-events: none;
}

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

.app-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 52px;
}

.topbar,
.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  border-bottom: 0;
  padding-bottom: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.brand-mark {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid rgba(0, 212, 255, 0.55);
  border-radius: 0;
  background:
    linear-gradient(135deg, rgba(0, 212, 255, 0.24), rgba(255, 255, 255, 0.05)),
    #101720;
  color: #fff;
  clip-path: polygon(0 0, 100% 0, 100% 76%, 76% 100%, 0 100%);
  box-shadow: inset 0 -3px 0 rgba(0, 212, 255, 0.44), 0 0 28px rgba(0, 212, 255, 0.2);
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.8px;
}

.nav-link {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  padding: 8px 13px;
  transition: border-color 140ms ease, color 140ms ease, background 140ms ease;
}

.nav-link:hover {
  border-color: rgba(0, 212, 255, 0.55);
  background: rgba(0, 212, 255, 0.08);
  color: var(--text);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(300px, 0.96fr);
  gap: 28px;
  align-items: stretch;
  min-height: 430px;
  padding: 20px 0 18px;
}

.command-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 270px;
  gap: 16px;
  align-items: stretch;
  min-height: 590px;
}

.module-rail,
.command-main,
.notice-window,
.status-board {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.055)),
    rgba(11, 16, 22, 0.46);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(18px) saturate(1.1);
  -webkit-backdrop-filter: blur(18px) saturate(1.1);
}

.glass-panel {
  border-radius: 0;
}

.module-rail,
.notice-window {
  position: relative;
  overflow: hidden;
  padding: 18px;
}

.module-rail {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.module-button {
  display: grid;
  gap: 2px;
  min-height: 54px;
  border: 0;
  border-left: 3px solid transparent;
  background: transparent;
  padding: 10px 12px;
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.module-button:hover,
.module-button.is-active {
  border-left-color: rgba(0, 212, 255, 0.72);
  background: linear-gradient(90deg, rgba(0, 212, 255, 0.18), rgba(255, 255, 255, 0.045));
  transform: translateX(3px);
}

.module-button strong {
  color: var(--primary);
  font-size: 12px;
  letter-spacing: 1.8px;
}

.module-button span {
  color: var(--text);
  font-size: 15px;
  font-weight: 900;
}

.command-main {
  position: relative;
  display: grid;
  grid-template-rows: 1fr;
  gap: 18px;
  overflow: hidden;
  padding: 22px;
  clip-path: none;
}

.command-main::before {
  content: " AI OPERATIONS";
  position: absolute;
  right: 22px;
  top: 18px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 2px;
}

.command-main .hero-copy {
  align-self: start;
  z-index: 1;
}

.status-board {
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 0;
  background: transparent;
  backdrop-filter: blur(12px);
}

.notice-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  border-bottom: 0;
  padding-bottom: 12px;
}

.notice-header h2 {
  margin: 4px 0 0;
  font-size: 22px;
}

.notice-carousel {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  overflow: hidden;
}

.notice-card {
  min-height: 450px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(0deg, rgba(5, 7, 10, 0.7), rgba(5, 7, 10, 0.2)),
    linear-gradient(135deg, rgba(0, 212, 255, 0.18), transparent 52%),
    rgba(255, 255, 255, 0.08);
  padding: 24px;
  animation: notice-slide 12s infinite;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.notice-card span {
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 1.5px;
}

.notice-card h3 {
  margin: 10px 0 8px;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.2;
}

.notice-card p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

@keyframes notice-slide {
  0%, 27% {
    transform: translateX(0);
  }

  33%, 60% {
    transform: translateX(-100%);
  }

  66%, 93% {
    transform: translateX(-200%);
  }

  100% {
    transform: translateX(0);
  }
}

.eyebrow,
.feature-card span,
.kicker {
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 1.8px;
  text-transform: uppercase;
}

.hero-copy,
.page-title {
  position: relative;
}

.hero-copy h1,
.page-title h1 {
  margin: 8px 0 0;
  max-width: 820px;
  font-size: clamp(36px, 5.4vw, 70px);
  line-height: 0.98;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-copy p,
.page-title p {
  max-width: 720px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 17px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.hero-panel {
  min-height: 340px;
  border: 1px solid var(--line-strong);
  background:
    linear-gradient(135deg, rgba(5, 7, 10, 0.18), rgba(5, 7, 10, 0.72)),
    url("../img/pages/notes/bg5.jpeg") center / cover;
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 34px), calc(100% - 34px) 100%, 0 100%);
}

.hero-panel::before {
  content: "RHODES TERMINAL";
  position: absolute;
  left: 18px;
  top: 16px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 2px;
}

.hero-panel::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 46%;
  background: linear-gradient(0deg, rgba(5, 7, 10, 0.9), transparent);
}

.hero-stats {
  position: absolute;
  inset: auto 18px 18px;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.stat {
  padding: 13px;
  border: 0;
  border-left: 3px solid rgba(0, 212, 255, 0.52);
  background: rgba(8, 12, 16, 0.42);
  backdrop-filter: blur(12px);
}

.stat strong {
  display: block;
  color: #fff;
  font-size: 25px;
  line-height: 1;
}

.stat span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
}

.feature-card,
.tool-card,
.result-card {
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025)),
    var(--panel);
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.22);
}

.feature-card {
  position: relative;
  display: flex;
  min-height: 156px;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px;
  overflow: hidden;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.feature-card::after,
.tool-card::after,
.result-card::after {
  content: "";
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, transparent 50%, rgba(0, 212, 255, 0.42) 50%);
  pointer-events: none;
}

.feature-card:hover {
  border-color: rgba(0, 212, 255, 0.58);
  box-shadow: 0 22px 55px rgba(0, 212, 255, 0.12), 0 16px 45px rgba(0, 0, 0, 0.3);
  transform: translateY(-3px);
}

.feature-card h2 {
  margin: 12px 0 7px;
  font-size: 21px;
  line-height: 1.25;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.page-title {
  margin: 10px 0 24px;
  border-left: 5px solid var(--primary);
  padding-left: 18px;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 430px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.tool-card,
.result-card {
  position: relative;
  padding: 22px;
  overflow: hidden;
}

.tool-card h2,
.result-card h2 {
  margin: 0 0 18px;
  color: #fff;
  font-size: 18px;
  letter-spacing: 0;
}

.field,
.mb-3 {
  margin-bottom: 16px;
}

.field label,
.mb-3 label {
  display: block;
  margin-bottom: 7px;
  color: #c9d4dc;
  font-size: 13px;
  font-weight: 900;
}

input[type="text"],
input[type="url"],
input[type="file"],
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0;
  background: rgba(5, 7, 10, 0.64);
  color: var(--text);
  font: inherit;
  outline: none;
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

input[type="text"],
input[type="url"],
select,
textarea {
  padding: 12px 13px;
}

input[type="file"] {
  padding: 10px;
}

textarea {
  min-height: 134px;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: #6f7b86;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(0, 212, 255, 0.78);
  background: rgba(5, 7, 10, 0.86);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.14);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

button,
.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(0, 212, 255, 0.5);
  border-radius: 0;
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.22), rgba(0, 151, 183, 0.76));
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  padding: 10px 16px;
  text-transform: uppercase;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
  transition: border-color 140ms ease, transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

button:hover,
.button:hover {
  border-color: rgba(247, 201, 72, 0.72);
  box-shadow: 0 0 26px rgba(0, 212, 255, 0.18);
  transform: translateY(-1px);
}

button:disabled {
  cursor: progress;
  opacity: 0.62;
  transform: none;
}

.secondary {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
}

.secondary:hover {
  border-color: rgba(255, 255, 255, 0.34);
  box-shadow: none;
}

.preview,
.responses,
#responses {
  display: grid;
  gap: 14px;
}

.empty-state {
  display: grid;
  min-height: 260px;
  place-items: center;
  border: 1px dashed var(--line-strong);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02)),
    rgba(5, 7, 10, 0.34);
  color: var(--muted);
  text-align: center;
  padding: 24px;
}

.media-preview img,
.responses img,
#responses img,
#preview img {
  width: 100%;
  max-height: 560px;
  object-fit: contain;
  border: 1px solid var(--line);
  background: #05070a;
}

.responses p,
#responses p,
.text-result,
.audio-item,
.image-item,
.position-relative,
#preview {
  margin: 0;
  border: 1px solid var(--line);
  background: rgba(5, 7, 10, 0.48);
  padding: 14px;
}

#preview:empty {
  display: none;
}

audio {
  width: 100%;
}

.notice-error {
  color: var(--danger);
}

.terminal-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 22px;
}

.terminal-strip span {
  min-height: 8px;
  background: var(--line);
}

.terminal-strip span:nth-child(2) {
  background: var(--primary);
}

.terminal-strip span:nth-child(4) {
  background: var(--warning);
}

.chat-page {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.chat-header,
.chat-input,
.chat-history {
  width: min(1040px, calc(100% - 32px));
  margin-right: auto;
  margin-left: auto;
}

.chat-header {
  padding-top: 22px;
}

.chat-history {
  overflow-y: auto;
  padding: 16px 0 26px;
}

.message {
  display: flex;
  margin-bottom: 14px;
}

.message-content {
  max-width: min(74%, 720px);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  padding: 13px 15px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.22);
  white-space: pre-wrap;
}

.user-message {
  justify-content: flex-end;
}

.user-message .message-content {
  border-color: rgba(0, 212, 255, 0.55);
  background: rgba(0, 212, 255, 0.14);
}

.ai-message .message-content {
  border-left: 4px solid var(--warning);
}

.chat-input {
  display: flex;
  gap: 10px;
  padding: 14px 0 22px;
}

.chat-input input {
  flex: 1;
}

@media (max-width: 900px) {
  .hero,
  .workspace,
  .feature-grid,
  .command-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .command-layout {
    min-height: auto;
  }

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

  .module-rail .kicker {
    grid-column: 1 / -1;
  }

  .message-content {
    max-width: 88%;
  }
}

@media (max-width: 560px) {
  .app-shell {
    width: min(100% - 20px, 1180px);
    padding-top: 18px;
  }

  .topbar,
  .chat-header,
  .chat-input {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-copy h1,
  .page-title h1 {
    font-size: 36px;
  }

  .tool-card,
  .result-card {
    padding: 16px;
  }

  .hero-stats,
  .terminal-strip,
  .status-board,
  .module-rail {
    grid-template-columns: 1fr;
  }

.notice-card {
    min-height: 300px;
  }
}

.home-page .topbar {
  margin-bottom: 18px;
  padding-bottom: 8px;
}

.home-page .brand {
  font-size: 15px;
  line-height: 1.15;
}

.home-page .brand-mark {
  width: 40px;
  height: 40px;
  font-size: 15px;
}

.home-page .brand small {
  margin-top: 2px;
  font-size: 10px;
  letter-spacing: 1.2px;
}

.home-page .command-layout {
  grid-template-columns: 220px minmax(0, 1fr) 280px;
  min-height: 560px;
}

.home-page .module-rail,
.home-page .notice-window,
.home-page .command-main {
  padding: 20px;
}

.home-page .kicker {
  margin: 0 0 12px;
  font-size: 11px;
  letter-spacing: 1.4px;
}

.home-page .module-button {
  min-height: 50px;
  padding: 9px 11px;
}

.home-page .module-button strong {
  font-size: 11px;
  letter-spacing: 1.4px;
}

.home-page .module-button span {
  font-size: 14px;
  font-weight: 800;
}

.home-page .notice-header {
  margin-bottom: 10px;
  padding-bottom: 6px;
}

.home-page .notice-header h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 850;
}

.home-page .notice-card {
  min-height: 430px;
  padding: 24px;
  background:
    linear-gradient(0deg, rgba(5, 7, 10, 0.82), rgba(5, 7, 10, 0.28)),
    linear-gradient(135deg, rgba(0, 212, 255, 0.2), transparent 50%),
    var(--notice-image) center / cover;
  background-blend-mode: normal, screen, normal;
}

.home-page .notice-card-system {
  --notice-image: url("../img/pages/notes/bg2.jpg");
}

.home-page .notice-card-tip {
  --notice-image: url("../img/pages/notes/bg3.jpeg");
}

.home-page .notice-card-comms {
  --notice-image: url("../img/pages/notes/bg4.jpeg");
}

.home-page .notice-card span {
  font-size: 11px;
  letter-spacing: 1.3px;
}

.home-page .notice-card h3 {
  max-width: 680px;
  margin: 10px 0 10px;
  font-size: clamp(26px, 3.3vw, 38px);
  line-height: 1.12;
  font-weight: 900;
}

.home-page .notice-card p {
  max-width: 680px;
  font-size: 15px;
  line-height: 1.72;
}

.home-page .command-main {
  align-content: start;
}

.home-page .command-main::before {
  font-size: 10px;
  letter-spacing: 1.4px;
}

.home-page .hero-copy h1 {
  margin-top: 10px;
  font-size: clamp(30px, 3.2vw, 40px);
  line-height: 1.08;
  font-weight: 900;
}

.home-page .hero-copy p {
  margin-top: 14px;
  font-size: 14px;
  line-height: 1.75;
}

@media (max-width: 900px) {
  .home-page .command-layout {
    grid-template-columns: 1fr;
  }

  .home-page .notice-card {
    min-height: 340px;
  }
}

@media (max-width: 560px) {
  .home-page .notice-card h3 {
    font-size: 28px;
  }

  .home-page .hero-copy h1 {
    font-size: 30px;
  }
}
