*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Fredoka", "Segoe UI", sans-serif;
  line-height: 1.6;
  color: #1a1a1a;
  background: #ffffff;
  padding-bottom: 6rem;
}

body {
  position: relative;
  overflow-x: hidden;
}

.rainbow-strip {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 72px;
  z-index: 0;
  background: linear-gradient(
    180deg,
    #e53935 0%,
    #fb8c00 20%,
    #fdd835 40%,
    #43a047 60%,
    #1e88e5 80%,
    #8e24aa 100%
  );
  opacity: 0.85;
  border-radius: 0 12px 12px 0;
  box-shadow: inset -4px 0 12px rgba(0, 0, 0, 0.15);
}

.left-corner-char {
  position: fixed;
  left: 72px; 
  bottom: 10px;
  width: min(320px, 45vw);
  height: auto;
  z-index: 2;
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.2));
}

body.page-index {
  background-color: #ffffff;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: scroll;
}

body.page-home {
  background-image: url("images/RainBow.jpg");
}

body.page-characters{
  background-image: url("images/characters.png");
}

body.page-tracks {
  background-image: url("images/Tracks_background2.png");
}

body.page-items {
  background-image: url("images/Items_Background2.png");
}

.site-header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1rem clamp(1rem, 4vw, 2rem);
  max-width: 960px;
  margin: 0 auto;
}

body.page-index .site-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: nowrap;
}

body.page-index .site-header .logo {
  grid-column: 2;
  justify-self: center;
}

body.page-index .site-header .item-boxes {
  grid-column: 3;
  justify-self: end;
  z-index: 2;
}

.logo {
  display: inline-block;
  line-height: 0;
  text-decoration: none;
  position: relative;
}

.logo img {
  display: block;
  max-width: min(280px, 55vw);
  height: auto;
  transition: opacity 0.2s;
}

.logo .logo-hover {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
}

.logo:hover .logo-initial {
  opacity: 0;
}

.logo:hover .logo-hover {
  opacity: 1;
}

body.page-index .site-header .logo img {
  max-width: min(240px, 50vw);
}

.item-boxes {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
}

.item-box {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  text-decoration: none;
  line-height: 1.2;
  overflow: visible;
  border: none;
  box-shadow: none;
  padding: 0;
  transition: transform 0.1s ease;
}

.item-box:hover {
  transform: translateY(-1px);
}

.item-box:focus-visible {
  outline: 2px solid #ff9800;
  outline-offset: 4px;
  border-radius: 12px;
}

.item-box__thumb {
  display: block;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #0d47a1;
  box-shadow: 0 2px 0 #0d47a1;
  transition: box-shadow 0.1s ease;
}

.item-box:hover .item-box__thumb {
  box-shadow: 0 3px 0 #0d47a1;
}

.item-box__thumb img {
  display: block;
  width: 48px;
  height: 48px;
  object-fit: cover;
}

.item-box.is-current .item-box__thumb {
  box-shadow: 0 0 0 2px #fdd835, 0 2px 0 #0d47a1;
}

.item-box__label {
  font-family: inherit;
  font-size: 0.65rem;
  font-weight: 600;
  text-align: center;
  color: #0d47a1;
  max-width: 76px;
  line-height: 1.15;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.15s ease, max-height 0.2s ease, margin 0.2s ease;
}

.item-box:hover .item-box__label,
.item-box:focus-visible .item-box__label,
.item-box.is-current .item-box__label {
  opacity: 1;
  max-height: 2.5rem;
  margin-top: 0.2rem;
}

.site-main {
  position: relative;
  z-index: 1;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2rem) 2rem;
}

.hero-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 1.25rem;
  padding: 1.25rem;
  background: #fff;
  border: 10px solid #6d4c41;
  border-radius: 20px;
  box-shadow: 0 12px 0 #4e342e, 0 18px 32px rgba(0, 0, 0, 0.12);
}

.track-actions {
  display: flex;
  gap: 1.5rem;
  margin-top: 2rem;
  max-width: min(440px, 58vw); 
  margin-left: auto;
  margin-right: 0;
}

.btn-mario {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-family: "Fredoka", sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  padding: 1rem;
  color: rgb(249, 2, 2);
  background: #f8f9fb; 
  border: 6px solid #6d4c41; 
  border-radius: 16px;
  box-shadow: 0 6px 0 #4e342e;
  transition: all 0.1s ease;
}

.btn-mario:hover {
  background: #fbebeb;
  transform: translateY(-2px);
  box-shadow: 0 8px 0 #4e342e;
}

.btn-mario:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 #4e342e;
}

.page-tracks .btn-mario:nth-of-type(1)::after {
  background-image: url('images/mariocircuit3-removebg-preview.png'); 
}

.page-tracks .btn-mario:nth-of-type(2)::after {
  background-image: url('images/Rainbow_ROAD-removebg-preview.png');
}

.page-characters .btn-mario,
.page-tracks .btn-mario,
.page-items .btn-mario {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  padding: 1rem; 
}

.page-characters .btn-mario::after,
.page-tracks .btn-mario::after,
.page-items .btn-mario::after {
  content: "";
  position: absolute; 
  right: 15px;
  width: 35px;
  height: 35px;
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.page-characters .btn-mario:hover,
.page-characters .btn-mario.is-current,
.page-tracks .btn-mario:hover,
.page-tracks .btn-mario.is-current,
.page-items .btn-mario:hover,
.page-items .btn-mario.is-current {
  padding-right: 50px; 
  justify-content: center;
}

.page-characters .btn-mario:hover::after,
.page-characters .btn-mario.is-current::after,
.page-tracks .btn-mario:hover::after,
.page-tracks .btn-mario.is-current::after,
.page-items .btn-mario:hover::after,
.page-items .btn-mario.is-current
 {
  opacity: 1;
  transform: scale(1);
}

.page-characters .btn-mario:nth-of-type(1)::active,
.page-items .btn-mario:nth-of-type(1)::active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 #4e342e;
  background-image: url('images/Peach.webp'); 
}

.page-characters .btn-mario:nth-of-type(1)::after,
.page-items .btn-mario:nth-of-type(1)::after {
  background-image: url('images/Peach.webp'); 
}

.page-characters .btn-mario:nth-of-type(2)::after,
.page-items .btn-mario:nth-of-type(2)::after {
  background-image: url('images/mario.png');
}

.character-footer-img {
  display: flex;
  justify-content: center; 
  margin-top: 2rem;     
  width: 100%;
  max-width: min(440px, 58vw);
  margin-left: auto;
  margin-right: 0;
  border: 6px solid #6d4c41;
  border-radius: 16px;
}

.character-footer-img2 {
  display: flex;
  justify-content: center; 
  margin-top: 2rem;     
  width: 100%;
  max-width: min(440px, 58vw);
  margin-left: auto;
  margin-right: 0;
}

.character-footer-img img {
  display: block;
  width: 100%;            
  height: auto;
  filter: drop-shadow(0 10px 15px rgba(0,0,0,0.1));
}

.character-footer-img2 img {
  display: block;
  width: 100%;            
  height: auto;
  filter: drop-shadow(0 10px 15px rgba(0,0,0,0.1));
}

body.page-index .hero--home {
  display: flex;
  justify-content: flex-end;
  width: 100%;
  margin-top: 0.25rem;
}

body.page-index .hero--home .hero-panel {
  max-width: min(440px, 58vw);
  margin-left: auto;
  margin-right: 0;
  padding: 0.4rem;
  gap: 0;
  border-width: 6px;
  border-radius: 14px;
  box-shadow: 0 7px 0 #4e342e, 0 10px 20px rgba(0, 0, 0, 0.1);
}

body.page-index .hero--home .hero-panel img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.hero-figure {
  margin: 0;
  flex: 1 1 220px;
  max-width: 100%;
}

.hero-figure img {
  display: block;
  width: 100%;
  max-width: 320px;
  height: auto;
  border-radius: 12px;
}

.hero-copy {
  flex: 1 1 260px;
  min-width: 0;
}

.hero-panel--text-only .hero-copy {
  flex: 1 1 100%;
}

.hero-title {
  margin: 0 0 1rem;
  font-family: "Fredoka", "Segoe UI", system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(1.1rem, 3vw, 1.65rem);
  line-height: 1.35;
  background: linear-gradient(90deg, #e53935, #fdd835, #1e88e5, #43a047);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.intro {
  margin: 0 0 1rem;
  font-size: 1.05rem;
}

.paragraph_1 {
  margin: 0;
  font-size: 0.95rem;
  color: #444;
}

.yoshi-corner {
  position: fixed;
  right: -10px;
  bottom: -10px;
  width: min(160px, 35vw);
  height: auto;
  z-index: 2;
  pointer-events: none;
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.2));
}

.carousel {
  overflow: hidden; 
  width: 100%;
  max-height: 180px; 
  border-radius: 12px;
  position: relative;
  border: 4px solid #6d4c41; 
  background-color: #fff;
}

.carousel-slide {
  display: flex;
  width: 500%; 
  animation: slide-animation 20s infinite ease-in-out;
}

.carousel-slide img {
  width: 20%; 
  flex-shrink: 0; 
  height: 180px;
  display: block;
  object-fit: contain; 
}

@keyframes slide-animation {
  0% { transform: translateX(0); }
  15% { transform: translateX(0); }            
  20% { transform: translateX(-20%); }           
  35% { transform: translateX(-20%); }          
  40% { transform: translateX(-40%); }          
  55% { transform: translateX(-40%); }          
  60% { transform: translateX(-60%); }          
  75% { transform: translateX(-60%); }          
  80% { transform: translateX(-80%); }          
  95% { transform: translateX(-80%); }          
  100% { transform: translateX(0); }            
}