/* 通用 Dify 单页应用样式 */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body.simple-app {
  font-family: 'Noto Sans SC', -apple-system, sans-serif;
  min-height: 100vh;
  color: #e8eaf6;
  background: #0f0f1a;
}

.simple-app .app-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: var(--app-gradient, linear-gradient(135deg, #667eea, #764ba2));
  opacity: 0.15;
}

.simple-app .app-shell {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  padding: 20px 16px 48px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.simple-app .top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  font-size: 0.85rem;
}

.simple-app .top-nav a {
  color: #8892b0;
  text-decoration: none;
}
.simple-app .top-nav a:hover { color: #fff; }

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

.simple-app .app-icon {
  font-size: 3rem;
  line-height: 1;
  margin-bottom: 12px;
}

.simple-app .app-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.simple-app .app-header p {
  color: #8892b0;
  font-size: 0.95rem;
}

.simple-app .card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 24px;
  backdrop-filter: blur(12px);
}

.simple-app label {
  display: block;
  font-size: 0.85rem;
  color: #8892b0;
  margin-bottom: 8px;
}

.simple-app input,
.simple-app textarea,
.simple-app select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(0,0,0,0.3);
  color: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  margin-bottom: 16px;
}

.simple-app textarea { min-height: 100px; resize: vertical; }

.simple-app input:focus,
.simple-app textarea:focus,
.simple-app select:focus {
  outline: none;
  border-color: var(--app-accent, #667eea);
}

.simple-app .btn-primary {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  background: var(--app-gradient, linear-gradient(135deg, #667eea, #764ba2));
  transition: transform 0.2s, opacity 0.2s;
}

.simple-app .btn-primary:hover:not(:disabled) { transform: translateY(-1px); opacity: 0.95; }
.simple-app .btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.simple-app .result-box {
  margin-top: 20px;
  padding: 20px;
  border-radius: 16px;
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.06);
  line-height: 1.75;
  color: #c8cad8;
  white-space: pre-wrap;
  word-break: break-word;
}

.simple-app .result-box h1,
.simple-app .result-box h2,
.simple-app .result-box h3 { color: #ffd700; margin: 12px 0 8px; }

.simple-app .coming-soon {
  text-align: center;
  padding: 48px 24px;
}

.simple-app .coming-soon .badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  background: rgba(255,255,255,0.08);
  color: #ffd700;
  margin-bottom: 16px;
}

.simple-app .spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(255,255,255,0.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 16px auto;
}

@keyframes spin { to { transform: rotate(360deg); } }

.simple-app .disclaimer {
  text-align: center;
  font-size: 0.75rem;
  color: #556;
  margin-top: 24px;
}
