body {
  font-family: 'Montserrat', Arial, sans-serif;
  background: #fff;
  color: #282828;
  margin: 0 0 40px 0;
  transition: background 0.3s, color 0.3s;
}

.container {
  max-width: 1024px;
  min-width: 320px;
  margin: 60px auto 40px auto;
  padding: 45px 40px 40px 40px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 10px 40px #0002;
  transition: background 0.3s, box-shadow 0.3s;
}

.logo-title {
  display: flex;
  align-items: center;
  margin-bottom: 25px;
  gap: 22px;
}

.logo-title img {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  box-shadow: 0 2px 10px #3332;
  background: #fff;
}

h1 {
  font-size: 2.8em;
  color: #212150;
  margin-bottom: 0;
  font-weight: 700;
}

h2 {
  font-size: 1.6em;
  color: #444;
  margin-top: 2.5em;
  margin-bottom: 8px;
}

p {
  font-size: 1.10em;
  margin-bottom: 12px;
}

.api-block {
  display: flex;
  align-items: flex-start;
  margin-bottom: 38px;
}

.api-block>div:first-child {
  flex: 1;
}

.api-block>img {
  margin-left: 40px;
  margin-top: 8px;
}

hr {
  margin: 30px 0;
}

.footer {
  color: #888;
  text-align: center;
  margin-top: 40px;
  font-size: 1.08em;
}

.footer-rate {
  color: #666;
  font-size: 0.95em;
  margin-top: 8px;
  font-style: italic;
}

.footer-links {
  text-align: center;
  margin-top: 15px;
  margin-bottom: 0;
}

.footer-link,
.site-link {
  color: #fff;
  background: #212150;
  padding: 2px 13px 4px 13px;
  border-radius: 6px;
  margin: 0 2px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.2s, color 0.2s;
  box-shadow: 0 1px 4px #0002;
  border: 1px solid #212150;
  display: inline-block;
}

.footer-link:hover,
.site-link:hover {
  background: #495afe;
  color: #fff;
  border-color: #495afe;
  text-decoration: none;
}

@media (max-width: 1100px) {
  .container {
    max-width: 97vw;
  }
}

@media (max-width: 750px) {
  .container {
    max-width: 99vw;
    padding: 20px 3vw 24px 3vw;
  }

  .logo-title {
    gap: 12px;
  }

  h1 {
    font-size: 2.0em;
  }

  .api-block {
    flex-direction: column;
  }

  .api-block>img {
    margin: 18px 0 0 0;
    max-width: 90px;
  }

  .logo-title img {
    width: 38px;
    height: 38px;
  }
}

@media (max-width: 480px) {
  .container {
    max-width: 100vw;
    border-radius: 0;
    margin: 0;
  }

  h1 {
    font-size: 1.45em;
  }

  .api-block {
    margin-bottom: 25px;
  }

  p {
    font-size: 1em;
  }
}

code {
  display: inline-block;
  background: #fff;
  color: #222;
  border: 1px solid #ededed;
  padding: 10px 15px;
  border-radius: 7px;
  margin-bottom: 8px;
  font-size: 1.14em;
  position: relative;
  margin-right: 8px;
  min-width: 230px;
  max-width: 63vw;
  word-break: break-all;
  box-sizing: border-box;
  transition: background 0.3s, color 0.3s, border 0.3s;
}

.copy-btn,
.go-btn {
  appearance: none;
  background: #6161e6;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 9px 18px;
  font-size: 1em;
  cursor: pointer;
  margin-left: 7px;
  transition: background 0.2s, color 0.2s;
  font-family: inherit;
}

.copy-btn.copied,
.go-btn:active {
  background: #212150;
  color: #fff;
}

.copy-btn:hover,
.copy-btn:focus,
.go-btn:hover {
  background: #495afe;
}

.sample-img {
  vertical-align: middle;
  height: 80px;
  border-radius: 14px;
  box-shadow: 0 0 4px #aaa;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  body {
    background: #18181c;
    color: #e3e3e3;
  }

  .container {
    background: #23232a;
    box-shadow: 0 2px 18px #000a;
  }

  h1 {
    color: #eee;
  }

  h2 {
    color: #d9d9f7;
  }

  .footer,
  .footer-rate {
    color: #aaa;
  }

  code {
    background: #18181c;
    color: #fff;
    border: 1px solid #333;
  }

  .copy-btn,
  .go-btn {
    background: #4646b8;
    color: #fff;
  }

  .copy-btn.copied,
  .copy-btn:hover,
  .copy-btn:focus,
  .go-btn:hover {
    background: #495afe;
    color: #fff;
  }

  .footer-link,
  .site-link {
    background: #333365;
    border-color: #333365;
  }

  .footer-link:hover,
  .site-link:hover {
    background: #6161e6;
    border-color: #6161e6;
  }
}

@media (max-width: 700px) {
  code {
    max-width: 98vw;
    min-width: 40vw;
  }

  .copy-btn,
  .go-btn {
    width: 90px;
    padding: 12px 0;
    margin-left: 6px;
  }
}

/* Copy notification */
#copy-notification {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #495afe;
  color: white;
  padding: 14px 28px;
  border-radius: 30px;
  box-shadow: 0 4px 15px rgba(73, 90, 254, 0.7);
  font-weight: 700;
  font-size: 18px;
  display: none;
  align-items: center;
  z-index: 9999;
  overflow: hidden;
  width: 240px;
}

#copy-notification.show {
  display: flex;
  animation: slideUpFade 0.4s ease forwards;
}

@keyframes slideUpFade {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

#copy-notification .progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 4px;
  background: #93a7f7;
  animation: progressBar 5s linear forwards;
  width: 100%;
  border-radius: 0 0 30px 30px;
}

@keyframes progressBar {
  from {
    width: 100%;
  }

  to {
    width: 0;
  }
}