@font-face {
    font-family: 'Shorai Sans';
    src: url('/font/ShoraiSansStdN-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Shorai Sans';
    src: url('/font/ShoraiSansStdN-Light.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: 'Shorai Sans';
    src: url('/font/ShoraiSansStdN-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'Shorai Sans';
    src: url('/font/ShoraiSansStdN-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
}

html,
body {
    font-family: 'Shorai Sans', sans-serif;
    height: 1024px;
    width: 1366px;
    padding: 0;
}

/* Make sure all text elements use Shorai Sans */
h1, h2, h3, h4, h5, h6, p, div, span, strong, .idle-title, .idle-description, .idle-cta, .decibel-numbers, .decibel-label {
    font-family: 'Shorai Sans', sans-serif;
}

.light-text {
    font-weight: 300;
}

.bold-text {
    font-weight: 700;
}

h2 {
    font-size: 2em;
    font-weight: 500;
    padding: 0;
}

td {
    border: 2px inset rgb(163, 163, 163);
}

td.active h2 {
    width: 100%;
    font-size: 2.4em;
    text-align: center;
    color: white;
    position: absolute;
    top: 10%;
}

td.active br {
    display: none;
}

h2.center-title,
td.active h2.center-title {
    display: block;
    width: 100%;
    text-align: center;
    font-size: 3.2em;
    font-weight: 700;
    margin-top: 0;
    position: absolute;
    top: 90px;
    left: 50%;
    transform: translateX(-50%);
    color: black;
}

h2.center-title .red-text {
    /* color: rgb(235, 0, 0); */
    color: rgb(0, 0, 0);
    display: block;
    margin-bottom: 5px;
}

strong {
    display: block;
    font-size: 1.7rem;
    line-height: 18px;
    margin-top: 10px;
    font-weight: 500;
}

table {
    height: 100%;
    border-collapse: collapse;
}

td {
    position: relative;
    width: 28%;
    height: 33%;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    background-image: linear-gradient(to bottom, rgb(230, 230, 230), rgb(250, 250, 250));
}

td.active {
    background-image: linear-gradient(to bottom, rgb(243, 0, 0), rgb(182, 0, 0));
}

td[rowspan="3"],
td[rowspan="3"].active {
    width: 42%;
    height: 100%;
    background-image:
        linear-gradient(to top, white, transparent 0%),
        linear-gradient(to bottom, white, transparent 40%),
        url('/assets/bg.jpg');
    background-position: center;
    background-size: cover;
    background-position: center;
}

.pair {
    display: flex;
    flex-direction: column;
    flex: row;
    align-items: center;
}

.icon {
    width: 100px;
    position: relative;
    margin: 0;
    background-color: white; /* ensures a white base */
    mix-blend-mode: darken;
    object-fit: contain;
    overflow: hidden;
    max-height: 100px;

}

td.active .icon {
    display: none;
}

td.active .single {
    color: black;
}

.single {
    color: rgb(255, 255, 255);
    padding-top: 9px;
}

.subtext {
    font-size: 20px;
    line-height: 27px;
    font-weight: 300;
    margin: 0;
}

.logo {
    width: 25%;
    position: absolute;
    top: 0px;
    left: 50%;
    transform: translateX(-50%);
}

.image-container {
    width: 90%;
    position: absolute;
    left: 50%;
    bottom: 50%;
    transform: translate(-50%, 50%);
}


.outline-img {
    width: 100%;
    position: absolute;
    left: 50%;
    bottom: 50%;
    object-fit: contain;
    overflow: hidden;
    transform: translate(-50%, 50%);
}

.colour-img {
    width: 100%;
    position: absolute;
    left: 50%;
    bottom: 50%;
    object-fit: contain;
    overflow: hidden;
    transform: translate(-50%, 50%);
}

td.active .outline-img {
    display: none;
}

.trapezium {
    position: absolute;
    bottom: 0px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 18%;
    background: black;
    color: white;
    text-align: center;
    line-height: 15px;
    clip-path: polygon(20% 0%, 80% 0%, 100% 100%, 0% 100%);
    font-size: 14px;
    font-weight: bold;
    padding-top: 10px;
    background-color: rgb(0, 0, 0);

}

.trapezium-middle {
    position: absolute;
    bottom: 0px;
    left: 50%;
    transform: translateX(-50%);
    width: 50%;
    height: 8%;
    background: black;
    color: white;
    text-align: center;
    clip-path: polygon(20% 0%, 80% 0%, 100% 100%, 0% 100%);
    display: flex;
    justify-content: center;
    align-items: start;
}

.trapezium-middle .single {
    margin-top: 25px;
}

td.active .trapezium {
    background-image: linear-gradient(to bottom, rgb(232, 232, 232), rgb(255, 255, 255));
}

.visualiser-container {
    display: none;
}

td.active .visualiser-container {
    display: flex;
    width: 75%;
    height: 60px;
    margin: auto;
    position: relative;
}

td.active .visualiser-container-middle {
    position: absolute;
    top: 33%;
    left: 58.5%;
    transform: translate(-50%, -50%);
    width: 75%;
    height: 60px;
}

canvas.visualiser {
    width: 100%;
    height: 100%;
    display: block;
}

/* Decibel Meter Styles */
.decibel-meter-container {
    position: absolute;
    bottom: 120px;
    left: 50%;
    transform: translateX(-50%);
    width: 85%;
    height: 80px;
    display: block;
    /* Always visible */
}

.decibel-meter {
    width: 100%;
    height: 50px;
    border-radius: 40px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border: 2px solid #333;
}

.decibel-gradient {
    width: 100%;
    height: 100%;
    background: linear-gradient(to right,
            rgb(66, 182, 66) 0%,
            rgb(127, 204, 51) 10%,
            rgb(177, 210, 37) 20%,
            rgb(208, 195, 31) 30%,
            rgb(231, 176, 24) 40%,
            rgb(237, 153, 17) 50%,
            rgb(242, 130, 12) 60%,
            rgb(246, 106, 6) 70%,
            rgb(250, 82, 3) 80%,
            rgb(251, 57, 2) 90%,
            rgb(250, 32, 3) 100%);
}

.decibel-numbers {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    font-weight: bold;
    font-size: 16px;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
    padding: 0 4px;
    box-sizing: border-box;
}

.decibel-indicator {
    position: absolute;
    top: 0;
    height: 100%;
    width: 5px;
    background-color: white;
    transition: left 1s ease-in-out;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
    z-index: 10;
}

.decibel-label {
    text-align: center;
    color: black;
    font-weight: bold;
    font-size: 24px;
    margin-top: 10px;
}

/* Add canvas to audio3 */
#audio3 .visualiser-container {
    position: absolute;
    top: 250px;
    left: 50%;
    transform: translateX(-50%);
    width: 75%;
    height: 60px;
}

.idle-overlay {
    position: fixed;
    top: 0;
    left: 0;
    height: 1024px;
    width: 1366px;
    background-image:
        linear-gradient(to bottom, rgba(255, 255, 255, 0) 20%, rgba(255, 255, 255, 0.8) 50%, white 80%),
        url('/assets/bg.jpg');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: top center;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 1;
    transition: opacity 0.3s ease;
    margin: auto;
}

.idle-overlay.hidden {
    opacity: 0;
    pointer-events: none;
    margin: auto;
}

.idle-logo-container {
    position: absolute;
    top: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: auto;

}

.idle-logo {
    width: 200px;
    padding: 0;
    margin: 0;
}

.idle-content {
    text-align: center;
    max-width: 80%;
}

.idle-title {
    font-size: 4.5rem;
    font-weight: bold;
    margin-bottom: 20px;
    line-height: 1.1;
}

.idle-description {
    font-family: 'Shorai Sans', sans-serif;
    font-size: 1.8rem;
    line-height: 1.4;
    margin-bottom: 40px;
}

.idle-description2 {
    font-family: 'Arial', sans-serif;
    font-size: 1.8rem;
    line-height: 1.4;
    margin-bottom: 40px;
}

.idle-cta {
    color: #eb0000;
    font-size: 2.2rem;
    font-weight: bold;
}

/* Idle Overlay Styles - Keeping your animation elements */
.cursor-animation {
    position: relative;
    width: 100px;
    height: 100px;
    margin-top: 30px;
    margin-left: auto;
    margin-right: auto;
}

.cursor {
    position: absolute;
    width: 40px;
    height: 40px;
    /* background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="2"><path d="M3 3l7.07 16.97 2.51-7.39 7.39-2.51L3 3z"/></svg>'); */
    background-repeat: no-repeat;
    background-size: contain;
    transform-origin: 20% 20%;
    animation: cursorMove 2.5s infinite;
    filter: invert(0);
}

.click-ripple {
    position: absolute;
    width: 0;
    height: 0;
    border-radius: 50%;
    background-color: rgba(235, 0, 0, 0.5);
    /* Red ripple matching Isuzu brand */
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    animation: clickRipple 2.5s infinite;
    opacity: 0;
}

@keyframes cursorMove {

    0%,
    100% {
        left: 75px;
        top: 75px;
        transform: scale(1);
    }

    40% {
        left: 45px;
        top: 45px;
    }

    45% {
        transform: scale(0.75);
        left: 45px;
        top: 45px;
        /* Simulate click press */
    }

    50% {
        transform: scale(1);
        /* Simulate click release */
        left: 45px;
        top: 45px;
    }

    60% {
        left: 45px;
        top: 45px;
    }

    80% {
        left: 75px;
        top: 75px;

    }
}

@keyframes clickRipple {

    0%,
    44%,
    100% {
        width: 0;
        height: 0;
        opacity: 0;
    }

    45% {
        width: 0;
        height: 0;
        opacity: 1;
    }

    47% {
        width: 20px;
        height: 20px;
        opacity: 1;
    }

    55% {
        width: 60px;
        height: 60px;
        opacity: 0;
    }
}