/* GSAP ScrollTrigger Guide Page Styles */

/* Color variables */
:root {
  --gs-primary: #00FF66;
  --gs-secondary: #00CC88;
  --gs-dark: #1A1A2E;
  --gs-darker: #0F0F1A;
}

/* Hero Section */
.st-hero {
  position: relative;
  background: linear-gradient(135deg, var(--gs-darker) 0%, #1a1a3e 100%);
  padding: 10rem 0 6rem;
  overflow: hidden;
}

.st-hero [data-gsap] {
  opacity: 0;
}

.st-hero h1 {
  font-weight: 800;
  letter-spacing: -0.02em;
}

.st-hero .lead {
  font-size: 1.15rem;
  line-height: 1.6;
}

/* Table of Contents */
.st-toc {
  background: rgba(0, 255, 102, 0.03);
  border: 1px solid rgba(0, 255, 102, 0.1);
  padding: 2rem;
}

.st-toc a {
  transition: color 0.3s ease;
}

.st-toc a:hover {
  color: var(--gs-primary) !important;
}

/* ScrollTrigger Sections */
.st-section {
  position: relative;
  transition: background-color 0.3s ease;
}

.st-section h2 {
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.st-section .text-white-50 {
  line-height: 1.7;
  font-size: 1rem;
}

/* Demo Elements */
.basic-trigger-box,
.position-box-1,
.position-box-2,
.position-box-3,
.scrub-box,
.pin-box,
.toggle-box,
.callback-box,
.marker-box,
.batch-box {
  width: 60px;
  height: 60px;
  border-radius: 8px;
}

.demo-primary {
  background-color: var(--gs-primary);
  box-shadow: 0 0 20px rgba(0, 255, 102, 0.3);
}

.demo-secondary {
  background-color: var(--gs-secondary);
  box-shadow: 0 0 20px rgba(0, 204, 136, 0.3);
}

/* Demo Stage */
.st-demo {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(0, 255, 102, 0.15);
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: auto;
}

.st-demo-stage {
  width: 100%;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  min-height: 200px;
}

/* Progress Bar */
.st-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--gs-primary), var(--gs-secondary));
  width: 0%;
  transition: width 0.05s linear;
}

/* Play Button */
.st-play-btn {
  position: absolute;
  bottom: 15px;
  right: 15px;
  z-index: 10;
  white-space: nowrap;
}

.st-play-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 255, 102, 0.3);
}

/* Control Bar */
.st-control-bar {
  background: rgba(0, 255, 102, 0.05);
  border: 1px solid rgba(0, 255, 102, 0.15);
}

.st-control-bar .btn {
  transition: all 0.3s ease;
}

.st-control-bar .btn:hover {
  transform: translateY(-2px);
}

/* Progress Container */
.st-progress-container {
  margin-top: 15px;
}

.progress {
  cursor: pointer;
  background: rgba(0, 255, 102, 0.1);
  border: 1px solid rgba(0, 255, 102, 0.2);
  border-radius: 4px;
}

.progress-bar {
  background: linear-gradient(90deg, var(--gs-primary), var(--gs-secondary));
}

/* Code Blocks */
.st-code {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(0, 255, 102, 0.1);
  overflow-x: auto;
}

.st-code pre {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 0.85rem;
  line-height: 1.6;
  margin: 0;
}

.st-code code {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
}

.st-copy-btn {
  transition: all 0.3s ease;
}

.st-copy-btn:hover {
  background-color: rgba(0, 255, 102, 0.1);
  border-color: var(--gs-primary);
}

.st-copy-btn.copied {
  background-color: var(--gs-primary);
  color: var(--gs-darker);
}

/* Callout Boxes */
.st-callout {
  background: rgba(0, 255, 102, 0.05);
  border: 1px solid rgba(0, 255, 102, 0.15);
  border-left: 3px solid var(--gs-primary);
  transition: all 0.3s ease;
}

.st-callout:hover {
  background: rgba(0, 255, 102, 0.08);
  border-color: rgba(0, 255, 102, 0.25);
}

.st-callout h4 {
  font-weight: 700;
}

.st-callout ul {
  padding-left: 1.25rem;
  list-style: none;
}

.st-callout li {
  position: relative;
  margin-bottom: 0.5rem;
  padding-left: 1rem;
}

.st-callout li:before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--gs-primary);
  font-weight: 700;
}

.st-callout p {
  margin-bottom: 0;
  line-height: 1.6;
}

.st-callout table {
  margin: 0;
}

.st-callout table th {
  border-top: 1px solid rgba(0, 255, 102, 0.15);
}

.st-callout table td {
  padding: 0.75rem;
}

/* Accordion */
.st-accordion .accordion-button {
  padding: 1.25rem 1.5rem;
  font-weight: 700;
  border: none;
  text-decoration: none;
  transition: all 0.3s ease;
}

.st-accordion .accordion-button:not(.collapsed) {
  background-color: rgba(0, 255, 102, 0.1);
  box-shadow: none;
  color: var(--gs-primary);
}

.st-accordion .accordion-button:focus {
  box-shadow: none;
  border-color: rgba(0, 255, 102, 0.25);
}

.st-accordion .accordion-body {
  padding: 1.5rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.7;
}

.st-accordion a {
  color: var(--gs-primary);
  text-decoration: none;
}

.st-accordion a:hover {
  text-decoration: underline;
}

/* Font monospace override */
.font-mono {
  font-family: 'JetBrains Mono', 'Courier New', monospace !important;
}

/* Letter spacing utility */
.ls-wide {
  letter-spacing: 0.1em;
}

/* Hover states for links */
.hover-primary:hover {
  color: var(--gs-primary) !important;
  text-decoration: underline;
}

/* Badge customization */
.badge {
  padding: 0.5rem 1rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

/* Utilities */
code {
  background: rgba(0, 255, 102, 0.1);
  color: var(--gs-primary);
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9em;
}

.text-primary {
  color: var(--gs-primary) !important;
}

.bg-gs-darker {
  background-color: var(--gs-darker) !important;
}

.bg-gs-dark {
  background-color: var(--gs-dark) !important;
}

/* Smooth transitions */
* {
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

button,
a {
  transition: all 0.3s ease;
}

/* Scrollbar styling */
.st-code::-webkit-scrollbar {
  height: 6px;
}

.st-code::-webkit-scrollbar-track {
  background: rgba(0, 255, 102, 0.05);
}

.st-code::-webkit-scrollbar-thumb {
  background: rgba(0, 255, 102, 0.3);
  border-radius: 3px;
}

.st-code::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 255, 102, 0.5);
}

/* Callback Log */
.callback-log {
  font-family: 'JetBrains Mono', monospace;
  color: var(--gs-primary);
}

.callback-entry {
  font-size: 11px;
  padding: 3px 0;
  border-bottom: 1px solid rgba(0, 255, 102, 0.1);
}

.callback-entry:last-child {
  border-bottom: none;
}

/* Status Text */
.toggle-status {
  min-height: 20px;
  font-weight: 600;
}

/* Position Demo Grid */
.position-demo-grid {
  width: 100%;
  min-height: 200px;
}

/* Pin Container */
.pin-container {
  position: relative;
  min-height: 120px;
}

/* Batch Grid */
.batch-grid {
  width: 100%;
  min-height: 100px;
}

/* Animation helpers */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

[data-gsap="fade-up"] {
  animation: fadeUp 0.6s ease-out forwards;
}

/* Responsive Design */
@media (max-width: 991px) {
  .st-hero h1 {
    font-size: 2.5rem;
  }

  .st-section h2 {
    font-size: 1.75rem;
  }

  .st-demo {
    min-height: 200px;
  }

  .st-code {
    margin-bottom: 1.5rem;
  }

  .st-code pre {
    font-size: 0.8rem;
  }

  .st-callout table {
    font-size: 0.875rem;
  }
}

@media (max-width: 768px) {
  .st-hero {
    padding: 3rem 1rem;
  }

  .st-hero h1 {
    font-size: 2rem;
  }

  .st-hero .lead {
    font-size: 1rem;
  }

  .st-section {
    padding: 2rem 0;
  }

  .st-section h2 {
    font-size: 1.5rem;
  }

  .st-toc {
    padding: 1.5rem;
  }

  .st-toc ul {
    font-size: 0.95rem;
  }

  .st-demo {
    min-height: 180px;
  }

  .st-demo-stage {
    flex-direction: column;
  }

  .st-code {
    padding: 1rem;
    border-radius: 0.75rem;
  }

  .st-code pre {
    font-size: 0.75rem;
  }

  .st-callout {
    padding: 1.5rem;
  }

  .st-control-bar {
    padding: 1.5rem !important;
  }

  .st-accordion .accordion-button {
    padding: 1rem 1.25rem;
    font-size: 0.95rem;
  }

  .btn-lg {
    font-size: 0.95rem;
    padding: 0.6rem 1.5rem;
  }

  .st-play-btn {
    font-size: 0.85rem;
    padding: 0.4rem 0.9rem;
  }

  .batch-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 480px) {
  .batch-grid {
    grid-template-columns: 1fr !important;
  }

  .st-demo-stage {
    padding: 15px;
  }

  .position-demo-grid {
    gap: 10px;
  }
}

/* Print styles */
@media print {
  .st-play-btn,
  .st-copy-btn,
  .st-control-bar,
  .position-buttons,
  .label-buttons {
    display: none;
  }
}
