*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --bg: #0f0f12;
  --surface: #1a1a22;
  --border: #2d2d3a;
  --text: #f4f4f8;
  --muted: #9b9bb0;
  --accent: #fe2c55;
  --accent-hover: #ff4d6d;
  --success: #25d366;
  --error: #ff6b6b;
  --radius: 14px;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(254, 44, 85, 0.12), transparent 40%),
    radial-gradient(circle at bottom right, rgba(37, 211, 102, 0.08), transparent 35%),
    var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.container {
  max-width: 560px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 3rem;
}

.header {
  text-align: center;
  margin-bottom: 2rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent), #25f4ee);
  color: #fff;
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
}

.header h1 {
  margin: 0 0 0.5rem;
  font-size: 1.75rem;
  font-weight: 700;
}

.subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted);
}

input[type="url"] {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="url"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(254, 44, 85, 0.2);
}

input[type="url"]::placeholder {
  color: #666;
}

.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  margin-top: 1rem;
  padding: 0.9rem 1.25rem;
  border: none;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s, opacity 0.2s;
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
}

.btn-primary:active:not(:disabled) {
  transform: scale(0.98);
}

.btn-primary:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.hidden {
  display: none !important;
}

.preview {
  margin-top: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  display: flex;
  gap: 1rem;
  align-items: center;
}

.preview img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
  background: var(--bg);
}

.preview-info h3 {
  margin: 0 0 0.25rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.preview-info p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.badge {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(37, 211, 102, 0.15);
  color: var(--success);
  font-size: 0.75rem;
  font-weight: 600;
}

.badge.watermark {
  background: rgba(255, 107, 107, 0.15);
  color: var(--error);
}

.status {
  margin-top: 1rem;
  padding: 0.875rem 1rem;
  border-radius: 10px;
  font-size: 0.9rem;
}

.status.error {
  background: rgba(255, 107, 107, 0.12);
  border: 1px solid rgba(255, 107, 107, 0.35);
  color: var(--error);
}

.status.success {
  background: rgba(37, 211, 102, 0.12);
  border: 1px solid rgba(37, 211, 102, 0.35);
  color: var(--success);
}

.footer {
  margin-top: 2rem;
  text-align: center;
}

.footer p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
}

@media (max-width: 480px) {
  .container {
    padding-top: 1.5rem;
  }

  .header h1 {
    font-size: 1.5rem;
  }
}
