/* 
 * Tutorials Page — Rosewood Ridge RP
 * Grid → Category drill-down (inspired by poggy_util /help)
 */

@import url('variables.css');

/* ── Page Layout ─────────────────────────────── */
.tut-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 2rem 4rem;
  min-height: 80vh;
}

/* ── Header ──────────────────────────────────── */
.tut-header {
  text-align: center;
  padding: 3rem 1rem 2rem;
  margin-bottom: 2rem;
  position: relative;
}

/* Hero SVG decoration */
.tut-hero-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
  color: var(--highlight-color, #cc7459);
  opacity: 0.85;
  animation: tutHeroFloat 6s ease-in-out infinite;
}
.tut-hero-icon svg {
  width: 90px;
  height: 90px;
}
@keyframes tutHeroFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.tut-header h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 0.75rem;
  letter-spacing: 1px;
}

.tut-subtitle {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-secondary-color);
  opacity: 0.8;
  max-width: 650px;
  margin: 0 auto 1.5rem;
}

/* ── Search ──────────────────────────────────── */
.tut-search-wrap {
  max-width: 480px;
  margin: 0 auto;
  position: relative;
}

.tut-search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: rgba(180, 160, 120, 0.35);
  pointer-events: none;
  transition: color 0.3s;
  z-index: 1;
}
.tut-search-wrap:focus-within .tut-search-icon {
  color: rgba(200, 170, 110, 0.6);
}

#tut-search {
  width: 100%;
  padding: 12px 20px 12px 42px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(180, 150, 100, 0.18);
  border-radius: 24px;
  color: var(--text-color);
  font-size: 14px;
  outline: none;
  transition: border-color 0.3s, background 0.3s, box-shadow 0.3s;
  box-sizing: border-box;
}
#tut-search::placeholder { color: rgba(180, 160, 120, 0.35); }
#tut-search:focus {
  border-color: rgba(200, 170, 110, 0.45);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 0 24px rgba(200, 170, 110, 0.08);
}

/* ── Category Grid ───────────────────────────── */
#tut-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
  padding: 10px 0 30px;
  transition: opacity 0.35s ease;
}
#tut-grid.hidden { opacity: 0; pointer-events: none; position: absolute; left: -9999px; }

/* ── Category Node ───────────────────────────── */
.tut-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px 12px 20px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(180, 150, 100, 0.1);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  animation: tutNodeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) backwards;
  animation-delay: calc(var(--i, 0) * 0.04s);
  position: relative;
  overflow: hidden;
}

@keyframes tutNodeIn {
  from { opacity: 0; transform: scale(0.85) translateY(16px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* glow ring on hover */
.tut-node::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 14px;
  border: 1px solid transparent;
  transition: border-color 0.35s, box-shadow 0.35s;
  pointer-events: none;
}
.tut-node:hover::before {
  border-color: var(--node-color, rgba(200, 170, 110, 0.35));
  box-shadow: 0 0 28px var(--node-glow, rgba(200, 170, 110, 0.1));
}
.tut-node:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-4px);
}
.tut-node:active { transform: scale(0.97); }

/* Node leaving animation */
.tut-node.leaving {
  opacity: 0;
  transform: scale(0.6);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Node Icon ───────────────────────────────── */
.tut-node-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.35s;
}
.tut-node-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tut-node:hover .tut-node-icon {
  transform: scale(1.1);
  filter: drop-shadow(0 0 8px var(--node-glow, rgba(200, 170, 110, 0.2)));
}

/* ── Node Label ──────────────────────────────── */
.tut-node-label {
  font-size: 11px;
  font-weight: 600;
  color: #d4c5a0;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.35;
}

/* ── Detail View ─────────────────────────────── */
#tut-detail {
  display: none;
  opacity: 0;
  transition: opacity 0.35s ease;
}
#tut-detail.visible { display: block; opacity: 1; }

#tut-detail-back {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

#tut-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  background: rgba(180, 150, 100, 0.08);
  border: 1px solid rgba(180, 150, 100, 0.15);
  border-radius: 20px;
  color: #d4c5a0 !important;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.5px;
}
#tut-back:hover { background: rgba(180, 150, 100, 0.18); }

#tut-breadcrumb-title {
  font-size: 13px;
  color: rgba(180, 160, 120, 0.5);
  letter-spacing: 0.5px;
}

#tut-detail-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 0 24px;
}

.tut-detail-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.tut-detail-icon svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tut-detail-title {
  font-family: 'Georgia', 'Times New Roman', serif;
  font-size: 22px;
  font-weight: 600;
  color: #d4c5a0;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* ── Section Card ────────────────────────────── */
.tut-section {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(180, 150, 100, 0.08);
  border-radius: 12px;
  margin-bottom: 16px;
  overflow: hidden;
  animation: tutSectionSlide 0.4s cubic-bezier(0.4, 0, 0.2, 1) backwards;
  animation-delay: calc(var(--si, 0) * 0.06s);
}

@keyframes tutSectionSlide {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Section title styling is defined in the section decorators block below */

.tut-section-items {
  padding: 12px 20px 16px;
}

/* ── Individual Item ─────────────────────────── */
.tut-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 7px 0;
  color: #ccc4b0;
  font-size: 14px;
  line-height: 1.6;
}

.tut-item a { color: var(--highlight-color) !important; text-decoration: underline; }
.tut-item a:hover { color: #e09070 !important; }

.tut-item-bullet {
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  margin-top: 9px;
  border-radius: 50%;
  background: rgba(180, 150, 100, 0.3);
}

/* Steps / ordered-list numbered bullets */
.tut-section[data-type="steps"] .tut-item-bullet,
.tut-section[data-type="ordered-list"] .tut-item-bullet {
  width: 22px;
  height: 22px;
  margin-top: 2px;
  border-radius: 50%;
  background: rgba(180, 150, 100, 0.08);
  border: 1px solid rgba(180, 150, 100, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: #d4c5a0;
}

/* Tips bullets */
.tut-section[data-type="tips"] .tut-item-bullet {
  width: auto;
  height: auto;
  margin-top: 0;
  border-radius: 0;
  background: none;
  font-size: 14px;
  line-height: 1.6;
}

/* Commands / code style */
.tut-section[data-type="commands"] .tut-item {
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 13px;
  color: #b8c0a0;
}

.tut-item code, .tut-item kbd {
  background: rgba(0, 0, 0, 0.3);
  padding: 2px 6px;
  border-radius: 3px;
  font-family: 'Consolas', monospace;
  font-size: 0.9em;
  color: var(--highlight-color);
}

/* Nested sub-section titles */
.tut-subsection-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-color);
  padding: 12px 20px 4px;
  letter-spacing: 0.5px;
}

/* Paragraph inside mixed sections */
.tut-section-paragraph {
  padding: 6px 20px 4px;
  font-size: 14px;
  line-height: 1.6;
  color: #ccc4b0;
}

/* ── Image Section ───────────────────────────── */
.tut-image-wrap {
  text-align: center;
  padding: 16px 20px;
}
.tut-image-wrap img {
  max-width: 50%;
  height: auto;
  border-radius: 10px;
  border: 1px solid rgba(180, 150, 100, 0.12);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}
.tut-image-caption {
  margin-top: 8px;
  font-size: 12px;
  color: rgba(180, 160, 120, 0.5);
  font-style: italic;
}

/* ── Video Section ───────────────────────────── */
.tut-video-wrap {
  padding: 16px 20px;
}
.tut-video-desc {
  font-size: 13px;
  color: rgba(180, 160, 120, 0.6);
  font-style: italic;
  margin-bottom: 12px;
}
.tut-video-container {
  position: relative;
  width: 60%;
  margin: 0 auto;
  padding-bottom: 33.75%; /* 16:9 at 60% */
  background: rgba(0, 0, 0, 0.3);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(180, 150, 100, 0.1);
}
.tut-video-container iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
}
.tut-video-title {
  text-align: center;
  margin-top: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--highlight-color);
}

/* ── Tips Section (special) ──────────────────── */
.tut-section[data-type="tips"] {
  background: rgba(204, 170, 116, 0.04);
  border-left: 3px solid rgba(204, 170, 116, 0.3);
}

/* ── Section title icon decorators ───────────── */
.tut-section-title {
  padding: 16px 20px 12px;
  font-size: 13px;
  font-weight: 600;
  color: #d4c5a0;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(180, 150, 100, 0.06);
  display: flex;
  align-items: center;
  gap: 8px;
}
.tut-section-title::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.35;
  flex-shrink: 0;
}
.tut-section[data-type="tips"] .tut-section-title::before {
  content: '\uD83D\uDCA1';
  width: auto;
  height: auto;
  background: none;
  border-radius: 0;
  opacity: 0.7;
  font-size: 13px;
}
.tut-section[data-type="video"] .tut-section-title::before {
  content: '\u25B6';
  width: auto;
  height: auto;
  background: none;
  border-radius: 0;
  opacity: 0.5;
  font-size: 10px;
}
.tut-section[data-type="image"] .tut-section-title::before {
  content: '\uD83D\uDDBC';
  width: auto;
  height: auto;
  background: none;
  border-radius: 0;
  opacity: 0.5;
  font-size: 12px;
}

/* ── Table styles (for wagon data etc) ────────── */
.tut-section table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0;
}
.tut-section table th {
  background: rgba(180, 150, 100, 0.08);
  text-align: left;
  padding: 8px 12px;
  font-weight: 600;
  font-size: 12px;
  color: #d4c5a0;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(180, 150, 100, 0.12);
}
.tut-section table td {
  padding: 7px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: #ccc4b0;
  font-size: 13px;
}
.tut-section table tbody tr:hover {
  background: rgba(180, 150, 100, 0.04);
}

/* ── Search Results ──────────────────────────── */
#tut-search-results {
  display: none;
}
#tut-search-results.visible { display: block; }

.tut-search-group {
  margin-bottom: 20px;
  animation: tutSectionSlide 0.35s cubic-bezier(0.4, 0, 0.2, 1) backwards;
  animation-delay: calc(var(--si, 0) * 0.05s);
}

.tut-search-group-title {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 12px;
  font-weight: 600;
  color: #d4c5a0;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
}
.tut-search-group-title:hover { opacity: 1; }

.tut-search-group-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}
.tut-search-group-icon svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tut-search-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 4px 0 4px 34px;
  color: #ccc4b0;
  font-size: 13px;
  line-height: 1.55;
}
.tut-search-item-dot {
  flex-shrink: 0;
  width: 4px;
  height: 4px;
  margin-top: 8px;
  border-radius: 50%;
  background: rgba(180, 150, 100, 0.3);
}

/* highlight matches */
.tut-search-item mark, .tut-node-label mark {
  background: none;
  color: #f0c060;
  font-weight: 700;
}

/* Empty state */
.tut-empty {
  text-align: center;
  padding: 60px 20px;
  color: rgba(180, 160, 120, 0.3);
  font-size: 15px;
  letter-spacing: 0.3px;
}

/* =====================================================
   DRUG CRAFTING PIPELINE — Web 3.0 Fancy UI
   ===================================================== */

/* ── Wrapper ─────────────────────────────────── */
.dc-wrapper {
  margin: -8px -18px 0 -18px;
}

/* ── Warning Note ────────────────────────────── */
.dc-note {
  margin: 0 18px 18px;
  padding: 12px 18px;
  background: rgba(220, 80, 60, 0.08);
  border: 1px solid rgba(220, 80, 60, 0.18);
  border-left: 3px solid rgba(220, 80, 60, 0.5);
  border-radius: 8px;
  font-size: 12.5px;
  color: rgba(230, 200, 180, 0.8);
  line-height: 1.55;
}

/* ── Drug Selector Tabs ──────────────────────── */
.dc-selector {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 4px 18px 20px;
}

.dc-drug-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 18px 12px;
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(180,150,100,0.1);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.4,0,0.2,1);
  position: relative;
  min-width: 80px;
  overflow: hidden;
}
.dc-drug-tab::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 14px;
  border: 1.5px solid transparent;
  transition: border-color 0.35s, box-shadow 0.35s;
  pointer-events: none;
}
.dc-drug-tab.active::before {
  border-color: var(--dc, rgba(200,170,110,0.5));
  box-shadow: 0 0 22px color-mix(in srgb, var(--dc, #c8a870) 25%, transparent),
              inset 0 0 16px color-mix(in srgb, var(--dc, #c8a870) 8%, transparent);
}
.dc-drug-tab.active {
  background: color-mix(in srgb, var(--dc, #c8a870) 10%, rgba(12,10,8,0.8));
}
.dc-drug-tab:hover:not(.active) {
  background: rgba(255,255,255,0.05);
  transform: translateY(-3px);
}
.dc-drug-tab:hover:not(.active)::before {
  border-color: color-mix(in srgb, var(--dc, #c8a870) 40%, transparent);
}

.dc-tab-img-wrap {
  position: relative;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dc-drug-tab.active .dc-tab-img-wrap::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--dc, #c8a870) 30%, transparent), transparent 70%);
  animation: dcTabGlow 2.5s ease-in-out infinite;
}
@keyframes dcTabGlow {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50%       { opacity: 1;   transform: scale(1.08); }
}
.dc-tab-img-wrap img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  filter: drop-shadow(0 0 4px rgba(0,0,0,0.8));
  transition: transform 0.3s, filter 0.3s;
}
.dc-drug-tab.active .dc-tab-img-wrap img {
  transform: scale(1.1);
  filter: drop-shadow(0 0 8px color-mix(in srgb, var(--dc, #c8a870) 60%, transparent));
}

.dc-tab-name {
  font-size: 10.5px;
  font-weight: 700;
  color: rgba(200,185,155,0.6);
  letter-spacing: 1px;
  text-transform: uppercase;
  white-space: nowrap;
  text-align: center;
  transition: color 0.3s;
}
.dc-drug-tab.active .dc-tab-name {
  color: var(--dc, #c8a870);
}

/* ── Main Area ───────────────────────────────── */
.dc-main {
  display: flex;
  gap: 24px;
  padding: 0 18px 20px;
  align-items: flex-start;
}

/* ── Profile Card (left) ─────────────────────── */
.dc-profile {
  flex: 0 0 240px;
  min-width: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 24px 18px 20px;
  background: rgba(255,255,255,0.02);
  border: 1px solid color-mix(in srgb, var(--dc, #c8a870) 20%, rgba(180,150,100,0.08));
  border-radius: 16px;
  overflow: hidden;
}
.dc-profile-glow {
  position: absolute;
  top: -30%;
  left: 50%;
  transform: translateX(-50%);
  width: 250px;
  height: 250px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--dc, #c8a870) 18%, transparent), transparent 65%);
  pointer-events: none;
  animation: dcProfileGlow 4s ease-in-out infinite;
}
@keyframes dcProfileGlow {
  0%, 100% { opacity: 0.5; }
  50%       { opacity: 1; }
}

.dc-profile-img-wrap {
  position: relative;
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dc-profile-glow-ring {
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  border: 1.5px solid color-mix(in srgb, var(--dc, #c8a870) 30%, transparent);
  animation: dcRingSpin 8s linear infinite;
}
.dc-profile-glow-ring::after {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--dc, #c8a870) 15%, transparent);
  animation: dcRingSpin 12s linear infinite reverse;
}
@keyframes dcRingSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.dc-profile-img {
  width: 90px;
  height: 90px;
  object-fit: contain;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 0 16px color-mix(in srgb, var(--dc, #c8a870) 50%, transparent));
  animation: dcImgFloat 6s ease-in-out infinite;
}
@keyframes dcImgFloat {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-5px); }
}

.dc-profile-name {
  font-family: 'Georgia', 'Times New Roman', serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--dc, #c8a870);
  letter-spacing: 2.5px;
  text-transform: uppercase;
  text-align: center;
  text-shadow: 0 0 20px color-mix(in srgb, var(--dc, #c8a870) 40%, transparent);
}
.dc-profile-desc {
  font-size: 14px;
  color: #fff;
  line-height: 1.6;
  text-align: center;
}

.dc-profile-stats {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}
.dc-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid color-mix(in srgb, var(--dc, #c8a870) 15%, rgba(180,150,100,0.1));
  border-radius: 8px;
  gap: 3px;
}
.dc-stat-label {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255,255,255,0.8);
  letter-spacing: 1px;
  text-transform: uppercase;
}
.dc-stat-value {
  font-size: 12px;
  font-weight: 700;
  color: var(--dc, #c8a870);
}

.dc-profile-section {
  width: 100%;
  padding: 10px 12px;
  background: rgba(0,0,0,0.15);
  border: 1px solid rgba(180,150,100,0.06);
  border-radius: 8px;
}
.dc-profile-section-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--dc, #c8a870);
  margin-bottom: 5px;
  text-transform: uppercase;
  opacity: 0.8;
}
.dc-profile-section-text {
  font-size: 13px;
  color: #fff;
  line-height: 1.6;
}

/* ── Pipeline (right) ────────────────────────── */
.dc-pipeline {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
}

/* ── Step Card ───────────────────────────────── */
.dc-step {
  background: rgba(255,255,255,0.022);
  border: 1px solid color-mix(in srgb, var(--dc, #c8a870) 12%, rgba(180,150,100,0.08));
  border-radius: 14px;
  padding: 18px 20px 16px;
  position: relative;
  overflow: hidden;
  animation: dcBlindOpen 0.45s cubic-bezier(0.4,0,0.2,1) backwards;
  animation-delay: calc(var(--si, 0) * 0.1s);
}
.dc-step::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg,
    transparent,
    color-mix(in srgb, var(--dc, #c8a870) 40%, transparent) 30%,
    color-mix(in srgb, var(--dc, #c8a870) 60%, transparent) 50%,
    color-mix(in srgb, var(--dc, #c8a870) 40%, transparent) 70%,
    transparent);
}
@keyframes dcBlindOpen {
  from {
    opacity: 0;
    transform: scaleY(0.3) translateY(-10px);
    transform-origin: top center;
  }
  to {
    opacity: 1;
    transform: scaleY(1) translateY(0);
    transform-origin: top center;
  }
}

.dc-step-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.dc-step-badge {
  padding: 3px 10px;
  background: color-mix(in srgb, var(--dc, #c8a870) 15%, rgba(0,0,0,0.3));
  border: 1px solid color-mix(in srgb, var(--dc, #c8a870) 30%, transparent);
  border-radius: 20px;
  font-size: 9.5px;
  font-weight: 700;
  color: var(--dc, #c8a870);
  letter-spacing: 1px;
  text-transform: uppercase;
  white-space: nowrap;
}
.dc-step-name {
  font-size: 13.5px;
  font-weight: 700;
  color: #d4c5a0;
  letter-spacing: 0.5px;
  flex: 1;
}
.dc-step-location {
  font-size: 10px;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.5px;
  margin-left: auto;
}

/* ── Ingredients Row ─────────────────────────── */
.dc-ingredients {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px 16px;
  background: rgba(0,0,0,0.12);
  border: 1px solid rgba(180,150,100,0.06);
  border-radius: 10px;
  margin-bottom: 12px;
}
.dc-plus {
  font-size: 18px;
  font-weight: 700;
  color: rgba(180,160,120,0.35);
  align-self: center;
  margin: 0 4px;
  margin-top: -14px;
}
.dc-ingredient {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.dc-ingredient-img-wrap {
  position: relative;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(180,150,100,0.1);
  border-radius: 10px;
}
.dc-ingredient-img-wrap img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.6));
}
.dc-ingredient-count {
  position: absolute;
  bottom: -2px;
  right: -2px;
  background: rgba(12,10,8,0.9);
  border: 1px solid color-mix(in srgb, var(--dc, #c8a870) 30%, transparent);
  border-radius: 5px;
  font-size: 9px;
  font-weight: 800;
  color: var(--dc, #c8a870);
  padding: 1px 4px;
  line-height: 1.4;
}
.dc-ingredient-name {
  font-size: 11px;
  color: #fff;
  text-align: center;
  max-width: 64px;
  line-height: 1.3;
}

/* ── Yield Arrow ─────────────────────────────── */
.dc-yield {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px 0;
  padding-left: 8px;
}
.dc-yield-line {
  width: 40px;
  height: 2px;
  background: rgba(180,150,100,0.1);
  position: relative;
  overflow: hidden;
  border-radius: 1px;
  flex-shrink: 0;
}
.dc-yield-flow {
  position: absolute;
  top: 0;
  left: -60%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--dc, #c8a870), transparent);
  animation: dcFlowRight 1.6s linear infinite;
}
@keyframes dcFlowRight {
  from { left: -60%; }
  to   { left: 120%; }
}
.dc-yield-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2px;
  color: rgba(255,255,255,0.7);
  text-transform: uppercase;
}
.dc-yield-arrow {
  width: 18px;
  height: 18px;
  color: color-mix(in srgb, var(--dc, #c8a870) 60%, transparent);
  flex-shrink: 0;
}

/* ── Output Item ─────────────────────────────── */
.dc-output {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  background: color-mix(in srgb, var(--dc, #c8a870) 6%, rgba(0,0,0,0.15));
  border: 1px solid color-mix(in srgb, var(--dc, #c8a870) 20%, transparent);
  border-radius: 10px;
}
.dc-output-img-wrap {
  position: relative;
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dc-output-glow {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--dc, #c8a870) 25%, transparent), transparent 70%);
  animation: dcOutputGlow 2.5s ease-in-out infinite;
}
@keyframes dcOutputGlow {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50%       { opacity: 1;   transform: scale(1.12); }
}
.dc-output-img-wrap img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 0 10px color-mix(in srgb, var(--dc, #c8a870) 50%, transparent));
}
.dc-output-count {
  position: absolute;
  bottom: -2px;
  right: -2px;
  background: rgba(12,10,8,0.9);
  border: 1px solid color-mix(in srgb, var(--dc, #c8a870) 50%, transparent);
  border-radius: 5px;
  font-size: 10px;
  font-weight: 800;
  color: var(--dc, #c8a870);
  padding: 1px 5px;
  line-height: 1.4;
}
.dc-output-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--dc, #c8a870);
  letter-spacing: 0.5px;
  text-shadow: 0 0 12px color-mix(in srgb, var(--dc, #c8a870) 35%, transparent);
}

/* ── Connector between steps ─────────────────── */
.dc-connector {
  display: flex;
  justify-content: center;
  padding: 6px 0;
}
.dc-connector-track {
  width: 2px;
  height: 32px;
  background: rgba(180,150,100,0.08);
  border-radius: 1px;
  position: relative;
  overflow: hidden;
}
.dc-connector-dot {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 8px;
  border-radius: 3px;
  background: var(--dc, #c8a870);
  box-shadow: 0 0 8px var(--dc, #c8a870);
  animation: dcDotFall 1.4s ease-in infinite;
}
@keyframes dcDotFall {
  from { top: -8px; opacity: 1; }
  to   { top: 100%; opacity: 0; }
}

/* ── Responsive ──────────────────────────────── */
@media (max-width: 900px) {
  .dc-main { flex-direction: column; }
  .dc-profile { flex: none; width: 100%; }
}
@media (max-width: 600px) {
  .dc-selector { gap: 8px; }
  .dc-drug-tab { min-width: 64px; padding: 10px 12px 8px; }
  .dc-tab-img-wrap { width: 40px; height: 40px; }
  .dc-tab-img-wrap img { width: 36px; height: 36px; }
}

/* ── Responsive ──────────────────────────────── */
@media (max-width: 768px) {
  .tut-page { padding: 1rem; }
  #tut-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
  .tut-node { padding: 18px 8px 14px; }
  .tut-node-icon { width: 40px; height: 40px; }
  .tut-node-icon svg { width: 20px; height: 20px; }
  .tut-node-label { font-size: 10px; }
  .tut-video-container { width: 100%; padding-bottom: 56.25%; }
  .tut-image-wrap img { max-width: 100%; }
}

@media (max-width: 480px) {
  #tut-grid { grid-template-columns: repeat(3, 1fr); }
  .tut-header h1 { font-size: 1.5rem; }
}
