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


.game-header {
    text-align: center;
    margin-bottom: 10px;
}

.game-header h1 {
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}
.pexeso-logo{
    width: 35%;
    height: auto;
    float: inline-end;
    padding: .5rem;
    border-radius: 10px;
}

.game-stats {
    display: flex;
    gap: 20px;
    font-size: 1.2rem;
    margin-bottom: 20px;
    margin: 10 auto;
    justify-content: center;
}

.stat {
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 5px;
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.game-board {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    max-width: 100%;
    margin-bottom: 30px;
}

.card {
    aspect-ratio: 1;
    /*background: linear-gradient(45deg, #ff6b6b, #feca57);*/
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    transform-style: preserve-3d;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.3);
}

.card.flipped {
    transform: rotateY(180deg);
}

.card.matched img {
    display: none;
}

.card.matched {
    animation: matchSuccess 0.6s ease;
    opacity: 0.9;
    cursor: default;
}

.card.matched::before {
    content: '🙂';
    margin-top: 20% !important;
    z-index: 1000;
    font-size: 5rem !important;
    margin: 0 auto;
    justify-content: center;
    /*transform: rotateY(180deg);*/
    /*color:rgb(0, 255, 34);*/
    /*text-shadow: 3px 3px black;*/
}

#miniaturki img{
    width: 35%;
    max-width: 150px;
    height: auto;
    padding: 5px;
}

.card-front,
.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    backface-visibility: hidden;
    font-size: 3rem;
}

.card-front {
    background: linear-gradient(45deg, #667eea, #4941a0);
    color: white;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.card-front img {
    width: 75%;
    height: 75%;
    object-fit: cover;
}

.card-back {
    background: white;
    color: #333;
    transform: rotateY(180deg);
    font-size: 2rem;
}

.card-back img {
    width: 95%;
    height: 95%;
    object-fit: cover;
    border-radius: 10px;
}

.card {
    min-height: 100px;
    /* Tymczasowo dla testów */
    border: 3px solid rgb(5, 23, 139);
    /* Żeby zobaczyć gdzie są karty */
}

 .smallMargin {
     margin-bottom: 0px !important;
 }

 @media (max-width: 1000px) {
     .smallMargin {
         margin-bottom: 10px !important;
         padding-right: 30px !important;
     }
 }

.controls {
    display: flex;
    gap: 15px;
}

.btn {
    padding: 12px 25px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary {
    background: linear-gradient(45deg, #ff6b6b, #feca57);
    color: white;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.infoMessageStart {
    display: none;
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 10px;
    background-color: #feca57;
}


.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: 1000;
}

.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;
}

@keyframes matchSuccess {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

@media (max-width: 775px) {
    .card.matched::before {
        z-index: 1000;
        font-size: 3rem !important;
        margin: 0 auto;
        margin-top: 10% !important;
        justify-content: center;
    }
}
@media (max-width: 1230px) {
    #miniaturki{
        display: none;
    }
}

@media (max-width: 995px) {
    
    .infoMessageStart {
        max-width: 100%;
    }

    .smallFlex {
        margin: 0 auto;
        justify-content: center;
    }

    .game-board {
        margin: 0 auto;
        justify-content: center;
    }

    .game-stats {
        display: flex;

        margin: 10 auto;
        justify-content: center;
    }
}

@media (max-width: 795px) {
    .game-board {
        grid-template-columns: repeat(3, 1fr);
        max-width: 350px;
    }

    .game-header h1 {
        font-size: 2rem;
    }

    .game-stats {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }
}

/* HTML: <div class="loader"></div> */
.loader {
  width: 320px;
  height: 22px;
  border-radius: 20px;
  color: #514b82;
  border: 2px solid;
  position: relative;
}
.loader::before {
  content: "";
  position: absolute;
  margin: 2px;
  inset: 0 100% 0 0;
  border-radius: inherit;
  background: currentColor;
  animation: l6 1s infinite;
}
@keyframes l6 {
    100% {inset:0}
}