@font-face {
  font-family: 'Pix';
  src: url('./Pixellari.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

html, body {
    background-image: url('art/pattern.png');
    background-repeat: repeat;
    background-size: 25%; 
    animation: scroll-bg 60s linear infinite;
    background-color: #e8c3a6;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    z-index: -2;
}

@keyframes scroll-bg {
    0% {
    background-position: 0 0;
    }
    100% {
    background-position: 1000px 1000px;
    }
}

body {
  font-family: 'Pix', sans-serif;
  background-color: #e8c3a6;
}

/* Override Bootstrap components */
.dropdown-item {
    z-index: 5 !important;
}

.navbar,
.dropdown-menu,
.btn,
.form-control,
.card,
.modal,
h1, h2, h3, h4, h5, h6 {
  font-family: inherit;
}

/* Bootstrap breakpoint for desktop */
@media (min-width: 992px) {
    .overlapping-image {
        max-width: 70%;
    }
}

.navbar {
    padding-bottom: 45px;
    position: relative;
    background-color: #653621;
}

.overlapping-image {
    position: relative;
    margin-top: -100px;
    z-index: 20;
}

#carouselExampleAutoplaying {
    margin-top: -15.5%;
    position: relative;
    z-index: 0;
}


/* Adjust for desktop view */
@media (min-width: 992px) {
    #carouselExampleAutoplaying {
        margin-top: calc(-15.5% + 140px); /* Adds 20px to the existing negative margin */
    }
}

.img-nibble {
    pointer-events: none;
    width: 100%;
    transform: translateY(-50%);
    max-width: 800px;
}

.carousel-caption {
    position: absolute;
    bottom: 5%;
    left: 1%;
    color: white;
    text-align: left;
    width: auto;
    max-width: 75%;
}

.carousel-caption h1,
.carousel-caption p {
    display: block;
    background-color: rgba(0, 0, 0, 0.45);
    padding: 5px 10px;
    margin: 0;
    line-height: 1.2;
    width: fit-content;
}

.caca {
    transform: translateY(-40px);
}

.ld {
    max-width: 800px;
}

/* Base font sizes for mobile */
.carousel-caption h1 {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.carousel-caption p {
    font-size: 1.1rem;
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
    .carousel-caption h1 {
        font-size: 2rem;
    }
    .carousel-caption p {
        font-size: 1.4rem;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
    .carousel-caption h1 {
        font-size: 2.5rem;
    }
    .carousel-caption p {
        font-size: 1.7rem;
    }
    .carousel-caption h1,
    .carousel-caption p {
        padding: 8px 15px;
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .carousel-caption h1 {
        font-size: 3rem;
    }
    .carousel-caption p {
        font-size: 2rem;
    }
}

.footer {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  background-color: #653621;
  color: white;
  text-align: center;
  z-index: 5;
  
}

.ld-container {
    position: relative;
    max-width: 600px;
    width: 90%;
    margin: 0 auto;
    aspect-ratio: 1 / 1.2; /* Keeps consistent height/width ratio */
    display: flex;
    justify-content: center;
    align-items: flex-end; /* Character aligns at bottom */
    padding-bottom: 2rem;
}

.ld-char {
    position: absolute;
    bottom: 25%;
    left: 50%;
    transform: translateX(-50%);
    max-height: 90%;
    width: auto;
    image-rendering: pixelated;
    z-index: 1;
    transition: transform 0.1s ease-out;
}

.ld-talk {
    position: relative;
    background: url('art/ld-talk.png') no-repeat center center;
    background-size: contain;
    width: 100%;
    aspect-ratio: 1.8 / 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    z-index: 2;
}

.ld-text {
    font-family: 'Pix', sans-serif;
    font-size: 1.5rem;
    color: #eb5b87;
    text-align: center;
    margin: 0;
    max-width: 85%;
    word-wrap: break-word;
    line-height: 1.3;
}

.game-thumb-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-bottom: 4px solid #653621;
}

/* Base styles */
.game-thumb,
.game-thumb-hover {
  object-fit: cover;
  width: 100%;
  height: 100%;
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  transition: opacity 0.3s ease-in-out;
  image-rendering: pixelated;
}

/* Hide GIF by default */
.game-thumb-hover {
  opacity: 0;
  pointer-events: none;
}

/* Show GIF only if it exists */
.game-thumb-wrapper:hover .game-thumb-hover {
  opacity: 1;
}
.game-thumb-wrapper:hover .game-thumb-hover ~ .game-thumb {
  opacity: 0;
}

.game-card .card-body {
  background-color: #653621 !important;
}

/* Force font colors */
.game-card .card-title,
.game-card .card-text,
.game-card .card-body,
.game-card {
  color: #ffe1c9 !important;
}

/* Override Bootstrap's text-muted or defaults */
.game-card * {
  color: #ffe1c9 !important;
}

/* Platform icon color */
.platform-icons i,
.platform-icons img {
  color: #ffe1c9 !important;
  filter: none; /* just in case grayscale is applied elsewhere */
}