﻿:root {
  --bg: #05070b;
  --bg-panel: rgba(10, 15, 24, 0.88);
  --line: rgba(103, 141, 196, 0.18);
  --line-strong: rgba(121, 165, 219, 0.32);
  --text: #eef4ff;
  --muted: #9caec8;
  --soft: #70839f;
  --accent: #2a557f;
  --accent-strong: #4675a8;
  --accent-glow: rgba(45, 95, 150, 0.32);
  --chip-bg: rgba(35, 52, 75, 0.35);
  --chip-selected: rgba(44, 83, 126, 0.8);
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.45);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 18px;
  --radius-sm: 14px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(42, 76, 121, 0.26), transparent 34%),
    radial-gradient(circle at 85% 20%, rgba(36, 67, 102, 0.32), transparent 26%),
    linear-gradient(180deg, #06080d 0%, #030508 100%);
  color: var(--text);
  font-family: "Aptos", "Segoe UI Variable Display", "Segoe UI", sans-serif;
}

body {
  position: relative;
  overflow-x: hidden;
}

button,
input,
textarea {
  font: inherit;
}

textarea,
input {
  color: var(--text);
}

.page-glow {
  position: fixed;
  width: 26rem;
  height: 26rem;
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
  opacity: 0.28;
  z-index: 0;
}

.page-glow-left {
  top: -5rem;
  left: -8rem;
  background: rgba(46, 89, 142, 0.55);
}

.page-glow-right {
  bottom: -6rem;
  right: -6rem;
  background: rgba(33, 63, 107, 0.45);
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(1280px, calc(100% - 32px));
  margin: 32px auto 48px;
  display: grid;
  gap: 24px;
}

.hero-card,
.workspace-card,
.insight-card,
.config-modal {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(13, 19, 29, 0.92), rgba(8, 12, 18, 0.9));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-card {
  border-radius: var(--radius-xl);
  padding: 28px 30px;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
}

.eyebrow,
.panel-kicker,
.panel-label,
.insight-kicker,
.hover-definition-label,
.score-label,
.tooltip-label,
.modal-note,
.modal-section-label {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  color: var(--muted);
}

.hero-card h1,
.workspace-card h2,
.insight-card h3,
.panel-title-row h3,
.hover-definition h4,
.config-modal h3 {
  margin: 0;
  font-weight: 700;
}

.hero-card h1 {
  font-size: clamp(2rem, 4vw, 3.5rem);
}

.hero-copy {
  max-width: 700px;
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.58;
}

.hero-badges,
.mode-tabs,
.controls-row,
.summary-chip-row,
.option-grid,
.selection-summary,
.suggestions-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.soft-badge,
.panel-tag,
.score-status,
.mode-tab,
.summary-chip,
.option-chip,
.summary-empty {
  border: 1px solid rgba(112, 145, 191, 0.22);
  background: var(--chip-bg);
  color: #dfe9ff;
  border-radius: 999px;
}

.soft-badge {
  padding: 10px 14px;
  white-space: nowrap;
}

.workspace-card,
.insight-card,
.config-modal {
  border-radius: var(--radius-xl);
}

.workspace-card {
  padding: 28px;
  display: grid;
  gap: 24px;
}

.panel-header,
.panel-title-row,
.score-wrap,
.controls-row,
.modal-header,
.modal-footer {
  display: flex;
  align-items: center;
}

.panel-header,
.panel-title-row,
.modal-header,
.modal-footer {
  justify-content: space-between;
  gap: 16px;
}

.score-wrap {
  gap: 16px;
}

.score-ring {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at center, rgba(6, 10, 16, 0.95) 0 54%, transparent 55%),
    conic-gradient(var(--accent-strong) 0deg, rgba(71, 96, 130, 0.26) 0deg);
  border: 1px solid rgba(107, 142, 192, 0.22);
  text-align: center;
}

.score-ring strong {
  display: block;
  font-size: 1.7rem;
}

.score-ring span {
  font-size: 0.72rem;
  color: var(--muted);
}

.score-status {
  display: inline-flex;
  margin: 8px 0 0;
  padding: 8px 12px;
  font-size: 0.88rem;
}

.mode-tabs {
  gap: 12px;
}

.mode-tab {
  padding: 12px 18px;
  cursor: pointer;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.mode-tab.is-active,
.option-chip.is-selected,
.summary-chip {
  background: linear-gradient(180deg, rgba(47, 89, 136, 0.94), rgba(23, 44, 67, 0.98));
  border-color: rgba(126, 177, 238, 0.45);
  box-shadow:
    0 0 0 1px rgba(91, 138, 199, 0.14),
    0 14px 28px rgba(18, 29, 47, 0.42),
    0 0 24px rgba(43, 81, 126, 0.22);
}

.controls-row {
  gap: 12px;
}

.action-button,
.bridge-button,
.icon-button {
  border: 1px solid rgba(109, 146, 194, 0.24);
  background: linear-gradient(180deg, rgba(21, 32, 48, 0.95), rgba(10, 16, 24, 0.95));
  color: var(--text);
  border-radius: 14px;
  cursor: pointer;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.action-button,
.icon-button {
  padding: 12px 18px;
}

.action-button:hover,
.action-button:focus-visible,
.bridge-button:hover,
.bridge-button:focus-visible,
.mode-tab:hover,
.mode-tab:focus-visible,
.option-chip:hover,
.option-chip:focus-visible,
.icon-button:hover,
.icon-button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(120, 164, 219, 0.52);
  box-shadow:
    0 0 0 1px rgba(91, 138, 199, 0.16),
    0 16px 32px rgba(18, 29, 47, 0.52),
    0 0 26px var(--accent-glow);
  outline: none;
}

.action-button.primary {
  background: linear-gradient(180deg, rgba(37, 69, 106, 0.95), rgba(20, 38, 58, 0.98));
}

.action-button.ghost,
.icon-button {
  background: rgba(10, 15, 22, 0.72);
  color: var(--muted);
}

.translate-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 90px minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}

.prompt-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(13, 20, 29, 0.95), rgba(7, 11, 17, 0.92)),
    var(--bg-panel);
  min-height: 560px;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 18px;
  padding: 22px;
}

.panel-tag {
  padding: 8px 12px;
  font-size: 0.82rem;
  align-self: start;
}

textarea,
.modal-search,
.modal-textarea {
  width: 100%;
  border: 1px solid rgba(86, 116, 156, 0.18);
  border-radius: 18px;
  background: rgba(5, 8, 13, 0.82);
  color: var(--text);
  padding: 18px 20px;
}

textarea,
.modal-textarea,
.output-pre {
  font: 500 0.99rem/1.72 "Cascadia Code", "JetBrains Mono", Consolas, monospace;
}

textarea {
  resize: none;
  min-height: 100%;
}

textarea::placeholder,
.modal-search::placeholder,
.modal-textarea::placeholder {
  color: #7588a4;
}

textarea:focus,
.modal-search:focus,
.modal-textarea:focus {
  outline: 1px solid rgba(89, 132, 188, 0.48);
  border-color: rgba(89, 132, 188, 0.38);
  box-shadow: 0 0 0 4px rgba(41, 71, 110, 0.22);
}

.bridge {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 14px;
}

.bridge-line {
  width: 1px;
  height: 100%;
  min-height: 80px;
  background: linear-gradient(180deg, transparent, rgba(103, 141, 196, 0.24), transparent);
}

.bridge-button {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 30%, rgba(69, 116, 180, 0.34), transparent 40%),
    linear-gradient(180deg, rgba(18, 28, 42, 0.98), rgba(8, 13, 20, 0.98));
}

.summary-chip-row {
  min-height: 38px;
  align-items: center;
}

.summary-chip,
.summary-empty,
.option-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  line-height: 1.2;
}

.summary-empty {
  color: var(--muted);
}

.option-chip {
  cursor: pointer;
  justify-content: flex-start;
}

.option-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(149, 181, 223, 0.55);
  box-shadow: inset 0 0 0 2px rgba(8, 14, 23, 0.42);
  flex: 0 0 auto;
}

.option-chip.is-selected .option-dot {
  background: #dcecff;
  box-shadow:
    inset 0 0 0 2px rgba(25, 43, 66, 0.48),
    0 0 14px rgba(83, 131, 194, 0.42);
}

.analysis-output {
  overflow: auto;
  border: 1px solid rgba(86, 116, 156, 0.18);
  border-radius: 18px;
  background: rgba(5, 8, 13, 0.82);
  padding: 20px;
  white-space: pre-wrap;
}
.output-copy-wrap {
  position: relative;
  min-height: 0;
}

.copy-button {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  border: 1px solid rgba(109, 146, 194, 0.24);
  background: linear-gradient(180deg, rgba(21, 32, 48, 0.96), rgba(10, 16, 24, 0.96));
  color: var(--text);
  border-radius: 12px;
  padding: 9px 12px;
  cursor: pointer;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease,
    opacity 160ms ease;
}

.copy-button:hover,
.copy-button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(120, 164, 219, 0.52);
  box-shadow:
    0 0 0 1px rgba(91, 138, 199, 0.16),
    0 16px 32px rgba(18, 29, 47, 0.52),
    0 0 22px var(--accent-glow);
  outline: none;
}

.copy-button[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.copy-button.is-copied {
  background: linear-gradient(180deg, rgba(46, 94, 146, 0.98), rgba(22, 48, 76, 0.98));
  border-color: rgba(138, 187, 242, 0.56);
}

.enhanced-output {
  padding-top: 58px;
}

.output-pre {
  margin: 0;
  color: #eef4ff;
}

.empty-state {
  display: grid;
  place-content: center;
  min-height: 100%;
  text-align: center;
  color: var(--muted);
}

.empty-state p {
  margin: 0 0 10px;
  font-size: 1.05rem;
  color: var(--text);
}

.hover-definition {
  border: 1px solid rgba(88, 120, 163, 0.2);
  border-radius: 18px;
  padding: 16px 18px;
  background: linear-gradient(180deg, rgba(12, 17, 25, 0.94), rgba(7, 11, 17, 0.9));
}

.hover-definition h4,
.hover-definition p {
  margin-top: 0;
}

.hover-definition h4 {
  margin-bottom: 8px;
}

.hover-definition p {
  color: var(--muted);
  line-height: 1.6;
}

.insights-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.35fr;
  gap: 20px;
}

.insight-card {
  padding: 24px;
}

.selection-summary {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.selection-summary li,
.suggestion-item {
  border: 1px solid rgba(88, 120, 163, 0.16);
  background: rgba(8, 12, 18, 0.72);
  border-radius: 16px;
  padding: 14px 16px;
}

.selection-summary strong {
  color: var(--text);
}

.selection-summary span,
.suggestion-item span {
  color: var(--muted);
}

.suggestions-list {
  margin: 16px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.suggestion-item {
  color: var(--text);
  line-height: 1.55;
}

.suggestion-item span {
  display: block;
  margin-top: 6px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: start center;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: rgba(2, 5, 9, 0.72);
  padding: 20px;
}

.config-modal {
  width: min(960px, 100%);
  max-height: min(88vh, 920px);
  min-height: 0;
  margin: auto 0;
  padding: 24px;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 18px;
}

.modal-search {
  height: 54px;
}

.modal-body {
  min-height: 0;
  overflow: auto;
  display: grid;
  gap: 16px;
  padding-right: 4px;
}

.modal-section {
  border: 1px solid rgba(88, 120, 163, 0.16);
  border-radius: 18px;
  background: rgba(8, 12, 18, 0.7);
  padding: 18px;
  display: grid;
  gap: 14px;
}

.modal-section-head h4 {
  margin: 0 0 6px;
}

.modal-section-head p,
.modal-note {
  color: var(--muted);
  line-height: 1.55;
}

.option-grid {
  align-items: stretch;
}

.modal-textarea {
  min-height: 120px;
  resize: vertical;
  background: rgba(88, 101, 122, 0.12);
}

.floating-tooltip {
  position: fixed;
  max-width: 280px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(103, 141, 196, 0.3);
  background: rgba(8, 12, 18, 0.96);
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.45);
  pointer-events: none;
  z-index: 30;
}

.tooltip-label,
.tooltip-text {
  margin: 0;
}

.tooltip-text {
  color: var(--muted);
  line-height: 1.5;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 1100px) {
  .translate-layout,
  .insights-grid {
    grid-template-columns: 1fr;
  }

  .bridge {
    grid-auto-flow: column;
    align-items: center;
    justify-content: center;
  }

  .bridge-line {
    width: 100%;
    height: 1px;
    min-height: 1px;
  }

  .hero-card,
  .panel-header {
    align-items: start;
    flex-direction: column;
  }
}

@media (max-width: 760px) {
  .app-shell {
    width: min(100% - 20px, 100%);
    margin: 16px auto 28px;
  }

  .hero-card,
  .workspace-card,
  .insight-card,
  .config-modal {
    padding: 20px;
  }

  .prompt-panel {
    min-height: 460px;
    padding: 18px;
  }

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

  .action-button,
  .mode-tab {
    width: 100%;
    justify-content: center;
  }

  .modal-footer {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}





