* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.app {
  min-height: 100vh;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.app::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  backdrop-filter: blur(3.5px);
  -webkit-backdrop-filter: blur(3.5px);
  z-index: 0;
}

.container {
  width: 100%;
  max-width: 500px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  padding: 40px 30px;
  backdrop-filter: blur(10px);
  position: relative;
  z-index: 1;
}

/* 头部 */
.header {
  text-align: center;
  margin-bottom: 30px;
}

.logo {
  width: 80px;
  height: 80px;
  margin-bottom: 10px;
  border-radius: 20px;
  animation: float 3s ease-in-out infinite;
  object-fit: cover;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

.title {
  font-size: 32px;
  color: #2d6a4f;
  margin-bottom: 8px;
  font-weight: 700;
}

.subtitle {
  font-size: 14px;
  color: #52b788;
  font-weight: 400;
}

/* 消息提示 */
.message {
  padding: 12px 20px;
  border-radius: 12px;
  margin-bottom: 20px;
  font-size: 14px;
  text-align: center;
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.message-success {
  background: #d8f3dc;
  color: #1b4332;
  border: 1px solid #95d5b2;
}

.message-error {
  background: #ffe5e5;
  color: #c92a2a;
  border: 1px solid #ffc9c9;
}

.message-info {
  background: #e7f5ff;
  color: #1864ab;
  border: 1px solid #a5d8ff;
}

/* 表单 */
.form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.label {
  font-size: 15px;
  font-weight: 900;
  color: #000000;
  display: flex;
  align-items: center;
  gap: 8px;
}

.label-hint {
  font-size: 12px;
  font-weight: 400;
  color: #74c69d;
}

.input-group {
  display: flex;
  align-items: center;
  background: #f8f9fa;
  border: 2px solid #d8f3dc;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.input-group:focus-within {
  border-color: #52b788;
  box-shadow: 0 0 0 3px rgba(82, 183, 136, 0.1);
}

.input-prefix {
  padding: 0 12px;
  font-size: 14px;
  color: #74c69d;
  font-weight: 500;
  white-space: nowrap;
}

.input {
  width: 100%;
  padding: 14px 16px;
  font-size: 15px;
  border: 2px solid #d8f3dc;
  border-radius: 12px;
  background: #f8f9fa;
  color: #2d6a4f;
  transition: all 0.3s ease;
  font-family: inherit;
}

.code-input {
  border: none;
  background: transparent;
  padding: 14px 12px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.input:focus {
  outline: none;
  border-color: #52b788;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(82, 183, 136, 0.1);
}

.input::placeholder {
  color: #95d5b2;
}

.select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2352b788' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

.select::-ms-expand {
  display: none;
}

/* 按钮 */
.btn {
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, #40916c 0%, #52b788 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(64, 145, 108, 0.3);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(64, 145, 108, 0.4);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.btn-secondary {
  background: #fff;
  color: #52b788;
  border: 2px solid #d8f3dc;
}

.btn-secondary:hover:not(:disabled) {
  background: #f1faee;
  border-color: #95d5b2;
}

.btn-copy {
  background: #e9f5f0;
  color: #2d6a4f;
  border: 2px solid #b7e4c7;
  padding: 10px 20px;
  font-size: 14px;
}

.btn-copy:hover:not(:disabled) {
  background: #d8f3dc;
}

/* 结果页面 */
.result {
  text-align: center;
  animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.success-icon {
  font-size: 64px;
  margin-bottom: 20px;
  animation: bounce 0.6s ease-out;
}

@keyframes bounce {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
}

.result-title {
  font-size: 24px;
  color: #2d6a4f;
  margin-bottom: 24px;
  font-weight: 700;
}

.result-box {
  background: linear-gradient(135deg, #d8f3dc 0%, #e9f5f0 100%);
  border: 2px solid #95d5b2;
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.result-url {
  font-size: 18px;
  font-weight: 600;
  color: #1b4332;
  word-break: break-all;
  padding: 12px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 10px;
}

.result-info {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
  text-align: left;
}

.result-info p {
  font-size: 14px;
  color: #2d6a4f;
  margin: 8px 0;
  word-break: break-all;
}

.result-info strong {
  color: #1b4332;
}

/* 页脚 */
.footer {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #d8f3dc;
  text-align: center;
}

.footer p {
  font-size: 13px;
  color: #74c69d;
}

/* 加载页面 */
.loading-page {
  text-align: center;
  padding: 60px 20px;
}

.loading-icon {
  font-size: 80px;
  margin-bottom: 20px;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
}

.loading-title {
  font-size: 24px;
  color: #2d6a4f;
  font-weight: 600;
}

/* 错误页面 */
.error-page {
  text-align: center;
  padding: 60px 20px;
}

.error-icon {
  font-size: 80px;
  margin-bottom: 20px;
}

.error-title {
  font-size: 24px;
  color: #c92a2a;
  font-weight: 600;
  margin-bottom: 12px;
}

.error-text {
  font-size: 16px;
  color: #74c69d;
}

/* 移动端适配 */
@media (max-width: 600px) {
  .app {
    padding: 10px;
  }

  .container {
    padding: 30px 20px;
    border-radius: 20px;
  }

  .logo {
    width: 70px;
    height: 70px;
    border-radius: 16px;
  }

  .title {
    font-size: 28px;
  }

  .subtitle {
    font-size: 13px;
  }

  .input-prefix {
    font-size: 12px;
    padding: 0 8px;
  }

  .input {
    font-size: 14px;
    padding: 12px 14px;
  }

  .btn {
    font-size: 15px;
    padding: 12px 20px;
  }

  .result-url {
    font-size: 16px;
  }

  .result-title {
    font-size: 22px;
  }

  .success-icon {
    font-size: 56px;
  }
}

@media (max-width: 400px) {
  .container {
    padding: 24px 16px;
  }

  .input-prefix {
    font-size: 11px;
  }

  .result-url {
    font-size: 14px;
  }
}

