body {
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: #0e0e0e;
    color: #eaeaea;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;

  display: flex;
  flex-direction: column;
  align-items: center;   /* THIS is the key line */

  backdrop-filter: blur(10px);
  background: rgba(18, 18, 18, 0.88);

  padding: 28px 20px 20px;
  border-bottom: 1px solid #1f1f1f;
}

.site-title {
    display: inline-block;
    font-size: 1.8rem;
    font-weight: 700;
    color: #eaeaea;
    text-decoration: none;
    margin-bottom: 14px;
}

.site-title:hover {
    opacity: 0.85;
}

.site-nav {
    display: flex;
    justify-content: center;
    gap: 22px;
    flex-wrap: wrap;
}

header h1 {
    margin: 0;
}

nav a {
    color: #eaeaea;
    margin-left: 15px;
    text-decoration: none;
}

.hero {
    padding: 60px 20px;
    text-align: center;
    background: linear-gradient(180deg, #1a1a1a, #0e0e0e);
}

section {
    padding: 40px 20px;
    max-width: 1000px;
    margin: auto;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.site-nav a {
    position: relative;
    color: #cfcfcf;
    text-decoration: none;
    font-size: 0.95rem;
    padding: 6px 4px;
    transition: color 0.2s ease;
}

.site-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 100%;
    height: 2px;
    background: #eaeaea;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.25s ease;
}

.site-nav a:hover {
    color: #ffffff;
}

.site-nav a:hover::after {
    transform: scaleX(1);
}

.card {
    background: #1b1b1b;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #2a2a2a;
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        border-color 0.25s ease;
}

.card:hover {
    transform: translateY(-6px) scale(1.02);
    border-color: #444;
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.04);
}

.card .placeholder-img {
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.card:hover .placeholder-img {
    transform: scale(1.03);
    opacity: 0.95;
}

.placeholder-img {
    background: #333;
    height: 150px;
    border-radius: 6px;
    margin-bottom: 10px;
}

.mod-img {
    width: 100%;
    height: 160px;          /* fixed banner height */
    object-fit: cover;     /* crop, don’t stretch */
    border-radius: 10px;
    margin-bottom: 12px;
    background: #111;
}

footer {
    text-align: center;
    padding: 20px;
    background: #121212;
    color: #aaa;
}
.brand {
    color: #eaeaea;
    text-decoration: none;
}

.meta {
    font-size: 0.9em;
    color: #bdbdbd;
}

.links {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}

.icon-btn {
    width: 20px;
    height: 20px;
    padding: 6px;
    border-radius: 6px;
    background: #2a2a2a;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
}

.icon-btn img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    filter: brightness(0.9);
}

.icon-btn:hover {
    background: #3a3a3a;
    transform: translateY(-2px);
}

.card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
}

.badge {
    font-size: 0.8em;
    padding: 4px 8px;
    border-radius: 999px;
    background: #2a2a2a;
    color: #eaeaea;
    border: 1px solid #3a3a3a;
    white-space: nowrap;
}

.badge-released {
    background: #1f2a1f;
    border-color: #2f4a2f;
}

.badge-wip {
    background: #2a261f;
    border-color: #4a3f2f;
}

.badge-archived {
    background: #2a1f1f;
    border-color: #4a2f2f;
}

form {
    display: grid;
    gap: 14px;
}

label {
    display: grid;
    gap: 6px;
    font-size: 0.95em;
}

input, select, textarea {
    background: #141414;
    color: #eaeaea;
    border: 1px solid #2c2c2c;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 1em;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #444;
}

.btn {
    background: #eaeaea;
    color: #111;
    border: none;
    border-radius: 10px;
    padding: 12px 14px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
    opacity: 0.95;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 8px 0 6px 0;
}

.tag {
    font-size: 0.75em;
    padding: 3px 8px;
    border-radius: 999px;
    background: #222;
    border: 1px solid #333;
    color: #ccc;
}

.tag-engine { border-color: #3a3a5a; }
.tag-vehicle { border-color: #3a5a3a; }
.tag-system { border-color: #5a3a3a; }
.tag-sound { border-color: #5a5a3a; }

@media (hover: none) {
    .card:hover {
        transform: none;
        box-shadow: none;
        border-color: #2a2a2a;
    }
}

.access {
    margin-top: 10px;
    font-size: 0.9em;
    padding: 8px 10px;
    border-radius: 8px;
    background: #181818;
    border: 1px solid #2a2a2a;
    color: #d0d0d0;
}

.access strong {
    color: #eaeaea;
}

.access-free {
    border-color: #2f4a2f;
    background: #1a241a;
}

.access-patreon {
    border-color: #4a3a2f;
    background: #241f1a;
}

/* --- Carousel / gallery --- */
.carousel {
    position: relative;
    width: 100%;
    height: 190px;                 /* preview height */
    overflow: hidden;
    border-radius: 12px;
    background: #111;
    margin-bottom: 12px;
    border: 1px solid #2a2a2a;
}

.carousel-track {
    height: 100%;
    display: flex;                 /* IMPORTANT */
    flex-direction: row;           /* IMPORTANT */
    flex-wrap: nowrap;             /* IMPORTANT */
    transform: translateX(0%);
    transition: transform 280ms ease;
    will-change: transform;
}

.carousel-slide {
    flex: 0 0 100%;                /* IMPORTANT */
    width: 100%;
    height: 100%;
    object-fit: cover;             /* crop */
    display: block;
}

/* Blur placeholder */
.carousel-track.is-loading .carousel-slide {
    filter: blur(14px);
    transform: scale(1.06);
    opacity: 0.9;
}

/* Arrow buttons */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid #2a2a2a;
    background: rgba(0,0,0,0.45);
    color: #eaeaea;
    font-size: 22px;
    line-height: 1;
    display: grid;
    place-items: center;
    cursor: pointer;
    user-select: none;
}

.carousel-btn.prev { left: 10px; }
.carousel-btn.next { right: 10px; }

.carousel-dots {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
}

.carousel-dot {
    width: 7px;
    height: 7px;
    border-radius: 99px;
    background: rgba(255,255,255,0.25);
    border: 1px solid rgba(255,255,255,0.12);
}

.carousel-dot.active {
    background: rgba(255,255,255,0.7);
}

.bg-logo {
    position: fixed;
    inset: 0;
    background-image: url("assets/logo.png");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 1000px;
    opacity: 0.25;              /* VERY subtle */
    pointer-events: none;       /* clicks pass through */
    z-index: -1;                /* stays behind everything */
}

body {
    position: relative;
    z-index: 0;
}

/* Page fade-in */
body {
  opacity: 0;
  animation: pageFadeIn 280ms ease forwards;
}

@keyframes pageFadeIn {
  to { opacity: 1; }
}

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  body {
    animation: none;
    opacity: 1;
  }
}

.back-to-top {
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid #2a2a2a;
  background: rgba(0,0,0,0.55);
  color: #eaeaea;
  font-size: 18px;
  cursor: pointer;
  display: grid;
  place-items: center;

  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  z-index: 1200;
}

.back-to-top:hover {
  background: rgba(0,0,0,0.75);
  border-color: #444;
}

.back-to-top.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .back-to-top {
    transition: none;
  }
}
.mod-filters {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 24px;
}

.mod-filters input {
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid #2a2a2a;
  background: #121212;
  color: #eaeaea;
  font-size: 0.95rem;
}

.mod-filters input::placeholder {
  color: #888;
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-buttons button {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid #2a2a2a;
  background: #161616;
  color: #ccc;
  cursor: pointer;
  font-size: 0.85rem;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.filter-buttons button:hover {
  background: #1f1f1f;
  border-color: #444;
}

.filter-buttons button.active {
  background: #eaeaea;
  color: #111;
  border-color: #eaeaea;
}
/* Taller image for WIP showcase cards */
.card-wip .carousel,
.card-wip .placeholder-img {
  height: 420px;
}

.card-wip .carousel-track,
.card-wip img.carousel-slide {
  height: 100%;
  object-fit: cover;
}
