
* {
    box-sizing: border-box;
}
body {
    margin: 0;
    padding: 0;
    /* We'll leave the body background a neutral gray so the Game Boy shell stands out */
    background-color: #ffffff;
    font-family: 'Press Start 2P', monospace; /* Retro font, remove if desired */
}

/* GAMEBOY CONTAINER */

.gameboy-container {

    margin-top: calc(50vh - 370px);
    margin-left: auto;
    margin-right: auto;

    max-width: 400px;
    height: 700px;

    background: url(../../images/background3.png) no-repeat center center;
    background-size: cover; /* Ensure it covers the full container */

    border-radius: 10px;
    box-shadow: 3px 5px 10px rgba(0,0,0,0.2);
    border: 2px solid #a17d56;

    position: relative;
    overflow: hidden;
}

.gameboy-screen {
    width: 90%;
    height: 50%;
    margin-right: auto;
    margin-left: auto;
    background-color: #372B26;
    border-radius: 10px;
    position: relative;
    overflow: auto;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 2);
}

.content {
    padding: 10px 15px;
    text-align: center;
    color: #fff;
}

#tapes {
    position: absolute;
    bottom: 80px;
    left: 27%;
    transform: translateX(-50%);

    width: 35%;
    height: auto;

    object-fit: cover;
}

/*BUTTONS*/
.bottom-nav {
    position: absolute;
    bottom: 64px;

    left: 73%;
    transform: translateX(-50%);

    align-items: center;
    justify-items: center;
    border-radius: 10px;

    display: grid;
    grid-template-columns: 80px 80px;
    grid-template-rows: 80px 80px;
    gap: 7px;

    width: max-content;
}

.bottom-nav a {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: url("../../images/bb1.png");
    background-size: cover;

    border-radius: 50%;
    text-decoration: none;
    box-shadow: inset -3px -4px 2px rgba(0, 0, 0, 0.2);

    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;

    cursor: pointer;
    touch-action: manipulation;
}

.bottom-nav a:active {
  background-color: rgba(0, 0, 0, 0.2);
  transform: translateY(1.5px);
  -webkit-transform: translateY(1.5px);
}

/* @media (hover: none) and (pointer: coarse) {
    .bottom-nav a:active {
        transform: translateY(1.5px);
        background-color: rgba(0, 0, 0, 0.2);
    }
} */

@media (hover: none) {
    .bottom-nav a {
        /* Add hover state styles directly to the element for touch devices */
        transition: transform 0.1s;
        -webkit-transition: -webkit-transform 0.1s;
    }
    
    .bottom-nav a:active {
        transform: translateY(1.5px);
        -webkit-transform: translateY(1.5px);
        background-color: rgba(0, 0, 0, 0.2);
    }
}


/*BUTTON ICON*/
.bottom-nav a img {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
    display: block;
}

/* ---------- ARCADE TABLE STYLING ---------- */
.arcade-table {
    text-align: center;
    border-collapse: collapse;
    margin: 0 auto;
    height: 90%;
    width: 100%;
}

.arcade-table th {
    font-size: 14px;
    text-transform: uppercase;
    padding: 8px 16px;
    border-bottom: 2px solid #ffffff;
    color: #ffffff;
}

.arcade-table td {
    text-align: center;
    padding: 8px 16px;
    font-size: 18px;
    color: #ffffff;
    margin-bottom: auto;
}

.room-table {
    text-align: center;
    border-collapse: collapse;
    margin: 0 auto;
    height: 90%;
    width: 100%;
}

.room-table th {
    font-size: 14px;
    text-transform: uppercase;
    padding: 8px 16px;
    border-bottom: 2px solid #ffffff;
    color: #ffffff;
}

.room-table td {
    text-align: center;
    padding: 8px 16px;
    font-size: 16px;
    color: #ffffff;
    vertical-align: middle;
}

.first-column {
    /* text-align: left !important; */
    padding: 8px 16px;
    font-size: 16px;
    color: #ffffff;
    vertical-align: top;
}

#sort {
    position: absolute;
    top: 60%;       /* Adjust to place it below the screen but above nav */
    left: 23%;
    transform: translateX(-50%);
    /* Style as needed */
    width: 120px;
    height: 22px;
    line-height: 0;

    border-radius: 10px;
    cursor: pointer;


    background-color: #a68151;
    color: #000000;
    border: solid 0.5px #000000;
    padding: 8px 15px;
    text-align: center;
    font-size: 11px;
    font-family: 'Press Start 2P', monospace;

    box-shadow: inset -1px -3px 0 rgba(0, 0, 0, 0.15);

    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

#sort:active {
    /* background-color: rgba(0, 0, 0, 0.2); */
    box-shadow: 0 1px #a68151;
    
  }

@media (hover: none) and (pointer: coarse) {
    #sort:active {
        box-shadow: 0 1px #a68151;
    }
}

/*MAIN SCREEN TITLE IMAGE */
#HomeScreen {
    margin-top: 72px;
    max-width: 100%;
    height: auto;
    display: block;
    animation: fadeIn 3s;
}

@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

/*CONTAINER HEADER*/
.gameboy-header {
    width: 400px;
    height: auto;
    overflow: hidden;
}

.gameboy-header img {
    width: 80%;
    height: 100%;
    object-fit: cover;
    display: block;
    margin: 2px 32px 2px;
}

#header {
    font-size: 1.9rem;
    max-width: 360px;
    text-align: center;
    width: 90%;
    margin: 20px auto 10px;
}

/*LOADING ANIMATION*/
.loading {
    font-size: 20px;
    font-weight: bold;
    text-align: center;
    margin: 100px 100px 0;
    color: #ffffff;
    animation: blink 1.5s infinite;
}

@keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0.3; }
    100% { opacity: 1; }
}

