/* ─── mc-hue-controller project page styles ─────────────────── */

/* Press Start 2P Minecraft font */
.mc-font {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.65rem;
  color: #4ade80;
  letter-spacing: 0.04em;
  line-height: 1.8;
  word-break: break-all;
}

.mc-font-small {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.55rem;
  color: #4ade80;
  letter-spacing: 0.02em;
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: 4px;
  padding: 2px 6px;
  white-space: nowrap;
}

/* ── Hero ─────────────────────────────────────────────────────── */
.mch-hero {
  background: linear-gradient(160deg, rgba(13, 31, 13, 0.9) 0%, var(--bg) 60%);
  border-bottom: 1px solid rgba(34, 197, 94, 0.15);
  padding: 3rem 1.5rem 3.5rem;
  position: relative;
  overflow: hidden;
}

/* subtle scanline texture */
.mch-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(74, 222, 128, 0.02) 3px,
    rgba(74, 222, 128, 0.02) 4px
  );
  pointer-events: none;
}

.mch-hero-inner {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  animation: fadeUp 0.55s ease both;
}

.mch-hero .back-link {
  align-self: flex-start;
}

/* two-column body: image | info */
.mch-hero-body {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 2.5rem;
  align-items: center;
}

.mch-hero-thumb {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(34, 197, 94, 0.25);
  box-shadow: 0 0 50px rgba(34, 197, 94, 0.1), 0 0 18px rgba(145, 70, 255, 0.08);
  flex-shrink: 0;
}

.mch-hero-thumb img {
  width: 100%;
  display: block;
}

.mch-hero-info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mch-title {
  font-size: clamp(1.4rem, 3.5vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #f0fdf4 30%, #4ade80 70%, #9146ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.mch-subtitle {
  font-size: 0.975rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.mch-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.mch-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* ── Buttons ──────────────────────────────────────────────────── */
.mch-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.35rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}
.mch-btn:hover { transform: translateY(-2px); }

.mch-btn-gh {
  background: #24292e;
  color: #fff;
  border: 1px solid #444d56;
}
.mch-btn-gh:hover { box-shadow: 0 6px 24px rgba(0,0,0,0.4); }

.mch-btn-dl {
  background: #22c55e;
  color: #052e16;
  border: 1px solid #16a34a;
  font-weight: 700;
}
.mch-btn-dl:hover { box-shadow: 0 6px 24px rgba(34, 197, 94, 0.35); }

/* ── Shared layout ────────────────────────────────────────────── */
.mch-section {
  padding: 4rem 1.5rem;
}

.mch-section-dark {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.mch-container {
  max-width: 960px;
  margin: 0 auto;
}

.mch-section-title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #4ade80;
  margin-bottom: 2rem;
}

/* ── Features grid ────────────────────────────────────────────── */
.mch-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.25rem;
}

.mch-feature-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  animation: fadeUp 0.5s ease both;
}
.mch-feature-card:hover {
  border-color: rgba(34, 197, 94, 0.5);
  box-shadow: 0 8px 30px rgba(34, 197, 94, 0.08);
}

.mch-feature-icon { font-size: 1.75rem; }

.mch-feature-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.mch-feature-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ── Commands ─────────────────────────────────────────────────── */
.mch-commands {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mch-cmd-row {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 1.25rem;
  align-items: center;
  padding: 1rem 1.25rem;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-left: 3px solid #4ade80;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  animation: fadeUp 0.45s ease both;
}

.mch-cmd-block {
  background: rgba(13, 31, 13, 0.8);
  border: 1px solid rgba(34,197,94,0.2);
  border-radius: 6px;
  padding: 0.65rem 0.9rem;
  min-width: 0;
  overflow-x: auto;
}

.mch-cmd-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin: 0;
}

/* ── Install two-col ──────────────────────────────────────────── */
.mch-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.mch-install-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
}

.mch-req-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.mch-req-list li {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.mch-req-icon { font-size: 1.2rem; }

.mch-step-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  list-style: none;
  padding: 0;
  counter-reset: steps;
}

.mch-step-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.mch-step-num {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  background: #22c55e;
  color: #052e16;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  margin-top: 1px;
}

.mch-step-list code {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 0.82rem;
  color: #4ade80;
}

/* ── Code block ───────────────────────────────────────────────── */
.mch-code-block {
  background: #0d1f0d;
  border: 1px solid rgba(34, 197, 94, 0.25);
  border-radius: var(--radius);
  overflow: hidden;
}

.mch-code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1rem;
  background: rgba(34, 197, 94, 0.06);
  border-bottom: 1px solid rgba(34, 197, 94, 0.15);
  font-size: 0.75rem;
}

.mch-code-lang { color: #4ade80; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; }
.mch-code-file { color: var(--text-dim); }

.mch-code-block pre {
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
}

.mch-code-block code {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.9rem;
  color: #86efac;
}

.mch-code-note {
  padding: 0.6rem 1.5rem;
  font-size: 0.8rem;
  color: var(--text-dim);
  border-top: 1px solid rgba(34, 197, 94, 0.1);
}

.mch-code-note code {
  background: transparent;
  color: #4ade80;
  font-size: 0.8rem;
}

/* ── Notes ────────────────────────────────────────────────────── */
.mch-notes {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mch-note {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.mch-note-icon { font-size: 1.3rem; flex-shrink: 0; margin-top: 1px; }
.mch-note strong { color: var(--text); }
.mch-note code {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 0.82rem;
  color: #4ade80;
}

/* ── CTA ──────────────────────────────────────────────────────── */
.mch-cta {
  background: linear-gradient(135deg, rgba(13,31,13,0.9) 0%, rgba(13,13,15,1) 100%);
  border-top: 1px solid rgba(34, 197, 94, 0.15);
  padding: 4rem 1.5rem;
  text-align: center;
}

.mch-cta-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.mch-cta-text {
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  font-weight: 600;
  color: var(--text);
}

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 780px) {
  .mch-hero-body {
    grid-template-columns: 1fr;
  }

  .mch-hero-thumb {
    max-width: 480px;
    width: 100%;
    margin: 0 auto;
  }
}

@media (max-width: 640px) {
  .mch-cmd-row {
    grid-template-columns: 1fr;
  }

  .mch-two-col {
    grid-template-columns: 1fr;
  }

  .mch-features-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 400px) {
  .mch-features-grid {
    grid-template-columns: 1fr;
  }
}
