:root {
    --header-height: 76px;
    /* CSS HEX */
    --gold-metallic: #e0ba6aff;
    --raisin-black: #1d1d22ff;
    --woodsmoke: #121213;
    --giants-orange: #ff521bff;
    --azure-web: #FCFFFC;
    --persian-green: #1b998bff;
}

/* Webkit Browser Scrollbar (Chrome, Safari, Opera, Edge) */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--woodsmoke);
    border: 1px solid var(--raisin-black);
}

::-webkit-scrollbar-thumb {
    background: var(--gold-metallic);
    border: 2px solid var(--woodsmoke);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--persian-green);
}

/* Firefox Scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--gold-metallic) var(--woodsmoke);
}

.offcanvas,
.offcanvas-xxl,
.offcanvas-xl,
.offcanvas-lg,
.offcanvas-md,
.offcanvas-sm {
    --bs-offcanvas-width: 75vw;
}

/* eagle-lake-regular - latin */
@font-face {
    font-display: swap;
    /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Eagle Lake';
    font-style: normal;
    font-weight: 400;
    src: url('../asset/fonts/eagle-lake-v24-latin-regular.woff2') format('woff2');
    /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

*,
*:before,
*:after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Eagle Lake';
    background-image: url('../asset/img/4_Main_location/Background/golden_pattern.jpg');
    background-repeat: repeat;
    background-size: 400px;
    backdrop-filter: blur(2px);
    color: aliceblue;
    height: 100%;
}

.body-height {
    height: 100vh !important;
}

.navbar {
    z-index: 999;
}

.navbar-brand img {
    width: 50px;
    height: 50px;
}

.navcolor {
    background-color: var(--woodsmoke);
}

.nav-link {
    color: var(--giants-orange);
}

.nav-link:hover {
    color: var(--persian-green);
}

.nav-link:focus {
    color: var(--persian-green);
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='gold' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar-toggler {
  border: 2px solid var(--gold-metallic);
}

.offcanvas {
    opacity: 1;
    background-color: rgba(15, 23, 42, .5);
    backdrop-filter: blur(8px);
}

h1 {
    font-size: 48px;
}

header {
    height: var(--header-height)
}

main {
    height: calc(100% - var(--header-height));
    position: relative;
}

.game-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

#start-screen,
#lost-screen,
#won-screen {
    z-index: 999;
}

#start-screen img,
#lost-screen img,
#won-screen img {
    width: 100%;
    height: 100%;
    border-radius: 15px;
}

#start-screen,
#game-screen,
#lost-screen,
#loading-screen,
#won-screen {
    width: 1200px;
    height: 675px;
    position: absolute;
    top: 49.5%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: black;
    border: 8px groove rgb(223, 187, 107);
    border-radius: 15px;
    display: flex;
    justify-content: center;
}

#loading-screen {
    background-color: rgba(0, 0, 0, 1);
    align-items: center;
    border-radius: 15px;
    z-index: 1000;
}

.loading-content {
    text-align: center;
    color: #fff;
    font-family: 'Eagle Lake', cursive;
}

.loading-content h2 {
    margin-bottom: 20px;
    font-size: 36px;
}

.loading-bar {
    width: 300px;
    height: 20px;
    background-color: #333;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid #666;
}

.loading-progress {
    width: 0%;
    height: 100%;
    background: linear-gradient(45deg, #ff521bff, #e0ba6aff);
    border-radius: 8px;
    transition: width 3s ease-in-out;
}

#loading-screen.loading .loading-progress {
    width: 100%;
}

.btn-home {
    background-color: var(--gold-metallic);
    color: var(--raisin-black);
}

.btn-start {
    background-color: var(--giants-orange);
    color: white;
}

.btn-home:hover,
.btn-start:hover {
    background-color: var(--persian-green);
    color: white;
}

.btn-home:active,
.btn-start:active {
    background-color: var(--persian-green) !important;
    color: white;
    border: 2px dotted var(--woodsmoke) !important;
}

.fullCanvas {
    border-radius: 0;
    border: none !important;
}

.fullscreen {
    width: 100vw;
    height: 100vh;
}

.d-none {
    display: none;
}

.inner-div {
    position: absolute;
    top: 10%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    backdrop-filter: brightness(75%);
    padding: 10px 5px;
    border-radius: 10px;
    min-width: 500px;
}

.inner-div h1,
.inner-div h2 {
    color: var(--persian-green);
    text-shadow: 2px 2px 1px #1d1d22;
}

/* Old Paper */

/* WARNING ! This solution seems to not work on all navigators.
This problem was reported to me on :
https://stackoverflow.com/questions/14585101/old-paper-background-texture-with-just-css/

August 2021 : ok on Chrome v92+, Firefox v90+, Edge v92+
*/

.ph-terms {
    height: 2900px !important;
}

.ph-imprint {
    height: 1000px !important;
}

#parchment {
    position: absolute;
    display: flex;
    width: 75%;
    height: 1750px;
    /* center page with absolute position */
    top: 0%;
    left: 50%;
    transform: translate(-50%, 0);
    margin: 2em 0;
    padding: 4em;
    box-shadow: 2px 3px 20px black, 0 0 125px #8f5922 inset;
    background: #fffef0;
    /* v2.1 : borders effect with SVG : try to play with scale to change them */
    filter: url(#wavy2);
    /* v2.2 : Noise added for a vellum paper effect */
    background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAMAAAAp4XiDAAAAUVBMVEWFhYWDg4N3d3dtbW17e3t1dXWBgYGHh4d5eXlzc3OLi4ubm5uVlZWPj4+NjY19fX2JiYl/f39ra2uRkZGZmZlpaWmXl5dvb29xcXGTk5NnZ2c8TV1mAAAAG3RSTlNAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAvEOwtAAAFVklEQVR4XpWWB67c2BUFb3g557T/hRo9/WUMZHlgr4Bg8Z4qQgQJlHI4A8SzFVrapvmTF9O7dmYRFZ60YiBhJRCgh1FYhiLAmdvX0CzTOpNE77ME0Zty/nWWzchDtiqrmQDeuv3powQ5ta2eN0FY0InkqDD73lT9c9lEzwUNqgFHs9VQce3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Sp1Y9p+tktDYYSNflcxI0iyO4TPBdlRcpeqjK/piF5bklq77VSEaA+z8qmJTFzIWiitbnzR794USKBUaT0NTEsVjZqLaFVqJoPN9ODG70IPbfBHKK+/q/AWR0tJzYHRULOa4MP+W/HfGadZUbfw177G7j/OGbIs8TahLyynl4X4RinF793Oz+BU0saXtUHrVBFT/DnA3ctNPoGbs4hRIjTok8i+algT1lTHi4SxFvONKNrgQFAq2/gFnWMXgwffgYMJpiKYkmW3tTg3ZQ9Jq+f8XN+A5eeUKHWvJWJ2sgJ1Sop+wwhqFVijqWaJhwtD8MNlSBeWNNWTa5Z5kPZw5+LbVT99wqTdx29lMUH4OIG/D86ruKEauBjvH5xy6um/Sfj7ei6UUVk4AIl3MyD4MSSTOFgSwsH/QJWaQ5as7ZcmgBZkzjjU1UrQ74ci1gWBCSGHtuV1H2mhSnO3Wp/3fEV5a+4wz//6qy8JxjZsmxxy5+4w9CDNJY09T072iKG0EnOS0arEYgXqYnXcYHwjTtUNAcMelOd4xpkoqiTYICWFq0JSiPfPDQdnt+4/wuqcXY47QILbgAAAABJRU5ErkJggg==);
}

/* v2.3 : folds added , remove this part if you don't want them
   I'll try to make it look like crumpled paper if I have time. */
#parchment:after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: conic-gradient(#fff3, #fff0 2% 24%, #fff2 25%, #4321 0, #0000 27% 48%, #9632 50%, #fff2 0, #fff0 52% 73%, #9632 75%, #fff3 0, #fff0 78% 97%, #9632);
}

.offcanvas-body p {
    font-size: 1.2em;
    color: #7F3300;
    margin-top: .35em;
    text-align: justify;
}

.controls {
    display: flex;
    justify-content: center;
    gap: 1em;
}

.el-left,
.el-right {
    flex: 1;
}

#explanation p::first-letter {
    float: left;
    font: 1.7em/1em Morris;
    /* a little relief for the first letter*/
    text-shadow: 1px 1px 1px black;
    margin: 0 .5rem;
}

#contain {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 75%;
    height: auto;
    margin: 0 auto;
    padding: 4em;
}

.inkTitle {
    font-size: 3em;
    text-align: center;
    line-height: 3em;
    color: DimGray;
}

#labarum {
    width: 20%;
    margin-left: calc((100% - 20%) / 2);
    height: auto;
}

.cachet {
    /* image width = 210px and height = 250px */
    /*  5 is one common denominator 210 = 5 * 42 */
    width: calc((100vw * 5) / 42);
    height: auto;
    /* Height is auto ajusted */
    margin-top: 4rem;
    margin-left: auto;
}

#labarum img,
.cachet img {
    object-fit: cover;
    width: 100%;
    height: 100%;
}

#signature {
    text-align: right;
    color: black;
    font-size: 1.2em;
}

#description {
    color: DimGray;
    line-height: 1.2em;
}

#sperator {
    margin-bottom: 1em;
    margin-top: 1em;
}


/* Imprint page styles */
.container {
    max-width: 1200px;
    margin: 0 auto;
}

.content h2 {
    color: var(--persian-green);
    font-size: 1.5em;
    margin-bottom: 1rem;
    margin-top: 2rem;
}

.content h3 {
    color: var(--giants-orange);
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    font-size: 1.2em;
}

.content p {
    color: var(--raisin-black);
    font-size: 1.2em;
    line-height: 1.6;
}

.content a {
    color: var(--giants-orange);
    text-decoration: none;
    transition: color 0.3s ease;
}

.content a:hover {
    color: var(--persian-green);
}

/* Privacy Policy styles */
.content .index {
    list-style: none;
    padding-left: 0;
}

.content .index-link {
    color: var(--giants-orange);
    text-decoration: none;
}

.content .index-link:hover {
    color: var(--persian-green);
}

.content ul:not(.index) {
    color: var(--raisin-black);
    margin-left: 1.5rem;
}

.content strong {
    color: var(--persian-green);
}

.content .seal {
    margin-top: 2rem;
    text-align: center;
}

.content .seal a {
    color: var(--persian-green);
    font-size: 0.9em;
    text-decoration: none;
}

.content .seal a:hover {
    color: var(--giants-orange);
}

#parchment .content {
    color: var(--raisin-black);
    font-size: 1.1em;
    line-height: 1.6;
}

.overflow-initial {
    overflow: initial;
}

.overflow-hidden {
    overflow: hidden;
}

#rotate-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.9);
    color: white;
    display: none;
    align-items: center;
    justify-content: center;
    text-align: center;
    z-index: 9999;
    font-size: 2rem;
    padding: 1rem;
}

#rotate-overlay .rotate-message {
    max-width: 90%;
}

#touch-controls {
    position: fixed;
    bottom: 10%;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 10px;
    z-index: 10000;
}

.touch-btn {
    width: 80px;
    height: 80px;
    padding: 10px;
    border-radius: 50%;
    pointer-events: auto;
    background-color: var(--gold-metallic);
    color: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    outline: none;
}

.touch-btn:active {
    transform: scale(0.95);
    background-color: var(--persian-green);
}

/* ===== Default Styles ===== */
canvas {
    background-color: black;
    border-radius: 12px;
    width: 100%;
    height: 100%;
    display: block;
}

/* ===== Smartphones (bis 600px breit) und Tablets (601px – 900px) Hochformat ===== */
@media only screen and (max-width: 1024px) and (orientation: portrait) {
    canvas {
        display: none;
    }

    #rotate-overlay {
        display: flex;
    }

    #start-screen,
    #game-screen,
    #lost-screen,
    #loading-screen
    #won-screen {
        display: none;
        
    }
}

/* ===== Smartphones Querformat (bis 900px breit, max 480px hoch) ===== */
@media only screen and (max-width: 900px) and (max-height: 480px) and (orientation: landscape) {
    canvas {
        width: 100vw !important;
        height: 100vh !important;
    }

    .game-container {
        display: block !important;
    }

    #start-screen,
    #game-screen,
    #lost-screen,
    #loading-screen,
    #won-screen {
        width: 100vw;
        height: 100vh;
        transform: none;
        top: 0;
        left: 0;
        margin: 0 auto !important;
    }

    #game-screen {
        border: none
    }

     #touch-controls {
        display: flex;
        bottom: 5%;
    }

    #btn-instruction-1,
    #btn-instruction-2,
    #btn-instruction-3,
    #btn-control-1,
    #btn-control-2,
    #btn-control-3 {
        display: none;
    }

    .container {
        margin-top: 5px !important;
    }

    .content h2 {
        font-size: 1em;
    }

    .content p {
        font-size: 0.8em;
    }

    .inkTitle,
    .cachet,
    #labarum {
        display: none;
    }

    .touch-btn {
        width: 60px;
        height: 60px;
        font-size: 20px;
    }

    h1 {
        font-size: 35px;
    }

    h2 {
        font-size: 30px;
    }

    .btn-group-lg>.btn, .btn-lg {
        --bs-btn-font-size: 0.75rem;
    }

    header {
        height: 30px;
    }

    .navbar-brand img {
        width: 30px;
        height: 30px;
    }

    .navbar-toggler-icon {
        width: 0.75em;
        height: 0.75em;
    }

    .inner-div {
        gap: 10px;
    }
}

/* ===== Kleine Laptops (901px – 1200px) ===== */
@media only screen and (min-width: 901px) and (max-width: 1200px) {
    canvas {
        width: 100%;
        height: calc(90vh - var(--header-height));
        margin: 0 auto;
    }

    #start-screen,
    #game-screen,
    #lost-screen,
    #loading-screen,
    #won-screen {
        width: 98%;
        height: calc(88vh - var(--header-height));
        margin: 0 auto;
    }

    #touch-controls {
        display: none;
    }
}

/* ===== Tablets Querformat (min 768px breit, max 1194px breit) ===== */
@media only screen and (min-width: 768px) and (max-width: 1200px) and (orientation: landscape) {
    canvas {
        width: 100vw !important;
        height: 100vh !important;
        margin: 0 auto;
        border: none;
    }

    .game-container {
        display: flex;
        justify-content: center;
        align-items: center;
    }

    #start-screen,
    #game-screen,
    #lost-screen,
    #loading-screen,
    #won-screen {
        width: 100vw !important;
        height: 100vh !important;
        margin: 40px auto;
    }

    #game-screen {
        border: none
    }

    #touch-controls {
        display: flex;
        position: absolute;
        bottom: 5%;
        gap: 15px;
    }

    .touch-btn {
        width: 70px;
        height: 70px;
        font-size: 28px;
    }

    #btn-instruction-1,
    #btn-instruction-2,
    #btn-instruction-3,
    #btn-control-1,
    #btn-control-2,
    #btn-control-3 {
        display: none;
    }

    .inkTitle {
        font-size: 2em;
    }
}

/* ===== Desktops (1201px – 1800px) ===== */
@media only screen and (min-width: 1201px) and (max-width: 1800px) {
    canvas {
        width: 100%;
        height: calc(87.2vh - var(--header-height));
        margin: 0 auto;
    }

    #start-screen,
    #game-screen,
    #lost-screen,
    #loading-screen,
    #won-screen {
        width: 80%;
        height: calc(90vh - var(--header-height));
        margin: 0 auto;
    }

    #touch-controls {
        display: none;
    }
}
