

@import url('https://fonts.googleapis.com/css2?family=Merriweather:ital,opsz,wght@0,18..144,300..900;1,18..144,300..900&display=swap');




@font-face {
    font-family: 'Zaadrez';
    src: url('Resources/fonts/alagard.ttf') format('opentype');
}

body {
font-family: "Zaadrez", serif;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  margin: 0;
  overflow: hidden;
  background: linear-gradient(-45deg, #081229, #0e5b4c, #6b0e5b, #123456);
  background-size: 400% 400%;
  animation: gradientMove 20s ease infinite;
  color: #e0e0e0;
  padding: 20px;
  box-sizing: border-box;
}

.alternate-style-black {
    background: black;
    background-size: 100% 100%;
    animation: none;
}

.alternate-style-white {
    background: white;
    background-size: 100% 100%;
    animation: none;
}

.alternate-style-shrek {
    background-image: url(imgs/shrek-win7.jpg);
    background-size: 100% 100%;
    animation: none;
}

.alternate-style-vivi {
  background-image: url(imgs/dragonitewp.png);
  background-size: 100% 100%;
}

.alternate-style-putin {
  background-image: url(imgs/putin\ com\ os\ dogs.jpg);
  background-size: 100% 100%;
  animation: none;
}

.alternate-style-guy {
  background-image: url(imgs/familyguywp.jpg);
  background-size: 100% 100%;
  animation: none;
}

.alternate-style-ronaldo {
  background-image: url(imgs/Weezer.gif);
  background-size: 100% 100%;
  animation: none;
}

.alternate-style-kamen {
  background-image: url(imgs/Rider.jpg);
  background-size: 100% 100%;
  animation: none;
}


@keyframes gradientMove {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.04) 1px, transparent 0);
  background-size: 60px 60px;
  pointer-events: none;
}

#menu-container, #bot-selection-container, #loading_container {
    text-align: center;
    background-color: #1f2a40;
    padding: 50px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
    animation: fadeIn 1s ease-out;
    z-index: 10;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

#menu-container h1, #bot-selection-container h1, #loading_container h1 {
    color: #e0bb40;
    margin-bottom: 20px;
    font-size: 2.8em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

#menu-container p {
    font-size: 1.4em;
    margin-bottom: 30px;
    color: #a0a0a0;
}

#menu-container button, #bot-selection-container #back-to-menu, #loading_container #back-to-menu {
    font-size: 1.5em;
    padding: 15px 30px;
    margin: 15px;
    cursor: pointer;
    border: none;
    border-radius: 8px;
    background-color: #007bff;
    color: white;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}
#menu-container button:hover, #bot-selection-container #back-to-menu:hover, #bot-selection-container #back-to-menu:hover {
    background-color: #0056b3;
    transform: translateY(-3px);
}

#menu-container #onlineButton {
    background-color: #0a9c4c;
}
#menu-container #onlineButton:hover {
    background-color: #0a7038;
    transform: translateY(-3px);
}

#loading_container #back-to-menu { background-color: #6c757d; }
#loading_container #back-to-menu:hover { background-color: #5a6268; }
#bot-selection-container #back-to-menu { background-color: #6c757d; }
#bot-selection-container #back-to-menu:hover { background-color: #5a6268; }


#menu-container #insert_code {
    font-size: 1.3em; padding: 12px 20px; margin-top: 20px; display: block;
    width: 100%; box-sizing: border-box; border: 2px solid #007bff;
    border-radius: 8px; background-color: #1a1a2e; color: #e0e0e0;
    font-weight: bold; transition: border-color 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
}
#menu-container #insert_code::placeholder{ color: #a0a0a0; }
#menu-container #insert_code:focus{ outline: none; border-color: #0056b3; box-shadow: 0 0 8px rgba(0, 123, 255, 0.4); }

.hidden { display: none !important; }

#game-container {
    gap: 40px;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    animation: fadeIn 1s ease-out;
}

#main-game-area {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

#area-jogo {
    flex-direction: row;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

#area-tabuleiro {
    display: flex;
    flex-direction: column;
    align-items: center; 
    gap: 15px;  
}

#chessboard {
    display: grid;
    grid-template-columns: repeat(8, 75px);
    grid-template-rows: repeat(8, 75px);
    width: 600px;
    height: 600px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
    border-radius: 5px;
    overflow: hidden;
    margin: 10px;
}

#SandBoxBlack {
    display: grid;
    grid-template-columns: repeat(6, 75px);
    width: 450px;
    height: 75px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
    border-radius: 5px;
    overflow: hidden;
}

#SandBoxWhite {
    display: grid;
    grid-template-columns: repeat(6, 75px);
    width: 450px;
    height: 75px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
    border-radius: 5px;
    overflow: hidden;
}

#SandRemoveBox {
    display: grid;
    grid-template-rows: repeat(2, 75px);
    width: 75px;
    height: 150px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
    border-radius: 5px;
    overflow: hidden;
    font-size: 200%;
    color: white;
}


.square {
    width: 75px; height: 75px;
    display: flex; justify-content: center; align-items: center;
    user-select: none; transition: background-color 0.2s ease;
}
.white-square { background-color: #b0b0b0; }
.black-square { background-color: #606060; }
.selected { background-color: #007bff !important; box-shadow: inset 0 0 0 3px #0056b3; }
.possible-move { background-image: radial-gradient(circle, rgb(0, 123, 255) 25%, transparent 26%) !important; cursor: pointer; }
.possible-capture { background-color: rgb(220, 53, 70) !important; box-shadow: inset 0 0 0 3px rgb(134, 0, 13); cursor: pointer; }
.sanded { background-color: #e0bb40 !important; box-shadow: inset 0 0 0 3px #d1a102; }
.nullifier { background-color: rgb(220, 53, 70) !important; box-shadow: inset 0 0 0 3px rgb(134, 0, 13); cursor: pointer; }

.piece-container { width: 100%; height: 100%; display: flex; justify-content: center; align-items: center; }
.piece-text { font-size: 58px; cursor: pointer; text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5); color: #f0f0f0; }
.piece { width: 80%; height: 80%; object-fit: contain; pointer-events: none; }

#game-info {
    height: 565px; width: 350px; padding: 25px;
    border-radius: 12px;
    color: #e0e0e0;
}

.game-info-style {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
    background-color: #1f2a40;
}


.game-info-vazio {
    background-color: none;
    box-shadow: none;
}

#game-info h2, #game-info h3 { border-bottom: 2px solid #3c4b6b; padding-bottom: 8px; margin-top: 5px; color: #e0bb40; }
#game-info p { font-size: 1.1em; margin-bottom: 10px; }
#turn-display { font-size: 1.6em; font-weight: bold; color: #007bff; margin-bottom: 15px; }
#status-display { font-style: italic; color: #a0a0a0; margin-bottom: 20px; }
#score-display { display: flex; justify-content: space-around; background-color: #1a1a2e; padding: 15px; border-radius: 8px; margin-top: 15px; }
#score-display p { font-size: 1.3em; font-weight: bold; margin: 0; }
#white-score { color: #b0b0b0; }
#black-score { color: #4a484a; }
#move-history { height: 120px; overflow-y: auto; background-color: #1a1a2e; padding: 15px; border-radius: 8px; margin-top: 20px; border: 1px solid #3c4b6b; }
#move-history ul { list-style: none; padding: 0; margin: 0; }
#move-history li { padding: 8px 0; border-bottom: 1px dashed #3c4b6b; font-size: 1em; color: #e0e0e0; }
#move-history li:last-child { border-bottom: none; }
#move-history::-webkit-scrollbar { width: 8px; }
#move-history::-webkit-scrollbar-track { background: #1f2a40; border-radius: 10px; }
#move-history::-webkit-scrollbar-thumb { background: #4a0e3a; border-radius: 10px; }
#move-history::-webkit-scrollbar-thumb:hover { background: #6a1a5a; }
#buttons-infogame-container1 { display: flex; gap: 15px; margin-top: 20px; height: 35px; }
#buttons-undo-redo { flex: 1; display: flex; gap: 10px;}
#buttons-undo-redo button { align-items: center;flex: 1; font-size: 1.5em; color: white; background-color: #1f2a40; border: none; border-radius: 5px; border: none;}
#buttons-undo-redo button:hover { color: #007bff; cursor: pointer; }
#game-container #back-to-menu { font-size: 1em; cursor: pointer; border: none; border-radius: 5px; background-color: #dc3545; color: white; transition: background-color 0.3s; display: block; width: 60%; box-sizing: border-box; }
#game-container #back-to-menu:hover { background-color: #c82333; }

#buttons-infogame-container0 {display: flex;}

.piece-style-dropdown { position: relative; display: inline-block; margin-bottom: 15px; }
#styleButton, #styleButtonboard, #styleImgButton {height: 46px; width: 100px; margin: 5px; font-size: 1em; padding: 10px 15px; cursor: pointer; border: none; border-radius: 6px; background-color: #007bff; color: white; font-weight: bold; transition: background-color 0.3s ease; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); }
#styleButton:hover, #styleButtonboard:hover { background-color: #0056b3; }
.dropdown-content { display: none; position: absolute; background-color: #1f2a40; min-width: 160px; border-radius: 6px; box-shadow: 0 8px 20px rgba(0,0,0,0.5); z-index: 1000; margin-top: 5px; padding: 5px 0; }
.dropdown-content div { padding: 10px 15px; cursor: pointer; color: #e0e0e0; transition: background-color 0.2s; }
.dropdown-content div:hover { background-color: #007bff; color: white; }

#bot-list { display: flex; justify-content: center; gap: 30px; margin: 40px 0; }
.bot-card { background-color: #3c4b6b; border: 3px solid transparent; border-radius: 10px; padding: 20px; width: 180px; cursor: pointer; transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s; }
.bot-card:hover { transform: translateY(-5px); border-color: #e0bb40; box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5); }
.bot-card img { width: 120px; height: 120px; border-radius: 50%; border: 4px solid #1f2a40; margin-bottom: 15px; box-shadow: 0 0 15px rgba(224, 187, 64, 0.5); }
.bot-card h3 { margin: 10px 0 5px 0; font-size: 1.4em; color: #fff; }
.bot-card p { font-size: 1em; color: #a0a0a0; margin: 0; }

#bot-personality-display {
    display: flex; align-items: center; justify-content: center;
    gap: 20px; width: 100%; margin-bottom: 25px; min-height: 100px;
}
#bot-image {
    width: 100px; height: 100px; border-radius: 50%;
    border: 4px solid #e0bb40; box-shadow: 0 0 15px rgba(224, 187, 64, 0.5);
    z-index: 2;
}
#bot-dialogue-box {
    position: relative; background-color: #1f2a40;
    padding: 15px 20px; border-radius: 12px; max-width: 400px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5); border: 1px solid #3c4b6b;
}
#bot-dialogue-box::after {
    content: ''; position: absolute; top: 50%; left: -20px;
    transform: translateY(-50%); border-width: 10px; border-style: solid;
    border-color: transparent #1f2a40 transparent transparent;
}
#bot-name { font-weight: bold; font-size: 1.2em; margin: 0 0 5px 0; color: #e0bb40; }
#bot-dialogue { font-style: italic; font-size: 1em; margin: 0; color: #ccc; }

#audio-visualizer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
}

#game-frame {
    position: relative;
    left: 60px;
    width: 1104px;
    height: 624px;
    margin: 0 auto;
    padding: 15px;
    border: 10px solid rgba(224, 187, 64, 0.8);
    border-radius: 20px;
    background: rgba(15, 15, 30, 0.85);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.8), inset 0 0 20px rgba(224,187,64,0.3);
    overflow: hidden;
}

#gameContainer, #gameContainer canvas {
    width: 100% !important;
    height: 100% !important;
    position: relative !important;
    display: block;
    margin: 0 auto;
}

#link-container {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

#extra-link {
    font-family: "Zaadrez", serif;
    font-size: 1.5em;
    padding: 15px 40px;
    cursor: pointer;
    border: none;
    border-radius: 10px;
    background: linear-gradient(45deg, #007bff, #00c3ff);
    color: white;
    font-weight: bold;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.5), 0 0 12px rgba(0, 195, 255, 0.7);
    transition: transform 0.2s ease, box-shadow 0.3s ease;
}

#extra-link:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.7), 0 0 20px rgba(0, 195, 255, 1);
}

/* Minha tentativa de girar o tabuleiro */
#chessboard {
  transition: transform 1s cubic-bezier(0.45, 0, 0.55, 1);
}

#chessboard.rotated {
  transform: rotate(180deg);
}

#chessboard.rotated .piece-container {
  transform: rotate(180deg);
}

/* tentativa de tela de vitória, acho que ficou legal */

#victory-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.25);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000; /* ESTORANDO O Z-INDEX PRA A CAMADA FICAR LÁ EM CIMA */
    backdrop-filter: blur(5px);
}

#victory-popup {
    background-color: #1f2a40;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
    text-align: center;
    width: 90%;
    max-width: 500px;
    border: 2px solid #e0bb40;
    animation: popup-appear 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popup-appear {
    from {
        opacity: 0;
        transform: scale(0.7);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}


#victory-title {
    font-family: 'Zaadrez', serif;
    color: #e0bb40;
    font-size: 3.5em;
    margin: 0 0 15px 0;
    text-shadow: 3px 3px 5px rgba(0, 0, 0, 0.5);
}

#victory-message {
    font-size: 1.6em;
    color: #e0e0e0;
    margin-bottom: 30px;
}

.popup-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.popup-button {
    font-family: "Zaadrez", serif;
    font-size: 1.4em;
    padding: 12px 25px;
    cursor: pointer;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.popup-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.6);
}

#play-again-button {
    background-color: #007bff;
    color: white;
}

#play-again-button:hover {
    background-color: #0056b3;
}

.popup-button.secondary {
    background-color: #6c757d;
    color: white;
}

.popup-button.secondary:hover {
    background-color: #5a6268;
}