@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&display=swap');

:root {
  --bg: #ffffff;
  --dot: #d8d8d8;
  --ink: #111111;
  --card-border: #111111;
  --muted: #8a8a8a;
  --accent-blue: #2563eb;
  --accent-orange: #d97706;
  --status-green: #16a34a;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  background-image: radial-gradient(var(--dot) 1.4px, transparent 1.4px);
  background-size: 22px 22px;
  font-family: 'Space Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--ink);
  min-height: 100vh;
}

.stage {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
}

.card {
  width: 420px;
  background: #ffffff;
  border: 1.5px solid var(--card-border);
  border-radius: 18px;
  padding: 28px 24px 20px;
  box-shadow: 0 1px 0 rgba(0,0,0,0.02);
}

/* Header */
.title-row {
  text-align: center;
  margin-bottom: 4px;
}

.title-link {
  text-decoration: none;
  color: inherit;
  display: inline-block;
  transition: opacity 0.15s;
}

.title-link:hover {
  opacity: 0.7;
}

h1 {
  margin: 0;
  font-size: 27px;
  font-weight: 700;
  letter-spacing: 1px;
  white-space: nowrap;
}

.caret {
  display: inline-block;
  width: 2px;
  background: var(--ink);
  margin-left: 2px;
  animation: blink 0.9s steps(1) infinite;
  height: 0.85em;
  vertical-align: -2px;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  50.01%, 100% { opacity: 0; }
}

.sync-label {
  text-align: center;
  font-size: 11px;
  letter-spacing: 1.5px;
  color: var(--status-green);
  margin-top: 4px;
  margin-bottom: 18px;
  height: 14px;
  opacity: 0;
  transition: opacity 0.3s;
}

.sync-label.show { opacity: 1; }

.desc-noisy {
  position: relative;
  isolation: isolate;
}

.desc-noisy::after {
  content: "";
  position: absolute;
  inset: -6px -10px;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='matrix' values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.06 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-repeat: repeat;
  mix-blend-mode: multiply;
  opacity: 0.55;
  animation: noiseShift 0.5s steps(2) infinite;
  z-index: 1;
}

@keyframes noiseShift {
  0%   { transform: translate(0, 0); }
  50%  { transform: translate(-1px, 1px); }
  100% { transform: translate(1px, -1px); }
}

.desc {
  text-align: center;
  font-size: 12px;
  line-height: 1.65;
  color: var(--ink);
  margin: 0 0 6px;
}

.desc b { font-weight: 700; }

.desc-sub {
  text-align: center;
  font-size: 12px;
  color: var(--ink);
  margin: 0 0 10px;
}

.github-link {
  display: block;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: underline;
  margin-bottom: 18px;
}

/* Icon row */
.icon-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-bottom: 18px;
  position: relative;
}

.icon-row a {
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.15s;
}

.icon-row a:hover { opacity: 0.55; }

.icon-row svg { width: 19px; height: 19px; }

.search-icon {
  position: absolute;
  right: 0;
}

.search-icon svg { width: 20px; height: 20px; }

/* Order form */
.form-block {
  margin-top: 4px;
}

.field-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.3px;
  margin-bottom: 2px;
}

.field-hint {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 8px;
}

.input-row {
  display: flex;
  align-items: center;
  border: 1.5px solid #e2e2e2;
  border-radius: 10px;
  padding: 3px;
  margin-bottom: 16px;
}

.input-row:focus-within {
  border-color: var(--ink);
}

.input-row .input-icon {
  padding: 0 9px;
  color: var(--muted);
  font-size: 14px;
  display: flex;
}

.input-row .input-icon svg {
  width: 15px;
  height: 15px;
}

.input-row input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 12px;
  padding: 9px 4px;
  color: var(--ink);
}

.input-row input::placeholder {
  color: #bdbdbd;
}

.qty-row {
  display: flex;
  align-items: center;
  border: 1.5px solid #e2e2e2;
  border-radius: 10px;
  padding: 3px;
  margin-bottom: 18px;
}

.qty-row:focus-within {
  border-color: var(--ink);
}

.qty-row .input-icon {
  padding: 0 9px;
  color: var(--muted);
  display: flex;
}

.qty-row .input-icon svg {
  width: 15px;
  height: 15px;
}

.qty-row input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 12px;
  padding: 9px 4px;
  color: var(--ink);
}

.qty-row input::placeholder {
  color: #bdbdbd;
}

.input-row.error {
  border-color: #ee0d0d;
}

.link-error {
  display: none;
  color: #ee0d0d;
  font-size: 10.5px;
  line-height: 1.4;
  margin: -10px 0 14px;
}

.link-error.show {
  display: block;
}

.qty-row.error {
  border-color: #ee0d0d;
}

.qty-error {
  display: none;
  color: #ee0d0d;
  font-size: 10.5px;
  line-height: 1.4;
  margin: -10px 0 14px;
}

.qty-error.show {
  display: block;
}

.send-btn {
  width: 100%;
  border: none;
  border-radius: 12px;
  padding: 14px 16px;
  background: linear-gradient(90deg, #7c3aed, #a855f7);
  color: #fff;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  box-shadow: 0 10px 24px -8px rgba(124, 58, 237, 0.55);
  transition: transform 0.1s, box-shadow 0.15s;
  margin-bottom: 14px;
}

.send-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px -8px rgba(124, 58, 237, 0.65);
}
.send-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.send-main {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.send-main svg {
  width: 14px;
  height: 14px;
}

.send-sub {
  font-size: 10px;
  letter-spacing: 0.6px;
  opacity: 0.9;
}

/* Footer */
.footer-rule {
  border: none;
  border-top: 1.5px solid var(--ink);
  margin: 14px 0 12px;
}

.footer-text {
  text-align: center;
  font-size: 10px;
  letter-spacing: 0.5px;
  color: var(--accent-orange);
  margin: 0;
}

.footer-text b { color: var(--ink); }

/* Success toast (Order validated) */
.duplicate-card {
  overflow: hidden;
  position: relative;
  text-align: left;
  border-radius: 0.5rem;
  max-width: 290px;
  width: 100%;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  background-color: #fff;
  font-family: 'Space Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

.duplicate-image {
  display: flex;
  margin-left: auto;
  margin-right: auto;
  background-color: #fde2e2;
  flex-shrink: 0;
  justify-content: center;
  align-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 9999px;
  animation: toastPulse .6s linear alternate-reverse infinite;
}

.duplicate-image svg {
  color: #ee0d0d;
  width: 2rem;
  height: 2rem;
}

.duplicate-title {
  color: #a31515;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5rem;
}

.duplicate-close {
  display: inline-flex;
  padding: 0.5rem 1rem;
  background-color: #ee0d0d;
  color: #ffffff;
  font-size: 0.95rem;
  line-height: 1.5rem;
  font-weight: 500;
  justify-content: center;
  width: 100%;
  border-radius: 0.375rem;
  border: none;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  cursor: pointer;
  font-family: inherit;
}

.toast-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 20px;
}

.toast-overlay.show {
  display: flex;
}

.toast-card {
  overflow: hidden;
  position: relative;
  text-align: left;
  border-radius: 0.5rem;
  max-width: 290px;
  width: 100%;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  background-color: #fff;
  font-family: 'Space Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

.toast-dismiss {
  position: absolute;
  right: 10px;
  top: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  background-color: #fff;
  color: black;
  border: 2px solid #D1D5DB;
  font-size: 1rem;
  font-weight: 300;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  transition: .3s ease;
  cursor: pointer;
}

.toast-dismiss:hover {
  background-color: #ee0d0d;
  border: 2px solid #ee0d0d;
  color: #fff;
}

.toast-header {
  padding: 1.25rem 1rem 1rem 1rem;
}

.toast-image {
  display: flex;
  margin-left: auto;
  margin-right: auto;
  background-color: #e2feee;
  flex-shrink: 0;
  justify-content: center;
  align-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 9999px;
  animation: toastPulse .6s linear alternate-reverse infinite;
  transition: .6s ease;
}

.toast-image svg {
  color: #0afa2a;
  width: 2rem;
  height: 2rem;
}

.toast-content {
  margin-top: 0.75rem;
  text-align: center;
}

.toast-title {
  color: #066e29;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5rem;
}

.toast-message {
  margin-top: 0.5rem;
  color: #595b5f;
  font-size: 0.8rem;
  line-height: 1.25rem;
}

.toast-message strong {
  color: #066e29;
  font-weight: 700;
}

.toast-actions {
  margin: 0.75rem 1rem;
}

.toast-history {
  display: inline-flex;
  padding: 0.5rem 1rem;
  background-color: #1aa06d;
  color: #ffffff;
  font-size: 0.95rem;
  line-height: 1.5rem;
  font-weight: 500;
  justify-content: center;
  width: 100%;
  border-radius: 0.375rem;
  border: none;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  cursor: pointer;
  font-family: inherit;
}

.toast-track {
  display: inline-flex;
  margin-top: 0.75rem;
  padding: 0.5rem 1rem;
  color: #242525;
  font-size: 0.95rem;
  line-height: 1.5rem;
  font-weight: 500;
  justify-content: center;
  width: 100%;
  border-radius: 0.375rem;
  border: 1px solid #D1D5DB;
  background-color: #fff;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  cursor: pointer;
  font-family: inherit;
}

@keyframes toastPulse {
  from { transform: scale(1); }
  to { transform: scale(1.09); }
}

/* =========================================
   FOLLOWERS-APP SPECIFIC ADDITIONS
========================================= */

.section {
  width: 100%;
}

[hidden] {
  display: none !important;
}

.spinner {
  width: 14px;
  height: 14px;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Timer Display for Cooldown */
.timer-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 15px;
}
.timer-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 50px;
  background: #f4f4f5;
  border: 1.5px solid var(--card-border);
  border-radius: 8px;
  padding: 10px 6px;
}
.timer-value {
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
}
.timer-label {
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  margin-top: 4px;
}
.timer-separator {
  font-size: 20px;
  font-weight: 700;
}

/* Status Cards (Success, Error, Blocked) */
.status-card {
  text-align: center;
  padding: 10px 0;
}
.status-icon-wrapper {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}
.status-icon-wrapper svg {
  width: 24px;
  height: 24px;
}
.success-glow {
  background: #e2feee;
  color: #0afa2a;
}
.error-glow {
  background: #fde2e2;
  color: #ee0d0d;
}
.cooldown-glow {
  background: #fffbeb;
  color: #d97706;
}

.status-card h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 8px;
}
.status-desc {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 20px;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  background: #f4f4f5;
  color: var(--ink);
  border: 1.5px solid var(--card-border);
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}
.btn-secondary:hover {
  background: #e4e4e7;
}

/* Order Info Details (Success Section) */
.order-info {
  border: 1.5px solid #e2e2e2;
  border-radius: 10px;
  margin-bottom: 16px;
  overflow: hidden;
  text-align: left;
}
.info-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 12px;
  font-size: 12px;
}
.info-row:not(:last-child) {
  border-bottom: 1.5px solid #e2e2e2;
}
.info-label {
  color: var(--muted);
  font-weight: 700;
}
.info-value {
  font-weight: 700;
}
.status-badge {
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  text-transform: uppercase;
}
.status-badge.processing, .status-badge.in-progress { 
  background: #fffbeb; color: #d97706; border: 1px solid #d97706; 
}
.status-badge.completed, .status-badge.partial { 
  background: #e2feee; color: #066e29; border: 1px solid #066e29;
}
.status-badge.canceled, .status-badge.error { 
  background: #fde2e2; color: #ee0d0d; border: 1px solid #ee0d0d;
}

.progress-wrapper {
  margin-top: 12px;
  text-align: left;
}
.progress-bar {
  height: 6px;
  background: #f4f4f5;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 6px;
}
.progress-fill {
  height: 100%;
  background: var(--ink);
  transition: width 0.3s;
}
.progress-text {
  font-size: 11px;
  color: var(--muted);
}

.glitch-text {
  position: relative;
  display: inline-block;
  color: var(--ink);
  font-weight: 700;
}

.glitch-text::before,
.glitch-text::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg);
}

.glitch-text::before {
  left: 1px;
  text-shadow: -1px 0 red;
  clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
  animation: glitch-anim-1 2.5s infinite linear alternate-reverse;
}

.glitch-text::after {
  left: -1px;
  text-shadow: -1px 0 blue;
  clip-path: polygon(0 80%, 100% 20%, 100% 100%, 0 100%);
  animation: glitch-anim-2 3s infinite linear alternate-reverse;
}

@keyframes glitch-anim-1 {
  0% { clip-path: inset(20% 0 80% 0); }
  20% { clip-path: inset(60% 0 10% 0); }
  40% { clip-path: inset(40% 0 50% 0); }
  60% { clip-path: inset(80% 0 5% 0); }
  80% { clip-path: inset(10% 0 70% 0); }
  100% { clip-path: inset(30% 0 50% 0); }
}

@keyframes glitch-anim-2 {
  0% { clip-path: inset(10% 0 60% 0); }
  20% { clip-path: inset(30% 0 20% 0); }
  40% { clip-path: inset(70% 0 10% 0); }
  60% { clip-path: inset(20% 0 50% 0); }
  80% { clip-path: inset(50% 0 30% 0); }
  100% { clip-path: inset(5% 0 80% 0); }
}
