/* Platform spotlight tour — premium glass UI (landing-grade) */

.platform-tour-root {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
}

.platform-tour-root:not([hidden]) {
  pointer-events: auto;
}

.platform-tour-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(6, 12, 18, 0.78);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  pointer-events: auto;
  opacity: 0;
  transition: opacity 0.35s ease, background 0.3s ease;
}

.platform-tour-root:not([hidden]) .platform-tour-backdrop {
  opacity: 1;
}

.platform-tour-backdrop--dim {
  background: rgba(6, 12, 18, 0.62);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.platform-tour-backdrop--spotlight {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  pointer-events: none;
}

.platform-tour-spot {
  position: fixed;
  z-index: 201;
  border-radius: 16px;
  pointer-events: none;
  background: transparent;
  box-shadow:
    0 0 0 2px rgba(88, 214, 82, 0.95),
    0 0 0 7px rgba(88, 214, 82, 0.22),
    0 0 32px rgba(88, 214, 82, 0.18),
    0 0 0 9999px rgba(6, 14, 22, 0.48);
  transition:
    top 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    left 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    width 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    height 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.3s ease;
  opacity: 0;
}

@media (max-width: 640px) {
  .platform-tour-spot {
    border-radius: 12px;
    box-shadow:
      0 0 0 2px rgba(88, 214, 82, 0.95),
      0 0 0 5px rgba(88, 214, 82, 0.22),
      0 0 24px rgba(88, 214, 82, 0.18),
      0 0 0 9999px rgba(6, 14, 22, 0.52);
  }
}

.platform-tour-spot--visible {
  opacity: 1;
}

.platform-tour-anchor-active {
  position: relative;
  z-index: 202 !important;
  filter: brightness(1.06) saturate(1.04);
}

.platform-tour-anchor-active.card-duo,
.platform-tour-anchor-active.vocab-set-card,
.platform-tour-anchor-active.skill-card,
.platform-tour-anchor-active:hover {
  transform: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .platform-tour-spot,
  .platform-tour-backdrop,
  .platform-tour-card {
    transition: none !important;
  }
}

.platform-tour-card {
  position: fixed;
  z-index: 203;
  width: min(26rem, calc(100vw - 2rem));
  padding: 0;
  pointer-events: auto;
  border-radius: 1.35rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(165deg, rgba(28, 48, 68, 0.96) 0%, rgba(15, 30, 46, 0.98) 55%, rgba(11, 22, 32, 0.99) 100%);
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 0 80px rgba(76, 185, 68, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  overflow: hidden;
  opacity: 0;
  transform: translateY(12px) scale(0.97);
  transition:
    opacity 0.35s ease,
    transform 0.45s cubic-bezier(0.16, 1, 0.3, 1),
    top 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    left 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (max-width: 640px) {
  .platform-tour-card {
    width: calc(100vw - 1rem);
    border-radius: 1.2rem;
    max-height: calc(100vh - 80px);
  }
}

.platform-tour-root:not([hidden]) .platform-tour-card--visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.platform-tour-card--center {
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) scale(0.97);
}

.platform-tour-root:not([hidden]) .platform-tour-card--center.platform-tour-card--visible {
  transform: translate(-50%, -50%) scale(1);
}

.platform-tour-card__glow {
  position: absolute;
  top: -40%;
  right: -20%;
  width: 70%;
  height: 70%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(76, 185, 68, 0.18), transparent 70%);
  pointer-events: none;
  filter: blur(24px);
}

.platform-tour-card__grain {
  position: absolute;
  inset: 0;
  opacity: 0.04;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

.platform-tour-card__inner {
  position: relative;
  padding: 1.35rem 1.4rem 1.25rem;
}

.platform-tour-card__header {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.platform-tour-card__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  align-self: flex-start;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.625rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #4cb944;
  border: 1px solid rgba(76, 185, 68, 0.35);
  background: rgba(76, 185, 68, 0.1);
}

.platform-tour-card__badge i {
  font-size: 0.85rem;
}

.platform-tour-progress-track {
  height: 4px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.platform-tour-progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #4cb944, #3da9fc);
  box-shadow: 0 0 12px rgba(76, 185, 68, 0.45);
  transition: width 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.platform-tour-card__title {
  margin: 0 0 0.55rem;
  font-size: 1.2rem;
  font-weight: 900;
  line-height: 1.25;
  color: #fff;
  letter-spacing: -0.02em;
}

.platform-tour-card__body {
  margin: 0 0 1.15rem;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.6;
  color: rgba(224, 231, 234, 0.92);
}

.platform-tour-card__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding-top: 0.15rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.platform-tour-card__nav {
  display: flex;
  gap: 0.5rem;
  margin-left: auto;
}

.platform-tour-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 2.35rem;
  padding: 0 1rem;
  border-radius: 0.75rem;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.platform-tour-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.platform-tour-btn--ghost {
  background: transparent;
  color: rgba(143, 163, 181, 0.95);
  padding-left: 0.25rem;
}

.platform-tour-btn--ghost:hover:not(:disabled) {
  color: #fff;
}

.platform-tour-btn--outline {
  background: rgba(255, 255, 255, 0.04);
  color: #e0e7ea;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.platform-tour-btn--outline:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.platform-tour-btn--primary {
  background: linear-gradient(180deg, #5fd456 0%, #4cb944 100%);
  color: #0a1a12;
  box-shadow: 0 4px 0 #2d8a28, 0 8px 20px rgba(76, 185, 68, 0.25);
}

.platform-tour-btn--primary:hover:not(:disabled) {
  filter: brightness(1.06);
  box-shadow: 0 4px 0 #2d8a28, 0 10px 24px rgba(76, 185, 68, 0.35);
}

.platform-tour-btn--primary:active:not(:disabled) {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #2d8a28, 0 4px 12px rgba(76, 185, 68, 0.2);
}

body.platform-tour-active {
  overflow: hidden;
}

/* Dashboard banner */
.platform-tour-banner {
  display: none;
  margin-bottom: 1.5rem;
  padding: 1rem 1.25rem;
  border-radius: 1rem;
  border: 1px solid rgba(76, 185, 68, 0.28);
  background:
    linear-gradient(135deg, rgba(76, 185, 68, 0.1) 0%, rgba(61, 169, 252, 0.06) 100%);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  animation: fadeSlideUp 0.4s ease backwards;
}

.platform-tour-banner--visible {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
}

.platform-tour-banner__copy {
  flex: 1 1 12rem;
}

.platform-tour-banner__title {
  font-size: 0.95rem;
  font-weight: 900;
  color: #fff;
  margin: 0 0 0.25rem;
}

.platform-tour-banner__text {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--duo-text-dim, #c5d4dc);
  margin: 0;
}

.platform-tour-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
