/* Get Started Guide Styles */

/* Container */
.get-started-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0;
}

/* Hero Section - Index Page */
.gs-hero {
  text-align: center;
  padding: 4rem 2rem;
  background: linear-gradient(135deg, var(--primary) 0%, #7A6BB5 100%);
  color: white;
  border-radius: var(--radius, 8px);
  margin-bottom: 2rem;
}

.gs-hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: white;
}

.gs-hero p {
  font-size: 1.25rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
}

/* Role Selection Cards */
.gs-role-selection {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  padding: 0 1rem;
  margin-bottom: 3rem;
}

.gs-role-card {
  background: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: var(--radius, 8px);
  padding: 2.5rem;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.gs-role-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.gs-role-teacher {
  border-color: var(--primary);
}

.gs-role-teacher:hover {
  border-color: var(--primary);
  background: linear-gradient(180deg, var(--card-bg) 0%, var(--badge-info-bg) 100%);
}

.gs-role-student {
  border-color: var(--color-success-alt-dark);
}

.gs-role-student:hover {
  border-color: var(--color-success-alt-dark);
  background: linear-gradient(180deg, var(--card-bg) 0%, var(--badge-success-bg) 100%);
}

.gs-role-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.gs-role-teacher .gs-role-icon {
  background: linear-gradient(135deg, var(--primary) 0%, #7A6BB5 100%);
  color: white;
}

.gs-role-student .gs-role-icon {
  background: linear-gradient(135deg, var(--color-success-alt-dark) 0%, var(--color-success-alt) 100%);
  color: white;
}

.gs-role-icon svg {
  width: 40px;
  height: 40px;
}

.gs-role-card h2 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.gs-role-card p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.gs-role-cta {
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.gs-role-teacher .gs-role-cta {
  color: var(--primary);
}

.gs-role-student .gs-role-cta {
  color: var(--color-success-alt-dark);
}

/* Features Section */
.gs-features {
  padding: 3rem 1rem;
  text-align: center;
}

.gs-features h2 {
  font-size: 2rem;
  margin-bottom: 2rem;
  color: var(--text-primary);
}

.gs-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.gs-feature {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius, 8px);
  padding: 2rem;
}

.gs-feature-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary) 0%, #7A6BB5 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  color: white;
}

.gs-feature-icon svg {
  width: 28px;
  height: 28px;
}

.gs-feature h3 {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.gs-feature p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* CTA Section */
.gs-cta {
  background: linear-gradient(135deg, #FFF8DC 0%, #FFED99 100%);
  border: 2px solid var(--accent-orange);
  border-radius: var(--radius, 8px);
  padding: 3rem 2rem;
  text-align: center;
  margin: 2rem 1rem;
}

.gs-cta h2 {
  font-size: 1.75rem;
  color: #92400e;
  margin-bottom: 0.75rem;
}

.gs-cta p {
  color: #78350f;
  margin-bottom: 1.5rem;
}

.gs-cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.gs-cta-buttons .btn-lg {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

/* Guide Hero Section */
.gs-guide-hero {
  padding: 4rem 2rem;
  border-radius: var(--radius, 8px);
  margin-bottom: 2rem;
  text-align: center;
}

.gs-teacher-hero {
  background: linear-gradient(135deg, var(--primary) 0%, #7A6BB5 100%);
  color: white;
}

.gs-student-hero {
  background: linear-gradient(135deg, var(--color-success-alt-dark) 0%, var(--color-success-alt) 100%);
  color: white;
}

.gs-hero-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.gs-hero-content h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: white;
}

.gs-hero-content p {
  font-size: 1.25rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto 1.5rem;
}

.gs-student-note {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.2);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius, 8px);
  font-size: 0.9rem;
  margin-top: 1rem;
}

.gs-student-note svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Steps Navigation */
.gs-steps-nav {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding: 1.5rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius, 8px);
  margin-bottom: 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.gs-step-nav-item {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
}

.gs-step-nav-item:hover {
  background: var(--primary);
  color: white;
}

.gs-step-nav-item.active {
  background: var(--primary);
  color: white;
  transform: scale(1.1);
}

/* Step Sections */
.gs-step {
  padding: 4rem 2rem;
  border-radius: var(--radius, 8px);
  margin-bottom: 1rem;
}

.gs-step-white {
  background: var(--card-bg);
  border: 1px solid var(--border);
}

.gs-step-blue {
  background: linear-gradient(135deg, var(--badge-info-bg) 0%, #d8d0ec 100%);
}

.gs-step-green {
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
}

.gs-step-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
}

.gs-step-reverse {
  direction: rtl;
}

.gs-step-reverse > * {
  direction: ltr;
}

.gs-step-text {
  position: relative;
  padding-top: 4rem;
}

.gs-step-number {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  font-size: 1.25rem;
  font-weight: bold;
  box-shadow: 0 4px 12px rgba(93, 76, 154, 0.3);
  margin-bottom: 1rem;
  flex-shrink: 0;
}

.gs-step-visual {
  grid-column: 2;
  grid-row: 1;
}

.gs-step-reverse .gs-step-visual {
  grid-column: 1;
}

.gs-step-reverse .gs-step-text {
  grid-column: 2;
}

.gs-step-reverse .gs-step-number {
  left: calc(50% + 1.5rem);
}

.gs-step-green .gs-step-number {
  background: var(--color-success-alt-dark);
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

.gs-step-text h2 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.gs-step-text p {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

/* Step Lists */
.gs-step-list {
  margin: 1.5rem 0;
  padding-left: 1.25rem;
}

.gs-step-list li {
  margin-bottom: 0.75rem;
  color: var(--text-primary);
  line-height: 1.6;
}

/* Feature Lists */
.gs-feature-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

.gs-feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
  line-height: 1.6;
}

.gs-list-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  background: var(--color-success-alt-dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.gs-list-icon svg {
  width: 14px;
  height: 14px;
}

/* Method Cards */
.gs-method-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin: 1.5rem 0;
}

.gs-method-cards-3 {
  grid-template-columns: repeat(3, 1fr);
}

.gs-step1-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.gs-method-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius, 8px);
  padding: 1.25rem;
}

.gs-method-icon {
  width: 48px;
  height: 48px;
  background: var(--primary);
  border-radius: var(--radius, 8px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  margin-bottom: 1rem;
}

.gs-method-icon svg {
  width: 24px;
  height: 24px;
}

.gs-method-card h4 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.gs-method-card p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

/* Screenshot Frames */
.gs-step-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Screenshot Images */
.gs-screenshot-img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.gs-screenshot-img.loading {
  opacity: 0;
}

.gs-screenshot-img.loaded {
  opacity: 1;
  transition: opacity 0.3s ease;
}

.gs-screenshot-frame {
  background: var(--card-bg, #fff);
  border-radius: 12px;
  padding: 0.75rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  width: 100%;
  max-width: 100%;
}

.gs-screenshot-placeholder {
  background: linear-gradient(135deg, #2d2d2d 0%, #3d3d3d 100%);
  border-radius: 8px;
  padding: 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  min-height: 200px;
  color: #888;
}

.gs-placeholder-icon {
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gs-placeholder-icon svg {
  width: 32px;
  height: 32px;
}

/* Tips */
.gs-tip {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: linear-gradient(135deg, #FFF8DC 0%, #FFED99 100%);
  border: 1px solid var(--accent-orange);
  border-radius: var(--radius, 8px);
  padding: 1rem 1.25rem;
  margin-top: 1.5rem;
}

.gs-tip-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  color: #b45309;
}

.gs-tip-icon svg {
  width: 100%;
  height: 100%;
}

.gs-tip p {
  margin: 0;
  color: #78350f;
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Next Steps Section */
.gs-next-steps {
  background: linear-gradient(135deg, #FFF8DC 0%, #FFED99 100%);
  border: 2px solid var(--accent-orange);
  border-radius: var(--radius, 8px);
  padding: 3rem 2rem;
  text-align: center;
  margin-top: 2rem;
}

.gs-next-steps h2 {
  color: #92400e;
  margin-bottom: 0.75rem;
}

.gs-next-steps > p {
  color: #78350f;
  margin-bottom: 2rem;
}

.gs-next-steps-grid {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.gs-next-step-card {
  background: white;
  border: 1px solid #FFE066;
  border-radius: var(--radius, 8px);
  padding: 1.5rem 2rem;
  text-decoration: none;
  color: #78350f;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: all 0.2s ease;
}

.gs-next-step-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  background: #FFF8DC;
}

.gs-next-icon {
  width: 32px;
  height: 32px;
  color: var(--accent-orange);
}

.gs-next-icon svg {
  width: 100%;
  height: 100%;
}

/* Interactive Demo Card */
.gs-demo-card {
  width: 280px;
  height: 180px;
  perspective: 1000px;
  cursor: pointer;
}

.gs-demo-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}

.gs-demo-card.flipped .gs-demo-card-inner {
  transform: rotateY(180deg);
}

.gs-demo-card-front,
.gs-demo-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: var(--radius, 8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.gs-demo-card-front {
  background: linear-gradient(135deg, var(--primary) 0%, #7A6BB5 100%);
  color: white;
}

.gs-demo-card-back {
  background: var(--card-bg);
  color: var(--text-primary);
  transform: rotateY(180deg);
  border: 2px solid var(--border);
}

.gs-demo-label {
  font-size: 0.75rem;
  opacity: 0.8;
  margin-bottom: 0.5rem;
}

.gs-demo-word {
  font-size: 2rem;
  font-weight: bold;
}

.gs-demo-sentence-front {
  font-size: 1.15rem;
  line-height: 1.5;
  color: white;
}

.gs-demo-sentence-front b {
  font-size: 1.4rem;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.gs-demo-translation {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.gs-demo-sentence {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-style: italic;
}

/* Spaced Repetition Visual */
.gs-sr-visual {
  margin: 1.5rem 0;
}

.gs-sr-explanation {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.gs-sr-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.gs-sr-rating {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: white;
  flex-shrink: 0;
}

.gs-rating-1 { background: var(--color-danger-dark); }
.gs-rating-2 { background: var(--accent-orange); }
.gs-rating-3 { background: var(--color-success-alt); }
.gs-rating-4 { background: var(--color-success-alt-dark); }

.gs-sr-demo {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius, 8px);
  padding: 2rem;
  text-align: center;
}

.gs-sr-timeline {
  position: relative;
  height: 60px;
  margin: 2rem 1rem;
}

.gs-sr-timeline::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--color-success-alt) 100%);
  border-radius: 2px;
  transform: translateY(-50%);
}

.gs-sr-point {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.gs-sr-dot {
  width: 16px;
  height: 16px;
  background: var(--primary);
  border: 3px solid white;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.gs-sr-time {
  font-size: 0.75rem;
  color: var(--text-secondary);
  white-space: nowrap;
  position: absolute;
  top: 24px;
}

.gs-sr-caption {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-top: 1rem;
}

/* Mobile Section */
.gs-mobile-section {
  background: linear-gradient(135deg, var(--primary) 0%, #7A6BB5 100%);
  color: white;
  border-radius: var(--radius, 8px);
  padding: 3rem 2rem;
  text-align: center;
  margin: 2rem 0;
}

.gs-mobile-icon {
  width: 80px;
  height: 80px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}

.gs-mobile-icon svg {
  width: 40px;
  height: 40px;
}

.gs-mobile-content h2 {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
  color: white;
}

.gs-mobile-content > p {
  opacity: 0.9;
  margin-bottom: 2rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.gs-mobile-steps {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.gs-mobile-step {
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius, 8px);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.gs-mobile-step-num {
  width: 28px;
  height: 28px;
  background: white;
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  flex-shrink: 0;
}

/* Tips Section */
.gs-tips-section {
  padding: 3rem 1rem;
}

.gs-tips-section h2 {
  text-align: center;
  margin-bottom: 2rem;
  color: var(--text-primary);
}

.gs-tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.gs-tip-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius, 8px);
  padding: 1.5rem;
  text-align: center;
}

.gs-tip-emoji {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 1rem;
}

.gs-tip-card h4 {
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.gs-tip-card p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

/* Responsive */
@media (max-width: 768px) {
  .gs-hero {
    padding: 3rem 1.5rem;
  }

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

  .gs-hero p {
    font-size: 1rem;
  }

  .gs-role-selection {
    grid-template-columns: 1fr;
    padding: 0;
  }

  .gs-step-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .gs-step-reverse {
    direction: ltr;
  }

  .gs-step-text {
    text-align: center;
    padding-top: 0;
  }

  .gs-step-text h2,
  .gs-step-text p {
    text-align: left;
  }

  .gs-step-number {
    position: static;
    margin: 0 auto 1rem;
  }

  .gs-step-visual,
  .gs-step-reverse .gs-step-visual,
  .gs-step-reverse .gs-step-text {
    grid-column: 1;
    grid-row: auto;
  }

  .gs-step-list,
  .gs-feature-list {
    text-align: left;
  }

  .gs-method-cards,
  .gs-method-cards-3,
  .gs-step1-columns {
    grid-template-columns: 1fr;
  }

  .gs-steps-nav {
    flex-wrap: wrap;
    position: relative;
  }

  .gs-step-nav-item {
    width: 36px;
    height: 36px;
    font-size: 0.875rem;
  }

  .gs-demo-card {
    width: 240px;
    height: 160px;
  }

  .gs-next-steps-grid {
    flex-direction: column;
    align-items: center;
  }

  .gs-next-step-card {
    width: 100%;
    max-width: 300px;
    justify-content: center;
  }

  .gs-mobile-steps {
    flex-direction: column;
    align-items: center;
  }

  .gs-sr-timeline {
    display: none;
  }

  .gs-tips-grid {
    grid-template-columns: 1fr;
  }
}

/* Leitner System Diagram */
.gs-leitner-diagram {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius, 8px);
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.gs-leitner-svg {
  width: 100%;
  max-width: 400px;
  height: auto;
  display: block;
  margin: 0 auto;
}

.gs-leitner-svg text {
  font-family: inherit;
}

.gs-leitner-legend {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.gs-leitner-legend-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.gs-leitner-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

@media (max-width: 768px) {
  .gs-leitner-diagram {
    padding: 1rem;
  }

  .gs-leitner-svg {
    max-width: 100%;
  }

  .gs-leitner-legend {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }
}

/* Screenshot Lightbox */
.gs-screenshot-img {
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gs-screenshot-img:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.gs-lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 10000;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  box-sizing: border-box;
  cursor: zoom-out;
}

.gs-lightbox.active {
  display: flex;
}

.gs-lightbox-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.gs-lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.gs-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.gs-lightbox-hint {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.875rem;
}

/* FSRS Visualization */
.fsrs-section {
  padding: 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

.fsrs-section-header {
  text-align: center;
  margin-bottom: 2rem;
}

.fsrs-section-header h2 {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.fsrs-section-header p {
  color: var(--text-secondary);
  font-size: 1rem;
}

.fsrs-legend {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.fsrs-legend-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.fsrs-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.fsrs-global-controls {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.fsrs-btn {
  padding: 0.45rem 1rem;
  border-radius: 0.4rem;
  border: none;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.fsrs-btn-primary {
  background: var(--primary);
  color: white;
}

.fsrs-btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.fsrs-btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.fsrs-btn-secondary:hover {
  background: var(--hover-bg, #f0f0f0);
  color: var(--text-primary);
}

.fsrs-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* Journey Card */
.fsrs-journey {
  background: var(--card-bg);
  border-radius: 0.75rem;
  margin-bottom: 1.25rem;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: box-shadow 0.3s;
}

.fsrs-journey:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.fsrs-journey-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 0.5rem;
}

.fsrs-journey-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.fsrs-journey-emoji {
  font-size: 1.5rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  background: var(--bg-secondary);
}

.fsrs-journey-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.fsrs-journey-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 0.1rem;
}

.fsrs-journey-controls {
  display: flex;
  gap: 0.4rem;
}

/* Timeline */
.fsrs-timeline-wrapper {
  padding: 1.5rem 1.25rem 1rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.fsrs-timeline {
  display: flex;
  align-items: center;
  min-width: max-content;
  position: relative;
  padding: 2rem 0 1.5rem;
}

/* Step */
.fsrs-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  opacity: 0;
  transform: scale(0.5) translateY(10px);
  transition: opacity 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
    transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.fsrs-step.visible {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.fsrs-step.fall-back {
  animation: fsrsFallBack 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes fsrsFallBack {
  0% { transform: scale(1) translateY(0); }
  30% { transform: scale(0.9) translateY(20px); }
  60% { transform: scale(1.05) translateY(-5px); }
  100% { transform: scale(1) translateY(0); }
}

/* State badge */
.fsrs-state-badge {
  font-size: 0.6rem;
  font-weight: 600;
  padding: 0.12rem 0.4rem;
  border-radius: 0.2rem;
  margin-bottom: 0.4rem;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0;
  transform: translateY(5px);
  transition: opacity 0.3s 0.2s, transform 0.3s 0.2s;
}

.fsrs-step.visible .fsrs-state-badge {
  opacity: 1;
  transform: translateY(0);
}

.fsrs-state-badge.learning {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.fsrs-state-badge.review {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.fsrs-state-badge.relearning {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

/* Node */
.fsrs-node {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: white;
  position: relative;
  z-index: 2;
}

.fsrs-node.rating-1 { background: #ef4444; }
.fsrs-node.rating-2 { background: #f59e0b; }
.fsrs-node.rating-3 { background: #10b981; }
.fsrs-node.rating-4 { background: #3b82f6; }

.fsrs-node.large-interval {
  animation: fsrsPulseGlow 2s ease-in-out infinite;
}

@keyframes fsrsPulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
  50% { box-shadow: 0 0 10px 3px rgba(16, 185, 129, 0.3); }
}

/* Rating label */
.fsrs-rating-label {
  font-size: 0.65rem;
  font-weight: 600;
  margin-top: 0.3rem;
  opacity: 0.85;
}

.fsrs-rating-label.rating-1 { color: #ef4444; }
.fsrs-rating-label.rating-2 { color: #f59e0b; }
.fsrs-rating-label.rating-3 { color: #10b981; }
.fsrs-rating-label.rating-4 { color: #3b82f6; }

/* Interval label */
.fsrs-interval-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 0.2rem;
  white-space: nowrap;
}

/* Connector */
.fsrs-connector {
  width: 50px;
  height: 3px;
  background: var(--border);
  position: relative;
  flex-shrink: 0;
}

.fsrs-connector-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0;
  border-radius: 2px;
  transition: width 0.4s ease-in-out;
}

.fsrs-connector.active .fsrs-connector-fill {
  width: 100%;
}

/* Growth bar */
.fsrs-growth-section {
  padding: 0 1.25rem 1rem;
}

.fsrs-growth-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  height: 24px;
}

.fsrs-growth-label {
  font-size: 0.7rem;
  color: var(--text-secondary);
  white-space: nowrap;
  min-width: 80px;
}

.fsrs-growth-track {
  flex: 1;
  height: 6px;
  background: var(--bg-secondary);
  border-radius: 3px;
  overflow: hidden;
}

.fsrs-growth-fill {
  height: 100%;
  border-radius: 3px;
  width: 0;
  transition: width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.fsrs-growth-value {
  font-size: 0.75rem;
  font-weight: 700;
  min-width: 40px;
  text-align: right;
  color: var(--text-primary);
}

/* Homepage science teaser */
.fsrs-science-teaser {
  text-align: center;
  padding: 3rem 2rem;
  background: var(--card-bg);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.fsrs-science-teaser h2 {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.fsrs-science-teaser > p {
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 1.5rem;
}

.fsrs-mini-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 1.5rem auto;
  flex-wrap: wrap;
  max-width: 600px;
}

.fsrs-mini-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.fsrs-mini-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.6rem;
  font-weight: 700;
}

.fsrs-mini-interval {
  font-size: 0.65rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.fsrs-mini-connector {
  width: 30px;
  height: 2px;
  background: var(--border);
  margin-bottom: 1rem;
}

.fsrs-science-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--primary);
  color: white;
  border-radius: 0.5rem;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s;
}

.fsrs-science-cta:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* Dark theme adjustments */
[data-theme="dark"] .fsrs-state-badge.learning {
  background: rgba(245, 158, 11, 0.2);
}

[data-theme="dark"] .fsrs-state-badge.review {
  background: rgba(16, 185, 129, 0.2);
}

[data-theme="dark"] .fsrs-state-badge.relearning {
  background: rgba(239, 68, 68, 0.2);
}

[data-theme="dark"] .fsrs-journey:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

/* FSRS Responsive */
@media (max-width: 768px) {
  .fsrs-section {
    padding: 1.5rem 1rem;
  }

  .fsrs-journey-header {
    padding: 0.75rem 1rem;
  }

  .fsrs-journey-emoji {
    font-size: 1.25rem;
    width: 34px;
    height: 34px;
  }

  .fsrs-journey-title {
    font-size: 0.9rem;
  }

  .fsrs-timeline-wrapper {
    padding: 1rem 0.75rem 0.75rem;
  }

  .fsrs-connector {
    width: 35px;
  }

  .fsrs-node {
    width: 32px;
    height: 32px;
    font-size: 0.6rem;
  }

  .fsrs-science-teaser {
    padding: 2rem 1rem;
  }

  .fsrs-science-teaser h2 {
    font-size: 1.4rem;
  }

  .fsrs-mini-dot {
    width: 24px;
    height: 24px;
    font-size: 0.55rem;
  }

  .fsrs-mini-connector {
    width: 20px;
  }
}

/* Print styles */
@media print {
  .gs-steps-nav {
    display: none;
  }

  .gs-step {
    page-break-inside: avoid;
  }

  .gs-lightbox {
    display: none !important;
  }
}
