/* VidClaw — Demo video section + OpenClaw section + Modals */

/* ══════════════════════════════════
   DEMO VIDEO SECTION
══════════════════════════════════ */

#demo {
  background: var(--bg-base);
  position: relative;
  overflow: hidden;
}

#demo::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 60% at 50% 40%, rgba(124,58,237,0.08), transparent),
    radial-gradient(ellipse 40% 40% at 80% 80%, rgba(6,182,212,0.06), transparent);
  pointer-events: none;
}

.demo__player {
  max-width: 420px;
  margin: 0 auto;
  position: relative;
}

/* Inline video wrapper */
.demo__video-wrap {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--bg-border);
  box-shadow: var(--shadow-lg), 0 0 60px rgba(124,58,237,0.15);
  background: #000;
  /* glow ring */
  outline: 1px solid transparent;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.demo__video-wrap:hover {
  border-color: rgba(124,58,237,0.45);
  box-shadow: var(--shadow-lg), 0 0 80px rgba(124,58,237,0.25);
}

.demo__video {
  display: block;
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: contain;
  background: #000;
  /* Style the native controls to sit over the dark bg */
  border-radius: var(--radius-xl);
}

/* ══════════════════════════════════
   OPENCLAW PARTNER SECTION
══════════════════════════════════ */

#openclaw {
  background: var(--bg-base);
  position: relative;
  overflow: hidden;
}

#openclaw::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 0% 50%, rgba(124,58,237,0.08), transparent),
    radial-gradient(ellipse 50% 40% at 100% 50%, rgba(6,182,212,0.06), transparent);
  pointer-events: none;
}

.openclaw__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  align-items: center;
}

.openclaw__text {}

.openclaw__logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}

.openclaw__logo-icon {
  font-size: 40px;
  line-height: 1;
}

.openclaw__logo-name {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.openclaw__logo-badge {
  font-size: 11px;
  font-family: var(--font-mono);
  font-weight: 700;
  padding: 3px 8px;
  background: rgba(6,182,212,0.15);
  border: 1px solid rgba(6,182,212,0.35);
  border-radius: var(--radius-full);
  color: var(--accent-cyan);
  letter-spacing: 0.05em;
}

.openclaw__title {
  font-size: clamp(24px, 3vw, 38px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: var(--space-5);
  color: var(--text-primary);
}

.openclaw__desc {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: var(--space-8);
}

.openclaw__points {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.openclaw__point {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
}

.openclaw__point-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: rgba(124,58,237,0.12);
  border: 1px solid rgba(124,58,237,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.openclaw__point-text {
  flex: 1;
}

.openclaw__point-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.openclaw__point-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ── Chat mockup ── */
.openclaw__chat {
  background: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg), 0 0 60px rgba(124,58,237,0.1);
}

.chat__header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--bg-border);
}

.chat__avatar {
  font-size: 24px;
  line-height: 1;
}

.chat__info {}

.chat__name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.chat__status {
  font-size: 12px;
  color: #4ADE80;
  display: flex;
  align-items: center;
  gap: 4px;
}

.chat__status::before {
  content: '';
  width: 6px;
  height: 6px;
  background: #4ADE80;
  border-radius: 50%;
  display: inline-block;
  animation: blink 2s ease-in-out infinite;
}

.chat__body {
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  min-height: 380px;
}

/* User message (right) */
.chat__msg {
  display: flex;
  gap: var(--space-2);
  align-items: flex-end;
}

.chat__msg--user {
  flex-direction: row-reverse;
}

.chat__bubble {
  max-width: 82%;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-lg);
  font-size: 13.5px;
  line-height: 1.65;
}

.chat__msg--user .chat__bubble {
  background: var(--accent-primary);
  color: white;
  border-bottom-right-radius: 4px;
}

.chat__msg--bot .chat__bubble {
  background: var(--bg-elevated);
  border: 1px solid var(--bg-border);
  color: var(--text-primary);
  border-bottom-left-radius: 4px;
}

.chat__bubble-link {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: rgba(255,255,255,0.7);
  display: block;
  margin-top: var(--space-1);
  word-break: break-all;
}

.chat__steps {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: var(--space-2);
  padding-top: var(--space-2);
  border-top: 1px solid rgba(255,255,255,0.08);
}

.chat__step {
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
}

.chat__step--done {
  color: #4ADE80;
}

.chat__result {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: var(--space-2);
  padding-top: var(--space-2);
  border-top: 1px solid rgba(255,255,255,0.08);
}

.chat__result-item {
  font-size: 12.5px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.chat__time {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  text-align: center;
  margin-top: var(--space-1);
}

/* Mobile */
@media (max-width: 900px) {
  .openclaw__inner {
    grid-template-columns: 1fr;
    gap: var(--space-10);
  }
}

/* ══════════════════════════════════
   QR CODE MODAL
══════════════════════════════════ */

.qr-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.qr-modal.open {
  display: flex;
}

.qr-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(8px);
  cursor: pointer;
}

.qr-modal__box {
  position: relative;
  z-index: 1;
  background: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  width: min(340px, 90vw);
  text-align: center;
  box-shadow: var(--shadow-lg), 0 0 80px rgba(124,58,237,0.2);
}

.qr-modal__close {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  width: 28px;
  height: 28px;
  background: var(--bg-elevated);
  border: 1px solid var(--bg-border);
  border-radius: 50%;
  color: var(--text-secondary);
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.qr-modal__close:hover {
  color: var(--text-primary);
  border-color: var(--accent-primary);
}

.qr-modal__icon {
  font-size: 36px;
  margin-bottom: var(--space-3);
  display: block;
}

.qr-modal__title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.qr-modal__sub {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: var(--space-5);
  line-height: 1.6;
}

.qr-modal__img-wrap {
  background: white;
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  margin-bottom: var(--space-5);
  display: inline-block;
  width: 100%;
}

.qr-modal__img {
  width: 100%;
  max-width: 220px;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: var(--radius-sm);
}

/* Placeholder when image doesn't exist */
.qr-modal__img-placeholder {
  width: 200px;
  height: 200px;
  background: linear-gradient(135deg, #f0f0f0, #e0e0e0);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #999;
  font-size: 13px;
  margin: 0 auto;
}

.qr-modal__wechat-id {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  background: var(--bg-elevated);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-4);
}
