:root {
  --primary-color: #0d9488;
  --secondary-color: #0284c7;
  --accent-color: #dc2626;
  --text-color: #0f172a;
  --muted-color: #64748b;
  --page-bg: #f1f5f9;
  --panel-bg: #ffffff;
  --border-color: #e2e8f0;
  --border-radius: 12px;
  --font-main: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: "SF Mono", "JetBrains Mono", Consolas, monospace;
  --transition: all 0.25s ease;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 10px 28px rgba(15, 23, 42, 0.06);
}

* { box-sizing: border-box; }

body {
  font-family: var(--font-main);
  background:
    radial-gradient(900px 420px at 10% -10%, rgba(13, 148, 136, 0.1), transparent 55%),
    radial-gradient(800px 400px at 100% 0%, rgba(2, 132, 199, 0.08), transparent 50%),
    var(--page-bg);
  color: var(--text-color);
  min-height: 100vh;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(15, 118, 110, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 118, 110, 0.035) 1px, transparent 1px);
  background-size: 32px 32px;
  z-index: -1;
  pointer-events: none;
}

.container {
  max-width: 900px;
  margin: 3rem auto;
  padding: 0 1.5rem;
  width: 100%;
}

.header {
  text-align: center;
  margin-bottom: 2.5rem;
  position: relative;
}

.header::after {
  content: '';
  position: absolute;
  bottom: -14px;
  left: 50%;
  transform: translateX(-50%);
  width: 88px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  border-radius: 3px;
}

.title {
  font-size: 2.25rem;
  font-weight: 750;
  margin: 0;
  color: var(--text-color);
  letter-spacing: 0.2px;
}

.subtitle {
  font-size: 1rem;
  color: var(--muted-color);
  margin-top: 0.6rem;
}

.main-content {
  background: var(--panel-bg);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-color);
  position: relative;
  margin-bottom: 2rem;
}

.main-content::before { display: none; }

.content-inner {
  padding: 2rem;
}

.udid-container {
  position: relative;
  margin: 1rem 0 2rem;
}

.udid-container::before {
  content: 'UDID信息';
  position: absolute;
  top: -10px;
  left: 15px;
  background: #fff;
  color: var(--primary-color);
  font-size: 0.8rem;
  padding: 0 10px;
  border-radius: 4px;
  z-index: 2;
  font-weight: 600;
  letter-spacing: 0.5px;
}

#udid-input {
  width: 100%;
  min-height: 120px;
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  color: var(--text-color);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.5;
  resize: none;
  transition: var(--transition);
  white-space: pre;
  overflow-x: hidden;
}

#udid-input:focus {
  outline: none;
  border-color: rgba(13, 148, 136, 0.55);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.14);
  background: #fff;
}

.action-buttons {
  display: flex;
  justify-content: center;
  margin: 1.5rem 0;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: #fff;
  border: none;
  padding: 0.85rem 2rem;
  border-radius: 999px;
  font-weight: 650;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 8px 20px rgba(13, 148, 136, 0.25);
  letter-spacing: 0.3px;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(13, 148, 136, 0.32);
}

.btn-primary:active { transform: translateY(0); }
.btn-primary i { margin-right: 8px; }
.btn-primary::before { display: none; }

.steps-guide {
  margin: 2rem 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.25rem;
}

.step-item {
  background: #f8fafc;
  border-radius: var(--border-radius);
  padding: 1.4rem;
  position: relative;
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.step-item:hover {
  transform: translateY(-3px);
  border-color: rgba(13, 148, 136, 0.35);
  background: #fff;
  box-shadow: var(--shadow);
}

.step-number {
  position: absolute;
  top: -12px;
  left: -8px;
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
}

.step-content h5 {
  margin: 0 0 0.45rem;
  color: #0f766e;
  font-size: 1.05rem;
}

.step-content p {
  margin: 0;
  color: var(--muted-color);
  font-size: 0.9rem;
}

.footer {
  margin-top: auto;
  text-align: center;
  padding: 1.5rem;
  background: #fff;
  border-top: 1px solid var(--border-color);
}

.hitokoto {
  color: var(--text-color);
  font-style: italic;
  margin-bottom: 1rem;
  padding: 1rem;
  background: #f8fafc;
  border-radius: var(--border-radius);
  border-left: 3px solid var(--primary-color);
}

.footer-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  color: var(--muted-color);
  font-size: 0.9rem;
}

.footer-item a {
  color: var(--primary-color);
  text-decoration: none;
}

.footer-item a:hover {
  color: var(--secondary-color);
  text-decoration: underline;
}

.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 14px 22px;
  border-radius: var(--border-radius);
  color: #fff;
  font-weight: 600;
  opacity: 0;
  transform: translateY(-16px);
  transition: all 0.25s ease;
  z-index: 9999;
  border: 1px solid transparent;
}

.notification.show {
  opacity: 1;
  transform: translateY(0);
}

.notification.success {
  background: #059669;
  border-color: #047857;
}

.notification.error {
  background: #dc2626;
  border-color: #b91c1c;
}

.notification.info {
  background: #0284c7;
  border-color: #0369a1;
}

@media (max-width: 768px) {
  .container {
    margin: 1.5rem auto;
    padding: 0 1rem;
  }
  .title { font-size: 1.75rem; }
  .content-inner { padding: 1.35rem; }
  .steps-guide { grid-template-columns: 1fr; }
}

.tech-decoration {
  position: absolute;
  width: 140px;
  height: 140px;
  border: 1px solid rgba(13, 148, 136, 0.15);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.tech-decoration.top-right { top: -70px; right: -70px; }
.tech-decoration.bottom-left { bottom: -70px; left: -70px; }

.tech-decoration::before,
.tech-decoration::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
}

.tech-decoration::before {
  width: 70%;
  height: 70%;
  border: 1px dashed rgba(13, 148, 136, 0.2);
}

.tech-decoration::after {
  width: 40%;
  height: 40%;
  background: rgba(13, 148, 136, 0.08);
}
