* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: linear-gradient(135deg, #d9f3f0 0%, #dff4ff 50%, #e9f7ff 100%);
  color: #234;
}

button,
textarea {
  font: inherit;
}

.page {
  min-height: 100vh;
  padding: 40px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.container {
  width: 100%;
  max-width: 1180px;
}

.header {
  text-align: center;
  margin-bottom: 28px;
}

.header h1 {
  margin: 0;
  font-size: clamp(30px, 5vw, 40px);
  color: #1f4d67;
  letter-spacing: 0;
}

.header p {
  margin: 12px auto 0;
  max-width: 720px;
  font-size: 16px;
  line-height: 1.6;
  color: #4c7182;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
}

.card {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 28px;
  padding: 24px;
  box-shadow: 0 16px 40px rgba(64, 123, 145, 0.14);
  backdrop-filter: blur(10px);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 10px;
}

.card h2 {
  margin: 0;
  font-size: 20px;
}

.badge {
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: bold;
}

.badge.input {
  background: #dff3ff;
  color: #246b94;
}

.badge.output {
  background: #dffaf0;
  color: #247752;
}

textarea {
  width: 100%;
  min-height: 270px;
  resize: vertical;
  border: 1px solid #bfe8ef;
  border-radius: 22px;
  padding: 16px;
  font-size: 14px;
  line-height: 1.6;
  outline: none;
  background: rgba(242, 251, 255, 0.9);
  color: #1f3340;
}

input {
  width: 100%;
  border: 1px solid #bfe8ef;
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 14px;
  outline: none;
  background: rgba(242, 251, 255, 0.95);
  color: #1f3340;
}

textarea:focus {
  border-color: #78c6d9;
  box-shadow: 0 0 0 4px rgba(120, 198, 217, 0.22);
}

input:focus {
  border-color: #78c6d9;
  box-shadow: 0 0 0 4px rgba(120, 198, 217, 0.22);
}

.readonly {
  background: rgba(242, 255, 250, 0.95);
}

.middle {
  display: flex;
  justify-content: center;
}

.middle-box {
  width: 100%;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 30px;
  padding: 28px 18px;
  box-shadow: 0 18px 44px rgba(64, 123, 145, 0.16);
  text-align: center;
}

.icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 18px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  background: linear-gradient(135deg, #87dff1, #9ce7c9);
  box-shadow: 0 10px 24px rgba(70, 171, 185, 0.25);
}

.auth-box {
  margin-bottom: 14px;
  text-align: left;
}

.auth-box label {
  display: block;
  margin-bottom: 7px;
  font-size: 12px;
  font-weight: bold;
  color: #4e6877;
}

.button {
  border: none;
  border-radius: 16px;
  padding: 14px 20px;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:active {
  transform: translateY(1px);
}

.button:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
}

.button.convert {
  width: 100%;
  color: white;
  background: linear-gradient(135deg, #58bfe0, #63d0ab);
  box-shadow: 0 10px 22px rgba(75, 181, 190, 0.28);
}

.button.copy {
  color: #294b5d;
  background: white;
  border: 1px solid #d6e8f1;
}

.button.open {
  color: white;
  background: linear-gradient(135deg, #76c6ff, #59c9d2);
}

.hint {
  margin-top: 14px;
  font-size: 12px;
  line-height: 1.6;
  color: #648090;
}

.info-box {
  margin-top: 14px;
  background: rgba(245, 249, 251, 0.95);
  border-radius: 18px;
  padding: 14px;
  font-size: 13px;
  line-height: 1.6;
  color: #4e6877;
  word-break: break-word;
}

.info-box div + div {
  margin-top: 8px;
}

.footer {
  margin-top: 22px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 24px;
  padding: 16px 18px;
  box-shadow: 0 12px 28px rgba(64, 123, 145, 0.12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.message {
  font-size: 14px;
  color: #335465;
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

@media (max-width: 980px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .middle-box {
    max-width: 340px;
    margin: 0 auto;
  }

  .footer {
    flex-direction: column;
    align-items: stretch;
  }

  .actions .button {
    width: 100%;
  }
}
