/* GamesRich Developer Tutorials Stylesheet */
:root {
  --code-bg: #131722;
  --code-border: #232a3b;
  --code-text: #e2e8f0;
  --code-keyword: #f472b6;
  --code-func: #60a5fa;
  --code-string: #4ade80;
  --code-comment: #94a3b8;
  --code-number: #facc15;
  --accent-orange: #ef7539;
  --accent-blue: #2563eb;
  --accent-green: #10b981;
}

.tutorial-shell {
  max-width: 980px;
  margin: auto;
  padding: 55px 24px 90px;
}

.tutorial-shell .breadcrumb {
  font-size: 13px;
  color: #697187;
  margin-bottom: 12px;
}

.tutorial-shell .breadcrumb a {
  color: var(--accent-orange);
  text-decoration: none;
  font-weight: 700;
}

.tutorial-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: #ffedd5;
  color: #c2410c;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-radius: 4px;
  margin-bottom: 12px;
}

.tutorial-badge.beginner { background: #dcfce7; color: #15803d; }
.tutorial-badge.intermediate { background: #fef3c7; color: #b45309; }
.tutorial-badge.advanced { background: #fee2e2; color: #b91c1c; }

.tutorial-lead {
  font-size: 20px;
  line-height: 1.7;
  color: #4b5563;
  margin: 16px 0 24px;
}

.tutorial-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 24px;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  color: #fff;
  border-radius: 8px;
  margin: 28px 0 36px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.tutorial-banner-content h3 {
  margin: 0 0 6px;
  font-size: 19px;
  color: #f8fafc;
}

.tutorial-banner-content p {
  margin: 0;
  font-size: 14px;
  color: #cbd5e1;
}

.tutorial-banner .play-btn {
  display: inline-block;
  padding: 10px 20px;
  background: var(--accent-orange);
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.5px;
  text-decoration: none;
  border-radius: 6px;
  white-space: nowrap;
  transition: transform 0.2s, background 0.2s;
}

.tutorial-banner .play-btn:hover {
  background: #ea580c;
  transform: translateY(-2px);
}

.tutorial-body {
  background: #fff;
  padding: clamp(24px, 5vw, 48px);
  border: 1px solid #e2d7c2;
  box-shadow: 4px 4px 0 #eadfc9;
  border-radius: 8px;
}

.tutorial-body h2 {
  font-size: 28px;
  margin: 44px 0 16px;
  color: #111827;
  border-bottom: 2px solid #f1f5f9;
  padding-bottom: 10px;
}

.tutorial-body h2:first-child {
  margin-top: 0;
}

.tutorial-body h3 {
  font-size: 20px;
  margin: 28px 0 12px;
  color: #1e293b;
}

.tutorial-body p, .tutorial-body li {
  line-height: 1.8;
  color: #374151;
  font-size: 16px;
}

.step-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 5px solid var(--accent-orange);
  border-radius: 6px;
  padding: 24px;
  margin: 28px 0;
}

.step-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--accent-orange);
  color: #fff;
  font-weight: 900;
  font-size: 14px;
  border-radius: 50%;
}

.step-title {
  margin: 0;
  font-size: 20px;
  color: #0f172a;
}

pre {
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: 8px;
  padding: 18px 20px;
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--code-text);
  margin: 18px 0 24px;
  tab-size: 2;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.9em;
  background: #f1f5f9;
  color: #0f172a;
  padding: 2px 6px;
  border-radius: 4px;
}

pre code {
  background: transparent;
  color: inherit;
  padding: 0;
  border-radius: 0;
}

.code-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #1e293b;
  color: #94a3b8;
  font-family: ui-monospace, monospace;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 16px;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  border: 1px solid var(--code-border);
  border-bottom: none;
  margin-bottom: -18px;
}

.code-title + pre {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.math-box {
  background: #eff6ff;
  border-left: 4px solid #3b82f6;
  padding: 16px 20px;
  margin: 20px 0;
  border-radius: 0 6px 6px 0;
  font-size: 15px;
}

.math-box strong {
  color: #1d4ed8;
}

.tip-box {
  background: #fefce8;
  border-left: 4px solid #eab308;
  padding: 16px 20px;
  margin: 20px 0;
  border-radius: 0 6px 6px 0;
  font-size: 15px;
}

.tip-box strong {
  color: #a16207;
}

.concept-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 14.5px;
}

.concept-table th, .concept-table td {
  padding: 12px 16px;
  border: 1px solid #e2e8f0;
  text-align: left;
}

.concept-table th {
  background: #f8fafc;
  color: #1e293b;
  font-weight: 700;
}

.concept-table tr:nth-child(even) {
  background: #fcfcfd;
}

/* Tutorials Hub Index Grid */
.tutorials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.tutorial-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #ded4be;
  border-radius: 8px;
  padding: 24px;
  text-decoration: none;
  box-shadow: 4px 4px 0 #eadfc9;
  transition: transform 0.2s, box-shadow 0.2s;
}

.tutorial-card:hover {
  transform: translateY(-4px);
  box-shadow: 6px 8px 0 #eadfc9;
}

.tutorial-card .card-category {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--accent-orange);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.tutorial-card h2 {
  font-size: 20px;
  margin: 0 0 10px;
  color: #111827;
  line-height: 1.3;
}

.tutorial-card p {
  font-size: 14px;
  color: #6b7280;
  line-height: 1.6;
  margin: 0 0 16px;
  flex-grow: 1;
}

.tutorial-card .card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 800;
  border-top: 1px solid #f1f5f9;
  padding-top: 14px;
}

.tutorial-card .read-link {
  color: var(--accent-orange);
}

.tutorial-card .level-tag {
  color: #64748b;
}

@media (max-width: 640px) {
  .tutorial-banner {
    flex-direction: column;
    align-items: flex-start;
  }
  .tutorial-banner .play-btn {
    width: 100%;
    text-align: center;
  }
  .tutorials-grid {
    grid-template-columns: 1fr;
  }
}
