/* ========== MACHINE PROPERTIES CARD ========== */
.machine-properties {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  padding: 10px 14px;
  margin: 0 0 20px 0;
  background: var(--md-code-bg-color);
  border-radius: 10px;
  border: 1px solid var(--md-default-fg-color--lightest);
}

.machine-properties .prop-ip {
  font-family: var(--md-code-font-family);
  font-size: 0.82em;
  color: var(--md-code-hl-special-color);
  background: var(--md-code-bg-color);
  padding: 3px 8px;
  border-radius: 5px;
  border: 1px solid var(--md-default-fg-color--lighter);
  margin-right: 2px;
}

.machine-properties .prop-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 16px;
  font-size: 0.72em;
  font-weight: 600;
  letter-spacing: 0.2px;
  text-transform: uppercase;
}

/* OS badges */
.prop-badge.windows {
  background: linear-gradient(135deg, #0078d4, #005a9e);
  color: #fff;
}
.prop-badge.linux {
  background: linear-gradient(135deg, #f5a623, #e69114);
  color: #1a1a1a;
}

/* Difficulty badges */
.prop-badge.very-easy {
  background: linear-gradient(135deg, #00c853, #00a844);
  color: #fff;
}
.prop-badge.easy {
  background: linear-gradient(135deg, #64dd17, #4caf50);
  color: #1a1a1a;
}
.prop-badge.medium {
  background: linear-gradient(135deg, #ffc107, #ffb300);
  color: #1a1a1a;
}
.prop-badge.hard {
  background: linear-gradient(135deg, #ff7043, #f4511e);
  color: #fff;
}
.prop-badge.insane {
  background: linear-gradient(135deg, #e53935, #c62828);
  color: #fff;
}

/* Skills badge */
.prop-badge.skills {
  background: linear-gradient(135deg, #7c4dff, #651fff);
  color: #fff;
}

/* ========== CODE BLOCKS ========== */

/* Terminal window wrapper */
.md-typeset .highlight {
  position: relative;
  border-radius: 12px;
  margin: 24px 0;
  background: #0d1117;
  border: 1px solid var(--md-default-fg-color--lightest);
  box-shadow:
    0 2px 12px rgba(0,0,0,0.15);
  overflow: hidden;
  transition: box-shadow 0.3s ease;
}

/* Scanline overlay */
.md-typeset .highlight::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.03) 2px,
    rgba(0,0,0,0.03) 4px
  );
  z-index: 1;
  border-radius: 12px;
}

/* Fake terminal title bar */
.md-typeset .highlight > pre,
.md-typeset .highlight > table {
  position: relative;
  padding-top: 38px !important;
}

.md-typeset .highlight > pre::before,
.md-typeset .highlight > table::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 30px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.03) 0%, transparent 100%),
    #161b22;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px 12px 0 0;
  z-index: 2;
}

/* Terminal dots: red, yellow, green */
.md-typeset .highlight > pre::after,
.md-typeset .highlight > table::after {
  content: "";
  position: absolute;
  top: 12px;
  left: 16px;
  width: 44px;
  height: 8px;
  background:
    radial-gradient(circle 3.5px, #ff5f56 100%, transparent 100%) 0 50%,
    radial-gradient(circle 3.5px, #ffbd2e 100%, transparent 100%) 16px 50%,
    radial-gradient(circle 3.5px, #27c93f 100%, transparent 100%) 32px 50%;
  background-repeat: no-repeat;
  z-index: 3;
}

/* Language tag in title bar */
.md-typeset .highlight .md-clipboard {
  z-index: 4;
}

/* Code pre styling */
.md-typeset .highlight pre {
  background: transparent !important;
  border-radius: 0;
  box-shadow: none;
  margin: 0;
}

.md-typeset .highlight pre > code {
  background: transparent !important;
  padding: 12px 18px 16px 18px;
  font-family: "Fira Code", "JetBrains Mono", "Cascadia Code", "SF Mono", monospace;
  font-size: 0.85em;
  line-height: 1.65;
  position: relative;
  z-index: 0;
}

/* Line numbers */
.md-typeset .highlight .linenos {
  background: rgba(0,0,0,0.3) !important;
  color: rgba(255,255,255,0.2) !important;
  padding: 12px 10px 16px 14px !important;
  user-select: none;
  text-align: right;
  border-right: 1px solid rgba(255,255,255,0.06);
  font-size: 0.8em;
}

/* Inline code */
.md-typeset code:not(pre code) {
  padding: 2px 7px;
  border-radius: 5px;
  font-weight: 500;
  font-size: 0.9em;
  background: var(--md-code-bg-color);
  color: var(--md-code-hl-special-color);
  border: 1px solid var(--md-default-fg-color--lightest);
  white-space: nowrap;
}

/* Copy button */
.md-typeset .highlight .md-clipboard {
  color: rgba(255,255,255,0.3) !important;
  transition: all 0.2s ease;
}

.md-typeset .highlight .md-clipboard:hover {
  color: rgba(255,255,255,0.8) !important;
}

.md-typeset .highlight .md-clipboard:has(.md-clipboard--success) {
  color: #00c853 !important;
}

/* Prompt styling ($ or #) - when using code with prompt */
.md-typeset .highlight .gp,
.md-typeset .highlight .gh {
  color: #00ff41 !important;
  user-select: none;
}

/* Command output dimmed */
.md-typeset .highlight .go {
  opacity: 0.8;
}

/* Hover subtle lift */
.md-typeset .highlight:hover {
  box-shadow:
    0 4px 20px rgba(0,0,0,0.25);
}

/* Inline code with backticks in headers */
.md-typeset h1 code,
.md-typeset h2 code,
.md-typeset h3 code {
  background: rgba(0,200,100,0.12) !important;
  border: 1px solid rgba(0,200,100,0.2);
  color: #00c853 !important;
  font-weight: 600;
}

/* ========== TYPOGRAPHY ========== */
/* Bold text with warning color */
.md-typeset strong {
  color: #ff9100;
  font-weight: 700;
}

/* Bold inside admonitions, tables, code, and links keeps original color */
.md-typeset .admonition strong,
.md-typeset table strong,
.md-typeset code strong,
.md-typeset pre strong,
.md-typeset a strong {
  color: inherit;
}

/* ========== HEADINGS ========== */
.md-typeset h1 {
  font-weight: 800;
  letter-spacing: -0.5px;
  padding-bottom: 8px;
  border-bottom: 2px solid;
  border-image: linear-gradient(90deg, var(--md-default-fg-color--lighter), transparent) 1;
}

.md-typeset h2 {
  font-weight: 700;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--md-default-fg-color--lightest);
  margin-top: 36px;
}

/* ========== TABLES ========== */
.md-typeset table:not([class]) {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.md-typeset table:not([class]) th {
  background: var(--md-default-fg-color--lightest);
  color: var(--md-typeset-color);
  font-weight: 500;
  font-size: 0.85em;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 10px 16px;
  border-bottom: 2px solid var(--md-default-fg-color--lighter);
}

.md-typeset table:not([class]) td {
  padding: 8px 16px;
}

/* ========== ADMONITIONS ========== */
.md-typeset .admonition {
  border-radius: 10px;
  border-left-width: 4px;
}

.md-typeset .admonition > .admonition-title {
  font-weight: 600;
  border-radius: 10px 10px 0 0;
}

/* ========== BLOCKQUOTES ========== */
.md-typeset blockquote {
  border-left: 4px solid var(--md-accent-fg-color);
  border-radius: 0 8px 8px 0;
  background: var(--md-code-bg-color);
  padding: 12px 18px;
}

/* ========== LINKS ========== */
.md-typeset a {
  font-weight: 500;
  transition: all 0.15s ease;
}

.md-typeset a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ========== HORIZONTAL RULES ========== */
.md-typeset hr {
  border: none;
  height: 2px;
  background: linear-gradient(90deg, var(--md-accent-fg-color) 0%, transparent 100%);
  margin: 32px 0;
}

/* ========== NAVIGATION ========== */
.md-nav__link {
  transition: all 0.15s ease;
}

.md-nav__link:hover {
  color: var(--md-accent-fg-color);
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--md-default-bg-color);
}
::-webkit-scrollbar-thumb {
  background: var(--md-default-fg-color--lighter);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--md-accent-fg-color);
}

/* ========== INDEX PAGE CARDS ========== */
.machine-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  margin: 20px 0;
}

.machine-card {
  display: flex;
  flex-direction: column;
  padding: 20px 18px;
  border-radius: 12px;
  border: 1px solid var(--md-default-fg-color--lightest);
  background: var(--md-code-bg-color);
  transition: all 0.2s ease;
  text-decoration: none !important;
}

.machine-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
  border-color: var(--md-accent-fg-color);
}

.machine-card .card-title {
  font-weight: 700;
  font-size: 1.15em;
  color: var(--md-typeset-color);
}

.machine-card .card-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.machine-card .card-meta .prop-badge {
  font-size: 0.7em;
  padding: 3px 12px;
  border-radius: 24px;
}

/* ========== SCREENSHOTS / IMAGES ========== */
/* Image card with shadow and hover zoom */
.md-typeset p img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  margin: 28px auto 8px auto;
  box-shadow:
    0 0 0 1px var(--md-default-fg-color--lightest),
    0 4px 16px rgba(0,0,0,0.12);
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  cursor: zoom-in;
}

.md-typeset p img:hover {
  transform: scale(1.02);
  box-shadow:
    0 0 0 1px var(--md-default-fg-color--lighter),
    0 8px 30px rgba(0,0,0,0.18);
}

/* Window frame with colored dots for screenshots with alt text */
.md-typeset p:has(img[alt]) {
  position: relative;
  display: block;
  max-width: 100%;
  padding-top: 30px;
  background: var(--md-code-bg-color);
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
  margin: 24px 0 16px 0;
}

.md-typeset p:has(img[alt]) img {
  margin: 0;
  box-shadow: none;
  border-radius: 0 0 10px 10px;
}

.md-typeset p:has(img[alt]) img:hover {
  transform: scale(1.01);
  box-shadow: none;
}

/* Red, yellow, green dots in the title bar */
.md-typeset p:has(img[alt])::before {
  content: "";
  position: absolute;
  top: 11px;
  left: 14px;
  width: 38px;
  height: 8px;
  background:
    radial-gradient(circle 3.5px, #ff5f56 100%, transparent 100%) 0 50%,
    radial-gradient(circle 3.5px, #ffbd2e 100%, transparent 100%) 14px 50%,
    radial-gradient(circle 3.5px, #27c93f 100%, transparent 100%) 28px 50%;
  background-repeat: no-repeat;
  z-index: 2;
  pointer-events: none;
}

/* ========== HEADER ========== */
.md-header {
  background: var(--md-code-bg-color) !important;
  border-bottom: 1px solid var(--md-default-fg-color--lightest);
}

/* ========== FOOTER ========== */
.md-footer {
  background: var(--md-code-bg-color) !important;
  border-top: 1px solid var(--md-default-fg-color--lightest);
}

.md-footer-meta {
  background: transparent !important;
}

/* Hide default mkdocs-material attribution */
.md-footer-meta .md-social,
.md-footer-meta .md-footer-meta__inner > :not(.md-copyright),
.md-copyright__highlight {
  display: none;
}

/* Center copyright */
.md-footer-meta__inner {
  justify-content: center !important;
}

.md-copyright {
  font-size: 0.85em;
  color: var(--md-default-fg-color--light);
  text-align: center;
  margin: 0 auto;
}

.md-copyright a {
  color: var(--md-typeset-color) !important;
  font-weight: 600;
  transition: color 0.15s ease;
}

.md-copyright a:hover {
  color: var(--md-accent-fg-color) !important;
  text-decoration: none;
}

/* ========== ANIMATIONS ========== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.md-typeset > * {
  animation: fadeIn 0.4s ease both;
}

.md-typeset > *:nth-child(2)  { animation-delay: 0.05s; }
.md-typeset > *:nth-child(3)  { animation-delay: 0.10s; }
.md-typeset > *:nth-child(4)  { animation-delay: 0.15s; }
.md-typeset > *:nth-child(5)  { animation-delay: 0.20s; }
