* {padding: 0; margin: 0; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;}

body {
    background-color: #e6f2ff;
}
header {
    text-align: center;
    margin: 40px;
}

main {
    margin: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}
#canvibr {
    font-size: larger;
    opacity: 0;
}

#plane {
    padding: 5px;
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    grid-template-rows: repeat(10, 1fr);
    gap: 2px;

    background-color: #cccccc;

    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);

    height: auto;
    width: 66%;
    max-width: 600px;
    aspect-ratio: 1 / 1;
}

.mine, .open {
    z-index: 1;
    border-radius: 10%;
    background-color: #fbfbfb;

    min-width: 0; 
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible; /* или оставить по умолчанию */
    transition: transform 0.2s ease;
}
.open {
    background-color: #cccccc00;
}
.mine:hover {
    z-index: 2;
    background-color: #615353;
    transform: scale(1.2);
    cursor: pointer;
}
.open:hover {
    transform: rotate(7deg) scale(1.1);
}

.mine img, .open img {
    opacity: 0;
    width: 100%;
    height: 100%;
}

/* right panel */
#stats {
    width: 33%;
    max-width: 300px;
    height: auto;
    padding: 5px;

    background-color: #ffffff;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    border-radius: 10px;

    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}
.stat {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#stats h1 {
    font-size: clamp(0px, 7vw, 70px);
}
#stats h3 {
    opacity: 0.9;
    font-size: clamp(0px, 6vw, 35px);
}
#timer {
    color: #24188be2;
}
#mines {
    color: #e22525;
}

#sellist {
    display: flex;
    justify-content: center;
    gap: 12px;

    max-width: 128px;
    padding: 10px;
}
#sellist img {
    opacity: 0.5;
    flex: 0 1 64px;
    width: 50%;

    background-color: #c0c0c0e2;
    
    border-radius: 10px;
    outline: 2px dotted black;
    outline-offset: -2px;
    outline-width: 5px;
    transition: transform 0.2s ease;
    cursor: pointer;
}
#sellist img:not(.selected):hover {
    opacity: 0.8;
    transform: rotate(5deg);
}
.selected {
    opacity: 1 !important;
    outline-style: none !important;
    background-color: #ececec !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    transform: scale(1.2) translateY(-2px);
}

/* Game Over | Win*/
#endtitle {
    text-decoration: underline;
}
#end {
    top: 0;
    left: 0;
    position: fixed;
    width: 100vw;
    height: 100vh;

    z-index: 3;
    text-align: center;
    line-height: 50vh;

    background-color: #ffffff9c;
    opacity: 0;

    display: none;
    flex-direction: column;
    justify-items: center;
    align-items: center;
}

#reset {
    line-height: 1;
    box-shadow: 6px 7px 8px 1px #3d3d3d3d;
    max-width: 100px;
    aspect-ratio: 2 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;

    width: 90vw;
    background-color: #fbfbfbb5;
    transition: transform 0.2s ease;
}
#reset:hover {
    transform: rotate(-3deg) translateY(7px);
    box-shadow: 0px 0px 0px 0px #3d3d3d3d;
    background-color: #615353;
    color: #e6f2ff;
    cursor: pointer;
}

footer {
    opacity: 0.3;
    text-align: center;
    margin: 20px;
}

p {
    display: none;
}

@media (max-width: 850px) {
    main {
      margin: 8px;
      flex-direction: column;
    }
    #plane {
        width: 100%;
    }
    #stats {
        flex: 0 1;
        width: 100%;
        max-width: 600px;
        
        align-items: center;
        flex-direction: row;
        gap: 20px;
    }
    #canvibr {
        opacity: 0.6;
    }
}