/* General styling */
main {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 10px;
}

/* Top panel */
.status-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 30rem;
    background-color: var(--container-bg);
    border: 1px solid var(--border-color);
    padding: 15px;
    border-radius: 8px;
    font-size: 1.1rem;
}
#turn-indicator {
    font-weight: bold;
}

/* Chess board */
.board-container {
    background: #313131;
    padding: 8px;
    border-radius: 8px;
}
.board {
    display: grid;
    grid-template-columns: repeat(8, 3.75rem);
    grid-template-rows: repeat(8, 3.75rem);
    border: 2px solid #333;
}
.square {
    width: 3.75rem;
    height: 3.75rem;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2.5rem;
    cursor: pointer;
    -webkit-user-select: none; /* Support for Safari */
    user-select: none;
    color: #000000 !important;
}
.light {
    background-color: #e2ddd4;
}
.dark {
    background-color: #bb8a62;
}
.square.selected {
    background-color: #afb864 !important;
}

/* Legal move indicators */
.legal-dot {
    width: 14px;
    height: 14px;
    background-color: #49b54c;
    border-radius: 50%;
    pointer-events: none;
}
.square.legal-capture {
    box-shadow: inset 0 0 0 4px #49b54c;
}

/* PGN move log box */
.pgn-container {
    width: 100%;
    max-width: 30rem;
    background-color: var(--container-bg);
    border: 1px solid var(--border-color);
    padding: 15px;
    border-radius: 8px;
    max-height: 7.5rem;
    overflow-y: auto;
    font-family: monospace;
    font-size: 0.95rem;
}

/* Promotion Modal */
#promo-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 999;
}
.promo-content {
    background: var(--container-bg);
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}
.promo-options {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 15px;
}
.promo-btn {
    font-size: 2rem;
    padding: 10px 20px;
    background: #e6e0e0;
    border: 1px solid #d8d3d3;
    border-radius: 4px;
    cursor: pointer;
    color: black;
}
