.history-container-wrapper {
    position: absolute;
    top: 5%;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

/* phone landscape  */
@media(max-width:1000px) and (max-height:500px){
    .history-container-wrapper {
        top: 1%;
    }
}

@media(max-width:800px) {
    .active-board-btns-container {
        width: 75%;
       max-width: 75%;
    gap:1%;

    }

    .nav-boards-info-container {
        gap: 0.5%;
    }
}

@media(max-width:1050px) and (min-width:500px) {
    .active-board-btns-container {
        width: 75%;
       max-width: 75%;
    gap:1%;

    }

    .nav-boards-info-container {
        gap: 2%;
    }
}

@media(min-width:1050px) {
    .active-board-btns-container {
        width: 50%;
        max-width: 50%;
        gap:3%;
    }

    .nav-boards-info-container {
        gap: 4%;
    }
}


.history-container {
    height: fit-content;
    background: #1a1a1a;
    z-index: 20000;
    display: flex;
    justify-content: space-around;
    gap: 2%;

}

.active-board-btns-container {
    display: flex;
    flex-direction: column;
    gap: 1%;
    justify-content: space-around;
}

.nav-boards-info-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.nav-boards-btn {
    background: transparent;
    font-size: 8px;
    font-weight: bold;
    color: white;
    border: 1px solid #ffd700;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.3);
    transform: translateZ(0);
    will-change: transform;
    white-space: nowrap;
    width: fit-content;
    height: 18px;
}

@media(max-width:800px) {
    .nav-boards-btn{
        font-size: 48%;
    }
}

@media(max-width:1050px) and (min-width:500px) {
    .nav-boards-btn{
        font-size: 70%;
    }
}

@media(min-width:1050px) {

    .nav-boards-btn{
        font-size: 80%;
    }
}

.nav-boards-btn:hover {
    background: rgba(255, 215, 0, 0.1);
    transform: translateY(-1px);
}

.nav-boards-btn.active {
    background: rgba(255, 215, 0, 0.3);
    border-color: #ffd700;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    transform: translateY(-1px);
}

/* Info circles styles */
.rounds-circle, .banker-count, .player-count, .tie-count {
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60%;
    font-weight: bold;
    color: white;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.5);
}

@media(max-width:600px) {
    .rounds-circle, .banker-count, .player-count, .tie-count {
        font-size: 60%;
        width: 10px;
        height: 10px;
    }
}

@media(max-width:1050px) and (min-width:600px) {
    .rounds-circle, .banker-count, .player-count, .tie-count {
        font-size: 70%;
        width: 15px;
        height: 15px;
    }
}

@media(min-width:1050px) {
    .rounds-circle, .banker-count, .player-count, .tie-count {
        font-size: 90%;
        width: 20px;
        height: 20px;
    }
}

.rounds-circle {
    background: #95a5a6;
    border: 2px solid #7f8c8d;
}

.banker-count {
    background: #e74c3c;
    border: 2px solid #c0392b;
}

.player-count {
    background: #4a90e2;
    border: 2px solid #2c5aa0;
}

.tie-count {
    background: #27ae60;
    border: 2px solid #229954;
}

.boards-container {
    display: flex;
    gap: 3%;
    justify-content: flex-start;
    align-items: self-end;
    width: 100%;
    overflow-x: scroll;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
}

/* Custom thin scrollbar */
.boards-container::-webkit-scrollbar {
    height: 1px;
    width: 1px;
}

.boards-container::-webkit-scrollbar-track {
    height: 1px;
    width: 50px; /* Make the track only 50px wide */
    margin: 0 auto; /* Center the short track */
}

.boards-container::-webkit-scrollbar-thumb {
    background: rgba(255, 215, 0, 0.1);
    border-radius: 0;
    height: 1px;
    min-height: 1px;
    width: 5px;
    min-width: 5px;
}

.boards-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 215, 0, 0.2);
}

/* For Firefox */
.boards-container {
    scrollbar-width:auto;
    scrollbar-color: rgba(255, 215, 0, 0.1) transparent;
}

.big-road-grid {
    display: grid;
    grid-template-rows: repeat(6, 1fr);  /* exactly 6 rows */
    grid-auto-flow: column;              /* fill column-first, not row-first */
    grid-auto-columns: 1fr;              /* each new column has equal width */
    gap: 1px;
    padding: 5px;
    background: #3f3d3d;
    border-radius: 8px;
    height: fit-content;
    scroll-snap-align: center;
    flex-shrink: 0;
  }

.boards-container.focused-mode{
    display: flex;
    align-items: center;
    justify-content: center;

}
  

.big-road-row {
    display: flex;
    gap: 1px;
}

.big-road-cell {
    width: 6px;
    height: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #3f3d3d;
    border-radius: 50%;
    border: 1.5px solid #827b7b;
    flex-shrink: 0;
    font-size: 6.5px;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-weight: 200;
    color: #52e592;
    position: relative;
}

.big-road-circle {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.5);
}

.big-road-cell.blue {
    background: transparent;
    border: 1.5px solid #0663f1;
}

.big-road-cell.red {
    background: transparent;
    border: 1.5px solid #be5b5b;
}

.big-road-cell.gray {
    background: #95a5a6;
    border: 1.5px solid #7f8c8d;
}

.big-road-cell.tie {
    position: relative;
}

.tie-mark {
    width: 1.5px;
    height: 90%;
    background: #52e592;;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
    border-radius: 2px;
    z-index: 2;
}

.big-road-cell.tie::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 80%;
    height: 2px;
    background: white;
    transform: translate(-50%, -50%) rotate(45deg);
    z-index: 1;
}

.big-road-cell.tie::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 80%;
    height: 2px;
    background: white;
    transform: translate(-50%, -50%) rotate(-45deg);
    z-index: 1;
}


@media(max-width:500px) {
    .big-road-cell {
        width: 4.5px;
        height: 4.5px;
    border: 1.5px solid #827b7b;
    font-size: 4.5px;
    }

    .big-road-cell{
        border-width: 1.5px;
    }

    .tie-mark{
        width: 1px;
    }

}

/* Bead Road Styles */
.bead-road-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    grid-template-rows: repeat(6, 1fr);
    gap: 1px;
    padding: 2px;
    background: #2a2a2a;
    border-radius: 0.5%;
    height: fit-content;
}



.bead-road-cell {
    width: 10px;
    height: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #333;
    border-radius: 50%;
    border: 1px solid #444;
}

.bead-road-circle {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    font-weight: bold;
    color: white;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.5);
}

.bead-road-circle.blue {
    background: #4a90e2;
    border: 1px solid #2c5aa0;
}

.bead-road-circle.red {
    background: #e74c3c;
    border: 1px solid #c0392b;
}

.bead-road-circle.green {
    background: #27ae60;
    border: 1px solid #229954;
}

.bead-road-circle.gray {
    background: #95a5a6;
    border: 1px solid #7f8c8d;
}

/* Cockroach Pig specific styles */
.cockroach-pig-cell {
    width: 9px;
    height: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.diagonal-line {
    width: 100%;
    height: 100%;
    position: relative;
}

.diagonal-line.red::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(317deg, transparent 40%, #be5b5b 40%, #be5b5b 60%, transparent 60%);
}

.diagonal-line.blue::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(317deg, transparent 40%, #0663f1 40%, #0663f1 60%, transparent 60%);
}

.empty-dot {
    width: 2px;
    height: 2px;
    background: #95a5a6;
    border-radius: 50%;
}

.cockroach-pig-cell.blue {
    background: transparent;
    border: none;
}

.cockroach-pig-cell.red {
    background: transparent;
    border: none;
}

.cockroach-pig-cell.gray {
    background: transparent;
    border: none;
}

@media(max-width:500px) {

    .bead-road-cell {
        width: 7px;
        height: 7px;
    }

    .cockroach-pig-cell {
        width: 7.5px;
        height: 7.5px;
    }

    .empty-dot {
        width: 1.5px;
        height: 1.5px;
    }
    
    .bead-road-circle {
        font-size: 6px;
        border-width: 0.7px;
    }
}