:root {
  --bg-deep: #030306;
  --bg-mid: #0b0d11;
  --surface: #11111a;
  --surface-strong: #15181d;
  --text: #e8ebf3;
  --muted: #a1a8b5;
  --primary: #3be3ff;
  --primary-strong: #12b9d6;
  --accent: #7be7ff;
  --danger: #ff4d73;
  --ring: rgba(59, 227, 255, 0.28);
  --shadow: 0 26px 70px rgba(0, 0, 0, 0.7);
  --radius-xl: 24px;
  --radius-lg: 14px;
  --radius-md: 10px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100dvh;
}

body {
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 500px at 12% -8%, rgba(59, 227, 255, 0.12), transparent 60%),
    radial-gradient(1000px 420px at 90% -12%, rgba(255, 255, 255, 0.05), transparent 55%),
    linear-gradient(160deg, var(--bg-deep) 0%, var(--bg-mid) 100%);
  padding: 24px 16px 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.5;
  overflow-x: hidden;
}

#wrap {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 36px 28px 22px;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(190, 210, 230, 0.48);
  background:
    linear-gradient(170deg, rgba(34, 38, 50, 0.98), rgba(18, 20, 28, 0.99));
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 0 0 2px rgba(59, 227, 255, 0.26),
    0 34px 90px rgba(0, 0, 0, 0.88),
    0 0 70px rgba(59, 227, 255, 0.24);
  backdrop-filter: blur(3px);
}

#shortener-div {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
}

.brand-wordmark {
  display: inline-block;
  margin: 2px auto 10px;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(1.9rem, 6.2vw, 3.4rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: transparent;
  background: linear-gradient(135deg, #cfd6df 0%, #8f9daf 45%, #4be0ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  text-decoration: none;
}

.brand-wordmark:hover,
.brand-wordmark:focus-visible {
  text-decoration: none;
  filter: brightness(1.08);
}

h1,
h2,
h3 {
  margin: 0;
}

h1 {
  font-family: "Segoe UI", "Arial Black", "Helvetica Neue", Arial, sans-serif;
  text-transform: uppercase;
  font-size: clamp(1.1rem, 2.4vw, 1.55rem);
  letter-spacing: 0.12em;
  font-weight: 700;
  color: #d9deea;
}

h2 {
  margin-top: 16px;
  font-size: clamp(1.05rem, 2.3vw, 1.3rem);
  color: var(--muted);
  font-weight: 600;
}

p,
div {
  font-size: 0.97rem;
}

a,
a:link,
a:active,
a:visited {
  color: var(--primary-strong);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  text-decoration: underline;
}

form {
  margin: 0;
}

.js-public-form p {
  margin: 0;
}

.js-public-form p + p {
  margin-top: 18px;
}

.align-value-two {
  margin-top: 18px;
}

.align-value-two .js-public-form p + p {
  margin-top: 18px;
}

#rf {
  width: 100%;
  max-width: 610px;
  height: 54px;
  padding: 0 16px;
  font-size: 1rem;
  color: var(--text);
  background: var(--surface-strong);
  border: 1px solid #343747;
  border-radius: var(--radius-lg);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

#rf::placeholder {
  color: #6f7690;
}

#rf:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--ring);
  transform: translateY(-1px);
  outline: none;
}

#rfb,
input.button,
input.primary,
button {
  width: 50%;
  min-width: 190px;
  max-width: 305px;
  height: 46px;
  margin-top: 18px;
  border: 0;
  border-radius: var(--radius-md);
  padding: 0 18px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #050509;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-strong) 100%);
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(10, 132, 255, 0.28);
  transition: none;
}

#rfb:hover,
input.button:hover,
input.primary:hover,
button:hover {
  transform: none;
  filter: none;
}

#rfb:active,
input.button:active,
input.primary:active,
button:active {
  transform: none;
}

input:focus,
select:focus,
textarea:focus,
button:focus {
  outline: none;
}

#shareboxes {
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid #2f3344;
  border-radius: var(--radius-lg);
  background: #0f1018;
  text-align: center;
}

#origlink {
  display: inline-block;
  max-width: 100%;
  padding: 8px 11px;
  margin: 6px 0 10px;
  border-radius: 9px;
  border: 1px solid #2f3344;
  background: #151820;
  overflow-wrap: anywhere;
  white-space: normal;
  font-weight: 600;
}

#footer {
  margin-top: 22px;
  padding-top: 12px;
  border-top: none;
  text-align: center;
  color: var(--muted);
}

#feedback {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
}

#feedback.is-error,
.result-message.is-error {
  color: #ffd8e0;
  background: rgba(255, 77, 115, 0.16);
  border: 1px solid rgba(255, 77, 115, 0.45);
}

#feedback.is-success,
.result-message.is-success {
  color: #d6fff1;
  background: rgba(0, 255, 179, 0.14);
  border: 1px solid rgba(0, 255, 179, 0.4);
}

.result-message {
  margin: 16px auto 0;
  max-width: 520px;
  padding: 10px 12px;
  border-radius: 10px;
}

.is-submitting #feedback.is-success::before {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 8px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-top-color: #fff;
  border-radius: 50%;
  vertical-align: -2px;
  animation: spin 0.7s linear infinite;
}

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

#footer a {
  color: #d9f6ff;
  font-weight: 700;
  text-shadow: 0 0 16px rgba(59, 227, 255, 0.35);
}

#footer a:hover,
#footer a:focus-visible {
  color: #ffffff;
  text-decoration: none;
}

.align-first-left {
  text-align: left;
}

.align-value-one,
.align-value-two {
  text-align: center;
}

.display-value-none,
.is-hidden,
.inline-hidden {
  display: none;
}

.inline-visible {
  display: inline;
}

input.inline-visible {
  display: inline-block;
}

.sub_wrap {
  max-width: 620px;
  padding-bottom: 28px;
  text-align: left;
  margin: 0 auto;
}

.sub_wrap span {
  background: rgba(255, 240, 183, 0.9);
  padding: 0 4px;
  border-radius: 4px;
}

a.bookmarklet {
  border: 1px solid #2f3344;
  border-radius: 10px;
  padding: 8px 12px;
  background: #141724;
  margin: 3px;
  display: inline-block;
}

@media (max-width: 760px) {
  body {
    padding: max(14px, env(safe-area-inset-top)) 12px max(28px, env(safe-area-inset-bottom));
    display: flex;
    align-items: center;
    justify-content: center;
  }

  #wrap {
    max-width: 100%;
    margin: auto;
    padding: 24px 16px 18px;
    border-radius: 18px;
  }

  .brand-wordmark {
    font-size: clamp(2rem, 10vw, 2.9rem);
  }

  h1 {
    font-size: clamp(0.95rem, 4.2vw, 1.1rem);
    letter-spacing: 0.16em;
  }

  h2 {
    margin-top: 14px;
    font-size: 0.98rem;
    line-height: 1.45;
  }

  #rf {
    height: 50px;
    font-size: 0.95rem;
    padding-inline: 14px;
  }

  #rfb,
  input.button,
  input.primary,
  button {
    width: 100%;
    min-width: 0;
    max-width: none;
    height: 44px;
    margin-top: 18px;
  }
}

@media (max-width: 480px) {
  body {
    padding-inline: 10px;
  }

  #wrap {
    width: 100%;
    padding: 22px 14px 16px;
    border-radius: 16px;
  }

  #shortener-div {
    max-width: 100%;
  }

  .align-value-two {
    margin-top: 16px;
  }

  #rf {
    height: 48px;
    font-size: 16px;
  }

  #rfb,
  input.button,
  input.primary,
  button {
    height: 46px;
    font-size: 0.95rem;
    margin-top: 18px;
  }

  #shareboxes {
    padding: 12px;
  }

  #origlink {
    width: 100%;
  }
}
