/* Tabuleiro do Jogo */
.game-container {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    padding: 2rem;
    align-items: center;
}

.game-board {
    flex: 1;
    min-width: 300px;
    min-height: 624px;
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.board-container {
    display: flex;
    justify-content: center;
    margin: 1.5rem 0;
}

.board {
    font-family: 'Fredoka One', cursive;
    display: grid;
    grid-template-columns: repeat(3, 80px);
    grid-gap: 8px;
}

.cell {
    width: 80px;
    height: 80px;
    background-color: #f8f9fa;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid #e9ecef;
}

/* Hover para células normais */
.cell:hover:not(.disabled):not(.win-cell):not(.lose-cell) {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    background-color: #e9ecef;
}

/* Hover para células de vitória */
.cell.win-cell:hover:not(.disabled) {
    transform: scale(1.05) translateY(-3px);
    box-shadow: 0 5px 15px rgba(33, 241, 89, 0.3);
    background-color: rgba(33, 241, 89, 0.4);
}

/* Hover para células de derrota */
.cell.lose-cell:hover:not(.disabled) {
    transform: scale(1.05) translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 0, 0, 0.3);
    background-color: rgba(255, 0, 0, 0.4);
}

.cell.x {
    color: #4285f4;
    border-color: #4285f4;
}

.cell.o {
    color: #ea4335;
    border-color: #ea4335;
}

.cell.win-cell {
    background-color: rgba(107, 238, 142, 0.351);
    animation: pulse 0.5s ease infinite;
}

.cell.lose-cell {
    background-color: rgba(255, 0, 0, 0.351);
    animation: pulse 0.5s ease infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.player-turn {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    margin: 1rem 0;
    font-weight: 500;
    text-align: center;
}

.human-turn {
    background-color: #e6f0fd;
    color: #4285f4;
    border-left: 4px solid #4285f4;
}

.ai-turn {
    background-color: #fde8e6;
    color: #ea4335;
    border-left: 4px solid #ea4335;
}

.game-status {
    float: right;
    font-size: 1rem;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-weight: normal;
}

.game-status.win {
    background-color: #e6f4ea;
    color: #34a853;
}

.game-status.lose {
    background-color: #fce8e6;
    color: #ea4335;
}

.game-status.draw {
    background-color: #fef7e0;
    color: #fbbc05;
}

.game-controls {
    display: flex;
    justify-content:center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.btn {
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-secondary {
    background-color: #f1f3f4;
    color: #3c4043;
}

.btn-danger {
    background-color: #ea4335;
    color: white;
}

.btn-info {
    background-color: #34a853;
    color: white;
}

.btn:hover:not(:disabled) {
    opacity: 0.9;
    transform: translateY(-2px);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Painel de Controle */
.control-panel {
    flex: 1;
    min-width: 300px;
    max-width: 400px;
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.panel-header {
    padding-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 1.5rem;
}

.stats {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.8rem;
    color: #5f6368;
}

.stat-value {
    font-size: 1.2rem;
    font-weight: 500;
    color: #202124;
}

.panel-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.learned-moves-container {
    max-height: 500px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.learned-move {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    background-color: #f8f9fa;
    border-left: 4px solid #e9ecef;
}

.learned-move.win {
    border-left-color: #34a853;
    background-color: #e6f4ea;
}

.learned-move.lose {
    border-left-color: #ea4335;
    background-color: #fce8e6;
}

.learned-move.draw {
    border-left-color: #fbbc05;
    background-color: #fef7e0;
}

.move-board {
    min-width: 100px;
}

.move-info {
    flex: 1;
}

.move-info p {
    margin: 0.2rem 0;
    font-size: 0.9rem;
}

.empty-state {
    text-align: center;
    padding: 2rem;
    color: #5f6368;
}

.empty-state i {
    font-size: 2rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.data-filters {
    overflow-y: auto;
    gap: 1rem;
    margin-bottom: 1rem;
}

.data-filters input, .data-filters select {
    padding: 0.5rem;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    flex: 1;
}

.game-tips {
    margin-top: 1.5rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.game-tips h4 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.game-tips ul {
    padding-left: 1.2rem;
}

.game-tips li {
    margin-bottom: 0.5rem;
}

/* Mini tabuleiro para visualização */
.mini-tabuleiro {
    font-family: 'Fredoka One', cursive;
    display: grid;
    grid-template-columns: repeat(3, 20px); /* 3 colunas de 20px cada */
    grid-template-rows: repeat(3, 20px);    /* 3 linhas de 20px cada */
    gap: 2px;                               /* espaçamento entre células */
}

.mini-celula {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 20px;
    height: 20px;
    border: 1px solid #ccc;
        border-radius: 3px;

    font-weight: bold;
    font-size: 14px;
    user-select: none;
}

.mini-celula.x {
    color: blue;
}
.cell.x, .cell.o {
  animation: popIn 0.3s ease forwards;
}

@keyframes popIn {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.mini-celula.o {
    color: red;
}