/* font-face import */
@font-face {
    font-family: 'VT320';
    src: url('public/fonts/vt320-firmware-V1.2-normal-1x3.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

:root {
    --text-color: rgba(208, 193, 174, 0.66);
    --text-color-darker: rgba(157, 132, 101, 0.7);
    --text-shadow: #e88731ed 0 0 30px, rgba(208, 193, 174, 0.5) 0 0 5px;
    --border-color: rgba(208, 193, 174, 0.46);
}

/* background defaults to transparent b/c mystery box randomly flashes on screen in 
random positions, this appears to patch the bug for now */
* { margin: 0; padding: 0; background-color: rgba( 0, 0, 0, 0 ); }
html, body {
    font-family: 'VT320', monospace;
}
.content {
    width: 100%;
    height: 100%;
    border-top: none !important;

    @media (max-width: 800px) {
        height: calc(100vh - 100px);
    }
}
.background {
    /* Permalink - use to edit and share this gradient: http://colorzilla.com/gradient-editor/#754d1a+0,442e19+100 */
    background: rgb(0, 0, 0); /* Old browsers */
    background: radial-gradient(
        ellipse at center,
        color(display-p3 0.459 0.302 0.102) 0%,
        color(display-p3 0.267 0.18 0.098) 100%
        );


    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#754d1a', endColorstr='#442e19',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */

    background-size: 100vw 100vh;
    background-position: 0px 0px;
    background-attachment: fixed;
}
.border {
    border: 3px solid var(--border-color);
}
.border-top {
    border-top: 3px solid var(--border-color);
}
.pattern {
    position: absolute;
    width: 100vw;
    height: 100vh;
    top: 0;
    left: 0;
    opacity: 0.03;
    background-image: url("public/img/bkrnd_pattern2.png");
    pointer-events: none;
}
.shift {
    position: absolute;
    width: 100vw;
    height: 100vh;
    top: 0;
    left: 0;
    background-image: url( "public/img/shift2.png" );
    background-repeat: repeat-x;
    background-position: 0 50%;
    background-size: 10px 600px;
    animation: shiftAnim;
    animation-duration: 6s;
    animation-iteration-count: infinite;
    animation-timing-function: linear;
}
@keyframes shiftAnim {
    0% {    background-position: 0 -600px; }
    64% {   background-position: 0 -600px; }
    100% {  background-position: 0 100vh; }
}
/* aperature science logo */
.logo {
    position: absolute;
    right: 80px;
    top: 40px;
    width: 146px;
    height: 146px;
    mix-blend-mode: color-dodge;
}
.logo img {
    width: 80%;
    height: 80%;
    margin: 10%;
    opacity: 0.8;
}
/* bars design */
.bars {
    position: absolute;
    width: 281px;
    height: 146px;
    top: 40px;
    right: 330px;
    mix-blend-mode: color-dodge;
    
    /* Hide bars on smaller screens */
    @media (max-width: 1180px) {
        display: none;
    }
}
/* number design */
.nums {
    position: absolute;
    width: 68px;
    height: 141px;
    top: 40px;
    right: 244px;
    padding-top: 5px;
    color: var(--text-color);
    text-shadow: var(--text-shadow);
    mix-blend-mode: color-dodge;
    font-size: 2rem;
    line-height: 30px;
    text-align: center;
    
    /* Hide bars on smaller screens */
    @media (max-width: 900px) {
        display: none;
    }
}
.bars1 {
    width: 45%;
    height: 100%;
    opacity: 0.3;
    float: left;
    margin-left: 3%;
    background: url( "public/img/bars.png" );
    background-size: 50% 150%;
    animation: barsAnim;
    animation-duration: 2500ms;
    animation-iteration-count: infinite;
    animation-timing-function: linear;
    animation-direction: reverse;
}
.bars2 {
    display: inline-block;
    width: 45%;
    height: 100%;
    opacity: 0.3;
    margin-left: 5%;
    background: url( "public/img/bars.png" );
    background-size: 50% 150%;
    animation: barsAnim;
    animation-duration: 2500ms;
    animation-iteration-count: infinite;
    animation-timing-function: linear;
}
@keyframes barsAnim {
    from { background-position: 0% 0%; }
    to { background-position: 0% 300%; }
}
.b1, .b2, .b3, .b4 {
    position: absolute;
    top: 50px;
    height: 3px;
    mix-blend-mode: hard-light;
}
.b1 {
    left: 53px;
    width: calc( 100% - 670px );
    
    /* extend when on smaller than 1180px */
    @media (max-width: 1180px) {
        width: calc( 100% - 383px );
    }
}
.b2 {
    right: 318px;
    width: 12px;
    
    /* extend when on smaller than 1180px */
    @media (max-width: 900px) {
        right: 244px;
        width: 86px;
    }
}
.b3 {
    right: 232px;
    width: 12px;
}
.b4 {
    right: 47px;
    width: 33px;
}
.lyrics {
    padding: 5vw 0 0 5vw;
    width: 50%;
    height: calc( 100% - 10vw );
    color: var(--text-color);
    text-shadow: var(--text-shadow);
    font-size: 1.5rem;
    float: left;

    /* mobile layout */
    @media (max-width: 800px) {
        margin-top: 4em;
        width: 100%;
        height: 50vh;
        font-size: 2rem;
    }
}
.printChar {
    animation: animAppear;
    animation-duration: 100ms;
    animation-iteration-count: 1;
    animation-play-state: paused;
}
@keyframes animAppear {
    0% { opacity: 0.4; }
    100% { opacity: 1; }
}
.cursor {
    animation: animBlink;
    animation-duration: 1000ms;
    animation-iteration-count: infinite;
    opacity: 0;
    display: inline-block;
}
@keyframes animBlink {
    0% { opacity: 0; }
    27% { opacity: 1; }
    54% { opacity: 1; }
    81% { opacity: 0; }
}
.break {
    display: block;
    content: "";
    height: 30px;
}
.credits-wrap {
    position: absolute;
    right: 90px;
    bottom: 90px;
    width: 40%;
    height: calc(100% - 280px);
    overflow: hidden;

    /* mobile layout */
    @media (max-width: 800px) {
        right: 70px;
        bottom: 60px;
        width: 100%;
        padding-top: 0;
        height: 40vh;
    }

    .credits {
        position: absolute;
        display: table-cell;
        width: 100%;
        bottom: 0;
        right: 0;
        text-align: right;
        vertical-align: bottom;
        font-size: 1.6rem;
        color: var(--text-color-darker);
    }
}
/* canvas screen scan animation */
#crt {
    position: absolute;
    top: 0;
    left: 0;
    mix-blend-mode: color-dodge;
    pointer-events: none;
    display: none; /* Temp disabled for perf reasons */
}
/* overlay */
#overlay {
    height: calc( 100vh - 100px );
    width: calc( 100vw - 100px );
    padding: 50px;
    overflow: hidden;
    box-shadow: inset 0 0 50vh black;
    mix-blend-mode: color-dodge;
}
/* Conteneur des boutons de langue */
#button-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

.overlay .overlay-button {
    padding: 1rem 2rem;
    background-color: orange;
    border: 2px solid darkorange;
    color: white;
    pointer-events: none; /* Désactivé tant que la musique n'est pas chargée */
    font-weight: bold;
    font-family: 'VT320', monospace;
    font-size: 1.5rem;
    text-align: center;
    width: 200px; /* Force la même largeur pour les deux boutons */
    cursor: default;
}

.overlay .overlay-button:hover {
    background-color: darkorange;
}

.overlay.ready .overlay-button {
    pointer-events: auto;
    cursor: pointer;
}

.overlay.play #button-container {
    display: none;
}
