/* light-theme: manual
   NexCraft "blocky" Minecraft style (nexcraft.html only, loaded after nexcraft-extra.css).
   Minecraft-GUI look: pixel font for headings/buttons, square notched corners,
   bevelled stone buttons, inventory-slot countdown and grass strips on panels. Remove the <link> in nexcraft.html to revert.
   The light variant at the bottom mimics the light-grey inventory GUI; the
   light-theme generator skips this file because of the marker above. */

:root .nexcraft-page {
  --mc-font: "Monocraft", monospace;
  --mc-notch: 6px;
  --mc-panel: #1c1f26;
  --mc-panel-2: #262a33;
  --mc-edge: #000;
  --mc-hi: rgba(255, 255, 255, 0.16);
  --mc-lo: rgba(0, 0, 0, 0.55);
  --mc-stone: #6f6f6f;
  --mc-stone-hi: #a8a8a8;
  --mc-stone-lo: #3a3a3a;
  --mc-text: #f4f4f4;
  --mc-text-shadow: #3f3f3f;
  --mc-green: #5fbf3a;
  --mc-green-dark: #3d8a22;
  --mc-slot: #2b2b2b;
  --mc-slot-hi: #8b8b8b;
  --mc-slot-lo: #121212;
}

/* notched "pixel" corners */
:root .nexcraft-page .nexcraft-hero,
:root .nexcraft-page .slider-container,
:root .nexcraft-page .nexcraft-placeholder-card,
:root .nexcraft-page .time-unit,
:root .nexcraft-page .nexcraft-btn,
:root .nexcraft-page .discord-widget-frame {
  border-radius: 0;
  clip-path: polygon(
    0 var(--mc-notch), var(--mc-notch) var(--mc-notch), var(--mc-notch) 0,
    calc(100% - var(--mc-notch)) 0, calc(100% - var(--mc-notch)) var(--mc-notch), 100% var(--mc-notch),
    100% calc(100% - var(--mc-notch)), calc(100% - var(--mc-notch)) calc(100% - var(--mc-notch)), calc(100% - var(--mc-notch)) 100%,
    var(--mc-notch) 100%, var(--mc-notch) calc(100% - var(--mc-notch)), 0 calc(100% - var(--mc-notch))
  );
}

/* --- panels: dark GUI panel, hard bevel, grass strip on top --- */
:root .nexcraft-page .nexcraft-hero,
:root .nexcraft-page .slider-container,
:root .nexcraft-page .nexcraft-placeholder-card {
  position: relative;
  border: 3px solid var(--mc-edge);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px) 0 0 / 16px 16px,
    linear-gradient(180deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px) 0 0 / 16px 16px,
    var(--mc-panel);
  box-shadow: inset 4px 4px 0 var(--mc-hi), inset -4px -4px 0 var(--mc-lo);
}

:root .nexcraft-page .nexcraft-hero { padding-top: calc(2.5rem + 14px); }
:root .nexcraft-page .slider-container { padding-top: 14px; }
:root .nexcraft-page .nexcraft-placeholder-card { padding-top: calc(1.1rem + 12px); }

:root .nexcraft-page .nexcraft-hero::before,
:root .nexcraft-page .slider-container::before,
:root .nexcraft-page .nexcraft-placeholder-card::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 14px;
  pointer-events: none;
  z-index: 1;
  /* row 1: solid grass in pixel shades, row 2: grass dripping into the panel */
  background:
    repeating-linear-gradient(90deg, #5fbf3a 0 8px, #4ea82f 8px 16px, #6fcf45 16px 24px, #58b334 24px 32px, #4ea82f 32px 40px) 0 0 / 100% 8px no-repeat,
    repeating-linear-gradient(90deg, #4ea82f 0 8px, transparent 8px 16px, #58b334 16px 24px, #4ea82f 24px 32px, transparent 32px 48px, #5fbf3a 48px 56px, transparent 56px 64px) 0 8px / 100% 6px no-repeat;
}

:root .nexcraft-page .nexcraft-placeholder-card::before { height: 12px; }

/* --- type --- */
:root .nexcraft-page .nexcraft-hero-title,
:root .nexcraft-page .countdown-section h3,
:root .nexcraft-page .mode-slide h3,
:root .nexcraft-page .nexcraft-placeholder-card h3,
:root .nexcraft-page .nexcraft-section-title,
:root .nexcraft-page .nexcraft-tagline,
:root .nexcraft-page .nexcraft-btn,
:root .nexcraft-page .mode-btn,
:root .nexcraft-page .nexcraft-small-btn,
:root .nexcraft-page .time-unit .number,
:root .nexcraft-page .time-unit .label,
:root .nexcraft-page .project-card-discord-badge,
:root .nexcraft-page .released,
:root .nexcraft-page .error,
:root .nexcraft-page .coming-soon {
  font-family: var(--mc-font);
}

:root .nexcraft-page .nexcraft-hero-title {
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.15;
  color: #ffffff;
  text-shadow: 3px 3px 0 rgba(0, 0, 0, 0.55);
}

:root .nexcraft-page .nexcraft-hero-title .mc-accent {
  color: #7fdc58;
  text-shadow: 3px 3px 0 #1d4a0c;
}

:root .nexcraft-page .nexcraft-tagline {
  border-radius: 0;
  border: 2px solid var(--mc-edge);
  background: var(--mc-green-dark);
  color: #eaffdf;
  letter-spacing: 0.1em;
  box-shadow: inset 2px 2px 0 rgba(255, 255, 255, 0.25), inset -2px -2px 0 rgba(0, 0, 0, 0.35);
}

:root .nexcraft-page .countdown-section h3 {
  color: #ffff55; /* Minecraft gold text */
  text-shadow: 3px 3px 0 #3f3f15;
  letter-spacing: 0.12em;
}

:root .nexcraft-page .mode-slide h3 {
  color: #55ffff;
  text-shadow: 3px 3px 0 #153f3f;
  letter-spacing: 0.08em;
}

:root .nexcraft-page .nexcraft-placeholder-card h3 {
  color: var(--mc-text);
  text-shadow: 2px 2px 0 var(--mc-text-shadow);
  letter-spacing: 0.04em;
}

:root .nexcraft-page .nexcraft-section-title {
  color: #aaaaaa;
  letter-spacing: 0.14em;
}

:root .nexcraft-page .nexcraft-section-title::before {
  content: "▶ ";
  color: var(--mc-green);
}

/* --- stone buttons --- */
:root .nexcraft-page .nexcraft-btn,
:root .nexcraft-page .mode-btn,
:root .nexcraft-page .nexcraft-small-btn {
  border-radius: 0;
  border: 2px solid var(--mc-edge);
  background: var(--mc-stone);
  color: var(--mc-text);
  text-shadow: 2px 2px 0 var(--mc-text-shadow);
  box-shadow: inset 2px 2px 0 var(--mc-stone-hi), inset -2px -3px 0 var(--mc-stone-lo);
  transition: none; /* blocky: no easing */
}

:root .nexcraft-page .nexcraft-btn {
  letter-spacing: 0.1em;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.75rem 1.1rem;
  transform: none;
}

:root .nexcraft-page .nexcraft-btn:hover,
:root .nexcraft-page .mode-btn:hover,
:root .nexcraft-page .nexcraft-small-btn:hover {
  background: #7b8fb8; /* the bluish hover tint of Minecraft menu buttons */
  border-color: #fff;
  color: #ffffa0;
  transform: none;
  box-shadow: inset 2px 2px 0 #b5c4e6, inset -2px -3px 0 #4a5878;
}

:root .nexcraft-page .nexcraft-btn:active,
:root .nexcraft-page .mode-btn:active,
:root .nexcraft-page .nexcraft-small-btn:active {
  transform: translateY(2px);
  box-shadow: inset 2px 2px 0 var(--mc-stone-lo), inset -2px -2px 0 var(--mc-stone-hi);
}

:root .nexcraft-page .mode-btn.active {
  background: var(--mc-green-dark);
  border-color: #fff;
  color: #fff;
  box-shadow: inset 2px 2px 0 #7fdc58, inset -2px -3px 0 #23560f;
}

:root .nexcraft-page .nexcraft-small-btn {
  font-size: 0.85rem;
  padding: 0.4rem 0.75rem;
}

:root .nexcraft-page .project-card-discord-badge {
  border-radius: 0;
  border: 2px solid var(--mc-edge);
  background: var(--mc-slot);
  box-shadow: inset 2px 2px 0 var(--mc-slot-lo), inset -2px -2px 0 #555;
}

:root .nexcraft-page .discord-badge-dot { border-radius: 0; }

/* --- countdown as inventory slots --- */
:root .nexcraft-page .time-unit {
  animation: none;
  background: var(--mc-slot);
  border: 3px solid var(--mc-edge);
  box-shadow: inset 4px 4px 0 var(--mc-slot-lo), inset -4px -4px 0 var(--mc-slot-hi);
}

:root .nexcraft-page .time-unit::before { display: none; }

:root .nexcraft-page .time-unit .number {
  color: #fff;
  font-weight: 700;
  text-shadow: 3px 3px 0 var(--mc-text-shadow);
}

:root .nexcraft-page .time-unit .label {
  color: #aaaaaa;
  letter-spacing: 0.08em;
}

:root .nexcraft-page .slide-header { gap: 0.6rem; }

:root .nexcraft-page .mode-slide p,
:root .nexcraft-page .nexcraft-placeholder-card p { color: #c8c8c8; }

/* --- motion --- */
:root .nexcraft-page .nexcraft-hero-logo img {
  animation: mc-bob 3.2s ease-in-out infinite;
  will-change: transform;
  filter: drop-shadow(8px 8px 0 rgba(0, 0, 0, 0.45));
}

@keyframes mc-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

:root .nexcraft-page .nexcraft-hero-watermark {
  color: var(--mc-green);
  opacity: 0.08;
  transform: rotate(0deg);
}


@media (prefers-reduced-motion: reduce) {
  :root .nexcraft-page .nexcraft-hero-logo img { animation: none; }
}

/* --- light theme: classic light-grey inventory GUI --- */
html[data-theme="light"] .nexcraft-page {
  --mc-panel: #c6c6c6;
  --mc-hi: #ffffff;
  --mc-lo: #555555;
  --mc-text: #3f3f3f;
  --mc-text-shadow: transparent;
  --mc-slot: #8b8b8b;
  --mc-slot-hi: #ffffff;
  --mc-slot-lo: #373737;
}

html[data-theme="light"] .nexcraft-page .nexcraft-hero,
html[data-theme="light"] .nexcraft-page .slider-container,
html[data-theme="light"] .nexcraft-page .nexcraft-placeholder-card {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.03) 1px, transparent 1px) 0 0 / 16px 16px,
    linear-gradient(180deg, rgba(0, 0, 0, 0.03) 1px, transparent 1px) 0 0 / 16px 16px,
    var(--mc-panel);
}

html[data-theme="light"] .nexcraft-page .nexcraft-hero-title {
  color: #2b2b2b;
  text-shadow: 3px 3px 0 rgba(255, 255, 255, 0.7);
}

html[data-theme="light"] .nexcraft-page .nexcraft-hero-title .mc-accent {
  color: #2f7a17;
  text-shadow: 3px 3px 0 rgba(255, 255, 255, 0.7);
}

html[data-theme="light"] .nexcraft-page .nexcraft-hero-sub,
html[data-theme="light"] .nexcraft-page .mode-slide p,
html[data-theme="light"] .nexcraft-page .nexcraft-placeholder-card p { color: #3f3f3f; }

html[data-theme="light"] .nexcraft-page .nexcraft-section-title { color: #555; }

html[data-theme="light"] .nexcraft-page .countdown-section h3 { color: #b8860b; text-shadow: 2px 2px 0 #f5e6a8; }
html[data-theme="light"] .nexcraft-page .mode-slide h3 { color: #1f6f8b; text-shadow: none; }

html[data-theme="light"] .nexcraft-page .nexcraft-btn,
html[data-theme="light"] .nexcraft-page .mode-btn,
html[data-theme="light"] .nexcraft-page .nexcraft-small-btn {
  color: #fff;
  text-shadow: 2px 2px 0 #3f3f3f;
}

html[data-theme="light"] .nexcraft-page .time-unit .number {
  color: #fff;
  text-shadow: 3px 3px 0 #3f3f3f;
}

html[data-theme="light"] .nexcraft-page .time-unit .label { color: #e8e8e8; }

html[data-theme="light"] .nexcraft-page .project-card-discord-badge { color: #fff; }

/* --- heading icons: little inventory slots --- */
:root .nexcraft-page .head-ico {
  display: inline-grid;
  place-items: center;
  width: 1.8em;
  height: 1.8em;
  margin-right: 0.55em;
  font-size: 0.85em;
  vertical-align: -0.3em;
  color: var(--mc-green);
  background: var(--mc-slot);
  border: 2px solid var(--mc-edge);
  box-shadow: inset 2px 2px 0 var(--mc-slot-lo), inset -2px -2px 0 #555;
  text-shadow: none;
}

:root .nexcraft-page .countdown-section h3 .head-ico { color: #ffff55; }
:root .nexcraft-page .mode-slide h3 .head-ico { color: #55ffff; }

html[data-theme="light"] .nexcraft-page .head-ico {
  color: #7fdc58;
  box-shadow: inset 2px 2px 0 #373737, inset -2px -2px 0 #ffffff;
}

/* --- SMP reveal --- */
:root .nexcraft-page .mode-new {
  display: inline-block;
  margin-left: 0.4em;
  padding: 0.1em 0.4em;
  font-size: 0.75em;
  background: #ffff55;
  color: #3f3f15;
  text-shadow: none;
  border: 1px solid #000;
  animation: mc-new-blink 1.4s steps(1) infinite;
}

@keyframes mc-new-blink { 50% { background: #ffaa00; } }

:root .nexcraft-page .mode-reveal-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  margin-left: 0.6em;
  padding: 0.25em 0.6em;
  vertical-align: middle;
  font-size: 0.55em;
  letter-spacing: 0.08em;
  color: #3f3f15;
  background: #ffff55;
  border: 2px solid #000;
  box-shadow: inset -2px -2px 0 #c9a400, 3px 3px 0 rgba(0, 0, 0, 0.5);
  text-shadow: none;
  transform: rotate(-3deg);
}

:root .nexcraft-page .mode-codename {
  margin: -0.6rem 0 1rem;
  font-family: var(--mc-font);
  font-size: 0.85rem;
  color: #aaaaaa;
}

html[data-theme="light"] .nexcraft-page .mode-codename { color: #555; }

@media (prefers-reduced-motion: reduce) {
  :root .nexcraft-page .mode-new { animation: none; }
}
