.title {
    padding: 10px;
    text-align: center;   /* centers inline elements like <img> */
}

.title img {
    display: block;       /* makes the image a block */
    margin: 0 auto;       /* centers the block horizontally */
    max-width: 100%;      /* keeps it responsive */
    height: auto;         /* preserves aspect ratio */
}
body {
  cursor: url("images/cursor.png") 8 8, auto;
}

/*font*/
@font-face {
    font-family: Handwriting;
    src: url(Font/Handwriting-Regular.woff);
}
@font-face {
    font-family: Kiddie;
    src: url(Font/Uppercase-Regular.woff);
}
body {
    font-family: Handwriting;
    font-size: 20px;
}
h1,h2,h3,h4,h5,h6 {
    font-family: Kiddie;
    font-weight: normal
}
a, button {
  cursor: url("images/cursorpointer.png") 8 8, pointer;
}

/*background*/
html {
    background-image: url(starback.gif);
}

/*layout*/
#container {
    position: relative;
    background: url("bg.gif");
    border: 2px dotted green;
    padding: 20px;
    margin: 20px auto;
    width: 90%;   /* shrinks on small screens */
    max-width: 1000px; /* keeps a nice max size */
    box-sizing: border-box;

}
/* Columns inside */
.columns {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr; /* 3-column layout */
    gap: 10px;
}
img {
    max-width: 100%;
    height: auto;
    display: block;
}
/* Each box inside */
.column, .bottom {
    border: 2px dotted green;
    padding: 10px;
    box-sizing: border-box;
}
.top-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}
.box {
    border: 2px dotted #7fba4a;
    border-radius: 8px;
    padding: 15px;
    background: rgba(255,255,255,0.6);
    color: #222;
}

/* Column sizes */
.nav { flex: 1; }
.middle { flex: 2; }
.chat { flex: 1; }

/* Bottom full width */
.bottom { margin-top: 20px; }

/* Nintendo floating */
.nintendo {
  position: absolute;
  bottom: 50px;              /* stick near the bottom of container */
  left: calc(100% / 1.2);
  transform: translateX(-50%); /* pull it into the "joint" */
  z-index: 10;               /* make sure it's above other boxes */
}
.nintendo img { transition: opacity 0.4s ease; }
.nintendo .back { position: absolute; top: 0; left: 0; opacity: 0; }
.nintendo:hover .front { opacity: 0; }
.nintendo:hover .back { opacity: 1; }

/* reusable hover-flip */
.icon-swap {
  position: relative;
  width: 60px;
}
.icon-swap img {
  width: 100%;
  display: block;
  transition: opacity 0.4s ease;
}
.icon-swap .back {
  position: absolute;
  top: 0; left: 0;
  opacity: 0;
  pointer-events: none;
}
.icon-swap:hover .front { opacity: 0; }
.icon-swap:hover .back { opacity: 1; }

/*heart*/
.icon-heart { display: inline-block; }
.icon-heart img {
  display: block;
  transform-origin: center;
  will-change: transform;
  cursor: url("images/cursorpointer.png") 8 8, pointer;
}
.icon-heart:hover img {
  animation: heartbeat 1.2s ease-in-out infinite;
}
@keyframes heartbeat {
  0% { transform: scale(1); }
  10% { transform: scale(1.18); }
  20% { transform: scale(1); }
  30% { transform: scale(1.14); }
  40% { transform: scale(1); }
  100% { transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .icon-heart:hover img { animation: none; }
}
.welcome-img {
    width: 100%;      /* makes it fit the column width */
    height: auto;     /* keeps the aspect ratio */
    display: block;   /* removes little gaps under image */
    margin: 0 auto;   /* centers it if it’s smaller */
}
@media (max-width: 768px) {
  .columns {
    grid-template-columns: 1fr; /* stack vertically */
  }

  .nintendo {
    position: static;       /* let it flow normally */
    transform: none;
    margin: 20px auto;      /* center under stacked layout */
    display: block;
  }

  .nintendo img {
    max-width: 80%;         /* shrink big floating img */
  }
}