/* FaceFollow - Static Site Styles */

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

:root {
  --green: #00ff88;
  --bg: #0a0a0a;
  --bg-light: #111;
  --border: #333;
  --text: #fff;
  --text-muted: #888;
  --text-dim: #666;
}

body {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: var(--green);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* Layout */
.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1.5rem;
  text-align: center;
}

/* Typography */
h1 {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}
h1 .green {
  color: var(--green);
  font-weight: 900;
}
h1 .normal {
  font-weight: 500;
}

.hint {
  color: var(--text-dim);
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}

/* Logo */
.logo {
  width: 80px;
  height: 80px;
  margin-bottom: 1rem;
}

/* Sprite Widget */
.sprite-widget {
  width: 200px;
  height: 200px;
  background-repeat: no-repeat;
  border: 2px solid var(--green);
  margin-bottom: 1.5rem;
  position: relative;
}

.sprite-widget.round {
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 0 60px rgba(0, 255, 136, 0.3);
}

/* Selectors */
.selectors {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
}

.selector-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.selector-label {
  color: var(--text-dim);
  width: 80px;
  text-align: right;
}

.selector-options {
  display: flex;
  gap: 0.25rem;
}

.selector-options button {
  background: none;
  border: none;
  color: var(--text-dim);
  padding: 0.25rem 0.5rem;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
}
.selector-options button:hover {
  color: var(--text);
}
.selector-options button.active {
  color: var(--green);
}
.selector-options .sep {
  color: var(--text-dim);
}

/* Buttons */
.btn {
  background: var(--green);
  color: #000;
  border: none;
  padding: 0.75rem 1.5rem;
  font-family: inherit;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}
.btn:hover {
  background: #fff;
}
.btn:disabled {
  background: var(--border);
  color: var(--text-dim);
  cursor: not-allowed;
}

.btn-large {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

.btn-secondary {
  background: var(--border);
  color: var(--text);
}
.btn-secondary:hover {
  background: #444;
}

/* CTA Button */
.cta-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 1.5rem;
}
.cta-btn .label {
  font-size: 0.75rem;
  opacity: 0.7;
  margin-top: 0.25rem;
}

/* Steps */
.steps {
  display: flex;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}
.steps .arrow {
  color: var(--text-dim);
}

/* Footer */
.footer {
  position: fixed;
  bottom: 1rem;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  font-size: 0.75rem;
}
.footer a {
  color: var(--text-dim);
}
.footer a:hover {
  color: var(--text-muted);
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 100;
}

.modal {
  background: var(--bg-light);
  border: 2px solid var(--border);
  max-width: 400px;
  width: 100%;
  padding: 1.5rem;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.modal-header h2 {
  font-size: 1.25rem;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}
.modal-close:hover {
  color: var(--text);
}

.modal-price {
  color: var(--green);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

/* Form */
.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.form-input {
  width: 100%;
  background: var(--bg);
  border: 2px solid var(--border);
  color: var(--text);
  padding: 0.625rem 0.75rem;
  font-family: inherit;
  font-size: 1rem;
}
.form-input:focus {
  outline: none;
  border-color: var(--green);
}
.form-input::placeholder {
  color: var(--text-dim);
}

/* Upload Area */
.upload-area {
  border: 2px dashed var(--border);
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s;
}
.upload-area:hover {
  border-color: var(--green);
}
.upload-area .text {
  color: var(--text-dim);
}
.upload-area .hint {
  color: var(--text-dim);
  font-size: 0.75rem;
  margin-top: 0.25rem;
  margin-bottom: 0;
}

.upload-preview {
  position: relative;
}
.upload-preview img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}
.upload-preview .remove-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: rgba(0, 0, 0, 0.5);
  color: var(--text);
  border: none;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  cursor: pointer;
}

/* Checkbox */
.checkbox-group {
  margin-bottom: 1rem;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.checkbox-label input {
  width: 1rem;
  height: 1rem;
  margin-top: 0.125rem;
  accent-color: var(--green);
  flex-shrink: 0;
}

.checkbox-nested {
  margin-left: 1.75rem;
}

/* Error */
.error-box {
  background: rgba(220, 38, 38, 0.2);
  border: 1px solid #dc2626;
  color: #f87171;
  padding: 0.75rem;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

/* Success */
.success-icon {
  color: var(--green);
  font-size: 3rem;
  margin-bottom: 1rem;
}

/* Download Page */
.download-page {
  padding: 3rem 1rem;
}

.download-page h1 {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.download-preview {
  margin: 2rem 0;
  display: flex;
  justify-content: center;
}

.embed-code {
  background: var(--bg-light);
  border-radius: 0.5rem;
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.embed-code h3 {
  font-size: 1rem;
  margin-bottom: 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.embed-code pre {
  background: var(--bg);
  padding: 1rem;
  border-radius: 0.25rem;
  overflow-x: auto;
  font-size: 0.75rem;
  color: var(--green);
}

.copy-btn {
  background: var(--border);
  border: none;
  color: var(--text);
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  cursor: pointer;
  font-family: inherit;
}
.copy-btn:hover {
  background: #444;
}
.copy-btn.copied {
  background: var(--green);
  color: #000;
}

/* Quick Start */
.quick-start {
  background: var(--bg-light);
  border-radius: 0.5rem;
  padding: 1.5rem;
  margin: 1.5rem 0;
  text-align: left;
}

.quick-start h3 {
  font-size: 1rem;
  margin-bottom: 1rem;
}

.quick-start ol {
  color: var(--text-muted);
  font-size: 0.875rem;
  padding-left: 1.25rem;
  line-height: 1.8;
}

.quick-start code {
  background: var(--border);
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
}

/* Loading */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

/* Policy Pages */
.policy-page {
  padding: 3rem 1rem;
}

.policy-page h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.policy-page .updated {
  color: var(--text-dim);
  font-size: 0.875rem;
  margin-bottom: 2rem;
}

.policy-page h2 {
  font-size: 1.25rem;
  margin: 2rem 0 1rem;
  color: var(--green);
}

.policy-page p {
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.policy-page ul {
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

/* Hidden */
.hidden {
  display: none !important;
}

/* Crop UI */
.crop-container {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border: 2px solid var(--border);
  background: var(--bg);
  cursor: move;
}

.crop-container.moderation-failed {
  border-color: #dc2626;
  background: rgba(220, 38, 38, 0.1);
}

.crop-image {
  position: absolute;
  max-width: none;
  max-height: none;
  user-select: none;
  -webkit-user-drag: none;
}

.crop-hint {
  position: absolute;
  bottom: 0.5rem;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 0.75rem;
  color: var(--green);
  pointer-events: none;
  background: rgba(0, 0, 0, 0.7);
  padding: 0.25rem;
}

.crop-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
}

.crop-overlay.warning {
  background: rgba(220, 38, 38, 0.9);
}

.crop-overlay-text {
  color: var(--text);
  text-align: center;
  padding: 1rem;
}

.crop-overlay-text .icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

/* Modal Steps */
.modal-step {
  display: none;
}

.modal-step.active {
  display: block;
}

.step-indicator {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
}

.step-dot.active {
  background: var(--green);
}

.step-dot.completed {
  background: var(--green);
}

/* Face detection status */
.face-status {
  font-size: 0.75rem;
  margin-top: 0.5rem;
  padding: 0.5rem;
  border-radius: 0.25rem;
}

.face-status.loading {
  color: var(--text-dim);
  background: var(--bg);
}

.face-status.success {
  color: #4ade80;
  background: rgba(74, 222, 128, 0.1);
}

.face-status.error {
  color: #f87171;
  background: rgba(248, 113, 113, 0.1);
}

/* Spinner */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
  vertical-align: middle;
  margin-right: 0.5rem;
}

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

/* Responsive */
@media (max-width: 640px) {
  .selector-label {
    display: none;
  }

  h1 {
    font-size: 1.5rem;
  }
}
