/* Fonts */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&display=swap');

/* Variables for animated background */
:root{
    --grid-color-one: #ffce00;
    --grid-color-two: #ffdd4d;
    --grid-size: 100px 100px;
    --grid-speed: 300s;

    /* Font sizing */
    --name-size: clamp(24px, 3.6vw, 64px);
    --desc-size: clamp(14px, 2vw, 28px);
}

/* Scrollbar styling (hidden anyway) */
html {
    scrollbar-color: #378af2 #0000;
    scrollbar-width: thin;
    width: 100%;
    height: 100%;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body {
    display: flex;
    align-items: center;
    justify-content: center;

    /* Moving background */
    background-size: var(--grid-size);
    background-image: repeating-conic-gradient(
        var(--grid-color-two) 0% 25%, 
        var(--grid-color-one) 0% 50%
    );
    animation: scroll var(--grid-speed) linear infinite;

    scrollbar-width: none;
}

@keyframes scroll {
    100% {
        background-position: 500% -1000%;
    }
}

/* --- Container --- */
.container {
    position: relative;
    width: 100%;
    height: 100%;
}

#bg-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1; /* behind everything */
}

/* --- Carousel layout --- */
#carousel {
    position: absolute;
    top: 45vh;
    left: 34vw;
    transform: translate(-50%, -50%);
    width: 70%;
    height: 60%;
    display: flex;
    overflow: hidden;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease;
    height: 60%;
}

#carousel,
.carousel-track {
    overflow: visible;
}

.carousel-track img {
    flex: 0 0 300px;   /* fixed width */
    height: 400px;     /* fixed height */
    margin: 0 30px;    /* spacing */
    object-fit: contain;
    width: 100%;
    height: 100%;
    background: transparent;
    filter: drop-shadow(10px 10px 0px rgba(0,0,0,0.2));
    transition: transform 0.3s;
}

.carousel-track img.selected {
    transform: scale(1.2);
}

/* --- Carousel controls: item-name + buttons --- */
#carousel-controls {
    position: absolute;
    top: 60vh;      /* vertical position of the whole group */
    left: 31vw;     /* horizontal center of the group */
    transform: translateX(-50%) rotate(-5.5deg);
    
    display: flex;
    align-items: center;  /* vertical alignment */
    justify-content: center;
    gap: 2vw;             /* space between buttons and name */
    z-index: 1000;
}



/* Carousel buttons inside wrapper */
#carousel-controls .carousel-btn {
    position: relative; /* controlled by wrapper */
    width: 60px;
    height: 60px;
    cursor: pointer;
    animation: wiggle 1s infinite alternate ease-in-out;
}

#btn-left {
    margin:0 2vh;
}

#btn-right {
    margin:0 2vh;
}


/* Wiggle animation for buttons */
@keyframes wiggle {
    0%   { transform: rotate(-5deg) translateX(0); }
    50%  { transform: rotate(-5deg) translateX(5px); }
    100% { transform: rotate(-5deg) translateX(-5px); }
}

/* --- Item name box --- */
#item-name-box {
    position: relative; /* controlled by wrapper */
    width: 20vw;
    height:10vh;
    max-width: 300px;
    padding: 0.5em 1em;

    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    overflow: hidden;
}

#item-name {
  font-family: "Montserrat", sans-serif;
  font-weight: 800;
  color: white;
  text-align: center;
  white-space: nowrap; 
}

/* --- Description box --- */
.description-box {
    background-color: #ea6595;
    width: 45vw;
    height: 25vh;
    text-align: left;
    display: flex;
    justify-content: center;
    align-items: center;
    
    position: absolute; /* separate from controls */
    top: 60vh;
    left: 70vw;
    transform: translateX(-50%);
    
    box-shadow: 10px 10px 0px rgba(0,0,0,0.2);
}

#item-description {
    font-family: "Montserrat", sans-serif;
    font-size: var(--desc-size);
    color: white;
    z-index: 1200;
    max-width: 40vw;
    margin: 1rem;
}

/* --- Theme filter buttons --- */
.buttons-box {
    background-color: transparent;
    width: 20vw;
    height: 8vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    
    position: absolute;
    top: 78vh;
    left: -2vw;
    gap: 1vh;
}

.themebutton {
    background: #ea6595;
    font-family: 'Montserrat';
    padding: 0.6em 1.3em;
    font-weight: 700;
    font-size: 1.5vh;
    border: 3px solid white;
    border-radius: 0.4em;
    box-shadow: 0.1em 0.1em;
    cursor: pointer;
    color: white;
    width: 45%;
    text-align: center;
    user-select: none;
}

.themebutton:hover {
    transform: translate(-0.05em, -0.05em);
    box-shadow: 0.15em 0.15em;
}

.themebutton:active {
    transform: translate(0.05em, 0.05em);
    box-shadow: 0.05em 0.05em;
}


h2{
    margin:1%;
}

h2 a{
    font-family:'Montserrat';
    text-decoration:none;
    color:white;
}

h2 a:hover{
    text-decoration:underline;
    color:#378af2;
}

#logo{
    display:flex;
    width:20%;
    position:relative;
    top:5vh;
    left:2vw;
}

#warning{
    width:13%;
    position:relative;
    top:45vh;
    left:1.5vw;
}
