[v-cloak] {
  display: none !important;
}

body.shortlink-mobile-page {
  background: #f5f7fa;
  color: #172033;
}

body.shortlink-mobile-page #app {
  min-height: 100vh;
  background: #f5f7fa;
}

.shortlink-mobile-page *,
.shortlink-mobile-page *::before,
.shortlink-mobile-page *::after {
  box-sizing: border-box;
  letter-spacing: 0;
}

.shortlink-main {
  width: 100%;
  max-width: 760px;
  min-height: calc(100vh - var(--h5-app-navbar, 68px));
  margin: 0 auto;
  padding: calc(var(--h5-app-topbar, 56px) + 14px) 14px calc(var(--h5-app-navbar, 68px) + 112px);
}

.shortlink-shell {
  display: grid;
  gap: 12px;
}

.shortlink-hero {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 2px 6px;
}

.shortlink-hero div {
  min-width: 0;
}

.shortlink-hero p {
  margin: 0 0 5px;
  color: #667085;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
}

.shortlink-hero h1 {
  margin: 0;
  overflow: hidden;
  color: #172033;
  font-size: 24px !important;
  font-weight: 800;
  line-height: 1.25;
  text-align: left !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shortlink-hero span {
  display: block;
  margin-top: 5px;
  color: #667085;
  font-size: 13px;
  line-height: 1.45;
}

.shortlink-hero > strong {
  flex: 0 0 auto;
  min-width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #e7f8f1;
  color: #16835d;
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
}

.shortlink-panel {
  min-width: 0;
  padding: 14px;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  background: #fff;
}

.shortlink-panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.shortlink-panel-heading h2 {
  margin: 0;
  color: #172033;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.25;
}

.shortlink-panel-heading p {
  margin: 4px 0 0;
  color: #667085;
  font-size: 12px;
  line-height: 1.4;
}

.shortlink-panel-heading > span {
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 4px;
  background: #e8eefc;
  color: #2f5bd3;
  font-size: 12px;
  font-weight: 800;
}

.shortlink-panel-heading > i {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: #f0fbf7;
  color: #16835d;
  font-size: 18px;
}

.shortlink-textarea {
  width: 100%;
  min-height: 184px;
  resize: vertical;
  padding: 11px 12px 11px 48px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  outline: 0;
  background: #fbfcfe;
  color: #172033;
  font-size: 13px;
  line-height: 23px;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.shortlink-textarea:focus {
  border-color: #2f5bd3;
  box-shadow: 0 0 0 3px rgba(47, 91, 211, 0.12);
}

.shortlink-textarea::placeholder {
  color: #98a2b3;
}

.shortlink-mobile-page .textarea-group {
  position: relative;
}

.shortlink-mobile-page .textarea-wrap {
  top: 0;
  left: 0;
  overflow: hidden;
  border-radius: 8px 0 0 8px;
}

.shortlink-mobile-page .textarea-rows {
  padding-top: 11px !important;
}

.shortlink-settings .el-form-item {
  margin-bottom: 14px;
}

.shortlink-settings .el-form-item:last-child {
  margin-bottom: 0;
}

.shortlink-settings .el-form-item__label {
  padding: 0 0 7px !important;
  color: #344054;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
}

.shortlink-rule-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 128px;
  gap: 8px;
}

.shortlink-settings .el-select,
.shortlink-settings .el-input-number {
  width: 100%;
}

.shortlink-settings .el-input__inner,
.shortlink-settings .el-input-number__decrease,
.shortlink-settings .el-input-number__increase {
  height: 42px;
  line-height: 42px;
}

.shortlink-settings .el-input__inner {
  border-radius: 8px;
  font-weight: 700;
}

.shortlink-settings .el-slider {
  padding: 3px 2px 0;
}

.shortlink-note {
  padding: 12px;
  border: 1px solid #d8e7ff;
  border-radius: 8px;
  background: #f2f7ff;
}

.shortlink-note div {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: flex-start;
  gap: 8px;
}

.shortlink-note i {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: #e8eefc;
  color: #2f5bd3;
  font-size: 16px;
}

.shortlink-note p {
  margin: 0;
  color: #475467;
  font-size: 12px;
  line-height: 1.5;
}

.shortlink-submit-bar {
  position: fixed;
  z-index: 2500;
  right: 0;
  bottom: var(--h5-app-navbar, 68px);
  left: 0;
  width: 100%;
  max-width: 750px;
  margin: 0 auto;
  padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid #e4e7ec;
  background: #fff;
  box-shadow: 0 -8px 22px rgba(16, 24, 40, 0.08);
}

.shortlink-submit-button {
  width: 100% !important;
  min-height: 48px !important;
  border: 0 !important;
  border-radius: 8px !important;
  background: #20a978 !important;
  color: #fff !important;
  font-size: 15px !important;
  font-weight: 800 !important;
  box-shadow: 0 8px 20px rgba(32, 169, 120, 0.22);
}

.shortlink-result-dialog {
  width: calc(100vw - 24px) !important;
  max-width: 520px;
  max-height: calc(100dvh - var(--h5-app-topbar, 56px) - var(--h5-app-navbar, 68px) - 36px);
  display: flex;
  flex-direction: column;
  margin: calc(var(--h5-app-topbar, 56px) + 12px) auto 0 !important;
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
}

.shortlink-mobile-page .v-modal {
  z-index: 3400 !important;
}

.shortlink-mobile-page .el-dialog__wrapper {
  z-index: 3500 !important;
}

.shortlink-result-dialog .el-dialog__header {
  min-height: 42px;
  padding: 0;
}

.shortlink-result-dialog .el-dialog__headerbtn {
  top: 10px;
  right: 12px;
  z-index: 2;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: #fff;
}

.shortlink-result-dialog .el-dialog__close {
  color: #667085;
  font-size: 20px;
  font-weight: 800;
}

.shortlink-result-dialog .el-dialog__body {
  min-height: 0;
  padding: 0 14px 14px;
  overflow: hidden;
}

.shortlink-result-modal {
  min-height: 0;
  max-height: calc(100dvh - var(--h5-app-topbar, 56px) - var(--h5-app-navbar, 68px) - 92px);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.shortlink-result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-radius: 8px;
  background: #ecfdf6;
}

.shortlink-result-header p {
  margin: 0 0 4px;
  color: #16835d;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
}

.shortlink-result-header h2 {
  margin: 0;
  color: #172033;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.25;
}

.shortlink-result-header i {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #fff;
  color: #20a978;
  font-size: 22px;
}

.shortlink-result-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.shortlink-result-actions .el-button {
  width: 100%;
  min-height: 40px;
  margin: 0 !important;
  border-radius: 8px !important;
  font-size: 13px !important;
  font-weight: 800 !important;
}

.shortlink-result-actions .el-button--primary.is-plain {
  border-color: #b9c9ff !important;
  background: #eef4ff !important;
  color: #2f5bd3 !important;
}

.shortlink-result-actions .el-button--success.is-plain {
  border-color: #abe8ce !important;
  background: #ecfdf6 !important;
  color: #16835d !important;
}

.shortlink-result-list {
  min-height: 0;
  display: grid;
  gap: 8px;
  overflow-y: auto;
  padding-right: 2px;
  -webkit-overflow-scrolling: touch;
}

.shortlink-result-item {
  min-width: 0;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 36px;
  align-items: flex-start;
  gap: 10px;
  padding: 11px;
  border: 1px solid #e4e7ec;
  border-radius: 7px;
  background: #f8fafc;
}

.shortlink-result-item > span {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: #e7f8f1;
  color: #16835d;
  font-size: 12px;
  font-weight: 800;
}

.shortlink-result-item div {
  min-width: 0;
}

.shortlink-result-item p,
.shortlink-result-item strong {
  min-width: 0;
  display: block;
  margin: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.shortlink-result-item p {
  margin-bottom: 4px;
  color: #667085;
  font-size: 12px;
  line-height: 1.45;
}

.shortlink-result-item strong {
  color: #172033;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.shortlink-copy-item {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 6px;
  background: #e8eefc;
  color: #2f5bd3;
  font-size: 17px;
}

.shortlink-copy-item:active {
  background: #dbe6ff;
}

.shortlink-empty {
  min-height: 136px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px dashed #d8dee9;
  border-radius: 8px;
  background: #f8fafc;
  color: #667085;
  text-align: center;
}

.shortlink-empty i {
  font-size: 28px;
}

.shortlink-empty p {
  margin: 0;
  font-size: 13px;
}

.shortlink-loading {
  position: fixed;
  z-index: 5000;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.42);
}

.shortlink-spinner {
  width: 42px;
  height: 42px;
  border: 3px solid rgba(255, 255, 255, 0.65);
  border-top-color: #2f5bd3;
  border-radius: 50%;
  animation: shortlink-spin 800ms linear infinite;
}

@keyframes shortlink-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 374px) {
  .shortlink-main {
    padding-right: 10px;
    padding-left: 10px;
  }

  .shortlink-hero h1 {
    font-size: 22px !important;
  }

  .shortlink-rule-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .shortlink-result-dialog .el-dialog__body {
    padding-right: 10px;
    padding-left: 10px;
  }
}

@media (min-width: 640px) {
  .shortlink-shell {
    gap: 16px;
  }

  .shortlink-main {
    padding-right: 18px;
    padding-left: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .shortlink-spinner {
    animation: none;
  }
}
