@font-face {
  font-family: 'typed';
  src: url('fonts/typed.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

html {
    font-size: 16px; 
}

.helpUs{
	color:#FFFDD0;
	font-size:1.5rem;
}

footer {
	width: 100%;
    background-color: #FFFDD0;
    text-align: center;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.3);

    font-size: 1.5rem;
    margin-top: auto;

    display: flex;
    flex-direction: column;
    justify-content: center; 
    align-items: center;    

    padding: 10px 0;
    gap: 5px;
}

.txtTerms {
    font-size: 1rem;
    color: #F59E0B;
    cursor: pointer; 
    transition: color 0.3s ease;
	text-decoration: none;
}

.txtTerms:hover {
    color: #c49a6c; 
}


	

.thinking {
  display: flex;
  flex-direction: column;
  align-items: center; 
}
.thinkIcon {
  width: clamp(40px, 6vw, 70px);
}

footer .txtFot {
    margin: 0; 
    color: #F59E0B;
    white-space: nowrap; 
    text-overflow: ellipsis; 
    overflow: hidden;
}


* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}


body {
   display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #da8c08;
    font-family: 'typed';
    margin: 0;
    padding: 0; 
    box-sizing: border-box;  
}


body > div {
    display: flex;
    flex-direction: column; 
    align-items: center;
    justify-content: center;
    width: fit-content;
    margin: 20px auto 0;
    gap: 20px;
	flex:1;
}


.chessboard {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    grid-template-rows: repeat(8, 1fr);
    width: min(90vw, 90vh);
    aspect-ratio: 1 / 1;
}


.square {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: clamp(1rem, 5vmin, 3rem);  /* טקסט גמיש שיתאים לגודל הריבוע */
    line-height: 1.2;  /* ריווח שורה קטן יותר */
    text-align: center;  /* למרכז את הטקסט */
    margin: 0;
    padding: 0;  /* אין רווחים פנימיים */
}


.colorA {
    background-image: url("imgs/aai2.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.colorB {
    background-image: url("imgs/aai1.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}


.txtP {
    font-size: 3.5vmin;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    width: 100%;
    height: 100%;
}


.pieces {
    background-size: contain;
    background-repeat: no-repeat;
    display: inline-block;
    width: 1em;
    height: 1em;
    font-size: 9vmin;
    line-height: 1;
}


.wpiece {
    color: white;
    cursor: pointer;
    text-shadow:
        -1px -1px 0 black,
         1px -1px 0 black,
        -1px  1px 0 black,
         1px  1px 0 black,
        -2px -2px 2px rgba(220,220,220,0.6),
         3px  3px 4px rgba(0,0,0,0.7);
}


.bpiece {
    text-shadow:
        -1px -1px 1px rgba(255,255,255,0.7),
         2px  2px 3px rgba(0,0,0,0.6);
}


.wrapnotes {
	
    width: 100%;
	position: relative;
    height: calc(90vh / 8);
    font-size: calc((90vh / 8) * 0.4);
	min-height: 15rem;
    line-height: 1;
    text-align: center;
    color: #F59E0B;
    background-color: #FFFDD0;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 10px;
	font-size: clamp(2rem, 4vw, 2rem);
	
}




.sA { color: #FFFDD0; }
.sB { color: #F59E0B; }


.wknightS { background-image: url(imgs/wknightS.png); }
.wpawnS   { background-image: url(imgs/wpawnS.png); }
.wkingS   { background-image: url(imgs/wkingS.png); }
.wbishopS { background-image: url(imgs/wbishopS.png); }
.wrookB   { background-image: url(imgs/wrookB.png); }
.wqueenS  { background-image: url(imgs/wqueenS.png); }

.bknightS { background-image: url(imgs/bknightS.png); }
.bpawnS   { background-image: url(imgs/bpawnB.png); }
.bkingS   { background-image: url(imgs/bkingS.png); }
.bbishopS { background-image: url(imgs/bbishopS.png); }
.brookB   { background-image: url(imgs/brookS.png); }
.bqueenS  { background-image: url(imgs/bqueenB.png); }

.explosion  { background-image: url(imgs/expofinal.png); }


header {
	margin: 0;
    width: 100%;
	background-color:#FFFDD0;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

header h1 {
    font-size: 2rem;
    line-height: 1.2;
    color: #F59E0B;
    margin: 0;
}


@media (min-width: 1024px) {
    body > div {
        flex-direction: row; 
        align-items: center;
    }

	.txtP {
        font-size: 3vmin; 
    }

    #notes {
        order: -1; 
        height: min(90vw, 90vh);
        width: 10rem;
    }
}
@media (max-width: 1023px) {
    body {
        margin: 0; 
        padding: 0; 
    }
	
    .chessboard {
        width: 98vw;
        height: 100vw; 
        max-width: 100vw; 
        aspect-ratio: 1 / 1; 
    }

    #notes {
        width: 100vw; 
       
		
    }
	
	.resignbtn {
	
		height: 2.5rem;     
	}


	footer {
		font-size: 1rem;
	}

   .resignbtn img {

		object-fit: contain; 
	    display: block;     
		max-height: 3.5rem;
  }
	
  .txtP {
	transform: scaleY(1.5);
  }
	
}



.overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5); 
  z-index: 10;

}


.menu {
  display: none;
  position: fixed;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  
  width: 420px;
  padding: 30px;

  //background: linear-gradient(145deg, #d6b48c, #b8936a);
  background:#da8c08;
  border: 3px solid #FFFDD0;
  border-radius: 15px;
  font-size:1.2rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);

  text-align: center;
  z-index: 11;
}

#menu h2 {
  margin-bottom: 20px;
  font-size: 24px;
  color: #FFFDD0;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

#menu ul {
  display: flex;
  justify-content: center;
  gap: 25px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.selectColor img {
  width: 80px;
  height: auto;
  display: block;

  filter: drop-shadow(0 5px 8px rgba(0,0,0,0.5));
  transition: transform 0.3s ease, filter 0.3s ease;
}

.selectColor {
  border: none;
  background: none;
  cursor: pointer;
  padding: 10px;

  border-radius: 12px;
  transition: all 0.3s ease;
}



.overlay.active {
  display: block;
}

.menu.active {
  display: block;
}





.btncontainer {
  position: absolute;
  bottom: 0;
  right: 0;
}


.resignbtn {
  all: unset;        
  cursor: pointer;
  display: flex;
  max-width: 100%;
  height: auto;
}


.resignbtn img {
  display: block;
  max-width: 100%;
  height: auto;
}