﻿.sd-root {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  font-family: 'Cairo', system-ui, sans-serif;
}

.sd-window {
  border-radius: 14px;
  overflow: hidden;
  background: #F7F8FF;
  box-shadow:
    0 30px 60px rgba(26, 31, 132, 0.28),
    0 0 0 1px rgba(26, 31, 132, 0.08);
}

.sd-titlebar {
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: #fff;
  border-bottom: 1px solid #E5E2DC;
}

.sd-traffic {
  position: absolute;
  left: 14px;
  display: flex;
  gap: 7px;
}

.sd-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}
.sd-dot-red { background: #FF5F57; }
.sd-dot-yellow { background: #FEBC2E; }
.sd-dot-green { background: #28C840; }

.sd-title {
  font-size: 12px;
  font-weight: 600;
  color: #4A5568;
}

.sd-screen {
  position: relative;
  height: 540px;
  overflow: hidden;
  background: #F7F8FF;
}

/* Scenes */
.sd-scene {
  position: absolute;
  inset: 0;
}

.sd-overview {
  animation: sd-show-overview 9s ease-in-out infinite;
}

.sd-session {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #F7F8FF;
  animation: sd-show-session 9s ease-in-out infinite;
}

@keyframes sd-show-overview {
  0%, 38% { opacity: 1; visibility: visible; }
  46%, 88% { opacity: 0; visibility: hidden; }
  95%, 100% { opacity: 1; visibility: visible; }
}

@keyframes sd-show-session {
  0%, 38% { opacity: 0; visibility: hidden; }
  46%, 88% { opacity: 1; visibility: visible; }
  95%, 100% { opacity: 0; visibility: hidden; }
}

/* App shell */
.sd-app {
  display: flex;
  height: 100%;
  position: relative;
  overflow: visible;
}

.sd-sidebar {
  width: 188px;
  flex-shrink: 0;
  background: #F7F8FF;
  border-inline-end: 1px solid #E5E2DC;
  padding: 10px 8px 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sd-brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2px 2px;
}

.sd-brand {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.sd-brand-ctrls {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.sd-brand-ctrls span {
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  border-radius: 6px;
  border: 1px solid #E5E2DC;
  background: #fff;
  color: #6B6660;
  font-size: 8px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.sd-logo {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: linear-gradient(135deg, #1A1F84, #6474FF);
  color: #fff;
  font-weight: 900;
  font-size: 11px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.sd-brand-ar { font-size: 11px; font-weight: 700; color: #1A1D3A; line-height: 1.1; }
.sd-brand-en { font-size: 8px; color: #645E58; }

.sd-user-card {
  background: #fff;
  border: 1px solid #E5E2DC;
  border-radius: 14px;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 1px 4px rgba(28, 26, 24, 0.06);
}

.sd-user-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.sd-avatar-wrap { position: relative; }
.sd-user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1A1F84, #6474FF);
  color: #fff;
  display: grid;
  place-items: center;
}
.sd-online {
  position: absolute;
  inset-inline-end: -1px;
  bottom: -1px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #22C55E;
  border: 2px solid #fff;
}
.sd-user-name { font-size: 12px; font-weight: 700; color: #1A1D3A; margin: 0; }
.sd-user-level { font-size: 9px; color: #645E58; margin: 0; }

.sd-streak-row {
  width: 100%;
  background: #F7F8FF;
  border-radius: 8px;
  padding: 6px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}
.sd-streak-left {
  font-size: 9px;
  font-weight: 600;
  color: #1A1D3A;
}
.sd-streak-badge {
  font-size: 8px;
  color: #645E58;
}

.sd-weekly-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.sd-weekly-head span:first-child {
  font-size: 9px;
  font-weight: 700;
  color: #1A1D3A;
}
.sd-weekly-head span:last-child {
  font-size: 8px;
  color: #645E58;
}

.sd-bars {
  width: 100%;
  height: 40px;
  display: flex;
  align-items: flex-end;
  gap: 3px;
  background: #F7F8FF;
  border-radius: 8px;
  padding: 5px;
}
.sd-bars span {
  flex: 1;
  background: #4F7EFF;
  border-radius: 2px 2px 0 0;
  opacity: 0.4;
}
.sd-bars span:last-child { opacity: 1; }

.sd-divider {
  height: 1px;
  background: #E5E2DC;
}

.sd-path {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sd-path-item {
  display: flex;
  align-items: flex-start;
  gap: 7px;
}
.sd-path-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.sd-path-item p {
  margin: 0;
  font-size: 9px;
  font-weight: 700;
  color: #1A1D3A;
  line-height: 1.3;
}
.sd-path-item small {
  font-size: 8px;
  color: #645E58;
}
.sd-path-item.done .sd-path-icon { background: rgba(34,197,94,0.15); color: #16A34A; }
.sd-path-item.active .sd-path-icon { background: #4F7EFF; color: #fff; }
.sd-path-item.locked .sd-path-icon { background: #F7F8FF; color: #645E58; }
.sd-path-item.locked p,
.sd-path-item.locked small { color: #645E58; }

.sd-path-active-body {
  flex: 1;
  min-width: 0;
}
.sd-path-bar {
  margin-top: 5px;
  height: 5px;
  border-radius: 999px;
  background: #F7F8FF;
  overflow: hidden;
}
.sd-path-bar i {
  display: block;
  width: 64%;
  height: 100%;
  border-radius: 999px;
  background: #4F7EFF;
}

.sd-main {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  position: relative;
}

.sd-main-inner {
  padding: 12px 14px 64px;
  height: 100%;
  overflow: hidden;
}

.sd-cols {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.sd-col-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sd-col-side {
  width: 170px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Hero */
.sd-hero {
  border-radius: 16px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #1A1F84 0%, #2E44B8 45%, #4F7EFF 100%);
  box-shadow: 0 10px 28px rgba(26, 31, 132, 0.28);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: #fff;
}

.sd-hero-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
}
.sd-hero-text h2 {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.25;
  margin: 0;
}
.sd-hero-text p {
  margin: 0;
  font-size: 11px;
  opacity: 0.82;
}
.sd-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.sd-pills span {
  background: rgba(255,255,255,0.18);
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 9px;
  font-weight: 600;
}
.sd-cta {
  margin-top: 2px;
  background: #fff;
  color: #1A1F84;
  border: 0;
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 11px;
  font-weight: 700;
  font-family: inherit;
  cursor: default;
}
.sd-hero-text small {
  font-size: 9px;
  opacity: 0.72;
}

.sd-hero-mic {
  width: 72px;
  height: 72px;
  border-radius: 14px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.20);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.sd-hero-mic-orb {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.20);
  border: 1px solid rgba(255,255,255,0.28);
  display: grid;
  place-items: center;
}

/* Cards */
.sd-card {
  background: #fff;
  border: 1px solid #E5E2DC;
  border-radius: 14px;
  padding: 10px 12px;
}
.sd-card-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.sd-card-row.muted {
  margin-bottom: 0;
  margin-top: 8px;
  font-size: 9px;
  color: #6B6660;
}
.sd-card-row strong {
  font-size: 11px;
  color: #1A1D3A;
}
.sd-accent { font-size: 11px; font-weight: 700; color: #4F7EFF; }
.sd-link { font-size: 10px; color: #4F7EFF; font-weight: 600; }

.sd-progress {
  height: 7px;
  border-radius: 999px;
  background: #F7F8FF;
  overflow: hidden;
}
.sd-progress i {
  display: block;
  height: 100%;
  background: #4F7EFF;
  border-radius: 999px;
}

.sd-dots {
  display: flex;
  gap: 4px;
}
.sd-dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #E5E2DC;
}
.sd-dots i.on { background: #4F7EFF; }

.sd-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.sd-stat {
  border-radius: 12px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sd-stat span { font-size: 9px; font-weight: 600; color: #1A1D3A; }
.sd-stat b { font-size: 16px; font-weight: 800; }
.sd-stat.blue { background: rgba(79,126,255,0.08); border: 1px solid rgba(79,126,255,0.15); }
.sd-stat.blue b { color: #4F7EFF; }
.sd-stat.green { background: rgba(22,163,74,0.08); border: 1px solid rgba(22,163,74,0.15); }
.sd-stat.green b { color: #16A34A; }
.sd-stat.amber { background: rgba(217,119,6,0.08); border: 1px solid rgba(217,119,6,0.15); }
.sd-stat.amber b { color: #D97706; font-size: 13px; }

.sd-scenarios {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.sd-sc {
  border-radius: 12px;
  padding: 8px;
  background: #F7F8FF;
  border: 1px solid #E5E2DC;
}
.sd-sc.active {
  background: rgba(79,126,255,0.08);
  border-color: rgba(79,126,255,0.25);
}
.sd-sc-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  color: #fff;
  display: grid;
  place-items: center;
  margin-bottom: 6px;
}
.sd-sc p {
  margin: 0;
  font-size: 10px;
  font-weight: 700;
  color: #1A1D3A;
}

.sd-card.tip p {
  margin: 0 0 8px;
  font-size: 10px;
  line-height: 1.5;
  color: #6B6660;
}
.sd-tip-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}
.sd-tip-icon {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: linear-gradient(135deg, #1A1F84, #6474FF);
  color: #fff;
  display: grid;
  place-items: center;
}
.sd-tip-phrase {
  display: flex;
  align-items: center;
  gap: 5px;
  border-radius: 10px;
  padding: 7px 8px;
  background: rgba(79,126,255,0.08);
  border: 1px solid rgba(79,126,255,0.15);
  color: #4F7EFF;
  font-size: 10px;
  font-weight: 600;
}

.sd-vocab {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #F7F8FF;
  border-radius: 10px;
  padding: 7px 8px;
  margin-top: 6px;
}
.sd-vocab b {
  display: block;
  font-size: 11px;
  color: #1A1D3A;
}
.sd-vocab small {
  font-size: 9px;
  color: #645E58;
}
.sd-vocab span {
  font-size: 9px;
  font-weight: 700;
  border-radius: 999px;
  padding: 2px 7px;
}
.sd-vocab .review { background: rgba(217,119,6,0.12); color: #D97706; }
.sd-vocab .known { background: rgba(22,163,74,0.12); color: #16A34A; }

/* Bottom nav */
.sd-bottom-nav {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #E5E2DC;
  box-shadow: 0 8px 24px rgba(28, 26, 24, 0.12);
  overflow: visible;
}

.sd-nav-item {
  width: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  color: #645E58;
}
.sd-nav-item.active { color: #4F7EFF; }
.sd-nav-item small {
  font-size: 7px;
  font-weight: 700;
}

.sd-mic-btn {
  position: relative;
  width: 44px;
  height: 44px;
  margin: 0 4px;
  margin-top: -18px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, #1A1F84, #4F7EFF);
  box-shadow: 0 8px 20px rgba(79, 126, 255, 0.35);
  display: grid;
  place-items: center;
  cursor: default;
  overflow: visible;
  animation: sd-mic-pulse 9s ease-in-out infinite;
}

@keyframes sd-mic-pulse {
  0%, 28% { transform: scale(1); box-shadow: 0 8px 20px rgba(79, 126, 255, 0.35); }
  32%, 36% { transform: scale(1.08); box-shadow: 0 10px 28px rgba(79, 126, 255, 0.55); }
  40%, 100% { transform: scale(1); box-shadow: 0 8px 20px rgba(79, 126, 255, 0.35); }
}

/* Session */
.sd-session-card {
  width: min(420px, 86%);
  background: #fff;
  border: 1px solid #E5E2DC;
  border-radius: 20px;
  padding: 20px 24px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  box-shadow: 0 12px 32px rgba(26, 31, 132, 0.08);
}

.sd-session-head { text-align: center; }
.sd-session-head h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: #1A1D3A;
}
.sd-session-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
  font-size: 12px;
  color: #4A4A55;
}
.sd-live {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4F7EFF;
  animation: sd-blink 1.2s ease-in-out infinite;
}
.sd-timer {
  background: #EEF1FF;
  border-radius: 999px;
  padding: 2px 8px;
  font-weight: 700;
  font-size: 11px;
  color: #1A1F84;
  direction: ltr;
}

.sd-session-avatar {
  position: relative;
  width: 140px;
  height: 140px;
  display: grid;
  place-items: center;
}
.sd-session-ring {
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  border: 2px solid rgba(79, 126, 255, 0.35);
  animation: sd-ring 2.2s ease-in-out infinite;
}
.sd-session-face {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, #1A1F84, #6474FF);
  box-shadow: 0 0 28px rgba(79, 126, 255, 0.35);
}
.sd-session-face video,
.sd-lina-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}

.sd-session-line {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #1A1D3A;
  text-align: center;
  direction: ltr;
}

.sd-session-controls {
  display: flex;
  gap: 18px;
  margin-top: 4px;
}
.sd-ctrl {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid #E5E2DC;
  background: #F7F8FF;
  color: #6B6660;
  display: grid;
  place-items: center;
}
.sd-ctrl.danger {
  background: #EF4444;
  border-color: #EF4444;
  color: #fff;
  box-shadow: 0 8px 20px rgba(239, 68, 68, 0.3);
}

/* Cursor — anchored to mic button, animates from dashboard into the mic */
.sd-cursor {
  position: absolute;
  z-index: 20;
  top: 50%;
  left: 50%;
  width: 22px;
  height: 28px;
  margin-top: -2px;
  margin-left: -2px;
  pointer-events: none;
  animation: sd-cursor 9s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.sd-click-ring {
  position: absolute;
  top: -6px;
  left: -6px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid #4F7EFF;
  opacity: 0;
  animation: sd-click 9s ease-out infinite;
}

@keyframes sd-cursor {
  0%, 10% {
    transform: translate(var(--sd-cursor-dx, -80px), var(--sd-cursor-dy, -220px));
    opacity: 1;
  }
  28%, 34% {
    transform: translate(5px, 0);
    opacity: 1;
  }
  36% {
    transform: translate(5px, 0) scale(0.9);
    opacity: 1;
  }
  42%, 88% {
    transform: translate(5px, 0);
    opacity: 0;
  }
  95%, 100% {
    transform: translate(var(--sd-cursor-dx, -80px), var(--sd-cursor-dy, -220px));
    opacity: 1;
  }
}

@keyframes sd-click {
  0%, 33% { opacity: 0; transform: scale(0.4); }
  36% { opacity: 1; transform: scale(1); }
  42% { opacity: 0; transform: scale(2.4); }
  100% { opacity: 0; transform: scale(0.4); }
}

@keyframes sd-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

@keyframes sd-ring {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.07); opacity: 0.65; }
}

@media (prefers-reduced-motion: reduce) {
  .sd-overview,
  .sd-session,
  .sd-cursor,
  .sd-click-ring,
  .sd-mic-btn,
  .sd-live,
  .sd-session-ring {
    animation: none !important;
  }
  .sd-overview { opacity: 1; visibility: visible; }
  .sd-session { opacity: 0; visibility: hidden; }
  .sd-cursor { opacity: 0; }
}

