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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC", "Microsoft JhengHei", sans-serif;
  background: #f5f5f5;
  color: #111;
  -webkit-font-smoothing: antialiased;
}

.embed-frame {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  background: #fff;
}

.loading-screen {
  position: fixed;
  inset: 0;
  background: #ffd700;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.loading-inner { text-align: center; }

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(0, 0, 0, 0.15);
  border-top-color: #111;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1rem;
}

.loading-inner p {
  font-size: 0.95rem;
  color: rgba(0, 0, 0, 0.6);
}

.error-screen {
  position: fixed;
  inset: 0;
  background: #ffd700;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.error-inner {
  text-align: center;
  padding: 2rem;
  max-width: 360px;
}

.error-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.error-inner h2 { font-size: 1.2rem; margin-bottom: 0.5rem; }
.error-inner p { font-size: 0.9rem; color: rgba(0, 0, 0, 0.6); margin-bottom: 1.5rem; }

.admin-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: linear-gradient(135deg, #ffd700 0%, #fff3a0 100%);
}

.admin-container { width: 100%; max-width: 520px; }

.admin-card {
  background: #fff;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.admin-header { margin-bottom: 1.75rem; }
.admin-header h1 { font-size: 1.4rem; font-weight: 800; margin-bottom: 0.35rem; }
.admin-header p { font-size: 0.88rem; color: #666; }

.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.4rem; color: #333; }
.form-group input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid #e0e0e0;
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
}
.form-group input:focus { border-color: #ffd700; }
.form-hint { display: block; font-size: 0.75rem; color: #999; margin-top: 0.35rem; }

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.btn-primary { width: 100%; background: #111; color: #fff; margin-top: 0.5rem; }
.btn-outline { background: transparent; color: #111; border: 1.5px solid #111; margin-top: 1rem; text-align: center; }

.admin-status {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  display: none;
}
.admin-status.success { display: block; background: rgba(38, 166, 154, 0.1); color: #26a69a; }
.admin-status.error { display: block; background: rgba(229, 57, 53, 0.1); color: #e53935; }

.admin-preview { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid #eee; }
.admin-preview h3 { font-size: 0.95rem; font-weight: 700; margin-bottom: 1rem; }
.preview-item { display: flex; justify-content: space-between; gap: 1rem; padding: 0.5rem 0; font-size: 0.85rem; }
.preview-label { color: #999; flex-shrink: 0; }
.preview-value { color: #333; text-align: right; word-break: break-all; }

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