* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: linear-gradient(160deg, #0abf6b 0%, #07c160 45%, #059a4c 100%);
  min-height: 100vh;
  color: #1a1a1a;
}

.page {
  max-width: 480px;
  margin: 0 auto;
  padding: 40px 16px 32px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.hero { text-align: center; color: #fff; margin-bottom: 24px; }
.logo { font-size: 44px; margin-bottom: 8px; filter: drop-shadow(0 4px 10px rgba(0,0,0,.2)); }
.hero h1 { font-size: 26px; font-weight: 700; letter-spacing: 2px; }
.tagline { margin-top: 10px; font-size: 14px; line-height: 1.7; opacity: .92; }

.card {
  background: #fff;
  border-radius: 20px;
  padding: 24px 20px 28px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, .22);
}

.drop-zone {
  border: 2px dashed #bfe8d2;
  border-radius: 14px;
  background: #f7fcf9;
  padding: 28px 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  outline: none;
  overflow: hidden;
}
.drop-zone:hover, .drop-zone:focus, .drop-zone.dragover {
  border-color: #07c160;
  background: #effdf5;
}
.drop-icon { font-size: 40px; margin-bottom: 10px; }
.drop-main { font-size: 16px; font-weight: 600; color: #333; }
.drop-sub { font-size: 12px; color: #9aa5a0; margin-top: 6px; }
.preview { max-width: 100%; max-height: 260px; border-radius: 8px; }

.field-label {
  display: block;
  margin: 18px 0 8px;
  font-size: 13px;
  color: #666;
}
.title-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #dde5e0;
  border-radius: 10px;
  font-size: 15px;
  outline: none;
  transition: border-color .2s;
}
.title-input:focus { border-color: #07c160; }

.submit-btn {
  width: 100%;
  margin-top: 20px;
  padding: 14px;
  border: none;
  border-radius: 12px;
  background: #07c160;
  color: #fff;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 4px;
  cursor: pointer;
  transition: opacity .2s, transform .1s;
}
.submit-btn:hover:not(:disabled) { opacity: .92; }
.submit-btn:active:not(:disabled) { transform: scale(.98); }
.submit-btn:disabled { background: #a8dfc3; cursor: not-allowed; }

.error-msg {
  margin-top: 12px;
  padding: 10px 12px;
  background: #fdeeee;
  color: #c0392b;
  border-radius: 8px;
  font-size: 13px;
  text-align: center;
}

.result-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 24px 0 16px;
  color: #07c160;
  font-size: 13px;
  font-weight: 600;
}
.result-divider::before, .result-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e3ece7;
}

.result-link-row {
  display: flex;
  gap: 10px;
  align-items: center;
}
.short-url {
  flex: 1;
  min-width: 0;
  padding: 13px 14px;
  background: #f0faf4;
  border: 1px solid #bfe8d2;
  border-radius: 10px;
  color: #046f3f;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.copy-btn {
  padding: 13px 18px;
  border: none;
  border-radius: 10px;
  background: #07c160;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
}
.copy-btn.copied { background: #046f3f; }

.result-body {
  display: flex;
  gap: 16px;
  margin-top: 18px;
  align-items: center;
}
.url-qr {
  width: 128px;
  height: 128px;
  border-radius: 8px;
  border: 1px solid #eef2ef;
  flex-shrink: 0;
}
.result-tips { font-size: 13px; color: #777; line-height: 2; }

.again-btn {
  width: 100%;
  margin-top: 20px;
  padding: 12px;
  border: 1px solid #cfe9db;
  border-radius: 12px;
  background: #fff;
  color: #07c160;
  font-size: 15px;
  cursor: pointer;
}
.again-btn:hover { background: #f0faf4; }

.foot {
  text-align: center;
  color: rgba(255, 255, 255, .85);
  font-size: 12px;
  margin-top: 28px;
  letter-spacing: 1px;
}

/* 登录状态栏 */
.user-bar {
  display: flex; align-items: center; justify-content: flex-end; gap: 14px;
  background: rgba(255, 255, 255, .16);
  border-radius: 12px; padding: 8px 14px; margin-bottom: 14px;
  backdrop-filter: blur(4px);
}
.user-name {
  color: #fff; font-size: 14px; font-weight: 600; text-decoration: none;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40%;
}
.user-link { color: rgba(255,255,255,.9); font-size: 13px; text-decoration: none; }
.user-link:hover { color: #fff; text-decoration: underline; }
.user-link-btn { border: none; background: none; cursor: pointer; padding: 0; }
.user-link-strong {
  background: #fff; color: #07c160; border-radius: 14px;
  padding: 4px 12px; font-weight: 600;
}
.user-link-strong:hover { color: #046f3f; text-decoration: none; }

/* 未登录提示 */
.login-hint {
  background: #fff; border-radius: 16px; text-align: center;
  padding: 34px 20px; margin-bottom: 16px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, .22);
}
.login-hint-icon { font-size: 40px; margin-bottom: 10px; }
.login-hint-text { color: #555; font-size: 15px; margin-bottom: 18px; }
.login-hint-btn {
  display: inline-block; background: #07c160; color: #fff; text-decoration: none;
  padding: 11px 30px; border-radius: 22px; font-size: 15px; font-weight: 600;
}
.login-hint-btn:hover { opacity: .92; }

.my-entry-tip {
  margin-top: 14px; text-align: center; font-size: 13px; color: #8a948e;
}
.my-entry-tip a { color: #07c160; }

@media (max-width: 420px) {
  .result-body { flex-direction: column; align-items: stretch; text-align: center; }
  .url-qr { margin: 0 auto; }
}
