/**
 * Tutorial System Styles
 * SEO-friendly, accessible, beautiful tutorial pages
 */

/* Tutorial intro paragraph on hub */
.tutorial-intro {
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: 16px;
  padding: 20px 24px;
  margin-bottom: 12px;
  line-height: 1.7;
  font-size: 1.05rem;
  color: var(--text-light);
}

/* Tutorial detail view */
.view[data-view="tutorial-detail"] {
  overflow: auto;
  padding-bottom: 40px;
}

.tutorial-detail-header {
  margin-bottom: 20px;
}

.tutorial-detail-content {
  max-width: 900px;
  margin: 0 auto;
}

/* Tutorial article layout */
.tutorial-article {
  background: var(--panel);
  border: 2px solid var(--stroke);
  border-radius: 24px;
  padding: 32px 28px;
  box-shadow: var(--shadow);
}

.tutorial-header {
  text-align: center;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 2px solid rgba(60, 255, 250, 0.2);
}

.tutorial-emoji {
  font-size: clamp(3.5rem, 10vw, 5rem);
  margin-bottom: 16px;
  line-height: 1;
}

.tutorial-h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 2.8rem);
  color: var(--neon-cyan);
  text-shadow: 0 0 16px rgba(60, 255, 250, 0.4);
  margin: 0;
  letter-spacing: 0.5px;
  line-height: 1.2;
}

/* Tutorial sections */
.tutorial-section {
  margin: 32px 0;
  padding: 20px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.tutorial-section:first-of-type {
  border-top: none;
  padding-top: 0;
}

.tutorial-h2 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 4vw, 1.8rem);
  color: var(--neon-pink);
  text-shadow: 0 0 12px rgba(255, 79, 216, 0.3);
  margin: 0 0 16px;
  letter-spacing: 0.5px;
}

.tutorial-text {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-light);
  margin: 0;
  padding: 16px;
  background: rgba(0, 0, 0, 0.15);
  border-left: 4px solid var(--neon-cyan);
  border-radius: 8px;
}

/* Lists */
.tutorial-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.tutorial-step,
.tutorial-rule,
.tutorial-control,
.tutorial-tip {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-light);
  margin: 12px 0;
  padding-left: 32px;
  position: relative;
}

/* Numbered steps */
.tutorial-list[itemprop="step"] {
  counter-reset: step-counter;
}

.tutorial-step {
  counter-increment: step-counter;
}

.tutorial-step::before {
  content: counter(step-counter);
  position: absolute;
  left: 0;
  top: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
  color: #000;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: bold;
  display: grid;
  place-items: center;
  box-shadow: 0 0 12px rgba(60, 255, 250, 0.3);
}

/* Rules bullets */
.tutorial-rule::before {
  content: '✓';
  position: absolute;
  left: 0;
  font-size: 1.2rem;
  color: var(--neon-lime);
  font-weight: bold;
}

/* Controls bullets */
.tutorial-control::before {
  content: '🎮';
  position: absolute;
  left: 0;
  font-size: 1.1rem;
}

/* Tips bullets */
.tutorial-tip::before {
  content: '💡';
  position: absolute;
  left: 0;
  font-size: 1.1rem;
}

.tutorial-tips .tutorial-tip {
  background: rgba(196, 255, 26, 0.05);
  border-left: 3px solid var(--neon-lime);
  padding: 12px 12px 12px 32px;
  margin: 10px 0;
  border-radius: 8px;
}

/* Tutorial CTA section */
.tutorial-cta {
  margin: 40px 0 24px;
  padding: 28px 24px;
  background: linear-gradient(135deg, rgba(60, 255, 250, 0.1), rgba(255, 79, 216, 0.1));
  border: 2px solid rgba(60, 255, 250, 0.25);
  border-radius: 20px;
  text-align: center;
  box-shadow: 0 0 24px rgba(60, 255, 250, 0.15);
}

.tutorial-cta-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  color: var(--neon-pink);
  text-shadow: 0 0 16px rgba(255, 79, 216, 0.4);
  margin: 0 0 12px;
  letter-spacing: 1px;
}

.tutorial-cta-text {
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--text-light);
  margin: 0 0 24px;
}

.tutorial-cta-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.primary-btn {
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
  color: #000;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(60, 255, 250, 0.3);
}

.primary-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 24px rgba(60, 255, 250, 0.5);
}

/* Tutorial footer */
.tutorial-footer {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.tutorial-footer-text {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--muted);
  margin: 0 0 20px;
}

/* Tutorial error state */
.tutorial-error {
  text-align: center;
  padding: 60px 20px;
}

.tutorial-error h2 {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--neon-pink);
  margin: 0 0 12px;
}

.tutorial-error p {
  font-size: 1.1rem;
  color: var(--text-light);
  margin: 0 0 24px;
}

/* Responsive adjustments */
@media (max-width: 700px) {
  .tutorial-article {
    padding: 24px 20px;
  }

  .tutorial-h1 {
    font-size: clamp(1.6rem, 6vw, 2.2rem);
  }

  .tutorial-h2 {
    font-size: clamp(1.3rem, 5vw, 1.6rem);
  }

  .tutorial-step,
  .tutorial-rule,
  .tutorial-control,
  .tutorial-tip {
    font-size: 1rem;
    padding-left: 28px;
  }

  .tutorial-cta {
    padding: 20px 16px;
  }

  .tutorial-cta-actions {
    flex-direction: column;
  }
}

/* Accessibility: Bold text for better readability */
.tutorial-rule strong,
.tutorial-tip strong {
  color: var(--neon-cyan);
  font-weight: 600;
}

/* Light theme adjustments */
body[data-theme="light"] .tutorial-text {
  background: rgba(0, 0, 0, 0.04);
  border-left-color: #0066cc;
}

body[data-theme="light"] .tutorial-tips .tutorial-tip {
  background: rgba(196, 255, 26, 0.1);
  border-left-color: #6b8e23;
}

body[data-theme="light"] .tutorial-cta {
  background: linear-gradient(135deg, rgba(0, 102, 204, 0.08), rgba(139, 0, 139, 0.08));
  border-color: rgba(0, 102, 204, 0.3);
}
