:root {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: #172b30;
  background: #f3f6f5;
  --accent: #117a65;
  --accent-dark: #0d5e4e;
  --line: #dce5e1;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #f3f6f5;
  color: #172b30;
}

.container {
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 24px;
}

.hero-bg {
  background: linear-gradient(180deg, #102926 0%, #132f2c 100%);
  padding-bottom: 48px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #fff;
  font-size: 24px;
  font-weight: 750;
  letter-spacing: -0.5px;
}

.brand span {
  color: #86dcb6;
  font-size: 18px;
  font-weight: 650;
}

.brand-tag {
  font-style: normal;
  font-size: 11px;
  font-weight: 500;
  background: #1f4741;
  color: #a8e5ca;
  padding: 3px 10px;
  border-radius: 99px;
  margin-left: 4px;
}

.topnav {
  display: flex;
  gap: 24px;
  align-items: center;
}

.topnav a {
  color: #c9ded7;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
}

.topnav a:hover {
  color: #fff;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1.15fr;
  gap: 36px;
  align-items: start;
  padding-top: 38px;
}

.hero-copy {
  color: #e6f4ef;
  padding-top: 8px;
}

.eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.3px;
  color: #86dcb6;
  background: #1c423d;
  border: 1px solid #2b5c55;
  padding: 6px 12px;
  border-radius: 99px;
  margin-bottom: 16px;
}

.hero-copy h1 {
  font-size: 36px;
  line-height: 1.24;
  letter-spacing: -0.8px;
  margin: 0 0 16px;
  color: #fff;
}

.lead {
  font-size: 14px;
  line-height: 1.85;
  color: #bdd5cd;
  margin: 0 0 26px;
}

.lead code {
  background: #1e453f;
  color: #9be7c5;
  padding: 2px 7px;
  border-radius: 4px;
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.stat-pill {
  background: #183a36;
  border: 1px solid #27524c;
  border-radius: 10px;
  padding: 14px 16px;
}

.stat-pill small {
  display: block;
  font-size: 11px;
  color: #9bbcb1;
  margin-bottom: 6px;
}

.stat-pill strong {
  font-size: 20px;
  color: #fff;
  letter-spacing: -0.5px;
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 26px 28px;
  margin-bottom: 24px;
  box-shadow: 0 6px 20px rgba(19, 47, 44, 0.04);
}

.shortener-card {
  margin-bottom: 0;
  box-shadow: 0 18px 50px rgba(8, 25, 22, 0.28);
}

h2 {
  font-size: 19px;
  margin: 0 0 6px;
}

.card-desc {
  font-size: 13px;
  color: #61766c;
  margin: 0 0 18px;
}

label {
  display: grid;
  gap: 7px;
  font-size: 13px;
  font-weight: 500;
  color: #365247;
  margin-bottom: 14px;
}

input[type="url"],
input[type="text"],
textarea {
  width: 100%;
  border: 1px solid #cddad3;
  background: #fff;
  padding: 11px 13px;
  border-radius: 8px;
  color: #172b30;
  font: inherit;
  font-size: 13.5px;
  line-height: 1.55;
  resize: vertical;
}

input:focus,
textarea:focus {
  outline: 2px solid #98d4bd;
  outline-offset: 1px;
}

.share-preview {
  margin-top: 12px;
}

.share-preview small {
  display: block;
  font-size: 11px;
  color: #466055;
  margin-bottom: 5px;
}

.share-preview pre {
  padding: 12px 14px;
  font-size: 12px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-all;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: end;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 10px;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.checkbox-label input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

button,
.btn-link {
  cursor: pointer;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  padding: 10px 18px;
  font: inherit;
  font-size: 13px;
  font-weight: 550;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: filter 0.15s;
}

button:hover,
.btn-link:hover {
  filter: brightness(0.95);
}

button:disabled {
  opacity: 0.55;
  cursor: wait;
}

button.secondary,
.btn-link.secondary {
  background: #eaf1ed;
  color: #265446;
}

.btn-lg {
  padding: 12px 24px;
  font-size: 14px;
}

.actions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 4px;
}

.notice {
  border: 1px solid #d6c28d;
  background: #fff8df;
  color: #5c4813;
  padding: 11px 14px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 13px;
}

.notice.error {
  border-color: #f1b7b1;
  background: #fdecea;
  color: #8a1c13;
}

.notice.success {
  border-color: #9be7c5;
  background: #e9f9f1;
  color: #0d5e4e;
}

.result-box {
  margin-top: 20px;
  padding: 18px;
  border-radius: 10px;
  background: #f5fbf8;
  border: 1px solid #bde5d2;
}

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.short-url-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #fff;
  border: 1px solid #dcebe3;
  padding: 12px 14px;
  border-radius: 8px;
  flex-wrap: wrap;
}

.short-url-display > a {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  word-break: break-all;
}

.short-url-display > a:hover {
  text-decoration: underline;
}

.result-actions {
  display: flex;
  gap: 8px;
}

.result-meta {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 20px;
  margin-top: 12px;
  font-size: 12px;
  color: #4e665c;
}

.result-meta .meta-full {
  grid-column: 1 / -1;
}

.main-content {
  padding-top: 32px;
  padding-bottom: 24px;
}

.sectionhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.inline-form {
  display: flex;
  gap: 12px;
  max-width: 680px;
}

.inline-form input {
  flex: 1;
}

.stats-detail {
  margin-top: 18px;
  padding: 18px;
  border-radius: 10px;
  background: #f7faf8;
  border: 1px solid #dce5e1;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.stat-item small {
  display: block;
  font-size: 11px;
  color: #71857c;
  margin-bottom: 5px;
}

.stat-item .stat-num {
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
}

.stat-item.full {
  grid-column: 1 / -1;
  padding-top: 8px;
  border-top: 1px solid #e6eeea;
}

.tablewrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th {
  text-align: left;
  font-size: 11px;
  letter-spacing: 0.4px;
  color: #6f8279;
  font-weight: 600;
  background: #f6f9f7;
}

th,
td {
  padding: 13px 12px;
  border-bottom: 1px solid #e8eeea;
  vertical-align: middle;
}

td button {
  padding: 6px 10px;
  font-size: 12px;
  margin-right: 6px;
}

.url-cell {
  max-width: 340px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.badge {
  display: inline-block;
  padding: 4px 9px;
  border-radius: 6px;
  background: #e9f5ee;
  color: #1f6d4f;
  font-size: 11px;
  font-weight: 600;
}

.badge-live {
  background: #dff7ec;
  color: #0b6e4f;
  border: 1px solid #86dcb6;
}

.muted {
  font-size: 12px;
  color: #76887f;
  margin: 0;
}

.empty {
  text-align: center;
  padding: 36px;
  color: #82948a;
}

.break-all {
  word-break: break-all;
}

code {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  background: #eaf2ee;
  color: #154739;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
}

pre {
  overflow: auto;
  background: #132f2c;
  color: #cde8dc;
  padding: 18px;
  border-radius: 9px;
  line-height: 1.7;
  font-size: 12px;
  margin: 0;
}

pre code {
  background: transparent;
  color: inherit;
  padding: 0;
}

.api-table-wrap {
  margin-bottom: 22px;
}

.code-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.code-card {
  border: 1px solid #e3ece8;
  border-radius: 10px;
  padding: 16px;
  background: #fafcfb;
}

.code-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.code-head h3 {
  font-size: 14px;
  margin: 0;
}

.site-footer {
  padding: 20px 24px 44px;
  color: #6a7d74;
  font-size: 13px;
}

.site-footer .muted {
  margin-left: 10px;
}

[hidden] {
  display: none !important;
}

@media (max-width: 920px) {
  .hero-grid,
  .code-grid,
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .inline-form {
    flex-direction: column;
  }
}
