﻿body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    /*background-color: #000;*/
}


* {
    user-select: none;
}







#DominoTable {
    position: relative;
    width: 100vw;
    height: 100vh;

  


    overflow: hidden;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    padding: 0.5vw;
    background: no-repeat url('/images/Background/Domino.jpg');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center center;
}



.domino {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    border: 0.2vmin solid;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center center;
    position: absolute;
    margin: 0;
    padding: 0;
    z-index: 5;
}


.dominoBack {
    background: no-repeat url('../images/Domino/backDomino.png');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center center;
}




/*.domino.selected {
    box-shadow: 0 0 1vmax rgba(255, 255, 255, 0.8), 0 0 2vmax rgba(255, 215, 0, 0.6);
    z-index: 10;*/
   /* z-index: 1000;*/
/*}*/



/*.domino.selected {
    box-shadow: 0 0 1vmax rgba(0, 255, 100, 0.9), 0 0 2vmax rgba(0, 255, 60, 0.8), 0 0 3vmax rgba(0, 255, 40, 0.6);
    z-index: 10;
    transition: box-shadow 0.2s ease;
}*/


/*.domino.selected {
    box-shadow: 0 0 0.5vmax rgba(0, 255, 0, 0.8), 0 0 1.5vmax rgba(50, 255, 50, 0.6);
    z-index: 10;
    transition: box-shadow 0.2s ease;
}*/






@keyframes pulse-green 
{
    0% 
    {
        box-shadow: 0 0 0.5vmax rgba(0, 255, 0, 0.8), 0 0 1.5vmax rgba(50, 255, 50, 0.6);
    }

    50% 
    {
        box-shadow: 0 0 1vmax rgba(0, 255, 0, 1), 0 0 2vmax rgba(100, 255, 100, 0.8);
    }

    100% 
    {
        box-shadow: 0 0 0.5vmax rgba(0, 255, 0, 0.8), 0 0 1.5vmax rgba(50, 255, 50, 0.6);
    }
}

.domino.selected {
    box-shadow: 0 0 0.5vmax rgba(0, 255, 0, 0.8), 0 0 1.5vmax rgba(50, 255, 50, 0.6);
    z-index: 10;
    animation: pulse-green 1.2s infinite ease-in-out;
    transition: box-shadow 0.2s ease;
}



















.domino.inactive {
    position: relative;
    cursor: default !important;
}

    .domino.inactive::after {
        content: "";
        position: absolute;
        inset: 0;
        background: rgba(0, 0, 0, 0.4); /* полупрозрачная тень */
        border-radius: inherit;
        pointer-events: none; /* чтобы клик не блокировался маской */
        transition: opacity 0.3s ease;
    }

    .domino.inactive:hover::after {
        opacity: 0.6; /* чуть темнее при наведении */
    }





.domino-center {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}








 











.domino.vertical {
    width: 2.0vmax;
    height: 4.0vmax;
}

.domino.horizontal {
    width: 4.0vmax;
    height: 2.0vmax;
}



/*🎬 Очень широкие (21:9 и более) — делаем поменьше по высоте */

/* 📱 Узкие 21:9 (телефоны) */
@media (min-aspect-ratio: 21/9) and (max-width: 1000px) 
{
  

    .domino.vertical {
        width: 2.4vmax;
        height: 4.8vmax;
    }

    .domino.horizontal {
        width: 4.8vmax;
        height: 2.4vmax;
    }



}



/* 🖥️ Очень широкие мониторы 21:9 */
@media (min-aspect-ratio: 21/9) and (min-width: 2000px) 
{
   /* .domino.vertical {
        width: 2.0vmax;
        height: 4.0vmax;
    }

    .domino.horizontal {
        width: 4.0vmax;
        height: 2.0vmax;
    }*/


    .domino.vertical {
        width: 1.8vmax;
        height: 3.6vmax;
    }

    .domino.horizontal {
        width: 3.6vmax;
        height: 1.8vmax;
    }





}






@media (max-aspect-ratio: 16/9) {


    /*.domino.vertical {
        width: 2.8vmax;
        height: 5.6vmax;
    }

    .domino.horizontal {
        width: 5.6vmax;
        height: 2.8vmax;
    }*/



    .domino.vertical {
        width: 2.6vmax;
        height: 5.2vmax;
    }

    .domino.horizontal {
        width: 5.2vmax;
        height: 2.6vmax;
    }




}



/*📱 Более квадратные (16:10, 4:3) — делаем чуть крупнее */
@media (max-aspect-ratio: 16/10)
{
    .domino.vertical 
    {
        width: 2.8vmax;
        height: 5.6vmax;
    }

    .domino.horizontal {
        width: 5.6vmax;
        height: 2.8vmax;
    }
}


.SouthWraper .domino {
    pointer-events: auto; /* 👈 а доминошкам вернуть кликабельность */
}





