.animation-page {
  max-width: 1160px;
  margin: 0 auto;
  padding: 8px 0 40px;
}

.animation-page .utility-top {
  text-align: center;
  padding: 30px 20px 28px;
}

.animation-page .utility-label {
  display: inline-flex;
  align-items: center;
  margin-bottom: 12px;
  padding: 6px 13px;
  border-radius: 999px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.animation-page .utility-title {
  margin: 0;
  color: #0f172a;
  font-size: clamp(32px, 4vw, 46px);
  font-weight: 900;
  letter-spacing: -0.04em;
}

.animation-page .utility-desc {
  max-width: 780px;
  margin: 16px auto 0;
  color: #64748b;
  font-size: 15px;
  line-height: 1.8;
}

.animation-summary-card {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.animation-summary-item {
  padding: 20px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}

.animation-summary-item::before {
  content: "";
  display: block;
  width: 36px;
  height: 4px;
  margin-bottom: 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, #2563eb, #7c3aed);
}

.animation-summary-item strong {
  display: block;
  margin-bottom: 7px;
  color: #0f172a;
  font-size: 15px;
  font-weight: 900;
}

.animation-summary-item span {
  color: #64748b;
  font-size: 13px;
  line-height: 1.7;
}

.animation-generator-card,
.animation-result-card {
  padding: 28px;
  margin-bottom: 24px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 26px;
  background: #ffffff;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
}

.animation-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 24px;
}

.animation-card-head h2 {
  margin: 0 0 8px;
  color: #0f172a;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.animation-card-head p {
  margin: 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.6;
}

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

.animation-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  gap: 26px;
  align-items: start;
}

.animation-control-panel {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.animation-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.animation-field {
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 20px;
  background: #f8fafc;
}

.animation-page .utility-field-label {
  display: block;
  margin-bottom: 10px;
  color: #0f172a;
  font-weight: 900;
}

.animation-input {
  width: 100%;
  min-height: 48px;
  box-sizing: border-box;
  border-radius: 14px;
  font-weight: 700;
}

.animation-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14);
}

.animation-field-help {
  margin: 10px 0 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.6;
}

.animation-range {
  width: 100%;
  margin: 6px 0 12px;
  accent-color: #2563eb;
}

.animation-range-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.animation-range-row span {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 700;
}

.animation-range-row strong {
  color: #2563eb;
  font-size: 14px;
  font-weight: 900;
}

.animation-preset-wrap {
  padding: 22px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 24px;
  background: #f8fafc;
}

.animation-preset-wrap h3 {
  margin: 0 0 18px;
  color: #0f172a;
  font-size: 18px;
  font-weight: 900;
}

.animation-preset-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.animation-preset {
  min-height: 54px;
  padding: 0 16px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 16px;
  background: #ffffff;
  color: #0f172a;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.animation-preset:hover {
  transform: translateY(-2px);
  border-color: rgba(37, 99, 235, 0.32);
  background: #eff6ff;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.animation-preview-panel {
  position: sticky;
  top: 20px;
  padding: 22px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 24px;
  background: radial-gradient(circle at top right, rgba(37, 99, 235, 0.08), transparent 30%), #f8fafc;
}

.animation-preview-label {
  display: inline-flex;
  margin-bottom: 16px;
  padding: 6px 11px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 900;
}

.animation-preview-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 390px;
  padding: 36px;
  border-radius: 28px;
  background: linear-gradient(90deg, rgba(148, 163, 184, 0.12) 1px, transparent 1px), linear-gradient(180deg, rgba(148, 163, 184, 0.12) 1px, transparent 1px), linear-gradient(135deg, #ffffff 0%, #eef6ff 100%);
  background-size: 32px 32px, 32px 32px, auto;
  overflow: hidden;
}

.animation-preview-box {
  width: min(100%, 280px);
  min-height: 220px;
  padding: 28px;
  border-radius: 24px;
  background: radial-gradient(circle at top right, rgba(37, 99, 235, 0.12), transparent 32%), #ffffff;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.14);
  will-change: transform, opacity;
}

.animation-preview-box span {
  display: inline-flex;
  margin-bottom: 16px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 12px;
  font-weight: 900;
}

.animation-preview-box strong {
  display: block;
  margin-bottom: 10px;
  color: #0f172a;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.animation-preview-box p {
  margin: 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.7;
}

.animation-preview-info {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.animation-preview-info div {
  padding: 16px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.animation-preview-info span {
  display: block;
  margin-bottom: 8px;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.animation-preview-info strong {
  color: #0f172a;
  font-size: 14px;
  font-weight: 900;
}

.animation-action-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 26px;
}

.animation-page .utility-btn {
  min-height: 46px;
  padding: 0 20px;
  border-radius: 14px;
  font-weight: 800;
}

.animation-page .utility-btn-primary {
  border-color: #0f172a;
  background: linear-gradient(135deg, #0f172a, #2563eb);
  color: #ffffff;
}

.animation-page .utility-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.18);
}

.animation-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 82px;
  padding: 8px 13px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.animation-status-badge.is-ready {
  background: #f1f5f9;
  color: #475569;
}

.animation-status-badge.is-success {
  background: #dbeafe;
  color: #1d4ed8;
}

.animation-status-badge.is-error {
  background: #fee2e2;
  color: #b91c1c;
}

.animation-result-box {
  min-height: 320px;
  max-height: 680px;
  overflow: auto;
  margin-top: 18px;
  padding: 24px;
  border-radius: 20px;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.9;
  font-size: 14px;
  font-family: Consolas, Monaco, "SFMono-Regular", "Courier New", monospace;
}

.animation-result-box.is-ready {
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: #f8fafc;
  color: #64748b;
}

.animation-result-box.is-success {
  border: 1px solid rgba(37, 99, 235, 0.22);
  background: radial-gradient(circle at top right, rgba(37, 99, 235, 0.08), transparent 28%), linear-gradient(180deg, #0f172a 0%, #111827 100%);
  color: #dbeafe;
}

.animation-result-box.is-error {
  border: 1px solid rgba(239, 68, 68, 0.28);
  background: #fef2f2;
  color: #991b1b;
}

.animation-page .help-panel {
  margin-top: 30px;
}

.animation-page .help-panel > h2 {
  margin: 0 0 18px;
  color: #0f172a;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.animation-page .help-box {
  border-radius: 22px;
}

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

  .animation-preview-panel {
    position: relative;
    top: auto;
  }
}

@media (max-width: 980px) {
  .animation-summary-card,
  .animation-form-grid,
  .animation-preview-info,
  .animation-preset-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .animation-page {
    padding: 0 0 28px;
  }

  .animation-page .utility-top {
    padding: 24px 14px 22px;
  }

  .animation-generator-card,
  .animation-result-card {
    padding: 22px;
    border-radius: 22px;
  }

  .animation-card-head {
    flex-direction: column;
    gap: 14px;
  }

  .animation-head-actions,
  .animation-action-row {
    width: 100%;
    flex-direction: column;
  }

  .animation-head-actions .utility-btn,
  .animation-action-row .utility-btn {
    width: 100%;
  }

  .animation-preview-stage {
    min-height: 300px;
    padding: 24px;
  }

  .animation-preview-box {
    min-height: 190px;
  }

  .animation-preview-box strong {
    font-size: 24px;
  }

  .animation-result-box {
    min-height: 260px;
    font-size: 13px;
  }

  .animation-page .utility-title {
    font-size: 34px;
  }
}