:root {
  --bg: #2a3132;
  --surface: #ffffff;
  --surface-muted: #f4f7f9;
  --border: #90afc5;
  --text: #2a3132;
  --text-muted: #5f6d6f;
  --brand: #336b87;
  --brand-strong: #2a3132;
  --accent-soft: #90afc5;
  --neutral: #aaaaaa;
  --ok: #1f7a4d;
  --danger: #a12622;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.2);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 0% 0%, rgba(144, 175, 197, 0.2) 0, rgba(42, 49, 50, 0) 45%),
    radial-gradient(circle at 100% 100%, rgba(51, 107, 135, 0.2) 0, rgba(42, 49, 50, 0) 42%),
    var(--bg);
}

.layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: linear-gradient(180deg, #2f3940 0%, #2a3132 100%);
  border-right: 1px solid rgba(170, 170, 170, 0.3);
  padding: 30px 24px;
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.22);
}

.sidebar-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

.sidebar-footer {
  flex-shrink: 0;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(170, 170, 170, 0.25);
}

.brand {
  font-size: 1.5rem;
  margin: 0 0 8px;
  color: #fff;
  letter-spacing: 0.02em;
}

.subtitle {
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.4;
}

.menu-group {
  margin-bottom: 20px;
}

.menu-title {
  margin: 0 0 8px;
  color: var(--accent-soft);
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.menu-list li {
  margin-bottom: 4px;
}

.menu-list a {
  display: block;
  padding: 10px 12px;
  text-decoration: none;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.88);
  border: 1px solid transparent;
  transition: all 120ms ease-in-out;
}

.menu-list a:hover,
.menu-list a.active {
  background: rgba(144, 175, 197, 0.22);
  color: #fff;
  border-color: rgba(144, 175, 197, 0.35);
}

main {
  padding: 32px;
}

.card {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafb 100%);
  border: 1px solid rgba(144, 175, 197, 0.45);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 22px;
}

h1,
h2 {
  margin-top: 0;
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 8px;
}

.help-tip {
  width: 22px;
  height: 22px;
  min-width: 22px;
  border-radius: 999px;
  border: 1px solid rgba(51, 107, 135, 0.5);
  background: rgba(144, 175, 197, 0.2);
  color: var(--brand-strong);
  font-size: 0.8rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  cursor: pointer;
  position: relative;
}

.help-tip-pop {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(280px, 80vw);
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid rgba(51, 107, 135, 0.35);
  background: #fff;
  color: var(--brand-strong);
  font-size: 0.82rem;
  line-height: 1.35;
  box-shadow: 0 10px 26px rgba(42, 49, 50, 0.2);
  z-index: 20;
}

p {
  line-height: 1.5;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 16px;
}

.tool {
  background: var(--surface-muted);
  border: 1px solid rgba(144, 175, 197, 0.5);
  border-radius: 12px;
  padding: 16px;
}

.tool h3 {
  margin-top: 0;
}

.action-grid a {
  text-decoration: none;
}

.action-tile {
  transition: transform 120ms ease, border-color 120ms ease;
}

.action-tile:hover {
  transform: translateY(-2px);
  border-color: rgba(51, 107, 135, 0.5);
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 11px;
  font-size: 0.95rem;
  font-family: inherit;
  background: #fff;
  color: var(--brand-strong);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(51, 107, 135, 0.2);
}

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

.row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.preview-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 10px 0 14px;
}

.chip {
  border: 1px solid rgba(51, 107, 135, 0.35);
  background: rgba(144, 175, 197, 0.15);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.82rem;
  color: var(--brand-strong);
}

.chip-btn {
  cursor: pointer;
}

.chip-btn.active {
  background: var(--brand);
  color: #fff;
  border-color: rgba(51, 107, 135, 0.8);
}

.utility-bar {
  position: sticky;
  top: 12px;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(144, 175, 197, 0.4);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  border-radius: 12px;
  margin-bottom: 12px;
}

.tab-list {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.tab-btn {
  background: rgba(144, 175, 197, 0.25);
  color: var(--brand-strong);
  border: 1px solid rgba(51, 107, 135, 0.25);
  box-shadow: none;
}

.tab-btn.active {
  background: var(--brand);
  color: #fff;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.payload-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(144, 175, 197, 0.5);
  border-radius: 10px;
  margin-bottom: 10px;
  background: #fff;
}

.payload-row code {
  display: block;
  margin-top: 6px;
  overflow-wrap: anywhere;
}

button {
  border: none;
  background: var(--brand);
  color: #fff;
  border-radius: 10px;
  padding: 10px 15px;
  cursor: pointer;
  font-weight: 600;
  transition: transform 120ms ease, box-shadow 120ms ease, background-color 120ms ease;
  box-shadow: 0 8px 18px rgba(51, 107, 135, 0.28);
}

button:hover {
  background: var(--brand-strong);
  transform: translateY(-1px);
}

button.ghost {
  background: rgba(144, 175, 197, 0.18);
  color: var(--brand-strong);
  border: 1px solid rgba(51, 107, 135, 0.22);
  box-shadow: none;
}

.output {
  margin-top: 10px;
  padding: 14px;
  background: #fff;
  border: 1px solid rgba(144, 175, 197, 0.6);
  border-radius: 10px;
  min-height: 46px;
  overflow-wrap: anywhere;
}

.hint {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.status {
  margin-top: 8px;
  font-size: 0.9rem;
  min-height: 20px;
}

.status.ok {
  color: var(--ok);
}

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

.link-list {
  display: grid;
  gap: 8px;
}

.link-list a {
  color: var(--brand);
  text-decoration: none;
}

.link-list a:hover {
  text-decoration: underline;
}

.about-hero {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 20px;
  align-items: center;
}

.about-avatar {
  width: 220px;
  height: 220px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid rgba(144, 175, 197, 0.6);
  box-shadow: 0 12px 24px rgba(42, 49, 50, 0.25);
}

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

  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid rgba(170, 170, 170, 0.35);
  }

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

  .about-hero {
    grid-template-columns: 1fr;
  }

  .about-avatar {
    width: min(220px, 100%);
  }
}
