/* === ОБЩИЕ === */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Nunito', 'Segoe UI', sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  overflow: hidden;
  color: #333;
  user-select: none;
}

/* === ПРОГРЕСС-БАР === */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 6px;
  background: rgba(255,255,255,0.3);
  z-index: 1000;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #ff6b6b, #ffd93d, #6bcb77, #4d96ff);
  width: 0%;
  transition: width 0.4s ease;
  border-radius: 0 3px 3px 0;
}

/* === НАВИГАЦИЯ === */
.nav-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 56px;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 900;
}
.nav-btn {
  background: rgba(255,255,255,0.15);
  color: white;
  border: 2px solid rgba(255,255,255,0.3);
  padding: 8px 20px;
  border-radius: 25px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.nav-btn:hover:not(:disabled) {
  background: rgba(255,255,255,0.3);
  transform: scale(1.05);
}
.nav-btn:disabled {
  opacity: 0.4;
  cursor: default;
}
.slide-counter {
  color: rgba(255,255,255,0.8);
  font-size: 1rem;
  font-weight: 600;
}

/* === СЛАЙДЫ === */
.slides-container {
  width: 100vw;
  height: calc(100vh - 62px);
  position: relative;
  overflow: hidden;
}
.slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateX(60px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
  padding: 20px;
  padding-bottom: 30px;
}
.slide.active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: all;
}
.slide.active.from-left {
  transform: translateX(0);
}
.slide.active.from-right {
  transform: translateX(0);
}
.slide.exit-left {
  opacity: 0;
  transform: translateX(-60px);
}
.slide.exit-right {
  opacity: 0;
  transform: translateX(60px);
}
.slide-content {
  max-width: 700px;
  width: 100%;
  text-align: center;
}

/* === ТИТУЛЬНЫЙ СЛАЙД === */
.title-slide h1 {
  font-size: 3rem;
  color: white;
  text-shadow: 0 3px 12px rgba(0,0,0,0.25);
  margin-bottom: 10px;
}
.title-slide .subtitle {
  font-size: 1.3rem;
  color: rgba(255,255,255,0.9);
  margin-bottom: 30px;
  line-height: 1.6;
}
.big-emoji {
  font-size: 5rem;
  margin-bottom: 15px;
  animation: bounce 2s infinite;
}
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
.decoration-row {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin: 20px 0;
}
.deco-item {
  font-size: 2.5rem;
  animation: float 3s ease-in-out infinite;
}
.deco-item:nth-child(2) { animation-delay: 0.5s; }
.deco-item:nth-child(3) { animation-delay: 1s; }
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-8px) rotate(5deg); }
}
.hint-text {
  color: rgba(255,255,255,0.7);
  font-size: 0.95rem;
  margin-top: 15px;
}

/* === СЛАЙД-ЭМОДЗИ И ЗАГОЛОВКИ === */
.slide-emoji {
  font-size: 3.5rem;
  margin-bottom: 10px;
}
h2 {
  font-size: 2rem;
  color: white;
  text-shadow: 0 2px 8px rgba(0,0,0,0.2);
  margin-bottom: 15px;
}

/* === ИНФО-КАРТОЧКА === */
.info-card {
  background: white;
  border-radius: 16px;
  padding: 18px 24px;
  margin-bottom: 20px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.12);
  text-align: left;
  font-size: 1.05rem;
  line-height: 1.6;
}
.info-card p { margin-bottom: 6px; }
.info-card p:last-child { margin-bottom: 0; }
.info-card strong { color: #764ba2; }

/* === ДЕМО-ОКНО (общее) === */
.demo-window {
  background: #f0f0f0;
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  overflow: hidden;
  margin: 15px auto;
  max-width: 320px;
  transition: transform 0.3s, opacity 0.3s;
  position: relative;
}
.window-titlebar {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  cursor: grab;
  user-select: none;
}
.window-titlebar:active { cursor: grabbing; }
.window-title {
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.window-buttons {
  display: flex;
  gap: 4px;
}
.win-btn {
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.1s;
}
.win-btn.minimize { background: #ffd93d; color: #333; }
.win-btn.minimize:hover { background: #ffcc00; transform: scale(1.15); }
.win-btn.maximize { background: #6bcb77; color: white; }
.win-btn.maximize:hover { background: #5ab86a; transform: scale(1.15); }
.win-btn.close { background: #ff6b6b; color: white; }
.win-btn.close:hover { background: #ee5a5a; transform: scale(1.15); }
.window-body {
  padding: 20px;
  font-size: 1rem;
  background: white;
  min-height: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* === АНИМАЦИОННАЯ ЗОНА === */
.animation-area {
  position: relative;
  height: 220px;
  margin: 10px auto;
  max-width: 350px;
}

/* === ПАНЕЛЬ ЗАДАЧ МОК === */
.taskbar-mock {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.75);
  border-radius: 8px 8px 0 0;
  padding: 4px 12px;
  display: flex;
  gap: 8px;
}
.taskbar-item {
  width: 40px;
  height: 34px;
  background: rgba(255,255,255,0.15);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.2s;
}
.taskbar-item:hover { background: rgba(255,255,255,0.3); }
.taskbar-item.active { background: rgba(255,255,255,0.25); border-bottom: 2px solid #4d96ff; }

/* === АНИМАЦИИ ОКОН === */
@keyframes minimizeAnim {
  0% { transform: scale(1); opacity: 1; }
  60% { transform: scale(0.3) translateY(40px); opacity: 0.6; }
  100% { transform: scale(0) translateY(120px); opacity: 0; pointer-events: none; }
}
@keyframes restoreAnim {
  0% { transform: scale(0) translateY(120px); opacity: 0; pointer-events: none; }
  40% { transform: scale(0.3) translateY(40px); opacity: 0.6; }
  100% { transform: scale(1) translateY(0); opacity: 1; pointer-events: all; }
}
@keyframes closeAnim {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(0.2); opacity: 0; pointer-events: none; }
}
.hidden-at-start {
  opacity: 0;
  transform: scale(0) translateY(120px);
  pointer-events: none;
}
.animate-minimize { animation: minimizeAnim 0.7s forwards ease-in-out; }
.animate-restore { animation: restoreAnim 0.7s forwards ease-in-out; }
.animate-close { animation: closeAnim 0.5s forwards ease-in-out; }

/* === АННОТАЦИИ === */
.annotated { position: relative; }
.annotation {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 6px;
  pointer-events: none;
}
.annotation-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ff6b6b;
  animation: pulse 1.5s infinite;
  flex-shrink: 0;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,107,107,0.5); }
  50% { box-shadow: 0 0 0 8px rgba(255,107,107,0); }
}
.annotation-line {
  width: 30px;
  height: 2px;
  background: #ff6b6b;
}
.annotation-text {
  background: #ff6b6b;
  color: white;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}
.ann-title { top: 50%; right: -140px; transform: translateY(-50%); }
.ann-min { top: 50%; left: -90px; transform: translateY(-50%); flex-direction: row-reverse; }
.ann-max { top: 50%; left: -100px; transform: translateY(-50%) translateX(-30px); flex-direction: row-reverse; }
.ann-close { top: 50%; left: -90px; transform: translateY(-50%) translateX(-58px); flex-direction: row-reverse; }

/* === ВЫДЕЛЕННАЯ ПОДСКАЗКА === */
.highlight-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(5px);
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 12px;
  padding: 12px 20px;
  margin-top: 15px;
  color: white;
  font-size: 0.95rem;
}
.highlight-icon { font-size: 1.3rem; }

/* === ИНТЕРЕСЫ (слайд 1) === */
.quiz-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  max-width: 500px;
  margin: 0 auto;
}
.interest-card {
  background: white;
  border-radius: 14px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  text-align: left;
}
.interest-emoji { font-size: 2rem; }
.interest-card p { font-size: 1rem; font-weight: 600; color: #444; }

/* === ДЕМО МЫШИ (слайд 2) === */
.mouse-demo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}
.mouse-visual {
  position: relative;
  width: 100px;
  height: 160px;
}
.mouse-body {
  width: 100px;
  height: 130px;
  background: linear-gradient(180deg, #e8e8e8 0%, #d0d0d0 100%);
  border-radius: 50px 50px 35px 35px;
  position: relative;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  cursor: pointer;
}
.mouse-btn-left, .mouse-btn-right {
  position: absolute;
  top: 8px;
  width: 44px;
  height: 55px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  transition: background 0.15s;
  cursor: pointer;
}
.mouse-btn-left {
  left: 4px;
  border-radius: 44px 0 0 0;
  background: rgba(255,255,255,0.6);
}
.mouse-btn-left:hover, .mouse-btn-left.pressed { background: #ffd93d; }
.mouse-btn-right {
  right: 4px;
  border-radius: 0 44px 0 0;
  background: rgba(255,255,255,0.6);
}
.mouse-btn-right:hover, .mouse-btn-right.pressed { background: #4d96ff; color: white; }
.mouse-wheel {
  position: absolute;
  top: 25px;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 18px;
  background: #999;
  border-radius: 4px;
}
.mouse-cord {
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 30px;
  background: linear-gradient(180deg, #bbb, transparent);
  border-radius: 2px;
}
.mouse-info {
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(5px);
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 12px;
  padding: 12px 20px;
  color: white;
  font-weight: 600;
  min-height: 48px;
  transition: all 0.3s;
}

/* === КЛИК ДЕМО (слайд 3) === */
.click-demo {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin: 15px 0;
}
.click-area {
  background: white;
  border-radius: 16px;
  padding: 20px;
  width: 200px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}
.click-area:hover { transform: scale(1.03); box-shadow: 0 6px 20px rgba(0,0,0,0.15); }
.click-area:active { transform: scale(0.97); }
.click-target { font-size: 3rem; display: block; margin-bottom: 8px; }
.click-label { font-size: 0.85rem; color: #888; font-weight: 600; }
.click-result {
  margin-top: 10px;
  font-size: 1.1rem;
  font-weight: 700;
  min-height: 28px;
  transition: all 0.3s;
}

/* === ПЕРЕТАСКИВАНИЕ (слайд 4) === */
.drag-playground {
  position: relative;
  width: 320px;
  height: 160px;
  margin: 15px auto;
  background: rgba(255,255,255,0.1);
  border-radius: 16px;
  border: 2px dashed rgba(255,255,255,0.3);
}
.drag-item {
  position: absolute;
  font-size: 2.5rem;
  cursor: grab;
  transition: transform 0.1s;
  z-index: 10;
}
.drag-item:active { cursor: grabbing; transform: scale(1.15); }
.drag-item.in-bucket {
  opacity: 0.3;
  pointer-events: none;
}
.drag-bucket {
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 80px;
  height: 70px;
  background: rgba(255,255,255,0.15);
  border: 2px dashed rgba(255,255,255,0.4);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}
.drag-bucket span { font-size: 1.8rem; }
.drag-bucket p { font-size: 0.6rem; color: rgba(255,255,255,0.7); margin-top: 2px; }
.drag-bucket.highlight {
  background: rgba(107,203,119,0.3);
  border-color: #6bcb77;
  transform: scale(1.05);
}

/* === ИНТЕРАКТИВНЫЕ КНОПКИ ОКОН === */
.win-action-minimize:hover { transform: scale(1.2); }
.win-action-maximize:hover { transform: scale(1.2); }
.win-action-close:hover { transform: scale(1.2); }

/* === ТАСКБАР ДЕМО (слайд 12) === */
.taskbar-demo { margin: 15px 0; }
.taskbar-full {
  display: flex;
  align-items: center;
  background: rgba(0,0,0,0.75);
  border-radius: 10px;
  padding: 6px 12px;
  max-width: 500px;
  margin: 0 auto;
}
.taskbar-start {
  padding: 0 12px 0 0;
  border-right: 1px solid rgba(255,255,255,0.2);
}
.start-btn {
  font-size: 1.3rem;
  color: white;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background 0.2s;
}
.start-btn:hover { background: rgba(255,255,255,0.15); }
.taskbar-programs {
  display: flex;
  gap: 6px;
  padding: 0 12px;
  flex: 1;
}
.taskbar-prog {
  width: 42px;
  height: 38px;
  background: rgba(255,255,255,0.1);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  position: relative;
  cursor: pointer;
  transition: background 0.2s;
}
.taskbar-prog:hover { background: rgba(255,255,255,0.2); }
.taskbar-indicator {
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 3px;
  background: #4d96ff;
  border-radius: 2px;
}
.taskbar-tray {
  padding-left: 12px;
  border-left: 1px solid rgba(255,255,255,0.2);
}
.tray-clock {
  color: rgba(255,255,255,0.8);
  font-size: 0.8rem;
  font-weight: 600;
}

/* === ПЕРЕКЛЮЧЕНИЕ (слайд 13) === */
.switch-demo { margin: 15px 0; }
.switch-taskbar {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 15px;
}
.switch-prog {
  background: rgba(255,255,255,0.1);
  border: 2px solid transparent;
  border-radius: 12px;
  padding: 10px 20px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}
.switch-prog:hover { background: rgba(255,255,255,0.2); }
.switch-prog.active {
  background: rgba(255,255,255,0.25);
  border-color: #4d96ff;
}
.switch-prog span { font-size: 1.8rem; display: block; }
.switch-prog p { color: white; font-size: 0.8rem; margin-top: 4px; }
.switch-window {
  background: white;
  border-radius: 12px;
  padding: 25px;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
  transition: all 0.3s;
}
.switch-window-content {
  font-size: 1.1rem;
  font-weight: 700;
  color: #333;
}

/* === ЗАПУСК ПРОГРАММ (слайд 14) === */
.launch-methods {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 15px 0;
}
.launch-card {
  background: white;
  border-radius: 14px;
  padding: 18px 14px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  text-align: center;
}
.launch-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 8px;
  width: 50px;
  height: 50px;
  line-height: 50px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border-radius: 12px;
  margin: 0 auto 10px;
}
.launch-card h3 {
  font-size: 0.95rem;
  color: #333;
  margin-bottom: 6px;
}
.launch-card p {
  font-size: 0.8rem;
  color: #888;
  line-height: 1.4;
}

/* === КАБИНЕТ (слайд 15) === */
.cabinet-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin: 15px 0;
}
.feature-card {
  background: white;
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  text-align: center;
}
.feature-emoji { font-size: 2.5rem; display: block; margin-bottom: 8px; }
.feature-card h3 { font-size: 1rem; color: #333; margin-bottom: 6px; }
.feature-card p { font-size: 0.85rem; color: #888; }

/* === ИТОГИ (слайд 16) === */
.summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 15px 0;
}
.summary-card {
  background: white;
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  text-align: center;
}
.summary-emoji { font-size: 2rem; display: block; margin-bottom: 6px; }
.summary-card h3 { font-size: 1rem; color: #333; margin-bottom: 4px; }
.summary-card p { font-size: 0.8rem; color: #888; line-height: 1.4; }

/* === ИЗМЕНЕНИЕ РАЗМЕРА (слайд 11) === */
.resizable-window {
  max-width: 320px;
  min-width: 180px;
  min-height: 100px;
}
.resize-handle {
  position: absolute;
  z-index: 10;
}
.rh-right {
  top: 0;
  right: -4px;
  width: 8px;
  height: 100%;
  cursor: ew-resize;
}
.rh-bottom {
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 8px;
  cursor: ns-resize;
}
.rh-corner {
  bottom: -4px;
  right: -4px;
  width: 16px;
  height: 16px;
  cursor: nwse-resize;
}

/* === АДАПТИВ === */
@media (max-width: 600px) {
  .title-slide h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  .click-demo { flex-direction: column; align-items: center; }
  .launch-methods { grid-template-columns: 1fr; }
  .summary-grid { grid-template-columns: 1fr; }
  .cabinet-features { grid-template-columns: 1fr; }
  .annotation { display: none; }
  .nav-btn { padding: 6px 14px; font-size: 0.85rem; }
}