.table-of-contents {
  background: linear-gradient(135deg, var(--dark-light) 0%, #24272c 100%);
  border-radius: 0.75rem;
  padding: 1rem;
  margin: 2rem 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.toc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  padding: 0.75rem;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary);
  user-select: none;
}

.toc-header:hover {
  background-color: rgba(255, 50, 92, 0.1);
}

.toc-toggle {
  font-size: 1rem;
  transition: transform 0.3s ease;
  color: var(--primary);
}

.toc-toggle.open {
  transform: rotate(180deg);
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.toc-list.show {
  max-height: 1000px;
  margin-top: 0.5rem;
}

.toc-list li {
  margin-bottom: 0.5rem;
}

.toc-list a {
  display: flex;
  align-items: center;
  color: var(--gray-300);
  text-decoration: none;
  padding: 0.4rem 0.5rem;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  font-size: 0.95rem;
}

.toc-list a:hover {
  background-color: rgba(255, 50, 92, 0.1);
  color: var(--primary);
  transform: translateX(5px);
}

.toc-list a::before {
  content: "\2192";
  margin-right: 0.5rem;
  color: var(--primary);
  font-weight: bold;
  font-size: 0.875rem;
}

.app-download-banner {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999;
  background: #212121;
  padding: 0.75rem 1rem;
  padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
  align-items: center;
  gap: 0.75rem;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
}

@media (max-width: 768px) {
  .app-download-banner {
    display: flex;
  }

  .app-download-banner.hidden {
    display: none !important;
  }

  body.app-banner-visible .scroll-to-top {
    bottom: 5.5rem;
  }
}

.app-download-banner__logo {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: contain;
}

.app-download-banner__info {
  flex: 1;
  min-width: 0;
}

.app-download-banner__name {
  display: block;
  font-weight: 600;
  font-size: 1rem;
  color: #fff;
}

.app-download-banner__stars {
  display: inline-flex;
  gap: 2px;
  margin-top: 2px;
}

.app-download-banner__stars .star {
  display: inline-block;
  width: 14px;
  height: 14px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'%3E%3Cpath d='M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z'/%3E%3C/svg%3E") no-repeat center;
  background-size: contain;
}

.app-download-banner__stars .star.half {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cdefs%3E%3ClinearGradient id='half' x1='0%25' y1='0%25' x2='100%25' y2='0%25'%3E%3Cstop offset='50%25' style='stop-color:%23fff'/%3E%3Cstop offset='50%25' style='stop-color:rgba(255,255,255,0.3)'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath fill='url(%23half)' d='M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z'/%3E%3C/svg%3E") no-repeat center;
  background-size: contain;
}

.app-download-banner__btn {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 6px;
  color: #fff;
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.5px;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
}

.app-download-banner__btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.6);
  color: #fff;
}

.app-download-banner__icon {
  flex-shrink: 0;
}

.scroll-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--primary) 0%, #ff1744 100%);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
  box-shadow: 0 4px 15px rgba(255, 50, 92, 0.4);
}

.scroll-to-top.show {
  opacity: 1;
  visibility: visible;
}

.scroll-to-top:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(255, 50, 92, 0.6);
}

.promo-timer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
  padding: 1rem;
  background: rgba(255, 50, 92, 0.1);
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 50, 92, 0.3);
}

.timer-label {
  color: var(--gray-300);
  font-size: 0.9rem;
  font-weight: 500;
}

.timer-display {
  display: flex;
  gap: 0.5rem;
}

.timer-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255, 50, 92, 0.2);
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
}

.timer-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}

.timer-text {
  font-size: 0.7rem;
  color: var(--gray-300);
  margin-top: 0.25rem;
}

@media (max-width: 768px) {
  .table-of-contents {
    padding: 0.75rem;
  }

  .toc-header {
    font-size: 1.125rem;
    padding: 0.6rem;
  }

  .toc-list a {
    font-size: 0.9rem;
    padding: 0.35rem 0.4rem;
  }

  .toc-list a::before {
    margin-right: 0.4rem;
    font-size: 0.8rem;
  }

  .scroll-to-top {
    bottom: 1rem;
    right: 1rem;
    width: 45px;
    height: 45px;
    font-size: 1.25rem;
  }

  .timer-value {
    font-size: 1.25rem;
  }

  .timer-unit {
    padding: 0.4rem 0.6rem;
  }
}

@media (max-width: 480px) {
  .table-of-contents {
    padding: 0.6rem;
  }

  .toc-header {
    font-size: 1rem;
    padding: 0.5rem;
  }

  .toc-list a {
    font-size: 0.85rem;
    padding: 0.3rem 0.35rem;
  }
}
