/* ================================
   DEMO TRIGGER BUTTON
   ================================ */
.demo-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 12px 24px;
  background: var(--primary);
  color: #fff;
  border: 2px solid var(--text);
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--text);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.demo-trigger:hover { transform: translate(-2px,-2px); box-shadow: 5px 5px 0 var(--text); }
.demo-trigger:active { transform: translate(1px,1px); box-shadow: 1px 1px 0 var(--text); }

/* ================================
   OVERLAY & PHONE FRAME
   ================================ */
.checkin-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.checkin-overlay.active { opacity: 1; pointer-events: auto; overscroll-behavior: contain; }

.checkin-phone {
  position: relative;
  width: 375px;
  height: 750px;
  background: #000;
  border-radius: 48px;
  border: 4px solid #333;
  overflow: hidden;
  box-shadow: 0 0 60px rgba(0,0,0,0.5);
}

.checkin-notch {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 150px;
  height: 28px;
  background: #000;
  border-radius: 0 0 20px 20px;
  z-index: 10;
}

.checkin-close {
  background: rgba(255,255,255,0.1);
  border: none;
  color: #94a3b8;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s;
}
.checkin-close:hover { background: rgba(255,255,255,0.2); color: #fff; }

@media (max-width: 768px) {
  .checkin-phone {
    width: 100%;
    height: 100%;
    border-radius: 0;
    border: none;
  }
  .checkin-notch { display: none; }
}

/* ================================
   CHECK-IN APP
   ================================ */
.checkin-app {
  width: 100%;
  height: 100%;
  background: #fff0f3;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.checkin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 40px 20px 12px;
  background: #9f1239;
}

.checkin-logo {
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
}

.checkin-sim-badge {
  text-align: center;
  padding: 6px;
  background: rgba(0,0,0,0.25);
  color: rgba(255,255,255,0.85);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.checkin-stats {
  display: flex;
  gap: 8px;
  padding: 16px 20px;
}

.checkin-stat {
  flex: 1;
  background: rgba(159,18,57,0.08);
  border-radius: 12px;
  padding: 12px 8px;
  text-align: center;
}

.checkin-stat-num { display: block; font-size: 1.3rem; font-weight: 900; color: #9f1239; }
.checkin-stat-label { font-size: 0.65rem; color: #4a5568; text-transform: uppercase; letter-spacing: 1px; }
.checkin-stat-ok .checkin-stat-num { color: #15803d; }
.checkin-stat-pending .checkin-stat-num { color: #b45309; }

.checkin-camera {
  flex: 1;
  margin: 0 20px 20px;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.checkin-camera video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.checkin-camera-msg {
  position: absolute;
  bottom: 16px;
  left: 0;
  right: 0;
  text-align: center;
  color: rgba(255,255,255,0.7);
  font-size: 0.82rem;
  font-weight: 600;
}

.checkin-corners {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%,-50%);
  width: 180px;
  height: 180px;
  border: 2px solid transparent;
  border-radius: 12px;
  background:
    linear-gradient(var(--primary), var(--primary)) top left / 24px 2px no-repeat,
    linear-gradient(var(--primary), var(--primary)) top left / 2px 24px no-repeat,
    linear-gradient(var(--primary), var(--primary)) top right / 24px 2px no-repeat,
    linear-gradient(var(--primary), var(--primary)) top right / 2px 24px no-repeat,
    linear-gradient(var(--primary), var(--primary)) bottom left / 24px 2px no-repeat,
    linear-gradient(var(--primary), var(--primary)) bottom left / 2px 24px no-repeat,
    linear-gradient(var(--primary), var(--primary)) bottom right / 24px 2px no-repeat,
    linear-gradient(var(--primary), var(--primary)) bottom right / 2px 24px no-repeat;
}

.checkin-scan-line {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 180px;
  height: 2px;
  background: var(--primary);
  box-shadow: 0 0 8px var(--primary);
  animation: scanLine 2s ease-in-out infinite;
}

@keyframes scanLine {
  0%, 100% { top: calc(50% - 90px); }
  50% { top: calc(50% + 90px); }
}

.checkin-feedback {
  position: absolute;
  bottom: 100px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.checkin-toast {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #166534;
  color: #fff;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 0.85rem;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
}
.checkin-toast.show { opacity: 1; transform: translateY(0); }
.checkin-toast-icon { font-size: 1.4rem; color: #4ade80; }

/* ================================
   CHAT APP
   ================================ */
.chat-app {
  width: 100%;
  height: 100%;
  background: #f0f2f5;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-size: 0.78rem;
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 36px 16px 12px;
  background: var(--primary);
  color: #fff;
}

.chat-header strong { font-size: 0.85rem; }
.chat-header small { font-size: 0.65rem; opacity: 0.8; }

.chat-avatar {
  width: 32px;
  height: 32px;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 800;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: none;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.chat-msg {
  max-width: 85%;
  padding: 8px 12px;
  border-radius: 12px;
  line-height: 1.4;
  position: relative;
}

.chat-msg p { margin: 0; }

.chat-msg.bot {
  background: #fff;
  color: #1e293b;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.chat-msg.user {
  background: var(--primary);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
  margin-top: 10px;
}

.chat-msg.bot + .chat-msg.user,
.chat-msg.user + .chat-msg.bot { margin-top: 12px; }

.chat-time {
  display: block;
  font-size: 0.55rem;
  opacity: 0.5;
  margin-top: 2px;
  text-align: right;
}

.chat-input {
  padding: 10px 16px;
  background: #fff;
  border-top: 1px solid #e4e4e7;
  color: #a1a1aa;
  font-size: 0.75rem;
}

.chat-sim-badge {
  text-align: center;
  padding: 6px;
  background: var(--primary);
  color: rgba(255,255,255,0.7);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* ================================
   SHIELD APP
   ================================ */
.shield-app {
  width: 100%;
  height: 100%;
  background: #0f172a;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-size: 0.78rem;
}

.shield-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 36px 16px 12px;
  background: #1e293b;
  color: #fff;
  font-weight: 800;
  font-size: 0.9rem;
}

.shield-sim-badge {
  text-align: center;
  padding: 6px;
  background: rgba(239,68,68,0.15);
  color: #ef4444;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.shield-content {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: none;
  padding: 12px;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.shield-block { padding: 10px 0; }

.shield-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.shield-danger .shield-label { color: #ef4444; }
.shield-safe .shield-label { color: #22c55e; }

.shield-divider {
  height: 1px;
  background: #27272a;
  margin: 8px 0;
}

.shield-chat {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}

.shield-msg {
  padding: 8px 12px;
  border-radius: 10px;
  line-height: 1.4;
  font-size: 0.72rem;
}

.shield-msg.user {
  background: #1e293b;
  color: #94a3b8;
  align-self: flex-end;
  max-width: 85%;
  border-bottom-right-radius: 4px;
}

.shield-msg.bot.danger {
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.3);
  color: #fca5a5;
  align-self: flex-start;
  max-width: 90%;
  border-bottom-left-radius: 4px;
}

.shield-msg.bot.safe {
  background: rgba(34,197,94,0.1);
  border: 1px solid rgba(34,197,94,0.3);
  color: #86efac;
  align-self: flex-start;
  max-width: 90%;
  border-bottom-left-radius: 4px;
}

/* ================================
   SEO APP
   ================================ */
.seo-app {
  width: 100%;
  height: 100%;
  background: #fff;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-size: 0.78rem;
}

.seo-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 36px 16px 12px;
  background: #fff;
  border-bottom: 1px solid #e4e4e7;
}

.seo-search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #f8fafc;
  border: 1px solid #e4e4e7;
  border-radius: 999px;
  font-size: 0.75rem;
  color: #1e293b;
}

.seo-search-icon { font-size: 0.85rem; }

.seo-sim-badge {
  text-align: center;
  padding: 6px;
  background: #f0fdf4;
  color: #16a34a;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.seo-results {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: none;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.seo-result {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.seo-result-url { font-size: 0.65rem; color: #16a34a; }
.seo-result-title { font-size: 0.82rem; font-weight: 700; color: #1a0dab; line-height: 1.3; }
.seo-result-desc { font-size: 0.7rem; color: #52525b; line-height: 1.4; }

.seo-result-top {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  padding: 12px;
  position: relative;
}

.seo-result-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 0.6rem;
  font-weight: 800;
  color: #16a34a;
  background: #dcfce7;
  padding: 2px 8px;
  border-radius: 999px;
}

.seo-result-highlight {
  position: relative;
  background: #eff6ff;
  border: 2px solid var(--primary);
  border-radius: 10px;
  padding: 12px;
}

.seo-highlight-ring {
  position: absolute;
  inset: -4px;
  border: 2px dashed var(--primary);
  border-radius: 12px;
  animation: pulseRing 2s ease-in-out infinite;
}

@keyframes pulseRing {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.seo-result-competitor {
  opacity: 0.5;
  padding: 0 4px;
}

.seo-typing::after {
  content: '|';
  animation: blink 0.8s infinite;
}

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