@import url(reset.css);

:root{
    --page-bg: #3a5655;
    --container-bg: #c2d2d2;
    --tile-bg: #f1f1f1;
    --tile-border: #000000;
    --accent: #284747; /* primary accent used for .button1 and similar */
    --ui-font: "azo-sans-web", sans-serif;
}

body{
    background-color: var(--page-bg);
    transition: background-color 350ms ease;
}
h1 {
    color: var(--accent);
    text-align: center;
    font-family: var(--ui-font);
font-weight: 900;
font-style: normal;
font-size: 40px;
}

p {
    color: #666;
    line-height: 1.6;
    padding: 0 20px;
    font-family: "azo-sans-web", sans-serif;
    font-weight: 400;
    font-style: normal;
}

ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background-color: var(--container-bg);
    width: 100%;
    height: 60px;
    font-family: "azo-sans-web", sans-serif;
    font-weight: 400;
    font-style: normal;
}
nav{
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 20;
}

li {
    float: left;
    font-family: "azo-sans-web", sans-serif;
    font-weight: 400;
    font-style: normal;
    align-items: column;
}

li a {
    display: block;
    color: rgb(93, 93, 93);
    text-align: center; 
    text-decoration: none;
}

.button {
  border: none;
  color: var(--accent);
  padding: 16px 32px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 16px;
  margin: 4px 2px;
  transition-duration: 0.1s;
  cursor: pointer;
    font-family: var(--ui-font);
font-weight: 700;
font-style: normal;
}

.button1 {
    background-color: var(--accent);
    color: var(--container-bg);
    border: 2px solid #ffffff;
    border-radius: 8px;
    height: 52px;
    border: none;
    z-index: 3;
}

.button1:hover {
  background-color: #1a2e2e;
  color: #c2d2d2;
}

.container{
    background-color: var(--container-bg);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    justify-content: space-around;
    top: 0;            
    left: 0;           
    width: 100%;      
    z-index: 10;
    height: 80px;
}
.buttn{
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    justify-content: space-around;
}
.logo{
    height: 60px;
    width: auto;
}
.containerSong {
    display: grid;
    grid-template-columns: auto auto auto auto;
    padding: 10px;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    gap: 50px;
}
.containerSong > div {
    background-color: var(--tile-bg);
    border: 1px solid var(--tile-border);
  padding: 10px;
  font-size: 30px;
  text-align: center;
  width: 225px;
  height: 225px;
  border-radius: 15px;
}
.r{
    rotate: 5deg;
}
.l{
    rotate: -5deg;
}
.wpsiatwin{
    background-image: url("Images/wpsiatwin.webp");
    background-size: cover;
    background-position: center;
    width: 100%;
    height: 100%;
    border-radius: 10px;
}
#wpsiatwinColor{
    background-color: #1f3839;
}
.fwn{
    background-image: url("Images/fwn.webp");
    background-size: cover;
    background-position: center;
    width: 100%;
    height: 100%;
    border-radius: 10px;
}
#fwnColor{
    background-color: #414344;
}
.humbug{
    background-image: url("Images/humbug.webp");
    background-size: cover;
    background-position: center;
    width: 100%;
    height: 100%;
    border-radius: 10px;
}
#humbugColor{
    background-color: #603453;
}
.sias{
    background-image: url("Images/sias.webp");
    background-size: cover;
    background-position: center;
    width: 100%;
    height: 100%;
    border-radius: 10px;
}
#siasColor{
    background-color: #fffbef;
}
.am{
    background-image: url("Images/am.png");
    background-size: cover;
    background-position: center;
    width: 100%;
    height: 100%;
    border-radius: 10px;
}
#amColor{
    background-color: #15191a;
}
.tbhc{
    background-image: url("Images/tbhc.webp");
    background-size: cover;
    background-position: center;
    width: 100%;
    height: 100%;
    border-radius: 10px;
}
#tbhcColor{
    background-color: #130f0a;
}
.car{
    background-image: url("Images/car.jpg");
    background-size: cover;
    background-position: center;
    width: 100%;
    height: 100%;
    border-radius: 10px;
}
#carColor{
    background-color: #ffffff;
}
.lbtlco{
    background-image: url("Images/lbtlco.jpg");
    background-size: cover;
    background-position: center;
    width: 100%;
    height: 100%;
    border-radius: 10px;
}
#lbtlcoColor{
    background-color: #d0986a;
}
.bgimg{
    width: 200px;
    height: auto;
    position: fixed;
    top: 90%;
    left: 93%;
    transform: translate(-50%, -50%);
}
.bgimg2{
    width: 100px;
    height: auto;
    position: fixed;
    top: 28%;
    left: 7%;
    transform: translate(-50%, -50%);
}
.w3-modal{
    display: none;
    position: fixed;
    z-index: 999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
    padding-top: 40px;
    font-family: var(--ui-font);
    color: var(--page-bg);
}
.w3-radio{
    font-family: var(--ui-font);
    color: var(--page-bg);
    text-decoration-color: var(--page-bg);
}

.w3-modal-content{
    background-color: var(--container-bg);
    margin: 0% auto;
    padding: 20px;
    border: 1px solid var(--tile-bg);
    width: 80%;
    max-width: 500px;
    border-radius: 8px;
}
.w3-button.w3-display-topright{
    float: right;
    font-size: 24px;
    cursor: pointer;
}
.containerSong > div:hover{
    transform: scale(1.08);
    transition: transform 200ms ease;
    cursor: pointer;
    will-change: transform;
}
#resetAllAudio{
    background-color: var(--accent);
    color: var(--container-bg);
    border: 2px solid #ffffff;
    border-radius: 8px;
    height: 60px;
    border: none;
    z-index: 3;
    margin: auto;
}
.button{
    border-radius: 8px;
    background-color: var(--accent);
    color: var(--container-bg);
    height: 60px;
}
#closeSettings{
    background-color: #00000000;
    color: var(--accent);
    border: #00000000;
    font-size: 40px;
}
.namebox{   
    background-color: var(--page-bg);
    color: var(--container-bg);
    border-color: #00000000;
    font-family: var(--ui-font);
    height: 60px;
}
/* smooth color transition animation between two play colors */
@keyframes playColorFade {
    0% { background-color: var(--play-color-1); }
    50% { background-color: var(--play-color-2); }
    100% { background-color: var(--play-color-1); }
}

/* apply animation when playing; CSS variables control colors per-tile */
.containerSong > div.playing{
    animation: playColorFade 1.2s linear infinite;
    /* ensure the transition to/from paused/base colors is smooth */
    transition: background-color 300ms ease;
}



/* tablet: stack the name input and save button in modal */
@media (min-width: 601px) and (max-width: 1024px) {
    .w3-modal-content .namebox{ box-sizing: border-box; width: 100%; display: block; }
    .w3-modal-content #saveUserName{ display: block; width: 100%; margin-top: 8px; }
    .w3-modal-content .name-row{ flex-direction: column; align-items: stretch; }
    /* center the song grid on tablets similar to mobile phones */
    .containerSong{
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(4, 1fr);
        gap: 50px;
        width: min(86vw, 360px);
        justify-items: center;
        align-items: center;
        z-index: 30;
        background: transparent;
        width: 50%;
    }
    .containerSong > div {
        aspect-ratio: 1 / 1;
        height: auto;
        font-size: 12px;
        width: 100%;
    }
    nav{
        height: 90px;
    }
}

@media (max-width: 600px) {
    /* phone: single column, full-width-ish tiles, compact nav */
    .container{
        flex-direction: column;
        align-items: center;
        height: auto;
        padding: 10px 12px;
        gap: 6px;
    }
    .logo{ height: 44px; }
    h1{ font-size: 20px; margin: 0; }
    .buttn { order: 2; }

    /* centered 2 columns x 4 rows grid in the middle of the viewport */
    .containerSong{
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -35%);
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(4, 1fr);
        gap: 20px;
        height: 75%;    
    }
    .containerSong > div {
        width: 90%;
        aspect-ratio: 1 / 1;
        height: auto;
        min-height: 0;
        font-size: 10px;

    }

    /* hide decorative background images on small screens to save space */
    .bgimg, .bgimg2 { display: none; }
    /* mobile: stack the name input and save button in modal as well */
    .w3-modal-content .namebox{ box-sizing: border-box; width: 100%; display: block; }
    .w3-modal-content #saveUserName{ display: block; width: 100%; margin-top: 8px; }
    .w3-modal-content .name-row{ flex-direction: column; align-items: stretch; }
}