*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
}

body {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top left, #0f766e 0, #020617 55%);
  color: #0f172a;
  -webkit-font-smoothing: antialiased;
}

.page {
  min-height: 100vh;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #e5e7eb;
}

.header-main h1 {
  font-size: 1.8rem;
  font-weight: 600;
}

.header-main p {
  font-size: 0.95rem;
  opacity: 0.8;
}

.support-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(22, 163, 74, 0.16);
  color: #bbf7d0;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.support-badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.24);
}

.hidden {
  display: none;
}

.layout {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 2fr);
  gap: 20px;
  align-items: stretch;
}

.panel {
  background: rgba(15, 23, 42, 0.9);
  border-radius: 18px;
  padding: 20px 20px 18px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  box-shadow:
    0 24px 50px rgba(15, 23, 42, 0.9),
    0 0 0 1px rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(14px);
  color: #e5e7eb;
}

.panel h2 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.panel-description {
  font-size: 0.9rem;
  color: #9ca3af;
  margin-bottom: 16px;
}

.cards {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.card {
  border-radius: 14px;
  padding: 14px 14px 12px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.12), rgba(15, 23, 42, 0.96));
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition:
    transform 140ms ease-out,
    box-shadow 140ms ease-out,
    border-color 140ms ease-out,
    background 140ms ease-out;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow:
    0 18px 35px rgba(15, 23, 42, 0.9),
    0 0 0 1px rgba(56, 189, 248, 0.35);
  border-color: rgba(56, 189, 248, 0.7);
  background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.22), rgba(15, 23, 42, 1));
}

.card-icon {
  font-size: 1.4rem;
  margin-bottom: 2px;
}

.card h3 {
  font-size: 1rem;
  font-weight: 600;
}

.card p {
  font-size: 0.85rem;
  color: #d1d5db;
  flex: 1;
}

.btn {
  margin-top: 8px;
  align-self: flex-start;
  border: none;
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  background: linear-gradient(135deg, #38bdf8, #22c55e);
  color: #020617;
  box-shadow:
    0 12px 30px rgba(8, 47, 73, 0.6),
    0 0 0 1px rgba(15, 23, 42, 0.9);
  transition:
    transform 100ms ease-out,
    box-shadow 100ms ease-out,
    filter 100ms ease-out;
}

.btn:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow:
    0 16px 36px rgba(8, 47, 73, 0.75),
    0 0 0 1px rgba(15, 23, 42, 1);
}

.btn:active {
  transform: translateY(0);
  box-shadow:
    0 10px 24px rgba(8, 47, 73, 0.6),
    0 0 0 1px rgba(15, 23, 42, 1);
}

.panel-viewer {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.viewer-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 8px;
}

.viewer-header h2 {
  font-size: 1rem;
}

.viewer-status {
  font-size: 0.75rem;
  color: #9ca3af;
}

.viewer {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: auto;
  border-radius: 12px;
  padding: 14px 14px 16px;
  background: radial-gradient(circle at top, rgba(15, 118, 110, 0.2), rgba(15, 23, 42, 0.98));
  border: 1px solid rgba(148, 163, 184, 0.5);
}

.viewer-placeholder {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #9ca3af;
  text-align: center;
  font-size: 0.9rem;
}

.markdown h1,
.markdown h2,
.markdown h3,
.markdown h4 {
  color: #e5e7eb;
  margin-top: 10px;
  margin-bottom: 4px;
  font-weight: 600;
}

.markdown h1 {
  font-size: 1.2rem;
  border-bottom: 1px solid rgba(55, 65, 81, 0.8);
  padding-bottom: 4px;
}

.markdown h2 {
  font-size: 1.05rem;
}

.markdown h3 {
  font-size: 0.95rem;
}

.markdown p {
  font-size: 0.86rem;
  line-height: 1.6;
  color: #d1d5db;
  margin-bottom: 6px;
}

.markdown ul,
.markdown ol {
  padding-left: 18px;
  margin-bottom: 6px;
}

.markdown li {
  font-size: 0.86rem;
  line-height: 1.6;
  color: #d1d5db;
}

.markdown code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.8rem;
  background: rgba(15, 23, 42, 0.95);
  padding: 2px 4px;
  border-radius: 4px;
  border: 1px solid rgba(31, 41, 55, 0.9);
}

.markdown pre {
  margin-bottom: 8px;
  padding: 10px 10px 8px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(30, 64, 175, 0.8);
  overflow: auto;
}

.markdown pre code {
  border: none;
  padding: 0;
  background: transparent;
}

.markdown table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 10px;
  font-size: 0.8rem;
}

.markdown th,
.markdown td {
  border: 1px solid rgba(55, 65, 81, 0.9);
  padding: 4px 6px;
}

.markdown th {
  background: rgba(15, 23, 42, 0.9);
  color: #e5e7eb;
}

.markdown a {
  color: #38bdf8;
  text-decoration: none;
}

.markdown a:hover {
  text-decoration: underline;
}

.footer {
  margin-top: 4px;
  font-size: 0.75rem;
  color: #9ca3af;
  display: flex;
  justify-content: center;
}

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

  .panel {
    padding: 16px;
  }
}

@media (max-width: 640px) {
  .page {
    padding: 16px;
  }

  .header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .header-main h1 {
    font-size: 1.4rem;
  }
}

