/* ── Reset & Base ─────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #0f1117;
  --surface: #1a1d27;
  --surface-2: #242736;
  --border: #2e3240;
  --text: #e4e6ed;
  --text-muted: #8b8fa3;
  --primary: #6c5ce7;
  --primary-hover: #7f71ed;
  --success: #00b894;
  --danger: #e17055;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
    sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1.25rem;
}

/* ── Header ──────────────────────────────────────────────────── */
header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.logo {
  font-size: 2rem;
  font-weight: 800;
  text-decoration: none;
  color: var(--primary);
  letter-spacing: -0.5px;
}

.tagline {
  color: var(--text-muted);
  margin-top: 0.3rem;
  font-size: 1.05rem;
}

/* ── Form ────────────────────────────────────────────────────── */
.check-section {
  margin-bottom: 1.5rem;
}

.input-group {
  display: flex;
  gap: 0.75rem;
}

#urlInput {
  flex: 1;
  padding: 0.85rem 1rem;
  font-size: 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
}

#urlInput:focus {
  border-color: var(--primary);
}

#urlInput::placeholder {
  color: var(--text-muted);
}

.hint {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  cursor: pointer;
  border: none;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.85rem 1.5rem;
  transition: background 0.2s, transform 0.1s;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-secondary {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--border);
}

/* ── Spinner ─────────────────────────────────────────────────── */
.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
}

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

/* ── Status ───────────────────────────────────────────────────── */
.status-box {
  background: rgba(108, 92, 231, 0.15);
  border: 1px solid var(--primary);
  color: var(--primary);
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* ── Confidence Bar ───────────────────────────────────────────── */
.confidence-bar-wrap {
  margin: 1rem 0;
}

.confidence-bar {
  width: 100%;
  height: 12px;
  background: var(--surface-2);
  border-radius: 6px;
  overflow: hidden;
}

.confidence-fill {
  height: 100%;
  border-radius: 6px;
  transition: width 0.8s ease;
}

.confidence-fill.ai {
  background: linear-gradient(90deg, #e17055, #d63031);
}

.confidence-fill.real {
  background: linear-gradient(90deg, #00b894, #00cec9);
}

.confidence-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

.score-row {
  display: flex;
  gap: 1.5rem;
  margin: 0.75rem 0;
}

.score-item {
  font-size: 0.95rem;
}

.score-item strong {
  color: var(--text-muted);
}

/* ── Verdict ─────────────────────────────────────────────────── */
.verdict-ai {
  color: var(--danger);
}

.verdict-real {
  color: var(--success);
}

/* ── Error ────────────────────────────────────────────────────── */
.error-box {
  background: rgba(225, 112, 85, 0.15);
  border: 1px solid var(--danger);
  color: var(--danger);
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

/* ── Result Card ─────────────────────────────────────────────── */
.result-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
}

.result-card.shared {
  max-width: 720px;
  margin: 0 auto 2rem;
}

.result-media img {
  width: 100%;
  max-height: 380px;
  object-fit: cover;
  display: block;
}

.result-body {
  padding: 1.5rem;
}

.result-body h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.verdict-ai-share {
  color: var(--danger);
}

.verdict-real-share {
  color: var(--success);
}

.result-meta p {
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
}

.result-meta strong {
  color: var(--text-muted);
}

.result-meta a {
  color: var(--primary);
  word-break: break-all;
}

/* ── Share ────────────────────────────────────────────────────── */
.share-section {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.share-section h3 {
  font-size: 1rem;
  margin-bottom: 0.75rem;
  color: var(--text-muted);
}

.share-row {
  display: flex;
  gap: 0.5rem;
}

.share-row input {
  flex: 1;
  padding: 0.65rem 0.85rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.9rem;
  outline: none;
}

.social-buttons {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.75rem;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
  transition: opacity 0.2s;
}

.social-btn:hover {
  opacity: 0.8;
}

.social-btn.twitter {
  background: #1da1f2;
  color: #fff;
}

.social-btn.facebook {
  background: #1877f2;
  color: #fff;
}

.social-btn.whatsapp {
  background: #25d366;
  color: #fff;
}

/* ── Recent Checks ───────────────────────────────────────────── */
.recent-section {
  margin-top: 1rem;
}

.recent-section h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--text-muted);
}

.recent-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.recent-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1rem;
  background: var(--surface);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  transition: background 0.2s;
  cursor: pointer;
}

.recent-item:hover {
  background: var(--surface-2);
}

.recent-thumb {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--surface-2);
  flex-shrink: 0;
}

.recent-info {
  flex: 1;
  min-width: 0;
}

.recent-name {
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recent-status {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.empty-state {
  color: var(--text-muted);
  text-align: center;
  padding: 2rem 0;
  font-size: 0.95rem;
}

/* ── Footer ──────────────────────────────────────────────────── */
footer {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 600px) {
  .input-group {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .result-media img {
    max-height: 220px;
  }
}
