/* train css */
:root {
    --scale-factor: 1;
    --base-size: 1.3rem;
}

h1 {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
}

.thumbnailMaps{
    max-height: 100px;
    cursor: pointer;
}

.tra {
    background-size: cover;
    outline: 2px solid rgb(3, 149, 13);
}

p, li{
    font-size: 1.12rem;
}

.tablicaInformacyjnaTop{
    background-color: #60a020;
    margin:auto;
}

.tablicaNaglowek{
    position: relative;
    min-height: 25px;
}

.turbulence{
    position: absolute;
}

 .smallMargin {
     margin-bottom: 0px !important;
 }

/* obrazek w texti*/
.train-logo{
    width: 40%;
    height: auto;
    float: inline-end;
    padding: .5rem;
}

.hiddenBoat{
    visibility: hidden;
}

 @media (max-width: 1000px) {
     .smallMargin {
         margin-bottom: 10px !important;
         padding-right: 30px !important;
     }
      h1 {
        font-size: 1rem;
      }
 }

@media (max-width: 795px) {
  h1 {
    font-size: 1rem;
  }
  .btn-lg{
    font-size: calc(var(--base-size) * var(--scale-factor));
  }
  .train-logo{
    width: 100%;
    float: none;
    }
}

#dodajLitere{
    cursor: pointer;
    color: #00ffe5;
}

.smileColor{
    color: rgb(255, 238, 0);
}


/*
.tree {
    background-image: url('https://projektika.org/gamesImg/trainbackgroundscale.webp');
    //background-size: cover;
    z-index: 1000000;
} */

canvas {
    /*border: 10px solid #ffffff;*/
    background: transparent;
    /* jasne, że przezroczyste */
    /*position: absolute;*/
    /* canvas na wierzchu */
    image-rendering: -moz-crisp-edges;
    image-rendering: pixelated;
    border:none;
    image-rendering: crisp-edges;   /* Firefox */
    image-rendering: -webkit-optimize-contrast; /* Older WebKit */
        transform: translateZ(0);
    backface-visibility: hidden;

}

#myCanvas{
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    image-rendering: -moz-crisp-edges;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    border:none;
}

#overlay-canvas {
    position: absolute;
    top:0;
    left:0;
    z-index: 5;
    pointer-events: none; 
    image-rendering: -moz-crisp-edges;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    pointer-events: none;
    border:none;
    filter: drop-shadow(0 -5px 5px rgba(0, 0, 0, 0.1));
}

#cloud-canvas {
    top: 0;
    left: 0;
    position: absolute;     
    z-index: 20;
    pointer-events: none;
    image-rendering: -moz-crisp-edges;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

#river-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

#game-container {
    position: relative;
    width: 100%;
    margin: 0 auto;
}

#target {
    font-size: 20px;
    margin-top: 0px;
}

.trasaRzeka {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.fireworks-text{
    position: absolute; 
    top: 50%; left: 50%; 
    transform: translate(-50%, -50%); 
    color: white; 
    text-align: center; 
    width:90%;
    text-shadow: 2px 2px 4px rgba(0, 0, 0.3);
    opacity: 0.9;
    z-index: 50;
    visibility:hidden;
    opacity: 0;
    transition: opacity 2s ease-in;
    --base-size: 1.4rem;
    font-size: calc(var(--base-size) * var(--scale-factor));
}

#literki{
    font-weight: bold;
    letter-spacing: calc(5px * var(--scale-factor));
    --base-size: 1.4rem;
    font-size: calc(var(--base-size) * var(--scale-factor));
}

/* blokowe literki na koncu */
.letter-tile {
  display: inline-block;
  padding: 2px 4px;
  margin: 3px;
  border: 1px solid #333;
  border-radius: 6px;
  font-weight: bold;
  /*font-size: 18px;*/
  cursor: pointer;
  user-select: none;
  background: #3d3d3d;
  color: white;
}



/* zebrane literki */
.literkiPojemnik{
    position:absolute;
    bottom: 0.5%;
    left: 1%; 
    z-index: 1000;
    
    filter: drop-shadow(0 -5px 10px rgba(0, 0, 0, 0.6));
}

.literkiPojemnik .literki-display-line {
    display: flex;
    justify-content: center;
    margin: calc(10px * var(--scale-factor)) 0;
    gap: calc(8px * var(--scale-factor));
    padding-left: calc(5px * var(--scale-factor));
    padding-right: calc(5px * var(--scale-factor));
}

.literkiPojemnik .literki-flip-char {
    width: calc(25px * var(--scale-factor));
    height: calc(35px * var(--scale-factor));
    background: #024301;
    border: calc(2px * var(--scale-factor)) solid #444;
    border-radius: calc(4px * var(--scale-factor));
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgb(255, 255, 255);
    font-size: calc(25px * var(--scale-factor));
    font-weight: bold;
    animation-name: slider;
    animation-duration: 1s;
}

@keyframes slider {
  0%   {color: black;}
  100% {color: white;}
}


.literki-flip-char{
    transform: scaleY(1);
}

.fireworks-text.visible {
    visibility: visible;
    opacity: 1;
    transition: opacity 2s ease-out;
}

/******** tablica odjazdow ***********/
.board-wrapper {
    perspective: 500px;
    transform-origin: top center;
    position: absolute;
     filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.4));
}

.railway-board-scalable {
    transform: rotateX(-22deg);
    transform-origin: top center;
    background-color: rgba(255, 255, 255, 0.356);
    /*box-shadow: 0 0 calc(15px * var(--scale-factor)) rgba(0, 0, 0, 0.5);*/
    position: relative;
    z-index: 5;
    /*display: none;*/
    font-size: calc(var(--base-size) * var(--scale-factor));
    margin:auto;
    padding:1px;
    /*min-height: calc(60px * var(--scale-factor));*/
}

.railway-board-scalable .display-line {
    display: flex;
    justify-content: center;
    margin: calc(8px * var(--scale-factor)) 0;
    gap: calc(4px * var(--scale-factor));
}

.railway-board-scalable .flip-char {
    width: calc(25px * var(--scale-factor));
    height: calc(35px * var(--scale-factor));
    background: #000;
    border: calc(2px * var(--scale-factor)) solid #444;
    border-radius: calc(4px * var(--scale-factor));
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.railway-board-scalable .char-content {
    font-size: calc(20px * var(--scale-factor));
    font-weight: bold;
    color: #00ffe5;
    transition: all 0.1s ease;
}

.char-content.flipping {
    transform: scaleY(0);
}

/**** settings ****/
.game-over {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.game-over-content {
    background: white;
    color: #333;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.game-over h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #667eea;
}

/* zgadywanka */

        .inputs-container {
            display: flex;
            justify-content: center;
            gap: 8px;
            margin: 10px 0;
            flex-wrap: wrap;
        }

        .letter-input {
            width: 43px;
            height: 43px;
            text-align: center;
            font-size: 23px;
            font-weight: bold;
            border: 2px solid #ddd;
            border-radius: 5px;
            background: rgb(193, 193, 193);
        }

        .letter-input:focus {
            outline: none;
            border-color: #007bff;
        }

        .letter-input:disabled {
            background: #e9ecef;
            color: #3a3a3a;
        }

        .letter-input.correct {
            background: #d4edda;
            border-color: #28a745;
        }
        .letter-input.success {
            background: #40e118;
            border-color: #1f8136;
        }

@media (max-width: 800px) {
    .inputs-container {
            gap: 4px;
            margin: 5px 0;
    }    
    .letter-input {
            width: 25px;
            height: 25px;
            text-align: center;
            font-size: 13px;
        }
        .letter-tile{
            font-size: 15px;
            margin: 6px;
        }

}


/* HTML: <div class="loader"></div> */
/* river clipath 
        .river {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            clip-path: polygon(17.92% 38.00%, 17.25% 40.00%, 16.17% 42.00%, 15.58% 44.25%, 14.17% 57.13%, 
            13.25% 61.12%, 12.58% 62.25%, 12.17% 63.50%, 10.67% 65.50%, 8.92% 67.00%, 5.42% 67.88%, 4.67% 67.63%, 
            0.00% 67.88%, 0.00% 69.38%, 0.42% 69.50%, 0.33% 70.00%, 0.00% 70.13%, 0.00% 72.00%, 0.17% 72.00%, 
            0.00% 72.38%, 0.17% 72.50%, 0.00% 72.75%, 0.00% 74.37%, 0.33% 74.63%, 0.33% 75.00%, 0.00% 75.13%, 
            6.50% 75.50%, 7.58% 75.00%, 9.00% 74.87%, 9.83% 74.50%, 13.58% 71.13%, 15.17% 68.88%, 17.25% 64.50%, 
            18.08% 61.87%, 19.42% 54.50%, 19.83% 46.38%, 20.75% 42.88%, 21.33% 42.00%, 22.17% 41.50%, 25.58% 41.25%, 
            26.92% 42.25%, 27.75% 43.50%, 28.42% 48.50%, 29.17% 50.38%, 30.17% 54.50%, 33.08% 59.50%, 34.83% 61.00%, 
            36.42% 61.50%, 37.75% 62.50%, 40.83% 62.50%, 44.67% 61.38%, 47.25% 61.00%, 48.08% 60.63%, 49.08% 59.50%, 
            49.67% 59.25%, 52.33% 59.25%, 54.58% 60.25%, 55.92% 61.63%, 56.42% 62.75%, 56.58% 68.50%, 56.42% 72.75%, 
            56.00% 75.63%, 55.83% 79.25%, 55.83% 80.62%, 56.17% 82.00%, 56.17% 83.75%, 56.42% 83.88%, 57.00% 87.75%, 
            57.83% 90.88%, 58.83% 92.63%, 60.08% 95.63%, 61.25% 96.00%, 63.17% 97.63%, 63.50% 97.63%, 63.67% 98.00%, 
            64.83% 98.25%, 64.92% 99.38%, 65.33% 99.38%, 65.33% 99.87%, 80.00% 99.87%, 78.42% 99.75%, 78.33% 99.38%, 
            76.50% 99.25%, 76.50% 98.00%, 77.25% 98.00%, 78.08% 97.25%, 77.33% 97.75%, 75.25% 98.00%, 71.33% 97.88%, 
            71.00% 98.25%, 69.58% 98.13%, 69.58% 97.63%, 68.50% 96.63%, 67.58% 95.00%, 66.58% 94.25%, 66.33% 93.75%, 
            66.00% 93.62%, 65.92% 93.00%, 64.75% 92.25%, 62.50% 89.63%, 62.00% 88.50%, 61.67% 86.38%, 61.00% 84.63%, 
            60.75% 82.25%, 60.42% 81.12%, 60.42% 76.50%, 61.50% 68.12%, 61.33% 64.25%, 60.42% 60.12%, 59.58% 58.38%, 
            57.92% 55.88%, 55.67% 54.00%, 54.33% 53.25%, 51.33% 52.63%, 47.83% 53.50%, 45.50% 55.00%, 41.17% 56.25%, 
            38.92% 56.38%, 36.67% 55.75%, 35.00% 54.50%, 34.08% 53.00%, 33.67% 51.50%, 32.83% 44.25%, 32.33% 42.50%, 
            32.25% 41.38%, 30.33% 37.25%, 29.17% 35.87%, 27.75% 34.87%, 25.92% 34.13%, 23.58% 33.75%, 22.17% 33.88%, 
            20.25% 35.13%, 17.92% 38.00%);
            
        }

        .river::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-size: 10px 10px;
            background: 
                linear-gradient(100deg, 
                    transparent 0%, 
                    rgba(255,255,255,0.1) 0%, 
                    rgba(255,255,255,0.3) 20%, 
                    rgba(255,255,255,0.1) 0%, 
                    transparent 0%
                );
            animation: flow 20s linear infinite;
            filter:blur(30px);
        }

        @keyframes flow {
            0% {
                transform: translateX(-20%);
            }
            50% {
                transform: translateX(70%);
            }
            100% {
                transform: translateX(150%);
            }
        }

        */