* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: #0b0f17;
  font-family: 'Montserrat', 'Vazirmatn', 'Noto Sans SC', 'Apple Color Emoji', 'Twemoji Country Flags', sans-serif;
  color: #e5e7eb;
  line-height: 1.5;
  padding: 1.2rem;
  max-width: 900px;
  margin: 0 auto;
}

.logo-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.logo {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 0.6rem;
  object-fit: contain;
  background: #1e293b;
  padding: 0.2rem;
}

h1 {
  font-size: 2rem;
  font-weight: 700;
  background: linear-gradient(135deg, #7dd3fc, #38bdf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
  margin: 0;
}

.subtitle {
  color: #94a3b8;
  margin-bottom: 1.8rem;
  font-size: 0.95rem;
  border-left: 3px solid #38bdf8;
  padding-left: 0.8rem;
}

.checklist {
  background: #151d2b;
  border-radius: 1rem;
  padding: 1.2rem 1.5rem;
  margin-bottom: 2rem;
  border: 1px solid #2a3547;
  box-shadow: none;
}

.checklist h2 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.8rem;
  color: #f1f5f9;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.checklist ol {
  list-style: none;
  counter-reset: steps;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.checklist li {
  counter-increment: steps;
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: #cbd5e1;
}

.checklist li::before {
  content: counter(steps);
  background: #38bdf8;
  color: #0b0f17;
  font-weight: 700;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.75rem;
}

.platforms {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

details.platform {
  background: #111827;
  border: 1px solid #1f2937;
  border-radius: 0.8rem;
  overflow: hidden;
  transition: all 0.2s;
  box-shadow: none;
}

details.platform[open] {
  border-color: #38bdf8;
  box-shadow: 0 0 0 1px rgba(56,189,248,0.2);
}

summary.platform-summary {
  padding: 0.9rem 1.2rem;
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #1a2332;
  color: #f8fafc;
  user-select: none;
  transition: background 0.2s;
  list-style: none;
}

summary.platform-summary::-webkit-details-marker {
  display: none;
}

summary.platform-summary:hover {
  background: #242f3d;
}

summary.platform-summary::after {
  content: "▾";
  font-size: 1.3rem;
  transition: transform 0.3s;
  color: #38bdf8;
}

details.platform[open] summary.platform-summary::after {
  transform: rotate(180deg);
}

.platform-content {
  padding: 1rem 1.2rem 1.5rem;
  background: #0f172a;
}

.apps-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-top: 0.5rem;
}

details.app-accordion {
  background: #1a2332;
  border: 1px solid #2a3547;
  border-radius: 0.7rem;
  overflow: hidden;
  box-shadow: none;
}

details.app-accordion[open] {
  border-color: #38bdf8;
  box-shadow: 0 0 0 1px rgba(56,189,248,0.2);
}

summary.app-summary {
  padding: 0.8rem 1.2rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #212e3e;
  color: #e2e8f0;
  user-select: none;
  transition: background 0.2s;
  list-style: none;
}

summary.app-summary::-webkit-details-marker {
  display: none;
}

summary.app-summary::after {
  content: "▾";
  font-size: 1.1rem;
  color: #38bdf8;
  transition: transform 0.2s;
}

details.app-accordion[open] summary.app-summary::after {
  transform: rotate(180deg);
}

.app-content {
  padding: 0.8rem 1.2rem 1.2rem;
}

.app-content h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #bae6fd;
  margin-bottom: 0.25rem;
}

.store-link {
  display: inline-block;
  margin: 0.25rem 0 0.8rem;
  color: #38bdf8;
  text-decoration: none;
  font-size: 0.85rem;
  border-bottom: 1px dashed #38bdf8;
}

.app-content h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: #e2e8f0;
  margin: 1rem 0 0.4rem;
  border-bottom: 1px solid #334155;
  padding-bottom: 0.2rem;
}

.app-content ol, .app-content ul {
  padding-left: 1.2rem;
  margin-bottom: 0.8rem;
  color: #cbd5e1;
  font-size: 0.9rem;
}

.app-content li {
  margin-bottom: 0.3rem;
}

pre {
  background: #0b1622;
  color: #a5f3fc;
  padding: 0.8rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  font-size: 0.8rem;
  border: 1px solid #1e3a5f;
  margin: 0.5rem 0 0.8rem;
  white-space: pre-wrap;
  word-break: break-all;
}

.copy-btn {
  background: #1e3a5f;
  border: none;
  color: #e0f2fe;
  padding: 0.3rem 0.8rem;
  border-radius: 0.4rem;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  margin-bottom: 0.8rem;
  transition: background 0.2s;
}

.copy-btn:hover {
  background: #2563eb;
}

.copy-btn.copied {
  background: #059669;
}

/* Карусель – более лёгкая */
.carousel {
  position: relative;
  margin-top: 1rem;
  background: transparent;
  border-radius: 0;
  padding: 0;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.carousel-track {
  position: relative;
  width: 100%;
  max-width: 320px;          /* немного уменьшим для лёгкости */
  aspect-ratio: 9 / 16;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 0.5rem;
  background: #1e293b;
}

.platform.windows .carousel-track,
.platform.macos .carousel-track,
.platform.linux .carousel-track {
  aspect-ratio: 16 / 9;
  max-width: 500px;
}

.carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  z-index: 2;
}

.carousel-slide.active {
  opacity: 1;
  visibility: visible;
  position: relative;
}

.screenshot-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 0.4rem;
  background: #2d3a4f;
  display: block;
}

.carousel-slide .step-number,
.carousel-slide .slide-caption {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.7);
  z-index: 3;
  font-size: 0.7rem;
}

.carousel-slide .step-number {
  bottom: 2.2rem;
  background: rgba(56,189,248,0.9);
  padding: 0.1rem 0.5rem;
  border-radius: 2rem;
  font-weight: 700;
  color: #0b0f17;
}

.carousel-slide .slide-caption {
  bottom: 0.6rem;
  font-weight: 500;
  background: rgba(0,0,0,0.6);
  padding: 0.15rem 0.5rem;
  border-radius: 0.3rem;
  font-size: 0.7rem;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(15, 23, 42, 0.7);
  border: none;
  color: #e2e8f0;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 50%;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 4;
  transition: background 0.2s;
  backdrop-filter: blur(2px);
}

.carousel-btn:hover {
  background: rgba(56,189,248,0.5);
}

.carousel-prev { left: 0.3rem; }
.carousel-next { right: 0.3rem; }

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.3rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
  position: relative;
  z-index: 3;
}

.dot {
  background: #334155;
  border: none;
  color: #cbd5e1;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  font-size: 0.65rem;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dot.active {
  background: #38bdf8;
  color: #0b0f17;
  font-weight: 700;
  transform: scale(1.1);
}

/* Лайтбокс */
.lightbox {
  display: flex;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.92);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 0.5rem;
  box-shadow: 0 20px 40px rgba(0,0,0,0.6);
  background: #1e293b;
  transform: scale(0.9);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.lightbox.active .lightbox-img {
  transform: scale(1);
  opacity: 1;
}

.lightbox-caption {
  margin-top: 0.8rem;
  color: #e2e8f0;
  font-size: 0.9rem;
  font-weight: 500;
  text-align: center;
  max-width: 80vw;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.lightbox.active .lightbox-caption {
  opacity: 1;
  transform: translateY(0);
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  font-size: 2.5rem;
  color: #e2e8f0;
  cursor: pointer;
  background: none;
  border: none;
  line-height: 1;
  z-index: 10;
  transition: color 0.2s;
}

.lightbox-close:hover {
  color: #38bdf8;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2.5rem;
  color: white;
  background: rgba(0,0,0,0.5);
  border: none;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
  z-index: 10;
}

.lightbox-nav:hover {
  background: rgba(56,189,248,0.7);
}

.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }

.lightbox-counter {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.7);
  color: #e2e8f0;
  padding: 0.2rem 0.8rem;
  border-radius: 2rem;
  font-size: 0.8rem;
  font-weight: 500;
}

@media (max-width: 600px) {
  body {
    padding: 0.8rem;
  }
  .logo-title {
    margin-bottom: 0.3rem;
  }
  h1 {
    font-size: 1.8rem;
  }
  .subtitle {
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
  }
  .checklist {
    padding: 1rem 1.2rem;
  }
  .platform-content {
    padding: 0.8rem 1rem 1.2rem;
  }
  .app-content {
    padding: 0.7rem 1rem 1rem;
  }
  .carousel-track {
    max-width: 260px;
  }
  .carousel-btn {
    width: 1.6rem;
    height: 1.6rem;
    font-size: 0.9rem;
  }
  .lightbox-close { top: 1rem; right: 1rem; font-size: 2rem; }
  .lightbox-nav { width: 2.2rem; height: 2.2rem; font-size: 1.8rem; }
}

/* Блок терминов и правил */
.terms-rules {
  background: #151d2b;
  border: 1px solid #2a3547;
  border-radius: 1rem;
  padding: 1.2rem 1.5rem;
  margin-bottom: 1.5rem;
  color: #cbd5e1;
  font-size: 0.9rem;
  line-height: 1.5;
}

.terms-rules h2 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #f1f5f9;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.terms-rules .tr-section {
  margin-bottom: 1rem;
}

.terms-rules .tr-section:last-child {
  margin-bottom: 0;
}

.terms-rules h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #bae6fd;
  margin-bottom: 0.4rem;
}

.terms-rules dl {
  margin: 0;
}

.terms-rules dt {
  font-weight: 600;
  color: #e2e8f0;
  margin-top: 0.6rem;
}

.terms-rules dd {
  margin-left: 0;
  margin-top: 0.2rem;
  color: #94a3b8;
}

.terms-rules ul {
  padding-left: 1.2rem;
  margin: 0;
  list-style: disc;
}

.terms-rules li {
  margin-bottom: 0.2rem;
}

.terms-rules p {
  margin: 0;
  color: #94a3b8;
}